diff options
| -rw-r--r-- | drivers/gpu/drm/i915/intel_fbdev.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c index b4d44e62f0c7..fce4a0d93c0b 100644 --- a/drivers/gpu/drm/i915/intel_fbdev.c +++ b/drivers/gpu/drm/i915/intel_fbdev.c | |||
| @@ -132,6 +132,16 @@ static int intelfb_create(struct drm_fb_helper *helper, | |||
| 132 | 132 | ||
| 133 | mutex_lock(&dev->struct_mutex); | 133 | mutex_lock(&dev->struct_mutex); |
| 134 | 134 | ||
| 135 | if (intel_fb && | ||
| 136 | (sizes->fb_width > intel_fb->base.width || | ||
| 137 | sizes->fb_height > intel_fb->base.height)) { | ||
| 138 | DRM_DEBUG_KMS("BIOS fb too small (%dx%d), we require (%dx%d)," | ||
| 139 | " releasing it\n", | ||
| 140 | intel_fb->base.width, intel_fb->base.height, | ||
| 141 | sizes->fb_width, sizes->fb_height); | ||
| 142 | drm_framebuffer_unreference(&intel_fb->base); | ||
| 143 | intel_fb = ifbdev->fb = NULL; | ||
| 144 | } | ||
| 135 | if (!intel_fb || WARN_ON(!intel_fb->obj)) { | 145 | if (!intel_fb || WARN_ON(!intel_fb->obj)) { |
| 136 | DRM_DEBUG_KMS("no BIOS fb, allocating a new one\n"); | 146 | DRM_DEBUG_KMS("no BIOS fb, allocating a new one\n"); |
| 137 | ret = intelfb_alloc(helper, sizes); | 147 | ret = intelfb_alloc(helper, sizes); |
