Skip to content

Commit 593f546

Browse files
Rex Zhualexdeucher
authored andcommitted
drm/amd/powerplay: fix bug fail to remove sysfs when rmmod amdgpu.
when hw_fini, pp will disable dpm.so remove sysfs before disable dpm. Signed-off-by: Rex Zhu <[email protected]> Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 53efaf5 commit 593f546

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ static int amdgpu_pp_hw_fini(void *handle)
188188
int ret = 0;
189189
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
190190

191+
if (adev->pp_enabled && adev->pm.dpm_enabled)
192+
amdgpu_pm_sysfs_fini(adev);
193+
191194
if (adev->powerplay.ip_funcs->hw_fini)
192195
ret = adev->powerplay.ip_funcs->hw_fini(
193196
adev->powerplay.pp_handle);
@@ -206,8 +209,6 @@ static void amdgpu_pp_late_fini(void *handle)
206209
adev->powerplay.ip_funcs->late_fini(
207210
adev->powerplay.pp_handle);
208211

209-
if (adev->pp_enabled && adev->pm.dpm_enabled)
210-
amdgpu_pm_sysfs_fini(adev);
211212

212213
if (adev->pp_enabled)
213214
amd_powerplay_destroy(adev->powerplay.pp_handle);

0 commit comments

Comments
 (0)