[Intel-gfx] [PATCH] drm/i915: disable non-sequential pfits on ivb/hsw
Ville Syrjälä
ville.syrjala at linux.intel.com
Wed Jan 13 08:43:37 PST 2016
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 <chris.bainbridge at gmail.com>
> > > ---
> > > 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
More information about the Intel-gfx
mailing list