From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ashish Arora <ashisharora.linux@outlook.com>,
"joonas.lahtinen@linux.intel.com"
<joonas.lahtinen@linux.intel.com>,
"rodrigo.vivi@intel.com" <rodrigo.vivi@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Discard large BIOS framebuffers causing display corruption.
Date: Fri, 07 Jan 2022 14:47:34 +0200 [thread overview]
Message-ID: <87sftzlnkp.fsf@intel.com> (raw)
In-Reply-To: <7F167771-2D0A-40AD-8162-645E7EE2B9A0@outlook.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ashish Arora <ashisharora.linux@outlook.com>,
"joonas.lahtinen@linux.intel.com"
<joonas.lahtinen@linux.intel.com>,
"rodrigo.vivi@intel.com" <rodrigo.vivi@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/i915: Discard large BIOS framebuffers causing display corruption.
Date: Fri, 07 Jan 2022 14:47:34 +0200 [thread overview]
Message-ID: <87sftzlnkp.fsf@intel.com> (raw)
In-Reply-To: <7F167771-2D0A-40AD-8162-645E7EE2B9A0@outlook.com>
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
next prev parent reply other threads:[~2022-01-07 12:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 12:35 [Intel-gfx] [PATCH] drm/i915: Discard large BIOS framebuffers causing display corruption Ashish Arora
2022-01-07 12:47 ` Jani Nikula [this message]
2022-01-07 12:47 ` Jani Nikula
2022-01-07 13:59 ` [Intel-gfx] " Aditya Garg
2022-01-07 13:59 ` Aditya Garg
2022-01-07 14:02 ` [Intel-gfx] " Aditya Garg
-- strict thread matches above, loose matches on Subject: below --
2022-01-08 5:11 Orlando Chamberlain
2022-01-08 8:55 ` Ashish Arora
2022-01-08 9:59 ` Ashish Arora
2022-01-08 10:26 ` Aun-Ali Zaidi
2022-01-08 10:43 ` Ashish Arora
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sftzlnkp.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=ashisharora.linux@outlook.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.