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 10:50:48 +0300	[thread overview]
Message-ID: <20140423075048.GX18465@intel.com> (raw)
In-Reply-To: <1398200758-26107-1-git-send-email-chris@chris-wilson.co.uk>

On Tue, Apr 22, 2014 at 10:05:58PM +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
> 
> 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>
> ---
>  drivers/gpu/drm/i915/intel_fbdev.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
> index b16116db6c37..28220ca838df 100644
> --- a/drivers/gpu/drm/i915/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/intel_fbdev.c
> @@ -133,6 +133,12 @@ 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_framebuffer_reference(&ifbdev->fb->base);

unreference

I know intel_fb == ifbdev->fb, but still I think it would look a bit
less confusing if you passed &intel_fb->base to
drm_framebuffer_unreference() instead of &ifbdev->fb->base. Simply
because you use intel_fb->base in the size checks just before.

> +		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

  parent reply	other threads:[~2014-04-23  7:50 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               ` [Intel-gfx] " Ville Syrjälä
2014-04-23 11:03                 ` Jani Nikula
2014-04-23  7:50           ` Ville Syrjälä [this message]
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=20140423075048.GX18465@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