]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/amd/powerplay: add default clockgating handling
authorFlora Cui <Flora.Cui@amd.com>
Mon, 15 Feb 2016 07:45:59 +0000 (15:45 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 May 2016 00:27:22 +0000 (20:27 -0400)
This is to workaround regression introduced in
46c34bcb6a15dd85329a39a5e72c62108626acdc. It should be reverted with a
final fix.

Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amd_powerplay.c

index 94b78095e1ce3adf9693264a9e5de771382be15b..32a6a6f8ffcb5884f6190fb4572ca2d6637d5cd6 100644 (file)
@@ -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