Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4560738a authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu/dpm: flush any thermal work on fini



Flush any outstanding thermal work before tearing down
the dpm driver.

Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e8d7515a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
+2 −0
Original line number Diff line number Diff line
@@ -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);
+2 −0
Original line number Diff line number Diff line
@@ -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);