drm/i915: Discard large BIOS framebuffers causing display corruption.

On certain 4k panels, the BIOS framebuffer is larger than what panel
requires causing display corruption. Introduce a check for the same.

Signed-off-by: Ashish Arora <ashisharora.linux@outlook.com>
Signed-off-by: Aun-Ali Zaidi <admin@kodeit.net>
This commit is contained in:
Ashish Arora
2022-01-08 21:43:18 +11:00
committed by Aun-Ali Zaidi
parent 870d05ccde
commit dca247bee8
+3 -3
View File
@@ -192,10 +192,10 @@ static int intelfb_create(struct drm_fb_helper *helper,
int ret;
if (intel_fb &&
(sizes->fb_width > intel_fb->base.width ||
sizes->fb_height > intel_fb->base.height)) {
(sizes->fb_width != intel_fb->base.width ||
sizes->fb_height != intel_fb->base.height)) {
drm_dbg_kms(&dev_priv->drm,
"BIOS fb too small (%dx%d), we require (%dx%d),"
"BIOS fb not valid (%dx%d), we require (%dx%d),"
" releasing it\n",
intel_fb->base.width, intel_fb->base.height,
sizes->fb_width, sizes->fb_height);