diff mbox

[v2,1/4] drm/i915/glk: Fix watermark computations for third sprite plane

Message ID 20170223071600.14356-2-ander.conselvan.de.oliveira@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ander Conselvan de Oliveira Feb. 23, 2017, 7:15 a.m. UTC
Geminilake has a third sprite plane (or fourth universal plane) that is
independent from the cursor. Make sure that for_each_plane_id_on_crtc()
is aware of that extra plane so that the watermark code takes it into
account.

Fixes: e9c9882556fc ("drm/i915/glk: Configure number of sprite planes properly")
Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: <drm-intel-fixes@lists.freedesktop.org>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Ville Syrjala Feb. 23, 2017, 10:02 a.m. UTC | #1
On Thu, Feb 23, 2017 at 09:15:57AM +0200, Ander Conselvan de Oliveira wrote:
> Geminilake has a third sprite plane (or fourth universal plane) that is
> independent from the cursor. Make sure that for_each_plane_id_on_crtc()
> is aware of that extra plane so that the watermark code takes it into
> account.

I wonder if we still have various pin_count limits and whatnot based on
some hardcoded theoretical max numner of planes...

> 
> Fixes: e9c9882556fc ("drm/i915/glk: Configure number of sprite planes properly")
> Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Cc: <drm-intel-fixes@lists.freedesktop.org>
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_drv.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index e346b2d..70892ea 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -293,6 +293,7 @@ enum plane_id {
>  	PLANE_PRIMARY,
>  	PLANE_SPRITE0,
>  	PLANE_SPRITE1,
> +	PLANE_SPRITE2,
>  	PLANE_CURSOR,
>  	I915_MAX_PLANES,
>  };
> -- 
> 2.9.3
Ander Conselvan de Oliveira Feb. 23, 2017, 12:24 p.m. UTC | #2
On Thu, 2017-02-23 at 12:02 +0200, Ville Syrjälä wrote:
> On Thu, Feb 23, 2017 at 09:15:57AM +0200, Ander Conselvan de Oliveira wrote:
> > Geminilake has a third sprite plane (or fourth universal plane) that is
> > independent from the cursor. Make sure that for_each_plane_id_on_crtc()
> > is aware of that extra plane so that the watermark code takes it into
> > account.
> 
> I wonder if we still have various pin_count limits and whatnot based on
> some hardcoded theoretical max numner of planes...

Where were those before? I can't see anything obvious but I also don't know
where to look for them?

Ander

> > Fixes: e9c9882556fc ("drm/i915/glk: Configure number of sprite planes properly")
> > Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Cc: Daniel Vetter <daniel.vetter@intel.com>
> > Cc: Jani Nikula <jani.nikula@linux.intel.com>
> > Cc: intel-gfx@lists.freedesktop.org
> > Cc: <drm-intel-fixes@lists.freedesktop.org>
> > Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> > ---
> >  drivers/gpu/drm/i915/i915_drv.h | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index e346b2d..70892ea 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -293,6 +293,7 @@ enum plane_id {
> >  	PLANE_PRIMARY,
> >  	PLANE_SPRITE0,
> >  	PLANE_SPRITE1,
> > +	PLANE_SPRITE2,
> >  	PLANE_CURSOR,
> >  	I915_MAX_PLANES,
> >  };
> > -- 
> > 2.9.3
> 
>
Ville Syrjala Feb. 23, 2017, 1:16 p.m. UTC | #3
On Thu, Feb 23, 2017 at 02:24:44PM +0200, Ander Conselvan De Oliveira wrote:
> On Thu, 2017-02-23 at 12:02 +0200, Ville Syrjälä wrote:
> > On Thu, Feb 23, 2017 at 09:15:57AM +0200, Ander Conselvan de Oliveira wrote:
> > > Geminilake has a third sprite plane (or fourth universal plane) that is
> > > independent from the cursor. Make sure that for_each_plane_id_on_crtc()
> > > is aware of that extra plane so that the watermark code takes it into
> > > account.
> > 
> > I wonder if we still have various pin_count limits and whatnot based on
> > some hardcoded theoretical max numner of planes...
> 
> Where were those before? I can't see anything obvious but I also don't know
> where to look for them?

Looks like it's called I915_VMA_PIN_MASK these days. So depending on
how we pin on plane updates I suppose that more or less allows us to
use the same vma with 8 or 16 planes simultanosly, minus all the other
pins of course. So I'm not sure if we're exceeding that limit or not.
Might be nice to have an igt that tries to maximize the number of pins
on the same vma.

> 
> Ander
> 
> > > Fixes: e9c9882556fc ("drm/i915/glk: Configure number of sprite planes properly")
> > > Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > Cc: Daniel Vetter <daniel.vetter@intel.com>
> > > Cc: Jani Nikula <jani.nikula@linux.intel.com>
> > > Cc: intel-gfx@lists.freedesktop.org
> > > Cc: <drm-intel-fixes@lists.freedesktop.org>
> > > Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> > 
> > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > > ---
> > >  drivers/gpu/drm/i915/i915_drv.h | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > > index e346b2d..70892ea 100644
> > > --- a/drivers/gpu/drm/i915/i915_drv.h
> > > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > > @@ -293,6 +293,7 @@ enum plane_id {
> > >  	PLANE_PRIMARY,
> > >  	PLANE_SPRITE0,
> > >  	PLANE_SPRITE1,
> > > +	PLANE_SPRITE2,
> > >  	PLANE_CURSOR,
> > >  	I915_MAX_PLANES,
> > >  };
> > > -- 
> > > 2.9.3
> > 
> >
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index e346b2d..70892ea 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -293,6 +293,7 @@  enum plane_id {
 	PLANE_PRIMARY,
 	PLANE_SPRITE0,
 	PLANE_SPRITE1,
+	PLANE_SPRITE2,
 	PLANE_CURSOR,
 	I915_MAX_PLANES,
 };