Commit 3ea87855 authored by Dave Airlie's avatar Dave Airlie

drm/helper: lock all around force mode restore

Since Daniel documented things with a sledge hammer, we got lots of
nice backtraces in suspend/resume operations, I've check the callers
of this and they all seems safe to me,

This fixes one set of warns I reported.
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 53f1904b
...@@ -983,6 +983,7 @@ void drm_helper_resume_force_mode(struct drm_device *dev) ...@@ -983,6 +983,7 @@ void drm_helper_resume_force_mode(struct drm_device *dev)
int encoder_dpms; int encoder_dpms;
bool ret; bool ret;
drm_modeset_lock_all(dev);
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
if (!crtc->enabled) if (!crtc->enabled)
...@@ -1017,6 +1018,7 @@ void drm_helper_resume_force_mode(struct drm_device *dev) ...@@ -1017,6 +1018,7 @@ void drm_helper_resume_force_mode(struct drm_device *dev)
/* disable the unused connectors while restoring the modesetting */ /* disable the unused connectors while restoring the modesetting */
__drm_helper_disable_unused_functions(dev); __drm_helper_disable_unused_functions(dev);
drm_modeset_unlock_all(dev);
} }
EXPORT_SYMBOL(drm_helper_resume_force_mode); EXPORT_SYMBOL(drm_helper_resume_force_mode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment