From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Discard BIOS framebuffers too small to accommodate chosen mode Date: Wed, 23 Apr 2014 09:11:25 +0200 Message-ID: <20140423071125.GS10722@phenom.ffwll.local> References: <535696DB.2080104@t-online.de> <1398200758-26107-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f48.google.com (mail-ee0-f48.google.com [74.125.83.48]) by gabe.freedesktop.org (Postfix) with ESMTP id F153C6E9C5 for ; Wed, 23 Apr 2014 00:11:31 -0700 (PDT) Received: by mail-ee0-f48.google.com with SMTP id b57so383838eek.21 for ; Wed, 23 Apr 2014 00:11:31 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1398200758-26107-1-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson Cc: Daniel Vetter , linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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 > 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 > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77767 > Signed-off-by: Chris Wilson > Cc: Jesse Barnes > --- > 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); > + intel_fb = ifbdev->fb = NULL; Hm, maybe add a DRM_DEBUG_KMS("BIOS fb to small, releasing it\n"); here. With or without this is Reviewed-by: Daniel Vetter > + } > 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 > -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch