The imx KMS driver will call drm_plane_create_zpos_property() with an
init value depending on the plane purpose.
Since the initial value wasn't carried over in the state, the driver had
to set it again in ipu_plane_state_reset(). However, the helpers have
been adjusted to set it properly at reset, so this is not needed
anymore.
Cc: linux-arm-kernel@lists.infradead.org
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20220221095918.18763-12-maxime@cerno.tech
static void ipu_plane_state_reset(struct drm_plane *plane)
{
- unsigned int zpos = (plane->type == DRM_PLANE_TYPE_PRIMARY) ? 0 : 1;
struct ipu_plane_state *ipu_state;
if (plane->state) {
if (ipu_state) {
__drm_atomic_helper_plane_reset(plane, &ipu_state->base);
- ipu_state->base.zpos = zpos;
- ipu_state->base.normalized_zpos = zpos;
ipu_state->base.color_encoding = DRM_COLOR_YCBCR_BT601;
ipu_state->base.color_range = DRM_COLOR_YCBCR_LIMITED_RANGE;
}