diff options
author | Dave Airlie <airlied@redhat.com> | 2014-03-20 20:45:40 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-03-21 18:05:32 -0400 |
commit | 3ea8785503a05a92601ffa209ef7d560d271fa33 (patch) | |
tree | 697ae6a57143ddfbab5d823a6ebb34022bf14a45 /drivers/gpu/drm/drm_crtc_helper.c | |
parent | 53f1904bced78d7c00f5d874c662ec3ac85d0f9f (diff) |
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: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 5d2b7a5716e6..c0f2d6266070 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
@@ -983,6 +983,7 @@ void drm_helper_resume_force_mode(struct drm_device *dev) | |||
983 | int encoder_dpms; | 983 | int encoder_dpms; |
984 | bool ret; | 984 | bool ret; |
985 | 985 | ||
986 | drm_modeset_lock_all(dev); | ||
986 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { | 987 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { |
987 | 988 | ||
988 | if (!crtc->enabled) | 989 | if (!crtc->enabled) |
@@ -1017,6 +1018,7 @@ void drm_helper_resume_force_mode(struct drm_device *dev) | |||
1017 | 1018 | ||
1018 | /* disable the unused connectors while restoring the modesetting */ | 1019 | /* disable the unused connectors while restoring the modesetting */ |
1019 | __drm_helper_disable_unused_functions(dev); | 1020 | __drm_helper_disable_unused_functions(dev); |
1021 | drm_modeset_unlock_all(dev); | ||
1020 | } | 1022 | } |
1021 | EXPORT_SYMBOL(drm_helper_resume_force_mode); | 1023 | EXPORT_SYMBOL(drm_helper_resume_force_mode); |
1022 | 1024 | ||