Skip to contentSkip to conversation

ti-img-rogue-driver: fix breakage with GCC 11

PATCH In review Denys Dmytriyenko 2 participants 2 messages May 2, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ti-img-rogue-driver: fix breakage with GCC 11

From: Denys Dmytriyenko <[email protected]>

Explicitly cast the value into correct type to fix this error:

| .../services/server/devices/rogue/rgxinit.c:1345:36: error: implicit conversion from 'enum <anonymous>' to 'IMG_BOOL' {aka 'enum tag_img_bool'} [-Werror=enum-conversion]
|  1345 |                         bEnableAPM = false;
|       |                                    ^
---
 ...nit.c-cast-boolean-value-to-IMG_BOOL.patch | 34 +++++++++++++++++++
 .../ti-img-rogue-driver_1.15.6133109.bb       |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-rgxinit.c-cast-boolean-value-to-IMG_BOOL.patch
meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-rgxinit.c-cast-boolean-value-to-IMG_BOOL.patch new file +34 -0
new file mode 100644
index 00000000..8d909279
@@ -0,0 +1,34 @@
+From cc95fb4b1635bd1018d74b668430cda67731148f Mon Sep 17 00:00:00 2001
+From: Denys Dmytriyenko <[email protected]>
+Date: Sat, 30 Apr 2022 18:37:46 +0000
+Subject: [PATCH] rgxinit.c: cast boolean value to IMG_BOOL
+
+Fixes this error with GCC 11:
+
+| .../services/server/devices/rogue/rgxinit.c:1345:36: error: implicit conversion from 'enum <anonymous>' to 'IMG_BOOL' {aka 'enum tag_img_bool'} [-Werror=enum-conversion]
+|  1345 |                         bEnableAPM = false;
+|       |                                    ^
+
+Upstream-Status: Pending
+
+Signed-off-by: Denys Dmytriyenko <[email protected]>
+---
+ services/server/devices/rogue/rgxinit.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/services/server/devices/rogue/rgxinit.c b/services/server/devices/rogue/rgxinit.c
+index ca7a1b9..fc94b73 100644
+--- a/services/server/devices/rogue/rgxinit.c
++++ b/services/server/devices/rogue/rgxinit.c
+@@ -1342,7 +1342,7 @@ PVRSRV_ERROR RGXInitDevPart2(PVRSRV_DEVICE_NODE	*psDeviceNode,
+ 		if (bEnableAPM && (!PVRSRV_VZ_MODE_IS(NATIVE)))
+ 		{
+ 			PVR_DPF((PVR_DBG_WARNING, "%s: Active Power Management disabled in virtualization mode", __func__));
+-			bEnableAPM = false;
++			bEnableAPM = (IMG_BOOL)false;
+ 		}
+ 
+ #if defined(RGX_NUM_OS_SUPPORTED) && (RGX_NUM_OS_SUPPORTED > 1) && defined(SUPPORT_AUTOVZ)
+-- 
+2.25.1
+
meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.15.6133109.bb +1 -0
index 94b05436..2f4a7354 100644
@@ -22,6 +22,7 @@ BRANCH = "linuxws/dunfell/k5.10/${PV}"
 SRC_URI = " \
     git://git.ti.com/graphics/ti-img-rogue-driver.git;branch=${BRANCH} \
     file://0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch \
+    file://0001-rgxinit.c-cast-boolean-value-to-IMG_BOOL.patch \
 "
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.25.1
#1 lore raw

Patch applied to master.

Quoted 79 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

Explicitly cast the value into correct type to fix this error:

| .../services/server/devices/rogue/rgxinit.c:1345:36: error: implicit conversion from 'enum <anonymous>' to 'IMG_BOOL' {aka 'enum tag_img_bool'} [-Werror=enum-conversion]
|  1345 |                         bEnableAPM = false;
|       |                                    ^
---
  ...nit.c-cast-boolean-value-to-IMG_BOOL.patch | 34 +++++++++++++++++++
  .../ti-img-rogue-driver_1.15.6133109.bb       |  1 +
  2 files changed, 35 insertions(+)

create mode 100644 meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-rgxinit.c-cast-boolean-value-to-IMG_BOOL.patch

meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-rgxinit.c-cast-boolean-value-to-IMG_BOOL.patch new file +34 -0
new file mode 100644
index 00000000..8d909279
@@ -0,0 +1,34 @@
+From cc95fb4b1635bd1018d74b668430cda67731148f Mon Sep 17 00:00:00 2001
+From: Denys Dmytriyenko <[email protected]>
+Date: Sat, 30 Apr 2022 18:37:46 +0000
+Subject: [PATCH] rgxinit.c: cast boolean value to IMG_BOOL
+
+Fixes this error with GCC 11:
+
+| .../services/server/devices/rogue/rgxinit.c:1345:36: error: implicit conversion from 'enum <anonymous>' to 'IMG_BOOL' {aka 'enum tag_img_bool'} [-Werror=enum-conversion]
+|  1345 |                         bEnableAPM = false;
+|       |                                    ^
+
+Upstream-Status: Pending
+
+Signed-off-by: Denys Dmytriyenko <[email protected]>
+---
+ services/server/devices/rogue/rgxinit.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/services/server/devices/rogue/rgxinit.c b/services/server/devices/rogue/rgxinit.c
+index ca7a1b9..fc94b73 100644
+--- a/services/server/devices/rogue/rgxinit.c
++++ b/services/server/devices/rogue/rgxinit.c
+@@ -1342,7 +1342,7 @@ PVRSRV_ERROR RGXInitDevPart2(PVRSRV_DEVICE_NODE	*psDeviceNode,
+ 		if (bEnableAPM && (!PVRSRV_VZ_MODE_IS(NATIVE)))
+ 		{
+ 			PVR_DPF((PVR_DBG_WARNING, "%s: Active Power Management disabled in virtualization mode", __func__));
+-			bEnableAPM = false;
++			bEnableAPM = (IMG_BOOL)false;
+ 		}
+
+ #if defined(RGX_NUM_OS_SUPPORTED) && (RGX_NUM_OS_SUPPORTED > 1) && defined(SUPPORT_AUTOVZ)
+--
+2.25.1
+
meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.15.6133109.bb +1 -1
index 94b05436..2f4a7354 100644
@@ -22,6 +22,7 @@ BRANCH = "linuxws/dunfell/k5.10/${PV}"
  SRC_URI = " \
      git://git.ti.com/graphics/ti-img-rogue-driver.git;branch=${BRANCH} \
      file://0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch \
+    file://0001-rgxinit.c-cast-boolean-value-to-IMG_BOOL.patch \
  "
 
  S = "${WORKDIR}/git"
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#14669): https://lists.yoctoproject.org/g/meta-ti/message/14669
Mute This Topic: https://lists.yoctoproject.org/mt/90837024/6551054
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS