]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
drm/amd/powerplay: Fix a bug for enabling ACDC gpio interrupt
authorEric Huang <JinHuiEric.Huang@amd.com>
Thu, 24 Mar 2016 20:44:18 +0000 (16:44 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 May 2016 00:29:11 +0000 (20:29 -0400)
Only enable it if it's supported rather than unconitionally.

Signed-off-by: Eric Yang <eric.yang2@amd.com>
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c

index fd29c5683085266b4233cf07d6558b9fd81c3d05..045c7ef3e81b35f7543de0fdf116f6126a8b7786 100644 (file)
@@ -2354,10 +2354,13 @@ static int polaris10_start_dpm(struct pp_hwmgr *hwmgr)
                                return -1);
        }
 
-       PP_ASSERT_WITH_CODE((0 == smum_send_msg_to_smc(hwmgr->smumgr,
-                                       PPSMC_MSG_EnableACDCGPIOInterrupt)),
-                                       "Failed to enable AC DC GPIO Interrupt!",
-                       );
+       if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+                               PHM_PlatformCaps_Falcon_QuickTransition)) {
+               PP_ASSERT_WITH_CODE((0 == smum_send_msg_to_smc(hwmgr->smumgr,
+                               PPSMC_MSG_EnableACDCGPIOInterrupt)),
+                               "Failed to enable AC DC GPIO Interrupt!",
+                               );
+       }
 
        return 0;
 }