Skip to content

Commit e2809c7

Browse files
committed
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 <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
1 parent 19a93f0 commit e2809c7

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

drivers/gpu/drm/drm_fb_helper.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,18 @@ bool drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper)
347347
{
348348
struct drm_device *dev = fb_helper->dev;
349349
bool ret;
350+
bool do_delayed = false;
351+
350352
drm_modeset_lock_all(dev);
351353
ret = restore_fbdev_mode(fb_helper);
354+
355+
do_delayed = fb_helper->delayed_hotplug;
356+
if (do_delayed)
357+
fb_helper->delayed_hotplug = false;
352358
drm_modeset_unlock_all(dev);
359+
360+
if (do_delayed)
361+
drm_fb_helper_hotplug_event(fb_helper);
353362
return ret;
354363
}
355364
EXPORT_SYMBOL(drm_fb_helper_restore_fbdev_mode_unlocked);
@@ -888,10 +897,6 @@ int drm_fb_helper_set_par(struct fb_info *info)
888897

889898
drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper);
890899

891-
if (fb_helper->delayed_hotplug) {
892-
fb_helper->delayed_hotplug = false;
893-
drm_fb_helper_hotplug_event(fb_helper);
894-
}
895900
return 0;
896901
}
897902
EXPORT_SYMBOL(drm_fb_helper_set_par);

0 commit comments

Comments
 (0)