aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2019-06-01 09:47:23 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2019-06-01 14:52:55 +0800
commit40d6871a07408a13f8c400449af79f5f1a804fec (patch)
treec5a319245ec7a7ebb880cee0073843a1ef136f6c
parent35555fb5197cb8f0e0c4062b82156b38e832cb01 (diff)
downloadmeta-intel-40d6871a07408a13f8c400449af79f5f1a804fec.tar.gz
meta-intel-40d6871a07408a13f8c400449af79f5f1a804fec.tar.bz2
meta-intel-40d6871a07408a13f8c400449af79f5f1a804fec.zip
igt-gpu-tools: fix build error with gcc9
Backport from master to fix build error when building with gcc 9: | ../../igt-gpu-tools-1.23/lib/igt_fb.c: In function 'create_bo_for_fb': | ../../igt-gpu-tools-1.23/lib/igt_fb.c:413:16: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith] | 413 | memset(ptr + offsets[0], full_range ? 0x00 : 0x10, | | ^ | ../../igt-gpu-tools-1.23/lib/igt_fb.c:415:16: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith] | 415 | memset(ptr + offsets[1], 0x80, | | ^ | ../../igt-gpu-tools-1.23/lib/igt_fb.c: In function 'convert_rgb24_to_nv12': | ../../igt-gpu-tools-1.23/lib/igt_fb.c:1382:12: error: array subscript 2 is outside array bounds of 'struct igt_vec4[2]' [-Werror=array-bounds] | 1382 | rgb->d[0] = rgb24[2]; | | ~~~~~~~~~~^~~~~~~~~~ | ../../igt-gpu-tools-1.23/lib/igt_fb.c:1549:20: note: while referencing 'rgb' | 1549 | struct igt_vec4 rgb[2]; | | ^~~ | ../../igt-gpu-tools-1.23/lib/igt_fb.c:1383:12: error: array subscript 2 is outside array bounds of 'struct igt_vec4[2]' [-Werror=array-bounds] | 1383 | rgb->d[1] = rgb24[1]; | | ~~~~~~~~~~^~~~~~~~~~ | ../../igt-gpu-tools-1.23/lib/igt_fb.c:1549:20: note: while referencing 'rgb' | 1549 | struct igt_vec4 rgb[2]; | | ^~~ | ../../igt-gpu-tools-1.23/lib/igt_fb.c:1384:12: error: array subscript 2 is outside array bounds of 'struct igt_vec4[2]' [-Werror=array-bounds] Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--recipes-graphics/igt-gpu-tools/files/0001-lib-fb-Fix-rgb24-to-nv12-conversion.patch40
-rw-r--r--recipes-graphics/igt-gpu-tools/igt-gpu-tools_1.23.bb4
2 files changed, 43 insertions, 1 deletions
diff --git a/recipes-graphics/igt-gpu-tools/files/0001-lib-fb-Fix-rgb24-to-nv12-conversion.patch b/recipes-graphics/igt-gpu-tools/files/0001-lib-fb-Fix-rgb24-to-nv12-conversion.patch
new file mode 100644
index 00000000..46b2eef5
--- /dev/null
+++ b/recipes-graphics/igt-gpu-tools/files/0001-lib-fb-Fix-rgb24-to-nv12-conversion.patch
@@ -0,0 +1,40 @@
+From f01796214bbde31e37b0593e547ad9436fdd02ba Mon Sep 17 00:00:00 2001
+From: Petri Latvala <petri.latvala@intel.com>
+Date: Wed, 9 Jan 2019 14:28:29 +0200
+Subject: [PATCH] lib/fb: Fix rgb24 to nv12 conversion
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+A typo fix in 1x2 pixel block conversion code, revealed by GCC 9
+
+Fixes: 1c7ef3890045 ("lib: Use igt_matrix for ycbcr<->rgb conversion")
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109257
+Reported-by: Martin Liska <mliska@suse.cz>
+Signed-off-by: Petri Latvala <petri.latvala@intel.com>
+Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
+Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
+
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ lib/igt_fb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/igt_fb.c b/lib/igt_fb.c
+index 8244e517..5cd1829a 100644
+--- a/lib/igt_fb.c
++++ b/lib/igt_fb.c
+@@ -1779,7 +1779,7 @@ static void convert_rgb24_to_nv12(struct fb_convert *cvt)
+ struct igt_vec4 yuv[2];
+
+ read_rgb(&rgb[0], &rgb24[j * 8 + 0]);
+- read_rgb(&rgb[2], &rgb24[j * 8 + 0 + rgb24_stride]);
++ read_rgb(&rgb[1], &rgb24[j * 8 + 0 + rgb24_stride]);
+
+ yuv[0] = igt_matrix_transform(&m, &rgb[0]);
+ yuv[1] = igt_matrix_transform(&m, &rgb[1]);
+--
+2.20.1
+
diff --git a/recipes-graphics/igt-gpu-tools/igt-gpu-tools_1.23.bb b/recipes-graphics/igt-gpu-tools/igt-gpu-tools_1.23.bb
index 9fe2950a..33c04e77 100644
--- a/recipes-graphics/igt-gpu-tools/igt-gpu-tools_1.23.bb
+++ b/recipes-graphics/igt-gpu-tools/igt-gpu-tools_1.23.bb
@@ -9,7 +9,9 @@ LICENSE_append = " & ISC"
inherit autotools gtk-doc
-SRC_URI = "${XORG_MIRROR}/individual/app/${BP}.tar.xz"
+SRC_URI = "${XORG_MIRROR}/individual/app/${BP}.tar.xz \
+ file://0001-lib-fb-Fix-rgb24-to-nv12-conversion.patch \
+ "
DEPENDS += "libdrm libpciaccess cairo udev glib-2.0 libxv libx11 libxext libxrandr procps libunwind kmod openssl"
RDEPENDS_${PN} += "bash"