aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_fb_helper.c
diff options
context:
space:
mode:
authorDavid Fries <david@fries.net>2010-12-12 13:39:22 -0500
committerDave Airlie <airlied@redhat.com>2010-12-20 22:00:04 -0500
commit3ce05168907c9b1358492a73badb0ff1603fb81d (patch)
treed5caa539bf4948675cfcd1347b1815c81d6879f1 /drivers/gpu/drm/drm_fb_helper.c
parent7d6aa80c35bb1f706e2894100dcc51e19a83f913 (diff)
drm/kms: load fbcon from drm_kms_helper
Kconfig says fbcon is required by drm_kms_helper. If radeon, fbcon, and drm_kms_helper are all modules, radeon is auto loaded (by PCI id?), drm_kms_helper is loaded because of the module dependency, but fbcon isn't loaded leaving the console unusable. Since fbcon is required and there isn't an explicit module dependency, request the module to be loaded from drm_kms_helper. Signed-off-by: David Fries <david@fries.net> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_fb_helper.c')
-rw-r--r--drivers/gpu/drm/drm_fb_helper.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index aa377115483b..5c4f9b9ecdc0 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1533,3 +1533,24 @@ bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
1533} 1533}
1534EXPORT_SYMBOL(drm_fb_helper_hotplug_event); 1534EXPORT_SYMBOL(drm_fb_helper_hotplug_event);
1535 1535
1536/* The Kconfig DRM_KMS_HELPER selects FRAMEBUFFER_CONSOLE (if !EMBEDDED)
1537 * but the module doesn't depend on any fb console symbols. At least
1538 * attempt to load fbcon to avoid leaving the system without a usable console.
1539 */
1540#if defined(CONFIG_FRAMEBUFFER_CONSOLE_MODULE) && !defined(CONFIG_EMBEDDED)
1541static int __init drm_fb_helper_modinit(void)
1542{
1543 const char *name = "fbcon";
1544 struct module *fbcon;
1545
1546 mutex_lock(&module_mutex);
1547 fbcon = find_module(name);
1548 mutex_unlock(&module_mutex);
1549
1550 if (!fbcon)
1551 request_module_nowait(name);
1552 return 0;
1553}
1554
1555module_init(drm_fb_helper_modinit);
1556#endif