summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-02-27 14:14:12 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-01 11:12:16 +0000
commitb7fdc5b4d9d9e273e1006f184e8688dbc329b621 (patch)
treeed99794cee5a1eaea839fc3fe93f58f9ff4750cd /meta/recipes-graphics
parent671beb4de74de732ef707c15748c7d24d4651ad7 (diff)
downloadpoky-b7fdc5b4d9d9e273e1006f184e8688dbc329b621.tar.gz
igt-gpu-tools: Fix warnings with gcc 11
(From OE-Core rev: 5537ad961e5d0663c2d293abe8312bd2b614d9ff) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-lib-igt_edid-Allocate-raw-8-bytes-for-VSDB.patch42
-rw-r--r--meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb1
2 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-lib-igt_edid-Allocate-raw-8-bytes-for-VSDB.patch b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-lib-igt_edid-Allocate-raw-8-bytes-for-VSDB.patch
new file mode 100644
index 0000000000..38bd4550a3
--- /dev/null
+++ b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-lib-igt_edid-Allocate-raw-8-bytes-for-VSDB.patch
@@ -0,0 +1,42 @@
1From 606349860d27492c328752dca5a3784c0e9a6d24 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 27 Feb 2021 11:05:45 -0800
4Subject: [PATCH i-g-t] lib/igt_edid: Allocate raw 8-bytes for VSDB
5
6hdmi_vsdb is an element of cea_vsdb which makes the size of cea_vsdb to
7be 8 ( 3bytes ieee_oui ) + ( 5bytes hdmi_vsdb struct), its true that we
8only use 7 bytes technically we can only allocate 7byte array but since
9we are writing to elements of hdmi_vsdb struct which is sitting at offet
104-8 in cea_vsdb, compiler thinks we have an element which is out of
11array bounds since out allocated size is 7bytes
12
13This errors out
14../git/lib/igt_edid.c:365:13: error: array subscript 'struct hdmi_vsdb[0]' is partly outside array bounds of 'char[7]' [-Werror=array-bounds]
15 365 | hdmi->src_phy_addr[0] = 0x10;
16 | ^~
17
18allocating one extra byte matches with size of cea_vsdb and compiler is
19happy
20
21Upstream-Status: Submitted [https://lists.freedesktop.org/archives/igt-dev/2021-February/029446.html]
22Signed-off-by: Khem Raj <raj.khem@gmail.com>
23---
24 lib/igt_edid.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/lib/igt_edid.c b/lib/igt_edid.c
28index 1c85486d..ce09cc47 100644
29--- a/lib/igt_edid.c
30+++ b/lib/igt_edid.c
31@@ -351,7 +351,7 @@ void cea_sad_init_pcm(struct cea_sad *sad, int channels,
32 const struct cea_vsdb *cea_vsdb_get_hdmi_default(size_t *size)
33 {
34 /* We'll generate a VSDB with 2 extension fields. */
35- static char raw[CEA_VSDB_HDMI_MIN_SIZE + 2] = {0};
36+ static char raw[CEA_VSDB_HDMI_MIN_SIZE + 3] = {0};
37 struct cea_vsdb *vsdb;
38 struct hdmi_vsdb *hdmi;
39
40--
412.30.1
42
diff --git a/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb
index f25cbc0603..098594cf2c 100644
--- a/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb
+++ b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb
@@ -11,6 +11,7 @@ SRCREV = "d16ad07e7f2a028e14d61f570931c87fa5ce404c"
11PV = "1.25+git${SRCPV}" 11PV = "1.25+git${SRCPV}"
12 12
13SRC_URI = "git://gitlab.freedesktop.org/drm/igt-gpu-tools.git;protocol=https \ 13SRC_URI = "git://gitlab.freedesktop.org/drm/igt-gpu-tools.git;protocol=https \
14 file://0001-lib-igt_edid-Allocate-raw-8-bytes-for-VSDB.patch \
14 file://reproducibility.patch" 15 file://reproducibility.patch"
15 16
16S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"