aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3520-drm-amd-powerplay-Fix-enum-mismatch.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3520-drm-amd-powerplay-Fix-enum-mismatch.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3520-drm-amd-powerplay-Fix-enum-mismatch.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3520-drm-amd-powerplay-Fix-enum-mismatch.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3520-drm-amd-powerplay-Fix-enum-mismatch.patch
new file mode 100644
index 00000000..e0248fce
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3520-drm-amd-powerplay-Fix-enum-mismatch.patch
@@ -0,0 +1,43 @@
+From ca3875014d2b57489b7e5acd863a7f387ff765f1 Mon Sep 17 00:00:00 2001
+From: Matthias Kaehlcke <mka@chromium.org>
+Date: Wed, 7 Feb 2018 10:58:43 -0800
+Subject: [PATCH 3520/4131] drm/amd/powerplay: Fix enum mismatch
+
+In several locations the driver uses AMD_CG_STATE_UNGATE (type enum
+amd_clockgating_state) instead of AMD_PG_STATE_UNGATE (type enum
+amd_powergating_stat) and vice versa. Both constants have the same
+value, so this doesn't cause any problems, but we still want to pass
+the correct type.
+
+Fixing the mismatch resolves multiple warnings like this when building
+with clang:
+
+drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/cz_clockpowergating.c:169:7:
+ error: implicit conversion from enumeration type 'enum
+ amd_powergating_state' to different enumeration type 'enum
+ amd_clockgating_state' [-Werror,-Wenum-conversion]
+ AMD_PG_STATE_UNGATE);
+
+Reviewed-by: Guenter Roeck <groeck@chromium.org>
+Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Kalyan Alle <kalyan.alle@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c
+index 402aa9c..72366b4 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c
+@@ -163,6 +163,7 @@ void smu7_powergate_uvd(struct pp_hwmgr *hwmgr, bool bgate)
+ cgs_set_powergating_state(hwmgr->device,
+ AMD_IP_BLOCK_TYPE_UVD,
+ AMD_PG_STATE_UNGATE);
++
+ smu7_update_uvd_dpm(hwmgr, false);
+ }
+
+--
+2.7.4
+