If we keep the BIOS framebuffer, stick to the desired framebuffer size
authorkettenis <kettenis@openbsd.org>
Mon, 30 Jul 2018 19:40:53 +0000 (19:40 +0000)
committerkettenis <kettenis@openbsd.org>
Mon, 30 Jul 2018 19:40:53 +0000 (19:40 +0000)
instead of using the actual framebuffer size.  This fixes a problem seen
on various Apple machines where the BIOS framebuffer is bigger than the
actual display.

ok jcs@, mpi@

sys/dev/pci/drm/i915/intel_fbdev.c

index bf221b0..a03b13d 100644 (file)
@@ -220,8 +220,10 @@ static int intelfb_create(struct drm_fb_helper *helper,
        } else {
                DRM_DEBUG_KMS("re-using BIOS fb\n");
                prealloc = true;
+#ifdef __linux__
                sizes->fb_width = intel_fb->base.width;
                sizes->fb_height = intel_fb->base.height;
+#endif
        }
 
        obj = intel_fb->obj;