[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140423075048.GX18465@intel.com>
Date: Wed, 23 Apr 2014 10:50:48 +0300
From: Ville Syrjälä <ville.syrjala@...ux.intel.com>
To: Chris Wilson <chris@...is-wilson.co.uk>
Cc: intel-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Daniel Vetter <daniel.vetter@...ll.ch>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Discard BIOS framebuffers too
small to accommodate chosen mode
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@...tuousgeek.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@...nline.de>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77767
> Signed-off-by: Chris Wilson <chris@...is-wilson.co.uk>
> Cc: Jesse Barnes <jbarnes@...tuousgeek.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@...ts.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists