Unverified Commit 0b983126 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!4015 drm/amdgpu: correct the amdgpu runtime dereference usage count

parents 539cf90d 2354075c
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -299,13 +299,11 @@ int amdgpu_display_crtc_set_config(struct drm_mode_set *set,
		adev->have_disp_power_ref = true;
		return ret;
	}
	/* if we have no active crtcs, then drop the power ref
	   we got before */
	if (!active && adev->have_disp_power_ref) {
		pm_runtime_put_autosuspend(dev->dev);
	/* if we have no active crtcs, then go to
	 * drop the power ref we got before
	 */
	if (!active && adev->have_disp_power_ref)
		adev->have_disp_power_ref = false;
	}

out:
	/* drop the power reference we got coming in here */
	pm_runtime_put_autosuspend(dev->dev);