diff mbox series

[09/15] drm/i915: Make sure Y slave planes get all the required state

Message ID 20191218161105.30638-10-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/tgl: Render/media decompression support | expand

Commit Message

Imre Deak Dec. 18, 2019, 4:10 p.m. UTC
Y planes program the offset and stride of the AUX plane, so make sure we
copy the required info for this into their plane state.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Kahola, Mika Dec. 19, 2019, 1:34 p.m. UTC | #1
On Wed, 2019-12-18 at 18:10 +0200, Imre Deak wrote:
> Y planes program the offset and stride of the AUX plane, so make sure
> we
> copy the required info for this into their plane state.
> 
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Signed-off-by: Imre Deak <imre.deak@intel.com>

Reviewed-by: Mika Kahola <mika.kahola@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> b/drivers/gpu/drm/i915/display/intel_display.c
> index b4eb0d2147f5..e350f1d40b88 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -12179,7 +12179,8 @@ static int icl_check_nv12_planes(struct
> intel_crtc_state *crtc_state)
>  		/* Copy parameters to slave plane */
>  		linked_state->ctl = plane_state->ctl |
> PLANE_CTL_YUV420_Y_PLANE;
>  		linked_state->color_ctl = plane_state->color_ctl;
> -		linked_state->color_plane[0] = plane_state-
> >color_plane[0];
> +		memcpy(linked_state->color_plane, plane_state-
> >color_plane,
> +		       sizeof(linked_state->color_plane));
>  
>  		intel_plane_copy_uapi_to_hw_state(linked_state,
> plane_state);
>  		linked_state->uapi.src = plane_state->uapi.src;
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index b4eb0d2147f5..e350f1d40b88 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -12179,7 +12179,8 @@  static int icl_check_nv12_planes(struct intel_crtc_state *crtc_state)
 		/* Copy parameters to slave plane */
 		linked_state->ctl = plane_state->ctl | PLANE_CTL_YUV420_Y_PLANE;
 		linked_state->color_ctl = plane_state->color_ctl;
-		linked_state->color_plane[0] = plane_state->color_plane[0];
+		memcpy(linked_state->color_plane, plane_state->color_plane,
+		       sizeof(linked_state->color_plane));
 
 		intel_plane_copy_uapi_to_hw_state(linked_state, plane_state);
 		linked_state->uapi.src = plane_state->uapi.src;