Skip to content

Commit

Permalink
drm/helper: lock all around force mode restore
Browse files Browse the repository at this point in the history
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: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Dave Airlie committed Mar 21, 2014
1 parent 53f1904 commit 3ea8785
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/drm_crtc_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,7 @@ void drm_helper_resume_force_mode(struct drm_device *dev)
int encoder_dpms;
bool ret;

drm_modeset_lock_all(dev);
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {

if (!crtc->enabled)
Expand Down Expand Up @@ -1017,6 +1018,7 @@ void drm_helper_resume_force_mode(struct drm_device *dev)

/* disable the unused connectors while restoring the modesetting */
__drm_helper_disable_unused_functions(dev);
drm_modeset_unlock_all(dev);
}
EXPORT_SYMBOL(drm_helper_resume_force_mode);

Expand Down

0 comments on commit 3ea8785

Please sign in to comment.