| From e0c59cbfb4e13a1e7f879901179c2ad09b246546 Mon Sep 17 00:00:00 2001 |
| From: Alex Deucher <alexander.deucher@amd.com> |
| Date: Wed, 17 Jun 2020 16:33:47 -0400 |
| Subject: [PATCH] drm/amdgpu/display bail early in dm_pp_get_static_clocks |
| |
| commit 376814f5fcf1aadda501d1413d56e8af85d19a97 upstream. |
| |
| If there are no supported callbacks. We'll fall back to the |
| nominal clocks. |
| |
| Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1170 |
| Reviewed-by: Evan Quan <evan.quan@amd.com> |
| Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| 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 37893145e712..b7ab878f3932 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 |
| @@ -500,6 +500,8 @@ bool dm_pp_get_static_clocks( |
| &pp_clk_info); |
| else if (adev->smu.funcs) |
| ret = smu_get_current_clocks(&adev->smu, &pp_clk_info); |
| + else |
| + return false; |
| if (ret) |
| return false; |
| |
| -- |
| 2.27.0 |
| |