drm/rcar: plane: Remove redundant zpos initialisation
authorMaxime Ripard <maxime@cerno.tech>
Mon, 21 Feb 2022 09:59:11 +0000 (10:59 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Fri, 25 Feb 2022 16:57:01 +0000 (17:57 +0100)
The rcar-du KMS driver will call drm_plane_create_zpos_property() with an
init value depending on the plane type.

Since the initial value wasn't carried over in the state, the driver had
to set it again in rcar_du_plane_reset() and rcar_du_vsp_plane_reset().
However, the helpers have been adjusted to set it properly at reset, so
this is not needed anymore.

Cc: linux-renesas-soc@vger.kernel.org
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220221095918.18763-16-maxime@cerno.tech
drivers/gpu/drm/rcar-du/rcar_du_plane.c
drivers/gpu/drm/rcar-du/rcar_du_vsp.c

index 862197b..9dda5e0 100644 (file)
@@ -696,7 +696,6 @@ static void rcar_du_plane_reset(struct drm_plane *plane)
        state->hwindex = -1;
        state->source = RCAR_DU_PLANE_MEMORY;
        state->colorkey = RCAR_DU_COLORKEY_NONE;
-       state->state.zpos = plane->type == DRM_PLANE_TYPE_PRIMARY ? 0 : 1;
 }
 
 static int rcar_du_plane_atomic_set_property(struct drm_plane *plane,
index b7fc5b0..719c600 100644 (file)
@@ -362,7 +362,6 @@ static void rcar_du_vsp_plane_reset(struct drm_plane *plane)
                return;
 
        __drm_atomic_helper_plane_reset(plane, &state->state);
-       state->state.zpos = plane->type == DRM_PLANE_TYPE_PRIMARY ? 0 : 1;
 }
 
 static const struct drm_plane_funcs rcar_du_vsp_plane_funcs = {