drm/amd/powerplay: send event to notify powerplay all modules are initialized.
authorRex Zhu <Rex.Zhu@amd.com>
Thu, 25 Feb 2016 09:32:45 +0000 (17:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Mar 2016 16:01:22 +0000 (11:01 -0500)
with this event, powerplay can adjust current power state if needed.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c

index b9d0d55..3cb6d6c 100644 (file)
@@ -143,8 +143,10 @@ static int amdgpu_pp_late_init(void *handle)
                                        adev->powerplay.pp_handle);
 
 #ifdef CONFIG_DRM_AMD_POWERPLAY
-       if (adev->pp_enabled)
+       if (adev->pp_enabled) {
                amdgpu_pm_sysfs_init(adev);
+               amdgpu_dpm_dispatch_task(adev, AMD_PP_EVENT_COMPLETE_INIT, NULL, NULL);
+       }
 #endif
        return ret;
 }