diff mbox series

[kirkstone,v3] kmscube: Add patch to fix -int-conversion build error

Message ID 20240930115332.925080-1-purushottam27.kumar@lge.com
State Under Review
Delegated to: Steve Sakoman
Headers show
Series [kirkstone,v3] kmscube: Add patch to fix -int-conversion build error | expand

Commit Message

Purushottam Choudhary Sept. 30, 2024, 11:53 a.m. UTC
On some platforms, `EGLNativeDisplayType` is an int instead of
a pointer, in which case the void pointer will raise
a `-Wint-conversion`.

Add change as a patch instead of updating SRCREV .
if we update SRCREV might will get compatiblity issue
with current gstreamer 1.20.7 version because SRCREV brings changes
which resolves negotiation issues encountered with V4L2 stateless
hardware video decoders when using kmscube video playback option
which has gstreamer dependency requirement to 1.22.0

Signed-off-by: Purushottam Choudhary <purushottam27.kumar@lge.com>
---
 ...001-common-fix-cast-type-in-init_egl.patch | 34 +++++++++++++++++++
 meta/recipes-graphics/kmscube/kmscube_git.bb  |  6 ++--
 2 files changed, 38 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-graphics/kmscube/kmscube/0001-common-fix-cast-type-in-init_egl.patch

Comments

Quentin Schulz Sept. 30, 2024, 2:30 p.m. UTC | #1
Hi Purushottam,

On 9/30/24 1:53 PM, Purushottam Choudhary via lists.openembedded.org wrote:
> On some platforms, `EGLNativeDisplayType` is an int instead of
> a pointer, in which case the void pointer will raise
> a `-Wint-conversion`.
> 
> Add change as a patch instead of updating SRCREV .
> if we update SRCREV might will get compatiblity issue
> with current gstreamer 1.20.7 version because SRCREV brings changes
> which resolves negotiation issues encountered with V4L2 stateless
> hardware video decoders when using kmscube video playback option
> which has gstreamer dependency requirement to 1.22.0
> 

@Steve for some context: 
https://gitlab.freedesktop.org/mesa/kmscube/-/commit/4961a04b4a434aefbd412eb24fb76998036eaaf6 
this is the problematic commit not allowing us to bump kmscube further 
than d12ba659695631e7a22dce8fa5d0bc576a9c2241 (or we do, and revert that 
patch instead).

> Signed-off-by: Purushottam Choudhary <purushottam27.kumar@lge.com>

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>

Thanks!
Quentin
Quentin Schulz Oct. 1, 2024, 9:31 a.m. UTC | #2
Hi Purushottam,

On 10/1/24 7:01 AM, Purushottam Kumar wrote:
> Hi Quentin,
> 
> Shall I update the SRCREV to latest and revert below commit change as patch
> would be fine for kirstone?
> https://gitlab.freedesktop.org/mesa/kmscube/-/
> commit/4961a04b4a434aefbd412eb24fb76998036eaaf6 <https://
> eur02.safelinks.protection.outlook.com/?
> url=https%3A%2F%2Fgitlab.freedesktop.org%2Fmesa%2Fkmscube%2F-
> %2Fcommit%2F4961a04b4a434aefbd412eb24fb76998036eaaf6&data=05%7C02%7Cquentin.schulz%40cherry.de%7C38b70b91da2a450fb8ef08dce1d6195c%7C5e0e1b5221b54e7b83bb514ec460677e%7C0%7C0%7C638633556881179123%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=ONuzmhX%2BxeRVXDvncoJ6FIz2%2B2JNuyUWD7NPIMDYQb4%3D&reserved=0>
> 
> Or shall I push specific change as a patch instead of updating SRCREV for
> master, scarthgap and kirkstone?Please suggest. Thanks, Purushottam
> 

Let's wait for maintainers' opinion on this :) (Steve is the LTS 
maintainer hence why I mentioned him in my previous answer)

Cheers,
Quentin
Steve Sakoman Oct. 1, 2024, 1:18 p.m. UTC | #3
On Mon, Sep 30, 2024 at 7:30 AM Quentin Schulz via
lists.openembedded.org
<quentin.schulz=cherry.de@lists.openembedded.org> wrote:
>
> Hi Purushottam,
>
> On 9/30/24 1:53 PM, Purushottam Choudhary via lists.openembedded.org wrote:
> > On some platforms, `EGLNativeDisplayType` is an int instead of
> > a pointer, in which case the void pointer will raise
> > a `-Wint-conversion`.
> >
> > Add change as a patch instead of updating SRCREV .
> > if we update SRCREV might will get compatiblity issue
> > with current gstreamer 1.20.7 version because SRCREV brings changes
> > which resolves negotiation issues encountered with V4L2 stateless
> > hardware video decoders when using kmscube video playback option
> > which has gstreamer dependency requirement to 1.22.0
> >
>
> @Steve for some context:
> https://gitlab.freedesktop.org/mesa/kmscube/-/commit/4961a04b4a434aefbd412eb24fb76998036eaaf6
> this is the problematic commit not allowing us to bump kmscube further
> than d12ba659695631e7a22dce8fa5d0bc576a9c2241 (or we do, and revert that
> patch instead).
>
> > Signed-off-by: Purushottam Choudhary <purushottam27.kumar@lge.com>
>
> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>

I'm fine with this version of the patch.

Steve
diff mbox series

Patch

diff --git a/meta/recipes-graphics/kmscube/kmscube/0001-common-fix-cast-type-in-init_egl.patch b/meta/recipes-graphics/kmscube/kmscube/0001-common-fix-cast-type-in-init_egl.patch
new file mode 100644
index 0000000000..50df211d60
--- /dev/null
+++ b/meta/recipes-graphics/kmscube/kmscube/0001-common-fix-cast-type-in-init_egl.patch
@@ -0,0 +1,34 @@ 
+From b2f97f53e01e07a920761e5d3e3ba22898b794a4 Mon Sep 17 00:00:00 2001
+From: Eric Engestrom <eric@igalia.com>
+Date: Tue, 24 Sep 2024 17:57:45 +0200
+Subject: [PATCH] common: fix cast type in init_egl()
+
+On some platforms, `EGLNativeDisplayType` is an int instead of
+a pointer, in which case the void pointer will raise
+a `-Wint-conversion`.
+
+Let's cast it to the correct type directly.
+
+Closes: https://gitlab.freedesktop.org/mesa/kmscube/-/issues/16
+        https://gitlab.freedesktop.org/mesa/kmscube/-/merge_requests/57
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/kmscube/-/commit/b2f97f53e01e07a920761e5d3e3ba22898b794a4]
+
+Signed-off-by: Purushottam Choudhary <Purushottam27.kumar@lge.com>
+---
+ common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common.c b/common.c
+index e52d480..e1e2dcf 100644
+--- a/common.c
++++ b/common.c
+@@ -341,7 +341,7 @@ int init_egl(struct egl *egl, const struct gbm *gbm, int samples)
+ 		egl->display = egl->eglGetPlatformDisplayEXT(EGL_PLATFORM_GBM_KHR,
+ 				gbm->dev, NULL);
+ 	} else {
+-		egl->display = eglGetDisplay((void *)gbm->dev);
++		egl->display = eglGetDisplay((EGLNativeDisplayType)gbm->dev);
+ 	}
+ 
+ 	if (!eglInitialize(egl->display, &major, &minor)) {
diff --git a/meta/recipes-graphics/kmscube/kmscube_git.bb b/meta/recipes-graphics/kmscube/kmscube_git.bb
index 98f110527e..40c5a14492 100644
--- a/meta/recipes-graphics/kmscube/kmscube_git.bb
+++ b/meta/recipes-graphics/kmscube/kmscube_git.bb
@@ -11,8 +11,10 @@  DEPENDS = "virtual/libgles3 virtual/libgles2 virtual/egl libdrm virtual/libgbm"
 LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb"
 
 SRCREV = "9f63f359fab1b5d8e862508e4e51c9dfe339ccb0"
-SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https"
-SRC_URI += "file://0001-texturator-Use-correct-GL-extension-header.patch"
+SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https \
+           file://0001-texturator-Use-correct-GL-extension-header.patch \
+           file://0001-common-fix-cast-type-in-init_egl.patch \
+"
 UPSTREAM_CHECK_COMMITS = "1"
 
 S = "${WORKDIR}/git"