From: Evan Quan Date: Fri, 30 Oct 2020 11:00:13 +0000 (+0800) Subject: drm/amdgpu: apply dm_pp_notify_wm_clock_changes() for Polaris only X-Git-Tag: baikal/mips/sdk5.9~12066^2~12^2~37 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=b91535d8377dccd4fc2f921f4e9999c329ea4729;p=kernel.git drm/amdgpu: apply dm_pp_notify_wm_clock_changes() for Polaris only Will expand it to other ASICs after verified. Signed-off-by: Evan Quan Acked-and-tested-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c index fd39dd67bfa41..84065c12d4b85 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c @@ -462,7 +462,12 @@ bool dm_pp_notify_wm_clock_changes( void *pp_handle = adev->powerplay.pp_handle; const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs; - if (pp_funcs && pp_funcs->set_watermarks_for_clocks_ranges) { + /* + * Limit this watermark setting for Polaris for now + * TODO: expand this to other ASICs + */ + if ((adev->asic_type >= CHIP_POLARIS10) && (adev->asic_type <= CHIP_VEGAM) + && pp_funcs && pp_funcs->set_watermarks_for_clocks_ranges) { if (!pp_funcs->set_watermarks_for_clocks_ranges(pp_handle, (void *)wm_with_clock_ranges)) return true;