diff mbox series

[1/7] drm/i915/gen11: Enable 6 sprites on gen11

Message ID 20180921173945.6276-2-maarten.lankhorst@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/gen11: Enable planar format support on gen11. | expand

Commit Message

Maarten Lankhorst Sept. 21, 2018, 5:39 p.m. UTC
Gen11 supports 7 planes + 1 cursor on each pipe. Bump
I915_MAX_PLANES to 8, and set num_sprites correctly.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_device_info.c | 5 ++++-
 drivers/gpu/drm/i915/intel_display.h     | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)

Comments

Matt Roper Sept. 21, 2018, 11:24 p.m. UTC | #1
On Fri, Sep 21, 2018 at 07:39:39PM +0200, Maarten Lankhorst wrote:
> Gen11 supports 7 planes + 1 cursor on each pipe. Bump
> I915_MAX_PLANES to 8, and set num_sprites correctly.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

I notcie the comment above this if statement is a bit stale since it
only mentions SKL and BXT, but not KBL, CFL, WHL, AML.  Just to avoid
confusion, we might want to update that to indicate the mutual exclusion
applies to all gen9 except for GLK and that the mutual exclusion is no
longer relevant on gen10+.


Matt

> ---
>  drivers/gpu/drm/i915/intel_device_info.c | 5 ++++-
>  drivers/gpu/drm/i915/intel_display.h     | 3 +++
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index 0ef0c6448d53..7863cf8eb3e6 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -761,7 +761,10 @@ void intel_device_info_runtime_init(struct intel_device_info *info)
>  	 * we don't expose the topmost plane at all to prevent ABI breakage
>  	 * down the line.
>  	 */
> -	if (IS_GEN10(dev_priv) || IS_GEMINILAKE(dev_priv))
> +	if (IS_GEN11(dev_priv))
> +		for_each_pipe(dev_priv, pipe)
> +			info->num_sprites[pipe] = 6;
> +	else if (IS_GEN10(dev_priv) || IS_GEMINILAKE(dev_priv))
>  		for_each_pipe(dev_priv, pipe)
>  			info->num_sprites[pipe] = 3;
>  	else if (IS_BROXTON(dev_priv)) {
> diff --git a/drivers/gpu/drm/i915/intel_display.h b/drivers/gpu/drm/i915/intel_display.h
> index 9fac67e31205..47000b25f1ff 100644
> --- a/drivers/gpu/drm/i915/intel_display.h
> +++ b/drivers/gpu/drm/i915/intel_display.h
> @@ -120,6 +120,9 @@ enum plane_id {
>  	PLANE_SPRITE0,
>  	PLANE_SPRITE1,
>  	PLANE_SPRITE2,
> +	PLANE_SPRITE3,
> +	PLANE_SPRITE4,
> +	PLANE_SPRITE5,
>  	PLANE_CURSOR,
>  
>  	I915_MAX_PLANES,
> -- 
> 2.18.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index 0ef0c6448d53..7863cf8eb3e6 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -761,7 +761,10 @@  void intel_device_info_runtime_init(struct intel_device_info *info)
 	 * we don't expose the topmost plane at all to prevent ABI breakage
 	 * down the line.
 	 */
-	if (IS_GEN10(dev_priv) || IS_GEMINILAKE(dev_priv))
+	if (IS_GEN11(dev_priv))
+		for_each_pipe(dev_priv, pipe)
+			info->num_sprites[pipe] = 6;
+	else if (IS_GEN10(dev_priv) || IS_GEMINILAKE(dev_priv))
 		for_each_pipe(dev_priv, pipe)
 			info->num_sprites[pipe] = 3;
 	else if (IS_BROXTON(dev_priv)) {
diff --git a/drivers/gpu/drm/i915/intel_display.h b/drivers/gpu/drm/i915/intel_display.h
index 9fac67e31205..47000b25f1ff 100644
--- a/drivers/gpu/drm/i915/intel_display.h
+++ b/drivers/gpu/drm/i915/intel_display.h
@@ -120,6 +120,9 @@  enum plane_id {
 	PLANE_SPRITE0,
 	PLANE_SPRITE1,
 	PLANE_SPRITE2,
+	PLANE_SPRITE3,
+	PLANE_SPRITE4,
+	PLANE_SPRITE5,
 	PLANE_CURSOR,
 
 	I915_MAX_PLANES,