aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0062-drm-amdgpu-poweprlay-export-program-display-gap-func.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0062-drm-amdgpu-poweprlay-export-program-display-gap-func.patch')
-rw-r--r--common/recipes-kernel/linux/files/0062-drm-amdgpu-poweprlay-export-program-display-gap-func.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0062-drm-amdgpu-poweprlay-export-program-display-gap-func.patch b/common/recipes-kernel/linux/files/0062-drm-amdgpu-poweprlay-export-program-display-gap-func.patch
new file mode 100644
index 00000000..7f90bd26
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0062-drm-amdgpu-poweprlay-export-program-display-gap-func.patch
@@ -0,0 +1,66 @@
+From e8804f55632a7d6f58ce5d769bd6767359823c31 Mon Sep 17 00:00:00 2001
+From: Rex Zhu <Rex.Zhu@amd.com>
+Date: Fri, 16 Oct 2015 14:55:03 +0800
+Subject: [PATCH 0062/1110] drm/amdgpu/poweprlay: export program display gap
+ function to eventmgr
+
+This allows the eventmgr to properly update the displaygap on
+certain power events.
+
+Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
+Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 27 ++++++++++++++++++++++
+ .../gpu/drm/amd/powerplay/inc/hardwaremanager.h | 2 ++
+ 2 files changed, 29 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
+index aec9f6d..620119f 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
+@@ -167,3 +167,30 @@ int phm_enable_clock_power_gatings(struct pp_hwmgr *hwmgr)
+ }
+ return 0;
+ }
++
++int phm_display_configuration_changed(struct pp_hwmgr *hwmgr)
++{
++ if (hwmgr == NULL)
++ return -EINVAL;
++
++ if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
++ PHM_PlatformCaps_TablelessHardwareInterface)) {
++ if (NULL != hwmgr->hwmgr_func->display_config_changed)
++ hwmgr->hwmgr_func->display_config_changed(hwmgr);
++ } else
++ return phm_dispatch_table(hwmgr, &hwmgr->display_configuration_changed, NULL, NULL);
++ return 0;
++}
++
++int phm_notify_smc_display_config_after_ps_adjustment(struct pp_hwmgr *hwmgr)
++{
++ if (hwmgr == NULL)
++ return -EINVAL;
++
++ if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
++ PHM_PlatformCaps_TablelessHardwareInterface))
++ if (NULL != hwmgr->hwmgr_func->display_config_changed)
++ hwmgr->hwmgr_func->notify_smc_display_config_after_ps_adjustment(hwmgr);
++
++ return 0;
++}
+diff --git a/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h b/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h
+index 9795b9a..1d29760 100644
+--- a/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h
++++ b/drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h
+@@ -328,4 +328,6 @@ extern int phm_apply_state_adjust_rules(struct pp_hwmgr *hwmgr,
+ const struct pp_power_state *current_ps);
+
+ extern int phm_force_dpm_levels(struct pp_hwmgr *hwmgr, enum amd_dpm_forced_level level);
++extern int phm_display_configuration_changed(struct pp_hwmgr *hwmgr);
++extern int phm_notify_smc_display_config_after_ps_adjustment(struct pp_hwmgr *hwmgr);
+ #endif /* _HARDWARE_MANAGER_H_ */
+--
+2.7.4
+