Commit b1f4b659 authored by Dave Airlie's avatar Dave Airlie Committed by Luis Henriques

drm/fb_helper: move deferred fb checking into restore mode (v2)

commit e2809c7d upstream.

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: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 1cc3d117
...@@ -331,9 +331,18 @@ bool drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper) ...@@ -331,9 +331,18 @@ bool drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper)
{ {
struct drm_device *dev = fb_helper->dev; struct drm_device *dev = fb_helper->dev;
bool ret; bool ret;
bool do_delayed = false;
drm_modeset_lock_all(dev); drm_modeset_lock_all(dev);
ret = restore_fbdev_mode(fb_helper); ret = restore_fbdev_mode(fb_helper);
do_delayed = fb_helper->delayed_hotplug;
if (do_delayed)
fb_helper->delayed_hotplug = false;
drm_modeset_unlock_all(dev); drm_modeset_unlock_all(dev);
if (do_delayed)
drm_fb_helper_hotplug_event(fb_helper);
return ret; return ret;
} }
EXPORT_SYMBOL(drm_fb_helper_restore_fbdev_mode_unlocked); EXPORT_SYMBOL(drm_fb_helper_restore_fbdev_mode_unlocked);
...@@ -858,10 +867,6 @@ int drm_fb_helper_set_par(struct fb_info *info) ...@@ -858,10 +867,6 @@ int drm_fb_helper_set_par(struct fb_info *info)
drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper); drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper);
if (fb_helper->delayed_hotplug) {
fb_helper->delayed_hotplug = false;
drm_fb_helper_hotplug_event(fb_helper);
}
return 0; return 0;
} }
EXPORT_SYMBOL(drm_fb_helper_set_par); EXPORT_SYMBOL(drm_fb_helper_set_par);
......
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