From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754730AbcAMQny (ORCPT ); Wed, 13 Jan 2016 11:43:54 -0500 Received: from mga01.intel.com ([192.55.52.88]:22831 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754508AbcAMQnl (ORCPT ); Wed, 13 Jan 2016 11:43:41 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,290,1449561600"; d="scan'208";a="889775555" Date: Wed, 13 Jan 2016 18:43:37 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Chris Bainbridge , daniel.vetter@intel.com, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [Intel-gfx] [PATCH] drm/i915: disable non-sequential pfits on ivb/hsw Message-ID: <20160113164337.GK23290@intel.com> References: <20160113143347.GA4866@localhost> <20160113161331.GX19130@phenom.ffwll.local> <20160113161415.GY19130@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160113161415.GY19130@phenom.ffwll.local> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 13, 2016 at 05:14:15PM +0100, Daniel Vetter wrote: > On Wed, Jan 13, 2016 at 05:13:31PM +0100, Daniel Vetter wrote: > > On Wed, Jan 13, 2016 at 02:33:47PM +0000, Chris Bainbridge wrote: > > > The existing code assumes a sequential mapping of panel fitters to pipes > > > (pfit0-pipeA, pfit1-pipeB, pfit2-pipeC), but boot firmware can > > > arbitrarily assign any pipe to a pfit on IVB hardware e.g. Macbook UEFI > > > uses pfit 0 and pipe C for eDP1 when the firmware boots in a non-16:10 > > > resolution (the last-used resolution is stored in NVRAM by OS X so the > > > firmware can immediately restore it at boot). When this happens, the > > > display will appear letterboxed due to incorrect aspect ratio and > > > attempting to switch to alternative resolutions will fail. Fix this by > > > disabling any panel fitters which have been non-sequentially assigned at > > > boot time. > > > > > > Link: https://bugs.freedesktop.org/show_bug.cgi?id=93523 > > > Signed-off-by: Chris Bainbridge > > > --- > > > drivers/gpu/drm/i915/intel_display.c | 26 ++++++++++++++++++-------- > > > 1 file changed, 18 insertions(+), 8 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > > > index 32cf97346978..9e588139a2dd 100644 > > > --- a/drivers/gpu/drm/i915/intel_display.c > > > +++ b/drivers/gpu/drm/i915/intel_display.c > > > @@ -9170,6 +9170,24 @@ static void ironlake_get_pfit_config(struct intel_crtc *crtc, > > > > get_config should never touch hw state, only read it out. The right place > > to put fixup code is in sanitize_crtc. What we need in get_config would be > > a check to make sure pfit is assigned to our pipe (and not take over the > > state if so). > > maybe even throw a new sanitize_pfit function in for clarity, since the > problem is that pfit is _not_ associated with the crtc at a hw level. Ideally we'd make the crtc<->pfit mapping flexible in the driver since IIRC the first pfit could have special powers. But I guess it could be a bit too much work for little gain. Although it shouldn't be too different from the SKL scaler assignment stuff, so maybe not that much work... -- Ville Syrjälä Intel OTC