diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1989-drm-amd-pp-implement-notify_smu_memory_info-on-Power.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1989-drm-amd-pp-implement-notify_smu_memory_info-on-Power.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1989-drm-amd-pp-implement-notify_smu_memory_info-on-Power.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1989-drm-amd-pp-implement-notify_smu_memory_info-on-Power.patch new file mode 100644 index 00000000..e6681867 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1989-drm-amd-pp-implement-notify_smu_memory_info-on-Power.patch @@ -0,0 +1,70 @@ +From 4d72cf478bb98e8c372ad32817d69092c766366a Mon Sep 17 00:00:00 2001 +From: Rex Zhu <Rex.Zhu@amd.com> +Date: Mon, 9 Oct 2017 12:22:21 +0800 +Subject: [PATCH 1989/4131] drm/amd/pp: implement notify_smu_memory_info on + Powerplay + +Change-Id: Ibdec9db5304ee169696bd2bf8a5eacdd546d496f +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> +--- + drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 36 +++++++++++++++++++++++++++ + 1 file changed, 36 insertions(+) + +diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +index 2010bbd..c330030 100644 +--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c ++++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +@@ -1163,6 +1163,41 @@ static int pp_dpm_switch_power_profile(void *handle, + return 0; + } + ++static int pp_dpm_notify_smu_memory_info(void *handle, ++ uint32_t virtual_addr_low, ++ uint32_t virtual_addr_hi, ++ uint32_t mc_addr_low, ++ uint32_t mc_addr_hi, ++ uint32_t size) ++{ ++ struct pp_hwmgr *hwmgr; ++ struct pp_instance *pp_handle = (struct pp_instance *)handle; ++ int ret = 0; ++ ++ ret = pp_check(pp_handle); ++ ++ if (ret) ++ return ret; ++ ++ hwmgr = pp_handle->hwmgr; ++ ++ if (hwmgr->hwmgr_func->notify_cac_buffer_info == NULL) { ++ pr_info("%s was not implemented.\n", __func__); ++ return -EINVAL; ++ } ++ ++ mutex_lock(&pp_handle->pp_lock); ++ ++ ret = hwmgr->hwmgr_func->notify_cac_buffer_info(hwmgr, virtual_addr_low, ++ virtual_addr_hi, mc_addr_low, mc_addr_hi, ++ size); ++ ++ mutex_unlock(&pp_handle->pp_lock); ++ ++ return ret; ++} ++ ++ + /* export this function to DAL */ + + static int pp_display_configuration_change(void *handle, +@@ -1435,6 +1470,7 @@ const struct amd_pm_funcs pp_dpm_funcs = { + .set_power_profile_state = pp_dpm_set_power_profile_state, + .switch_power_profile = pp_dpm_switch_power_profile, + .set_clockgating_by_smu = pp_set_clockgating_by_smu, ++ .notify_smu_memory_info = pp_dpm_notify_smu_memory_info, + /* export to DC */ + .get_sclk = pp_dpm_get_sclk, + .get_mclk = pp_dpm_get_mclk, +-- +2.7.4 + |