aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2018-drm-amd-powerplay-Tidy-up-cz_dpm_powerup_uvd.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2018-drm-amd-powerplay-Tidy-up-cz_dpm_powerup_uvd.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2018-drm-amd-powerplay-Tidy-up-cz_dpm_powerup_uvd.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2018-drm-amd-powerplay-Tidy-up-cz_dpm_powerup_uvd.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2018-drm-amd-powerplay-Tidy-up-cz_dpm_powerup_uvd.patch
new file mode 100644
index 00000000..2537587a
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2018-drm-amd-powerplay-Tidy-up-cz_dpm_powerup_uvd.patch
@@ -0,0 +1,44 @@
+From 8858550069a34427ab28970ddc5b2cf5bfc4c331 Mon Sep 17 00:00:00 2001
+From: Tom St Denis <tom.stdenis@amd.com>
+Date: Mon, 16 Oct 2017 13:28:24 -0400
+Subject: [PATCH 2018/4131] drm/amd/powerplay: Tidy up cz_dpm_powerup_uvd()
+
+Use PP_CAP and simplify enable/disable logic.
+
+Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 17 +++++------------
+ 1 file changed, 5 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
+index c2afc0a..c57f7f3 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
+@@ -1281,18 +1281,11 @@ int cz_dpm_powerdown_uvd(struct pp_hwmgr *hwmgr)
+
+ int cz_dpm_powerup_uvd(struct pp_hwmgr *hwmgr)
+ {
+- if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+- PHM_PlatformCaps_UVDPowerGating)) {
+- if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+- PHM_PlatformCaps_UVDDynamicPowerGating)) {
+- return smum_send_msg_to_smc_with_parameter(
+- hwmgr,
+- PPSMC_MSG_UVDPowerON, 1);
+- } else {
+- return smum_send_msg_to_smc_with_parameter(
+- hwmgr,
+- PPSMC_MSG_UVDPowerON, 0);
+- }
++ if (PP_CAP(PHM_PlatformCaps_UVDPowerGating)) {
++ return smum_send_msg_to_smc_with_parameter(
++ hwmgr,
++ PPSMC_MSG_UVDPowerON,
++ PP_CAP(PHM_PlatformCaps_UVDDynamicPowerGating) ? 1 : 0);
+ }
+
+ return 0;
+--
+2.7.4
+