* Re: [PATCH] drm/i915: Discard large BIOS framebuffers causing display corruption. [not found] <7F167771-2D0A-40AD-8162-645E7EE2B9A0@outlook.com> @ 2022-01-07 12:47 ` Jani Nikula 2022-01-07 13:59 ` Aditya Garg 0 siblings, 1 reply; 4+ messages in thread From: Jani Nikula @ 2022-01-07 12:47 UTC (permalink / raw) To: Ashish Arora, joonas.lahtinen, rodrigo.vivi Cc: intel-gfx, Linux Kernel Mailing List On Fri, 07 Jan 2022, Ashish Arora <ashisharora.linux@outlook.com> wrote: > From: Ashish Arora <ashisharora.linux@outlook.com> > > On certain 4k panels, the BIOS framebuffer is larger than what panel > requires causing display corruption. Introduce a check for the same. This is quite thin on details. Is there a bug report? Moreover, if this is what we want, this should be combined with the conditions that follow resulting in a "!=" check instead of separate "<" and ">". BR, Jani. > > Signed-off-by: Ashish Arora <ashisharora.linux@outlook.com> > --- > drivers/gpu/drm/i915/display/intel_fbdev.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c > index adc3a81be..f9952e1f8 100644 > --- a/drivers/gpu/drm/i915/display/intel_fbdev.c > +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c > @@ -193,6 +193,17 @@ static int intelfb_create(struct drm_fb_helper *helper, > struct drm_i915_gem_object *obj; > int ret; > > + if (intel_fb && > + (sizes->fb_width < intel_fb->base.width || > + sizes->fb_height < intel_fb->base.height)) { > + drm_dbg_kms(&dev_priv->drm, > + "BIOS fb too large (%dx%d), we require (%dx%d)," > + " releasing it\n", > + intel_fb->base.width, intel_fb->base.height, > + sizes->fb_width, sizes->fb_height); > + drm_framebuffer_put(&intel_fb->base); > + intel_fb = ifbdev->fb = NULL; > + } > if (intel_fb && > (sizes->fb_width > intel_fb->base.width || > sizes->fb_height > intel_fb->base.height)) { -- Jani Nikula, Intel Open Source Graphics Center ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Discard large BIOS framebuffers causing display corruption. 2022-01-07 12:47 ` [PATCH] drm/i915: Discard large BIOS framebuffers causing display corruption Jani Nikula @ 2022-01-07 13:59 ` Aditya Garg 0 siblings, 0 replies; 4+ messages in thread From: Aditya Garg @ 2022-01-07 13:59 UTC (permalink / raw) To: Jani Nikula Cc: joonas.lahtinen, rodrigo.vivi, intel-gfx, Linux Kernel Mailing List > On 07-Jan-2022, at 6:17 PM, Jani Nikula <jani.nikula@linux.intel.com> wrote: > > On Fri, 07 Jan 2022, Ashish Arora <ashisharora.linux@outlook.com> wrote: >> From: Ashish Arora <ashisharora.linux@outlook.com> >> >> On certain 4k panels, the BIOS framebuffer is larger than what panel >> requires causing display corruption. Introduce a check for the same. > > This is quite thin on details. Is there a bug report? No bug report, but an issue I am facing myself. This patch seems to fix it. > > Moreover, if this is what we want, this should be combined with the > conditions that follow resulting in a "!=" check instead of separate "<" > and ">”. Sending a version 2 > > BR, > Jani. > > > >> >> Signed-off-by: Ashish Arora <ashisharora.linux@outlook.com> >> --- >> drivers/gpu/drm/i915/display/intel_fbdev.c | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c >> index adc3a81be..f9952e1f8 100644 >> --- a/drivers/gpu/drm/i915/display/intel_fbdev.c >> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c >> @@ -193,6 +193,17 @@ static int intelfb_create(struct drm_fb_helper *helper, >> struct drm_i915_gem_object *obj; >> int ret; >> >> + if (intel_fb && >> + (sizes->fb_width < intel_fb->base.width || >> + sizes->fb_height < intel_fb->base.height)) { >> + drm_dbg_kms(&dev_priv->drm, >> + "BIOS fb too large (%dx%d), we require (%dx%d)," >> + " releasing it\n", >> + intel_fb->base.width, intel_fb->base.height, >> + sizes->fb_width, sizes->fb_height); >> + drm_framebuffer_put(&intel_fb->base); >> + intel_fb = ifbdev->fb = NULL; >> + } >> if (intel_fb && >> (sizes->fb_width > intel_fb->base.width || >> sizes->fb_height > intel_fb->base.height)) { > > -- > Jani Nikula, Intel Open Source Graphics Center ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Discard large BIOS framebuffers causing display corruption. @ 2022-01-08 5:11 Orlando Chamberlain [not found] ` <AC748346-8777-4107-9E7D-526D5854F11B@outlook.com> 0 siblings, 1 reply; 4+ messages in thread From: Orlando Chamberlain @ 2022-01-08 5:11 UTC (permalink / raw) To: jani.nikula Cc: ashisharora.linux, intel-gfx, joonas.lahtinen, linux-kernel, rodrigo.vivi, Aun-Ali Zaidi I haven't observed "display corruption", but on my MacBookPro16,1 the bottom and right edges of the TTY are not on the screen, so a few lines of text cannot be seen. This also occurs on the internal displays of all (as far as I know) other 2018-2020 Intel Macbooks when using the Intel GPU (The 15" and 16" ones also have an AMDGPU, but this issue occurs when they have the Intel GPU set as the boot gpu). There's a similar patch that hasn't been sent upstream that people with these Macbooks have been using: https://github.com/aunali1/linux-mbp-arch/blob/master/7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch Cc: Aun-Ali Zaidi <admin@kodeit.net> -- Thanks, Orlando ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <AC748346-8777-4107-9E7D-526D5854F11B@outlook.com>]
* Re: [PATCH] drm/i915: Discard large BIOS framebuffers causing display corruption. [not found] ` <AC748346-8777-4107-9E7D-526D5854F11B@outlook.com> @ 2022-01-08 10:26 ` Aun-Ali Zaidi 0 siblings, 0 replies; 4+ messages in thread From: Aun-Ali Zaidi @ 2022-01-08 10:26 UTC (permalink / raw) To: Ashish Arora Cc: Orlando Chamberlain, jani.nikula, intel-gfx, joonas.lahtinen, Linux Kernel Mailing List, rodrigo.vivi, Aditya Garg LGTM — Aun-Ali Zaidi > On Jan 8, 2022, at 3:59 AM, Ashish Arora <ashisharora.linux@outlook.com> wrote: > > > I believe I forgot to add Aditya to the conversation. So, I am sending the patch as an attachment for those who want to test :)<0001-drm.patch> ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-08 10:41 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <7F167771-2D0A-40AD-8162-645E7EE2B9A0@outlook.com> 2022-01-07 12:47 ` [PATCH] drm/i915: Discard large BIOS framebuffers causing display corruption Jani Nikula 2022-01-07 13:59 ` Aditya Garg 2022-01-08 5:11 Orlando Chamberlain [not found] ` <AC748346-8777-4107-9E7D-526D5854F11B@outlook.com> 2022-01-08 10:26 ` Aun-Ali Zaidi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).