diff mbox series

[2/2] drm/i915: Do not program aux plane offsets on gen11+

Message ID 20181025213244.25233-2-dhinakaran.pandiyan@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/i915: Add function to check for linear surfaces | expand

Commit Message

Dhinakaran Pandiyan Oct. 25, 2018, 9:32 p.m. UTC
The PLANE_AUX_OFFSET mmio does not exist on ICL, do not program it.  We'll
still calculate the aux offset as it is required for adjusing x-y offsets.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 drivers/gpu/drm/i915/intel_sprite.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Ville Syrjälä Oct. 26, 2018, 3:45 p.m. UTC | #1
On Thu, Oct 25, 2018 at 02:32:44PM -0700, Dhinakaran Pandiyan wrote:
> The PLANE_AUX_OFFSET mmio does not exist on ICL, do not program it.  We'll
> still calculate the aux offset as it is required for adjusing x-y offsets.

Ah yes. CCS doesn't have its own offsets, and with NV12 using another
plane's main surface AUX_OFFSET was no longer needed.

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

> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_sprite.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index cfaddc05fea6..a27d6f67c7c5 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -414,9 +414,11 @@ skl_program_plane(struct intel_plane *plane,
>  	I915_WRITE_FW(PLANE_SIZE(pipe, plane_id), (src_h << 16) | src_w);
>  	I915_WRITE_FW(PLANE_AUX_DIST(pipe, plane_id),
>  		      (plane_state->color_plane[1].offset - surf_addr) | aux_stride);
> -	I915_WRITE_FW(PLANE_AUX_OFFSET(pipe, plane_id),
> -		      (plane_state->color_plane[1].y << 16) |
> -		      plane_state->color_plane[1].x);
> +
> +	if (INTEL_GEN(dev_priv) < 11)
> +		I915_WRITE_FW(PLANE_AUX_OFFSET(pipe, plane_id),
> +			      (plane_state->color_plane[1].y << 16) |
> +			       plane_state->color_plane[1].x);
>  
>  	if (icl_is_hdr_plane(plane)) {
>  		u32 cus_ctl = 0;
> -- 
> 2.14.1
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index cfaddc05fea6..a27d6f67c7c5 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -414,9 +414,11 @@  skl_program_plane(struct intel_plane *plane,
 	I915_WRITE_FW(PLANE_SIZE(pipe, plane_id), (src_h << 16) | src_w);
 	I915_WRITE_FW(PLANE_AUX_DIST(pipe, plane_id),
 		      (plane_state->color_plane[1].offset - surf_addr) | aux_stride);
-	I915_WRITE_FW(PLANE_AUX_OFFSET(pipe, plane_id),
-		      (plane_state->color_plane[1].y << 16) |
-		      plane_state->color_plane[1].x);
+
+	if (INTEL_GEN(dev_priv) < 11)
+		I915_WRITE_FW(PLANE_AUX_OFFSET(pipe, plane_id),
+			      (plane_state->color_plane[1].y << 16) |
+			       plane_state->color_plane[1].x);
 
 	if (icl_is_hdr_plane(plane)) {
 		u32 cus_ctl = 0;