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 862197be1e012bfcb3f4296c6c02d66ab9423668..9dda5e06457d8d8a754bd58d9f1431ac42b6f277 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 b7fc5b069cbc0b88722ef8af1a09f767983a4e9f..719c60034952c0ecaf7fb2c62874e488e4d809e4 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 = {