drm/exynos: drm_plane: Correct exynos_drm_plane_reset
authorChristoph Manszewski <c.manszewski@samsung.com>
Fri, 21 Sep 2018 12:24:36 +0000 (14:24 +0200)
committerInki Dae <inki.dae@samsung.com>
Mon, 1 Oct 2018 02:49:53 +0000 (11:49 +0900)
Make use of helper functions in exynos_drm_plane_reset in order to set
all default values. Currently alpha isn't set during reset.

Signed-off-by: Christoph Manszewski <c.manszewski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_plane.c

index dba29aec59b44d873df58555ece705b0d4de6d74..755ca0e9ead227c5f62fff297d7f0082c7cece80 100644 (file)
@@ -131,16 +131,14 @@ static void exynos_drm_plane_reset(struct drm_plane *plane)
 
        if (plane->state) {
                exynos_state = to_exynos_plane_state(plane->state);
-               if (exynos_state->base.fb)
-                       drm_framebuffer_put(exynos_state->base.fb);
+               __drm_atomic_helper_plane_destroy_state(plane->state);
                kfree(exynos_state);
                plane->state = NULL;
        }
 
        exynos_state = kzalloc(sizeof(*exynos_state), GFP_KERNEL);
        if (exynos_state) {
-               plane->state = &exynos_state->base;
-               plane->state->plane = plane;
+               __drm_atomic_helper_plane_reset(plane, &exynos_state->base);
                plane->state->zpos = exynos_plane->config->zpos;
        }
 }