aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-11-25 22:15:24 -0500
committerDave Airlie <airlied@redhat.com>2014-12-08 18:56:45 -0500
commite2809c7db818df6bbd0edf843e1beb2fbc9d8541 (patch)
treeed7ba4d60fc1a8c1111430bc29ea4110adef682b
parent19a93f042fc241ecdf98543cedfe7c171f8cdf53 (diff)
drm/fb_helper: move deferred fb checking into restore mode (v2)
On MST systems the monitors don't appear when we set the fb up, but plymouth opens the drm device and holds it open while they come up, when plymouth finishes and lastclose gets called we don't do the delayed fb probe, so the monitor never appears on the console. Fix this by moving the delayed checking into the mode restore. v2: Daniel suggested that ->delayed_hotplug is set under the mode_config mutex, so we should check it under that as well, while we are in the area. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/drm_fb_helper.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 09d47e9ba026..a467460f2aa6 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -347,9 +347,18 @@ bool drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper)
347{ 347{
348 struct drm_device *dev = fb_helper->dev; 348 struct drm_device *dev = fb_helper->dev;
349 bool ret; 349 bool ret;
350 bool do_delayed = false;
351
350 drm_modeset_lock_all(dev); 352 drm_modeset_lock_all(dev);
351 ret = restore_fbdev_mode(fb_helper); 353 ret = restore_fbdev_mode(fb_helper);
354
355 do_delayed = fb_helper->delayed_hotplug;
356 if (do_delayed)
357 fb_helper->delayed_hotplug = false;
352 drm_modeset_unlock_all(dev); 358 drm_modeset_unlock_all(dev);
359
360 if (do_delayed)
361 drm_fb_helper_hotplug_event(fb_helper);
353 return ret; 362 return ret;
354} 363}
355EXPORT_SYMBOL(drm_fb_helper_restore_fbdev_mode_unlocked); 364EXPORT_SYMBOL(drm_fb_helper_restore_fbdev_mode_unlocked);
@@ -888,10 +897,6 @@ int drm_fb_helper_set_par(struct fb_info *info)
888 897
889 drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper); 898 drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper);
890 899
891 if (fb_helper->delayed_hotplug) {
892 fb_helper->delayed_hotplug = false;
893 drm_fb_helper_hotplug_event(fb_helper);
894 }
895 return 0; 900 return 0;
896} 901}
897EXPORT_SYMBOL(drm_fb_helper_set_par); 902EXPORT_SYMBOL(drm_fb_helper_set_par);