tegra_plane_reset() does the state initialisation by copying a lot of
the code found in the __drm_atomic_helper_plane_reset(). Let's switch to
that helper and reduce the boilerplate.

Cc: linux-te...@vger.kernel.org
Cc: Jonathan Hunter <jonath...@nvidia.com>
Cc: Thierry Reding <thierry.red...@gmail.com>
Signed-off-by: Maxime Ripard <max...@cerno.tech>
---
 drivers/gpu/drm/tegra/plane.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c
index 321cb1f13da6..ec0822c86926 100644
--- a/drivers/gpu/drm/tegra/plane.c
+++ b/drivers/gpu/drm/tegra/plane.c
@@ -37,8 +37,7 @@ static void tegra_plane_reset(struct drm_plane *plane)
 
        state = kzalloc(sizeof(*state), GFP_KERNEL);
        if (state) {
-               plane->state = &state->base;
-               plane->state->plane = plane;
+               __drm_atomic_helper_plane_reset(plane, &state->base);
                plane->state->zpos = p->index;
                plane->state->normalized_zpos = p->index;
 
-- 
2.34.1

Reply via email to