diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-09-23 14:32:06 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-09-23 17:23:46 -0400 |
commit | 4c7fbc39b1d58d9f4113ef962743a67bcdfe6be2 (patch) | |
tree | f559394d176b225facb8bb1928651cc954e9f44c | |
parent | 6adaed5bfe4f6f0a0e027e87d5dd80bd9834d5f0 (diff) |
drm/amdgpu: Sprinkle drm_modeset_lock_all to appease locking checks
In
commit 7a3f3d6667f5f9ffd1517f6b21d64bbf5312042c
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Thu Jul 9 23:44:28 2015 +0200
drm: Check locking in drm_for_each_connector
I added locking checks to drm_for_each_connector but failed that
through drm_helper_connector_dpms -> drm_helper_choose_encoder_dpms
it's used in a few more places in the amdgpu resume/suspend code.
Fix them up.
Note that we could use the connector iterator macros in there too, but
that's for the future.
Port of radeon commit:
drm/radeon: Sprinkle drm_modeset_lock_all to appease locking checks
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 2d569eccf41f..6068d8207d10 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -1651,9 +1651,11 @@ int amdgpu_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon) | |||
1651 | drm_kms_helper_poll_disable(dev); | 1651 | drm_kms_helper_poll_disable(dev); |
1652 | 1652 | ||
1653 | /* turn off display hw */ | 1653 | /* turn off display hw */ |
1654 | drm_modeset_lock_all(dev); | ||
1654 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { | 1655 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { |
1655 | drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); | 1656 | drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); |
1656 | } | 1657 | } |
1658 | drm_modeset_unlock_all(dev); | ||
1657 | 1659 | ||
1658 | /* unpin the front buffers */ | 1660 | /* unpin the front buffers */ |
1659 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { | 1661 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { |
@@ -1748,9 +1750,11 @@ int amdgpu_resume_kms(struct drm_device *dev, bool resume, bool fbcon) | |||
1748 | if (fbcon) { | 1750 | if (fbcon) { |
1749 | drm_helper_resume_force_mode(dev); | 1751 | drm_helper_resume_force_mode(dev); |
1750 | /* turn on display hw */ | 1752 | /* turn on display hw */ |
1753 | drm_modeset_lock_all(dev); | ||
1751 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { | 1754 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { |
1752 | drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); | 1755 | drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); |
1753 | } | 1756 | } |
1757 | drm_modeset_unlock_all(dev); | ||
1754 | } | 1758 | } |
1755 | 1759 | ||
1756 | drm_kms_helper_poll_enable(dev); | 1760 | drm_kms_helper_poll_enable(dev); |