From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fanzine.igalia.com (fanzine.igalia.com [178.60.130.6]) by mx.groups.io with SMTP id smtpd.web10.189.1632422675956739286 for ; Thu, 23 Sep 2021 11:44:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@igalia.com header.s=20170329 header.b=A8ND+k2i; spf=pass (domain: igalia.com, ip: 178.60.130.6, mailfrom: psaavedra@igalia.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=MIME-Version:Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID; bh=gTSRxccXgWjbQLj74XwY8JaGi0tX2JkmqKQ7PdEsIGE=; b=A8ND+k2isnw/APj5pOZz7GnwIoBCHktW+qmZvO7ZXZTfGqoBcIpxCtPNhmr09JVcC++FQce++USkrWEQkiPwDjup9CpfCs+e0mpYerfA42ibT7YQdJP4sYEZz72N/BpSqwjtA2KtQBgDfUHkQIx+9LkIYdbuC7+sWwPcseCrFqZrp8q/qlph/PO+Ef7Gun1PunZno3PhHvTC7CGmgr1BX2IBqb1EktrvPLAV6WAoILJ0Z4Q0r1DVhyc7xE7cByb2Q3i5vQ90w5DtpM9jttxIy3DX4PduN5k6FgFJmwiCKuJjHrC1WGyaIicnVR3c1JnXOR7f2aizKZ1599nytko2tw==; Received: from 164.25.165.83.dynamic.reverse-mundo-r.com ([83.165.25.164] helo=[192.168.1.245]) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1mTThx-0001cj-1D; Thu, 23 Sep 2021 20:44:33 +0200 Message-ID: Subject: Re: [OE-core] [hardknott][PATCH v2 ] mesa: Add patches for red label issues on video for VC4 and Freedreno From: "Pablo Saavedra Rodi?o" To: Alexander Kanavin Cc: OE-core Date: Thu, 23 Sep 2021 20:44:23 +0200 In-Reply-To: References: <20210923151723.3435155-1-psaavedra@igalia.com> User-Agent: Evolution 3.40.0-1 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-LI0kA4Dlcbt98Z+93Exo" --=-LI0kA4Dlcbt98Z+93Exo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit On Thu, 2021-09-23 at 18:01 +0200, Alexander Kanavin wrote: > I would strongly suggest that you get everything merged upstream > first before adding the patches to oe-core. > I kindly accept your recommendation but could I make also a question?: Couldn't it be enough just setting the 0001-freedreno-YUV-formats-are- supported-as-external-only.patch with "Upstream-status: Submitted" [1]. [1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12991 > Even then, this should go to master first, as we do not want the > situation when honister has these fixes, but master does not. > I assume this point affects only to the 0001-freedreno-YUV-formats-are- supported-as-external-only.patch patch since the other commits are already in Mesa 20.2 (version available in Honister) and they are not required for Honister and next Am I right? > > Backport must be capitalized. > > Alex > > On Thu, 23 Sept 2021 at 17:17, Pablo Saavedra Rodi?o > wrote: > > freedreno,v3d: YUV formats are supported as external-only dmabuf > > modifiers. > > > > This patch fix red label issues on video for Raspberry 4-64 Mesa > > VC4 > > driver and for iMX53 Adreno A200 GPU using the Mesa Freedreno > > driver > > > > Issue was originally reported in meta-webkit [1] and later > > contributed > > in Mesa [2]  where it was already merged in master. > > > > * Commits for VC4 [3] had been nominated for stable 21.1 and > > already in > >   21.2 (available in honister). > > * Commit for Freedreno [4] also reported (not merged yet). > > > > [1] https://github.com/Igalia/meta-webkit/issues/185 > > [2] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10524 > > [3] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10534 > > [4] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12991 > > > > Signed-off-by: Pablo Saavedra > > --- > >  ...rmats-are-supported-as-external-only.patch | 34 > > +++++++++++++++++ > >  ...at-is_dmabuf_modifier_supported-are-.patch | 35 > > ++++++++++++++++++ > >  ...at-query_dmabuf_modifiers-are-extern.patch | 34 > > +++++++++++++++++ > >  ...OD_BROADCOM_SAND128-only-available-f.patch | 37 > > +++++++++++++++++++ > >  meta/recipes-graphics/mesa/mesa.inc           |  4 ++ > >  5 files changed, 144 insertions(+) > >  create mode 100644 meta/recipes-graphics/mesa/files/0001- > > freedreno-YUV-formats-are-supported-as-external-only.patch > >  create mode 100644 meta/recipes-graphics/mesa/files/0001-v3d-YUV- > > formats-at-is_dmabuf_modifier_supported-are-.patch > >  create mode 100644 meta/recipes-graphics/mesa/files/0002-v3d-YUV- > > formats-at-query_dmabuf_modifiers-are-extern.patch > >  create mode 100644 meta/recipes-graphics/mesa/files/0003-v3d- > > DRM_FORMAT_MOD_BROADCOM_SAND128-only-available-f.patch > > > > diff --git a/meta/recipes-graphics/mesa/files/0001-freedreno-YUV- > > formats-are-supported-as-external-only.patch b/meta/recipes- > > graphics/mesa/files/0001-freedreno-YUV-formats-are-supported-as- > > external-only.patch > > new file mode 100644 > > index 0000000000..9688ac1619 > > --- /dev/null > > +++ b/meta/recipes-graphics/mesa/files/0001-freedreno-YUV-formats- > > are-supported-as-external-only.patch > > @@ -0,0 +1,34 @@ > > +From e5b33a4b744a3114ff054ae577ac7802d9221490 Mon Sep 17 00:00:00 > > 2001 > > +From: Pablo Saavedra > > +Date: Thu, 23 Sep 2021 10:23:56 +0200 > > +Subject: [PATCH] freedreno: YUV formats are supported as external- > > only dmabuf > > + modifiers > > + > > +Based on > > https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10524 > > + > > +Co-authored-by: Alberto Garcia > > +Co-authored-by: Jose Maria Casanova Crespo > > +Signed-off-by: Pablo Saavedra > > + > > +Upstream-Status: Pending > > [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12991] > > +Signed-off-by: Pablo Saavedra > > +--- > > + src/gallium/drivers/freedreno/freedreno_screen.c | 2 +- > > + 1 file changed, 1 insertion(+), 1 deletion(-) > > + > > +diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c > > b/src/gallium/drivers/freedreno/freedreno_screen.c > > +index a9cd0e2..dc2b79d 100644 > > +--- a/src/gallium/drivers/freedreno/freedreno_screen.c > > ++++ b/src/gallium/drivers/freedreno/freedreno_screen.c > > +@@ -804,7 +804,7 @@ fd_screen_query_dmabuf_modifiers(struct > > pipe_screen *pscreen, > > +                       modifiers[num] = screen- > > >supported_modifiers[i]; > > + > > +               if (external_only) > > +-                      external_only[num] = 0; > > ++                      external_only[num] = > > util_format_is_yuv(format); > > + > > +               num++; > > +       } > > +-- > > +2.30.2 > > + > > diff --git a/meta/recipes-graphics/mesa/files/0001-v3d-YUV-formats- > > at-is_dmabuf_modifier_supported-are-.patch b/meta/recipes- > > graphics/mesa/files/0001-v3d-YUV-formats-at- > > is_dmabuf_modifier_supported-are-.patch > > new file mode 100644 > > index 0000000000..9e90a07c8e > > --- /dev/null > > +++ b/meta/recipes-graphics/mesa/files/0001-v3d-YUV-formats-at- > > is_dmabuf_modifier_supported-are-.patch > > @@ -0,0 +1,35 @@ > > +From 389bffa0981bba60f9d081063c150fb17e497c4a Mon Sep 17 00:00:00 > > 2001 > > +From: Jose Maria Casanova Crespo > > +Date: Thu, 29 Apr 2021 18:15:27 +0200 > > +Subject: [PATCH] v3d: YUV formats at is_dmabuf_modifier_supported > > are > > + external_only > > +MIME-Version: 1.0 > > +Content-Type: text/plain; charset=UTF-8 > > +Content-Transfer-Encoding: 8bit > > + > > +This fixes Issue https://github.com/Igalia/meta-webkit/issues/185 > > +"Issue Raspberry 4-64 + Mesa VC4 driver + Gstreamer = red Label on > > video" > > + > > +Fixes: 6ee10ab3de86 "gallium: Add > > pipe_screen::is_dmabuf_modifier_supported" > > +Reviewed-by: Alejandro Piñeiro > > +Part-of: > > > > + > > +Upstream-status: backport > > [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10524] > > +Signed-off-by: pablo saavedra > > +--- > > + src/gallium/drivers/v3d/v3d_screen.c | 2 +- > > + 1 file changed, 1 insertion(+), 1 deletion(-) > > + > > +diff --git a/src/gallium/drivers/v3d/v3d_screen.c > > b/src/gallium/drivers/v3d/v3d_screen.c > > +index 4f69c20..a5c94db 100644 > > +--- a/src/gallium/drivers/v3d/v3d_screen.c > > ++++ b/src/gallium/drivers/v3d/v3d_screen.c > > +@@ -670,7 +670,7 @@ v3d_screen_is_dmabuf_modifier_supported(struct > > pipe_screen *pscreen, > > +         for (i = 0; i < ARRAY_SIZE(v3d_available_modifiers); i++) > > { > > +                 if (v3d_available_modifiers[i] == modifier) { > > +                         if (external_only) > > +-                                *external_only = false; > > ++                                *external_only = > > util_format_is_yuv(format); > > + > > +                         return true; > > +                 } > > diff --git a/meta/recipes-graphics/mesa/files/0002-v3d-YUV-formats- > > at-query_dmabuf_modifiers-are-extern.patch b/meta/recipes- > > graphics/mesa/files/0002-v3d-YUV-formats-at-query_dmabuf_modifiers- > > are-extern.patch > > new file mode 100644 > > index 0000000000..d1658f9a87 > > --- /dev/null > > +++ b/meta/recipes-graphics/mesa/files/0002-v3d-YUV-formats-at- > > query_dmabuf_modifiers-are-extern.patch > > @@ -0,0 +1,34 @@ > > +From a5f74e140cce671dd9a04d3b3541cd3faf91916b Mon Sep 17 00:00:00 > > 2001 > > +From: Jose Maria Casanova Crespo > > +Date: Thu, 29 Apr 2021 18:37:25 +0200 > > +Subject: [PATCH] v3d: YUV formats at query_dmabuf_modifiers are > > external_only > > +MIME-Version: 1.0 > > +Content-Type: text/plain; charset=UTF-8 > > +Content-Transfer-Encoding: 8bit > > + > > +This fixes Issue https://github.com/Igalia/meta-webkit/issues/185 > > +"Issue Raspberry 4-64 + Mesa VC4 driver + Gstreamer = red Label on > > video" > > + > > +Fixes: 95c4f0f91098 "v3d: Enables DRM_FORMAT_MOD_BROADCOM_SAND128 > > support" > > +Reviewed-by: Alejandro Piñeiro > > +Part-of: > > > > + > > +Upstream-status: backport > > [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10524] > > +Signed-off-by: pablo saavedra > > +--- > > + src/gallium/drivers/v3d/v3d_screen.c | 2 +- > > + 1 file changed, 1 insertion(+), 1 deletion(-) > > + > > +diff --git a/src/gallium/drivers/v3d/v3d_screen.c > > b/src/gallium/drivers/v3d/v3d_screen.c > > +index a5c94db..edde17d 100644 > > +--- a/src/gallium/drivers/v3d/v3d_screen.c > > ++++ b/src/gallium/drivers/v3d/v3d_screen.c > > +@@ -655,7 +655,7 @@ v3d_screen_query_dmabuf_modifiers(struct > > pipe_screen *pscreen, > > +         for (i = 0; i < *count; i++) { > > +                 modifiers[i] = v3d_available_modifiers[i]; > > +                 if (external_only) > > +-                        external_only[i] = false; > > ++                        external_only[i] = > > util_format_is_yuv(format); > > +        } > > + } > > + > > diff --git a/meta/recipes-graphics/mesa/files/0003-v3d- > > DRM_FORMAT_MOD_BROADCOM_SAND128-only-available-f.patch > > b/meta/recipes-graphics/mesa/files/0003-v3d- > > DRM_FORMAT_MOD_BROADCOM_SAND128-only-available-f.patch > > new file mode 100644 > > index 0000000000..17a612ea7e > > --- /dev/null > > +++ b/meta/recipes-graphics/mesa/files/0003-v3d- > > DRM_FORMAT_MOD_BROADCOM_SAND128-only-available-f.patch > > @@ -0,0 +1,37 @@ > > +From cd2dce0257608fde2b9dd21429d1d7356e37abe1 Mon Sep 17 00:00:00 > > 2001 > > +From: Jose Maria Casanova Crespo > > +Date: Thu, 29 Apr 2021 18:47:53 +0200 > > +Subject: [PATCH] v3d: DRM_FORMAT_MOD_BROADCOM_SAND128 only > > available for NV12 > > + format. > > +MIME-Version: 1.0 > > +Content-Type: text/plain; charset=UTF-8 > > +Content-Transfer-Encoding: 8bit > > + > > +We were exposing as available DRM_FORMAT_MOD_BROADCOM_SAND128 for > > +any format. > > + > > +Fixes: 95c4f0f91098 "v3d: Enables DRM_FORMAT_MOD_BROADCOM_SAND128 > > support" > > +Reviewed-by: Alejandro Piñeiro > > +Part-of: > > > > + > > +Upstream-status: backport > > [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10524] > > +Signed-off-by: pablo saavedra > > +--- > > + src/gallium/drivers/v3d/v3d_screen.c | 4 ++++ > > + 1 file changed, 4 insertions(+) > > + > > +diff --git a/src/gallium/drivers/v3d/v3d_screen.c > > b/src/gallium/drivers/v3d/v3d_screen.c > > +index edde17d..684f912 100644 > > +--- a/src/gallium/drivers/v3d/v3d_screen.c > > ++++ b/src/gallium/drivers/v3d/v3d_screen.c > > +@@ -646,6 +646,10 @@ v3d_screen_query_dmabuf_modifiers(struct > > pipe_screen *pscreen, > > +         int i; > > +         int num_modifiers = ARRAY_SIZE(v3d_available_modifiers); > > + > > ++        /* Expose DRM_FORMAT_MOD_BROADCOM_SAND128 only for > > PIPE_FORMAT_NV12 */ > > ++        if (format != PIPE_FORMAT_NV12) > > ++                num_modifiers--; > > ++ > > +         if (!modifiers) { > > +                 *count = num_modifiers; > > +                 return; > > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes- > > graphics/mesa/mesa.inc > > index a85f94c75e..8d8871aa5d 100644 > > --- a/meta/recipes-graphics/mesa/mesa.inc > > +++ b/meta/recipes-graphics/mesa/mesa.inc > > @@ -19,6 +19,10 @@ SRC_URI = > > "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ > >             file://0002-meson.build-make-TLS-ELF-optional.patch \ > >             file://0001-meson-misdetects-64bit-atomics-on-mips- > > clang.patch \ > >             file://0001-futex.h-Define-__NR_futex-if-it-does-not- > > exist.patch \ > > +           file://0001-v3d-YUV-formats-at- > > is_dmabuf_modifier_supported-are-.patch \ > > +           file://0002-v3d-YUV-formats-at-query_dmabuf_modifiers- > > are-extern.patch \ > > +           file://0003-v3d-DRM_FORMAT_MOD_BROADCOM_SAND128-only- > > available-f.patch \ > > +           file://0001-freedreno-YUV-formats-are-supported-as- > > external-only.patch \ > >             " > > > >  SRC_URI[sha256sum] = > > "565c6f4bd2d5747b919454fc1d439963024fc78ca56fd05158c3b2cde2f6912b" --=-LI0kA4Dlcbt98Z+93Exo Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
On Thu, 2021-09-23 at 18:01 +0200, Alexander = Kanavin wrote:
I= would strongly suggest that you get everything merged upstream first befor= e adding the patches to oe-core.


I kindly accept your recommendation but cou= ld I make also a question?: Couldn't it be enough just setting the 0001-fre= edreno-YUV-formats-are-supported-as-external-only.patch with "Upstream-stat= us: Submitted" [1].

Even then, this sh= ould go to master first, as we do not want the situation when honister has = these fixes, but master does not.


I assume this point affects only to the 0001-= freedreno-YUV-formats-are-supported-as-external-only.patch patch since the = other commits are already in Mesa 20.2 (version available in Honister) and = they are not required for Honister and next Am I right?


Backport must be capi= talized.

Alex

On Thu, 23 Sept = 2021 at 17:17, Pablo Saavedra Rodi?o <psaavedra@igalia.com> wrote:
freedreno,v3d: YUV formats are supported as external-only dmabufmodifiers.

This patch fix red label issues on video for = Raspberry 4-64 Mesa VC4
driver and for iMX53 Adreno A200 GPU using the M= esa Freedreno driver

Issue was originally reported in met= a-webkit [1] and later contributed
in Mesa [2]  where it was alread= y merged in master.

* Commits for VC4 [3] had been nomina= ted for stable 21.1 and already in
  21.2 (available in honister).<= br>* Commit for Freedreno [4] also reported (not merged yet).

[1] https://github.com/Igalia/meta-webkit/iss= ues/185
[2] https://gitlab.fre= edesktop.org/mesa/mesa/-/merge_requests/10524
[3] https://gitlab.freedesktop.org/mesa/mesa/-/merge_reques= ts/10534
[4] https://gitlab.fr= eedesktop.org/mesa/mesa/-/merge_requests/12991

Signed= -off-by: Pablo Saavedra <psaavedra@igalia.com>
---
 ...rmats-are-suppo= rted-as-external-only.patch | 34 +++++++++++++++++
 ...at-is_dmabuf= _modifier_supported-are-.patch | 35 ++++++++++++++++++
 ...at-query= _dmabuf_modifiers-are-extern.patch | 34 +++++++++++++++++
 ...OD_BR= OADCOM_SAND128-only-available-f.patch | 37 +++++++++++++++++++
 met= a/recipes-graphics/mesa/mesa.inc           |&= nbsp; 4 ++
 5 files changed, 144 insertions(+)
 create mode= 100644 meta/recipes-graphics/mesa/files/0001-freedreno-YUV-formats-are-sup= ported-as-external-only.patch
 create mode 100644 meta/recipes-grap= hics/mesa/files/0001-v3d-YUV-formats-at-is_dmabuf_modifier_supported-are-.p= atch
 create mode 100644 meta/recipes-graphics/mesa/files/0002-v3d-= YUV-formats-at-query_dmabuf_modifiers-are-extern.patch
 create mode= 100644 meta/recipes-graphics/mesa/files/0003-v3d-DRM_FORMAT_MOD_BROADCOM_S= AND128-only-available-f.patch

diff --git a/meta/recipes-g= raphics/mesa/files/0001-freedreno-YUV-formats-are-supported-as-external-onl= y.patch b/meta/recipes-graphics/mesa/files/0001-freedreno-YUV-formats-are-s= upported-as-external-only.patch
new file mode 100644
index 0000000000= ..9688ac1619
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/000= 1-freedreno-YUV-formats-are-supported-as-external-only.patch
@@ -0,0 +1,= 34 @@
+From e5b33a4b744a3114ff054ae577ac7802d9221490 Mon Sep 17 00:00:00= 2001
+From: Pablo Saavedra <psaavedra@igalia.com>
+Date: Thu, 23 Sep 2021 1= 0:23:56 +0200
+Subject: [PATCH] freedreno: YUV formats are supported as = external-only dmabuf
+ modifiers
+
+Based on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/= 10524
+
+Co-authored-by: Alberto Garcia <berto@igalia.com>
+Co-authored-b= y: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
+Signed-off-by: Pablo Sa= avedra <psaave= dra@igalia.com>
+
+Upstream-Status: Pending [https://gitlab.freedesktop.org/mesa/mesa/-/merge_reque= sts/12991]
+Signed-off-by: Pablo Saavedra <psaavedra@igalia.com>
+---+ src/gallium/drivers/freedreno/freedreno_screen.c | 2 +-
+ 1 file chan= ged, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/driver= s/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_sc= reen.c
+index a9cd0e2..dc2b79d 100644
+--- a/src/gallium/drivers/free= dreno/freedreno_screen.c
++++ b/src/gallium/drivers/freedreno/freedreno_= screen.c
+@@ -804,7 +804,7 @@ fd_screen_query_dmabuf_modifiers(struct pi= pe_screen *pscreen,
+              &n= bsp;        modifiers[num] =3D screen->supported_mod= ifiers[i];
+
+               = ;if (external_only)
+-              &= nbsp;       external_only[num] =3D 0;
++    &nb= sp;                 external_only[n= um] =3D util_format_is_yuv(format);
+
+        &= nbsp;      num++;
+       }
+-- +2.30.2
+
diff --git a/meta/recipes-graphics/mesa/files/0001-v3d-YU= V-formats-at-is_dmabuf_modifier_supported-are-.patch b/meta/recipes-graphic= s/mesa/files/0001-v3d-YUV-formats-at-is_dmabuf_modifier_supported-are-.patc= h
new file mode 100644
index 0000000000..9e90a07c8e
--- /dev/null<= br>+++ b/meta/recipes-graphics/mesa/files/0001-v3d-YUV-formats-at-is_dmabuf= _modifier_supported-are-.patch
@@ -0,0 +1,35 @@
+From 389bffa0981bba6= 0f9d081063c150fb17e497c4a Mon Sep 17 00:00:00 2001
+From: Jose Maria Cas= anova Crespo <jmcasanova@igalia.com>
+Date: Thu, 29 Apr 2021 18:15:27 +0200+Subject: [PATCH] v3d: YUV formats at is_dmabuf_modifier_supported are
= + external_only
+MIME-Version: 1.0
+Content-Type: text/plain; charset= =3DUTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes Issue https://github.com/Igalia/meta-webkit/issues/185
= +"Issue Raspberry 4-64 + Mesa VC4 driver + Gstreamer =3D red Label on video= "
+
+Fixes: 6ee10ab3de86 "gallium: Add pipe_screen::is_dmabuf_modifie= r_supported"
+Reviewed-by: Alejandro Pi=C3=B1eiro <apinheiro@igalia.com>
+Pa= rt-of: <https://gitlab.freedesktop= .org/mesa/mesa/-/merge_requests/10524>
+
+Upstream-status: bac= kport [https://gitlab.freedesktop.org= /mesa/mesa/-/merge_requests/10524]
+Signed-off-by: pablo saavedra &l= t;psaavedra@igali= a.com>
+---
+ src/gallium/drivers/v3d/v3d_screen.c | 2 +-
+= 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ga= llium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c
+i= ndex 4f69c20..a5c94db 100644
+--- a/src/gallium/drivers/v3d/v3d_screen.c=
++++ b/src/gallium/drivers/v3d/v3d_screen.c
+@@ -670,7 +670,7 @@ v3d= _screen_is_dmabuf_modifier_supported(struct pipe_screen *pscreen,
+ = ;        for (i =3D 0; i < ARRAY_SIZE(v3d_available_= modifiers); i++) {
+              &nb= sp;  if (v3d_available_modifiers[i] =3D=3D modifier) {
+  &nbs= p;                     &n= bsp;if (external_only)
+-             = ;                   *external_= only =3D false;
++               = ;                 *external_only = =3D util_format_is_yuv(format);
+
+         = ;                return true;
+&= nbsp;                }
diff --gi= t a/meta/recipes-graphics/mesa/files/0002-v3d-YUV-formats-at-query_dmabuf_m= odifiers-are-extern.patch b/meta/recipes-graphics/mesa/files/0002-v3d-YUV-f= ormats-at-query_dmabuf_modifiers-are-extern.patch
new file mode 100644index 0000000000..d1658f9a87
--- /dev/null
+++ b/meta/recipes-graph= ics/mesa/files/0002-v3d-YUV-formats-at-query_dmabuf_modifiers-are-extern.pa= tch
@@ -0,0 +1,34 @@
+From a5f74e140cce671dd9a04d3b3541cd3faf91916b M= on Sep 17 00:00:00 2001
+From: Jose Maria Casanova Crespo <jmcasanova@igalia.com&= gt;
+Date: Thu, 29 Apr 2021 18:37:25 +0200
+Subject: [PATCH] v3d: YUV= formats at query_dmabuf_modifiers are external_only
+MIME-Version: 1.0<= br>+Content-Type: text/plain; charset=3DUTF-8
+Content-Transfer-Encoding= : 8bit
+
+This fixes Issue https://github.com/= Igalia/meta-webkit/issues/185
+"Issue Raspberry 4-64 + Mesa VC4 driv= er + Gstreamer =3D red Label on video"
+
+Fixes: 95c4f0f91098 "v3d: E= nables DRM_FORMAT_MOD_BROADCOM_SAND128 support"
+Reviewed-by: Alejandro = Pi=C3=B1eiro <= apinheiro@igalia.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10524>
+
+Upstream-status: backport [
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10524]+Signed-off-by: pablo saavedra <psaavedra@igalia.com>
+---
+ src/gallium/d= rivers/v3d/v3d_screen.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 delet= ion(-)
+
+diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gal= lium/drivers/v3d/v3d_screen.c
+index a5c94db..edde17d 100644
+--- a/s= rc/gallium/drivers/v3d/v3d_screen.c
++++ b/src/gallium/drivers/v3d/v3d_s= creen.c
+@@ -655,7 +655,7 @@ v3d_screen_query_dmabuf_modifiers(struct pi= pe_screen *pscreen,
+         for (i =3D 0; i &= lt; *count; i++) {
+              &nb= sp;  modifiers[i] =3D v3d_available_modifiers[i];
+    &n= bsp;            if (external_only)
+- = ;                     &nb= sp; external_only[i] =3D false;
++          &nb= sp;             external_only[i] =3D util_for= mat_is_yuv(format);
+        }
+ }
+
diff = --git a/meta/recipes-graphics/mesa/files/0003-v3d-DRM_FORMAT_MOD_BROADCOM_S= AND128-only-available-f.patch b/meta/recipes-graphics/mesa/files/0003-v3d-D= RM_FORMAT_MOD_BROADCOM_SAND128-only-available-f.patch
new file mode 1006= 44
index 0000000000..17a612ea7e
--- /dev/null
+++ b/meta/recipes-g= raphics/mesa/files/0003-v3d-DRM_FORMAT_MOD_BROADCOM_SAND128-only-available-= f.patch
@@ -0,0 +1,37 @@
+From cd2dce0257608fde2b9dd21429d1d7356e37ab= e1 Mon Sep 17 00:00:00 2001
+From: Jose Maria Casanova Crespo <jmcasanova@igalia.com<= /a>>
+Date: Thu, 29 Apr 2021 18:47:53 +0200
+Subject: [PATCH] v3d:= DRM_FORMAT_MOD_BROADCOM_SAND128 only available for NV12
+ format.
+M= IME-Version: 1.0
+Content-Type: text/plain; charset=3DUTF-8
+Content-= Transfer-Encoding: 8bit
+
+We were exposing as available DRM_FORMAT_M= OD_BROADCOM_SAND128 for
+any format.
+
+Fixes: 95c4f0f91098 "v3d: = Enables DRM_FORMAT_MOD_BROADCOM_SAND128 support"
+Reviewed-by: Alejandro= Pi=C3=B1eiro <
apinheiro@igalia.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10524= >
+
+Upstream-status: backport [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10524= ]
+Signed-off-by: pablo saavedra <psaavedra@igalia.com>
+---
+ src/galliu= m/drivers/v3d/v3d_screen.c | 4 ++++
+ 1 file changed, 4 insertions(+)+
+diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/driv= ers/v3d/v3d_screen.c
+index edde17d..684f912 100644
+--- a/src/galliu= m/drivers/v3d/v3d_screen.c
++++ b/src/gallium/drivers/v3d/v3d_screen.c+@@ -646,6 +646,10 @@ v3d_screen_query_dmabuf_modifiers(struct pipe_scree= n *pscreen,
+         int i;
+    =      int num_modifiers =3D ARRAY_SIZE(v3d_available_modifier= s);
+
++        /* Expose DRM_FORMAT_MOD_BROADCO= M_SAND128 only for PIPE_FORMAT_NV12 */
++        if = (format !=3D PIPE_FORMAT_NV12)
++          &nbs= p;     num_modifiers--;
++
+        &nb= sp;if (!modifiers) {
+              &= nbsp;  *count =3D num_modifiers;
+         = ;        return;
diff --git a/meta/recipes-graphics/= mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index a85f94c75e..8d= 8871aa5d 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/= recipes-graphics/mesa/mesa.inc
@@ -19,6 +19,10 @@ SRC_URI =3D "https://mesa.freedesktop.org/archive/mesa-${PV}.t= ar.xz \
            file://0002-meson.= build-make-TLS-ELF-optional.patch \
          &= nbsp; file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
&= nbsp;           file://0001-futex.h-Define-__NR_fu= tex-if-it-does-not-exist.patch \
+          &nb= sp;file://0001-v3d-YUV-formats-at-is_dmabuf_modifier_supported-are-.patch \=
+           file://0002-v3d-YUV-formats-a= t-query_dmabuf_modifiers-are-extern.patch \
+       =    file://0003-v3d-DRM_FORMAT_MOD_BROADCOM_SAND128-only-availabl= e-f.patch \
+           file://0001-freedr= eno-YUV-formats-are-supported-as-external-only.patch \
    &nb= sp;       "

 SRC_URI[sha256sum] =3D "= 565c6f4bd2d5747b919454fc1d439963024fc78ca56fd05158c3b2cde2f6912b"
=

--=-LI0kA4Dlcbt98Z+93Exo--