diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 10 | 
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 3ec732d13d32..cbabac1f2c47 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -1599,17 +1599,15 @@ static int amdgpu_pmops_runtime_idle(struct device *dev)  	if (amdgpu_device_has_dc_support(adev)) {  		struct drm_crtc *crtc; -		drm_modeset_lock_all(drm_dev); -  		drm_for_each_crtc(crtc, drm_dev) { -			if (crtc->state->active) { +			drm_modeset_lock(&crtc->mutex, NULL); +			if (crtc->state->active)  				ret = -EBUSY; +			drm_modeset_unlock(&crtc->mutex); +			if (ret < 0)  				break; -			}  		} -		drm_modeset_unlock_all(drm_dev); -  	} else {  		struct drm_connector *list_connector;  		struct drm_connector_list_iter iter;  | 
