From: Flora Cui Date: Mon, 15 Feb 2016 07:45:59 +0000 (+0800) Subject: drm/amd/powerplay: add default clockgating handling X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=538333f0dcc00e24ca4bd63905fa75aa41b4c665;p=linux-beck.git drm/amd/powerplay: add default clockgating handling This is to workaround regression introduced in 46c34bcb6a15dd85329a39a5e72c62108626acdc. It should be reverted with a final fix. Signed-off-by: Flora Cui Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index 94b78095e1ce..32a6a6f8ffcb 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c @@ -188,10 +188,12 @@ static int pp_set_clockgating_state(void *handle, hwmgr = ((struct pp_instance *)handle)->hwmgr; - if (hwmgr == NULL || hwmgr->hwmgr_func == NULL || - hwmgr->hwmgr_func->update_clock_gatings == NULL) + if (hwmgr == NULL || hwmgr->hwmgr_func == NULL) return -EINVAL; + if (hwmgr->hwmgr_func->update_clock_gatings == NULL) + return 0; + if (state == AMD_CG_STATE_UNGATE) pp_state = 0; else