From: Jesse Barnes <jbarnes at virtuousgeek.org> And make sure we register the BIOS config framebuffer if needed. --- drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_fb.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 762d580..612ff1b 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -146,6 +146,8 @@ struct intel_fbdev { struct intel_framebuffer ifb; struct list_head fbdev_list; struct drm_display_mode *our_mode; + bool bios_fb; + bool bios_fb_registered; }; struct intel_encoder { diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index 83d3f7b..12a0c14 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c @@ -194,6 +194,12 @@ static int intel_fb_find_or_create_single(struct drm_fb_helper *helper, int new_fb = 0; int ret; + /* A stolen BIOS fb may be new to the core */ + if (ifbdev->bios_fb && !ifbdev->bios_fb_registered) { + ifbdev->bios_fb_registered = true; + return 1; + } + if (!helper->fb) { ret = intelfb_create(ifbdev, sizes); if (ret) @@ -375,12 +381,16 @@ void intel_fbdev_init_bios(struct drm_device *dev) crtc->base.fb = &ifbdev->ifb.base; obj->pin_count++; + ifbdev->bios_fb = true; drm_fb_helper_single_add_all_connectors(&ifbdev->helper); - drm_fb_helper_hotplug_event(&ifbdev->helper); + drm_fb_helper_initial_config(&ifbdev->helper, bpp); vga_switcheroo_client_fb_set(dev->pdev, info); dev_priv->fbdev = ifbdev; + + DRM_DEBUG_KMS("using BIOS config for initial console\n"); + return; } -- 1.7.10