From b5373dadca510a7ba35f71e9570e6457526952e9 Mon Sep 17 00:00:00 2001 From: David Fries Date: Sun, 12 Dec 2010 12:39:22 -0600 Subject: [PATCH] --- yaml --- r: 228615 b: refs/heads/master c: 3ce05168907c9b1358492a73badb0ff1603fb81d h: refs/heads/master i: 228613: 7107d553de98cab3fa109329bfa9a07b279b3924 228611: 4b7ed8594b3243cfcb903232210fd65674a757ad 228607: a77bbaa93009277b92d4b3866a6f1c2853918c88 v: v3 --- [refs] | 2 +- trunk/drivers/gpu/drm/drm_fb_helper.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5c356643d2c5..8cbd850c0c43 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7d6aa80c35bb1f706e2894100dcc51e19a83f913 +refs/heads/master: 3ce05168907c9b1358492a73badb0ff1603fb81d diff --git a/trunk/drivers/gpu/drm/drm_fb_helper.c b/trunk/drivers/gpu/drm/drm_fb_helper.c index aa377115483b..5c4f9b9ecdc0 100644 --- a/trunk/drivers/gpu/drm/drm_fb_helper.c +++ b/trunk/drivers/gpu/drm/drm_fb_helper.c @@ -1533,3 +1533,24 @@ bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper) } EXPORT_SYMBOL(drm_fb_helper_hotplug_event); +/* The Kconfig DRM_KMS_HELPER selects FRAMEBUFFER_CONSOLE (if !EMBEDDED) + * but the module doesn't depend on any fb console symbols. At least + * attempt to load fbcon to avoid leaving the system without a usable console. + */ +#if defined(CONFIG_FRAMEBUFFER_CONSOLE_MODULE) && !defined(CONFIG_EMBEDDED) +static int __init drm_fb_helper_modinit(void) +{ + const char *name = "fbcon"; + struct module *fbcon; + + mutex_lock(&module_mutex); + fbcon = find_module(name); + mutex_unlock(&module_mutex); + + if (!fbcon) + request_module_nowait(name); + return 0; +} + +module_init(drm_fb_helper_modinit); +#endif