public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Discard BIOS framebuffers too small to accommodate chosen mode
Date: Wed, 23 Apr 2014 11:24:21 +0300	[thread overview]
Message-ID: <20140423082421.GE18465@intel.com> (raw)
In-Reply-To: <1398239671-4135-1-git-send-email-chris@chris-wilson.co.uk>

On Wed, Apr 23, 2014 at 08:54:31AM +0100, Chris Wilson wrote:
> If the inherited BIOS framebuffer is smaller than the mode selected for
> fbdev, then if we continue to use it then we cause display corruption as
> we do not setup the panel fitter to upscale.
> 
> Regression from commit d978ef14456a38034f6c0e94a794129501f89200
> Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> Date:   Fri Mar 7 08:57:51 2014 -0800
> 
>     drm/i915: Wrap the preallocated BIOS framebuffer and preserve for KMS fbcon v12
> 
> v2: Add a debug message to track the discard of the BIOS fb.
> v3: Ville pointed out the difference between ref/unref
> 
> Reported-by: Knut Petersen <Knut_Petersen@t-online.de>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77767
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/intel_fbdev.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
> index b16116db6c37..fbe7941f88c8 100644
> --- a/drivers/gpu/drm/i915/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/intel_fbdev.c
> @@ -133,6 +133,16 @@ static int intelfb_create(struct drm_fb_helper *helper,
>  
>  	mutex_lock(&dev->struct_mutex);
>  
> +	if (intel_fb &&
> +	    (sizes->fb_width > intel_fb->base.width ||
> +	     sizes->fb_height > intel_fb->base.height)) {
> +		DRM_DEBUG_KMS("BIOS fb too small (%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_unreference(&intel_fb->base);
> +		intel_fb = ifbdev->fb = NULL;
> +	}
>  	if (!intel_fb || WARN_ON(!intel_fb->obj)) {
>  		DRM_DEBUG_KMS("no BIOS fb, allocating a new one\n");
>  		ret = intelfb_alloc(helper, sizes);
> -- 
> 1.9.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2014-04-23  8:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-21 16:46 [Bug 3.15-rc2] intel framebuffer broken Knut Petersen
2014-04-22 11:54 ` [Intel-gfx] " Jani Nikula
2014-04-22 13:59   ` [Intel-gfx] [Bug 3.15-rc2] [bisected] " Knut Petersen
2014-04-22 15:10     ` Jani Nikula
2014-04-22 16:20       ` Knut Petersen
2014-04-22 21:05         ` [PATCH] drm/i915: Discard BIOS framebuffers too small to accommodate chosen mode Chris Wilson
2014-04-23  7:11           ` Daniel Vetter
2014-04-23  7:39             ` Chris Wilson
2014-04-23  7:54             ` Chris Wilson
2014-04-23  8:24               ` Ville Syrjälä [this message]
2014-04-23 11:03                 ` [Intel-gfx] " Jani Nikula
2014-04-23  7:50           ` Ville Syrjälä
2014-04-22 16:22       ` [Intel-gfx] [Bug 3.15-rc2] [bisected] intel framebuffer broken Imre Deak
2014-04-22 17:33         ` Daniel Vetter

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=20140423082421.GE18465@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox