Skip to content

Commit c6df7f3

Browse files
Prike Liangalexdeucher
authored andcommitted
drm/amdgpu: correct the amdgpu runtime dereference usage count
Fix the amdgpu runpm dereference usage count. Signed-off-by: Prike Liang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 4636a21 commit c6df7f3

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -340,14 +340,11 @@ int amdgpu_display_crtc_set_config(struct drm_mode_set *set,
340340
adev->have_disp_power_ref = true;
341341
return ret;
342342
}
343-
/* if we have no active crtcs, then drop the power ref
344-
* we got before
343+
/* if we have no active crtcs, then go to
344+
* drop the power ref we got before
345345
*/
346-
if (!active && adev->have_disp_power_ref) {
347-
pm_runtime_put_autosuspend(dev->dev);
346+
if (!active && adev->have_disp_power_ref)
348347
adev->have_disp_power_ref = false;
349-
}
350-
351348
out:
352349
/* drop the power reference we got coming in here */
353350
pm_runtime_put_autosuspend(dev->dev);

0 commit comments

Comments
 (0)