public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/fbdev: Discard large BIOS framebuffers
@ 2025-01-21 10:42 Atharva Tiwari
  2025-01-21 12:05 ` Jani Nikula
  0 siblings, 1 reply; 2+ messages in thread
From: Atharva Tiwari @ 2025-01-21 10:42 UTC (permalink / raw)
  Cc: evepolonium, Jani Nikula, Rodrigo Vivi, Joonas Lahtinen,
	Tvrtko Ursulin, David Airlie, Simona Vetter, intel-gfx, intel-xe,
	dri-devel, linux-kernel

On certain 4K panels, the BIOS framebuffer
exceeds the panel's required dimensions,
leading to display corruption.
This patch introduces a validation check to address the issue.

Signed-off-by: Atharva Tiwari <evepolonium@gmail.com>
---
 drivers/gpu/drm/i915/display/intel_fbdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
index 00852ff5b247..e8cf06772c31 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
@@ -197,10 +197,10 @@ static int intelfb_create(struct drm_fb_helper *helper,
 	ifbdev->fb = NULL;
 
 	if (fb &&
-	    (sizes->fb_width > fb->base.width ||
-	     sizes->fb_height > fb->base.height)) {
+	    (sizes->fb_width != fb->base.width ||
+	     sizes->fb_height != fb->base.height)) {
 		drm_dbg_kms(&dev_priv->drm,
-			    "BIOS fb too small (%dx%d), we require (%dx%d),"
+			    "BIOS fb dimensions mismatch (%dx%d), we require (%dx%d),"
 			    " releasing it\n",
 			    fb->base.width, fb->base.height,
 			    sizes->fb_width, sizes->fb_height);
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/i915/fbdev: Discard large BIOS framebuffers
  2025-01-21 10:42 [PATCH] drm/i915/fbdev: Discard large BIOS framebuffers Atharva Tiwari
@ 2025-01-21 12:05 ` Jani Nikula
  0 siblings, 0 replies; 2+ messages in thread
From: Jani Nikula @ 2025-01-21 12:05 UTC (permalink / raw)
  To: Atharva Tiwari
  Cc: evepolonium, Rodrigo Vivi, Joonas Lahtinen, Tvrtko Ursulin,
	David Airlie, Simona Vetter, intel-gfx, intel-xe, dri-devel,
	linux-kernel, Ville Syrjala

On Tue, 21 Jan 2025, Atharva Tiwari <evepolonium@gmail.com> wrote:
> On certain 4K panels, the BIOS framebuffer
> exceeds the panel's required dimensions,
> leading to display corruption.
> This patch introduces a validation check to address the issue.
>
> Signed-off-by: Atharva Tiwari <evepolonium@gmail.com>

See [1], [2], and [3].

Please add your dmesg with debugs enabled to [3].

BR,
Jani.


[1] https://lore.kernel.org/r/31D69334-DEF9-41B7-968B-B847796926FF@outlook.com

[2] https://lore.kernel.org/r/Yd7ZnBlU0sjP4qcG@intel.com

[3] https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13466


> ---
>  drivers/gpu/drm/i915/display/intel_fbdev.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
> index 00852ff5b247..e8cf06772c31 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
> @@ -197,10 +197,10 @@ static int intelfb_create(struct drm_fb_helper *helper,
>  	ifbdev->fb = NULL;
>  
>  	if (fb &&
> -	    (sizes->fb_width > fb->base.width ||
> -	     sizes->fb_height > fb->base.height)) {
> +	    (sizes->fb_width != fb->base.width ||
> +	     sizes->fb_height != fb->base.height)) {
>  		drm_dbg_kms(&dev_priv->drm,
> -			    "BIOS fb too small (%dx%d), we require (%dx%d),"
> +			    "BIOS fb dimensions mismatch (%dx%d), we require (%dx%d),"
>  			    " releasing it\n",
>  			    fb->base.width, fb->base.height,
>  			    sizes->fb_width, sizes->fb_height);

-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-21 12:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-21 10:42 [PATCH] drm/i915/fbdev: Discard large BIOS framebuffers Atharva Tiwari
2025-01-21 12:05 ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox