]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/amdgpu/dpm: flush any thermal work on fini
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 21 Oct 2016 20:30:10 +0000 (16:30 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 24 Oct 2016 21:00:10 +0000 (17:00 -0400)
Flush any outstanding thermal work before tearing down
the dpm driver.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/ci_dpm.c
drivers/gpu/drm/amd/amdgpu/kv_dpm.c
drivers/gpu/drm/amd/amdgpu/si_dpm.c

index 1d8c375a3561c9f872a4d87c0b435048f5a4b10b..29e6061b908756c94e9ea91c50ecaa5b66aa9ccc 100644 (file)
@@ -6236,6 +6236,8 @@ static int ci_dpm_sw_fini(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+       flush_work(&adev->pm.dpm.thermal.work);
+
        mutex_lock(&adev->pm.mutex);
        amdgpu_pm_sysfs_fini(adev);
        ci_dpm_fini(adev);
index f8618a3881a841a3160115eabd065a9b311f862b..71d2856222fa9be710be004ad40f3d32c5ab17cb 100644 (file)
@@ -3063,6 +3063,8 @@ static int kv_dpm_sw_fini(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+       flush_work(&adev->pm.dpm.thermal.work);
+
        mutex_lock(&adev->pm.mutex);
        amdgpu_pm_sysfs_fini(adev);
        kv_dpm_fini(adev);
index 3de7bca5854b1b06f20077d177c5476511d5e74b..ee77e9cb55b1fe85d8a56e42dedc0132e9cd7478 100644 (file)
@@ -7777,6 +7777,8 @@ static int si_dpm_sw_fini(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+       flush_work(&adev->pm.dpm.thermal.work);
+
        mutex_lock(&adev->pm.mutex);
        amdgpu_pm_sysfs_fini(adev);
        si_dpm_fini(adev);