summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/rcar-du/rcar_du_plane.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2015-02-20 12:30:59 +0300
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2015-03-03 17:16:12 +0300
commit3e8da87d0c04e585f4af0f223376128f923cf7bc (patch)
tree1fbd6f64273d17cab059f6d8f0c62542bb7f5cb5 /drivers/gpu/drm/rcar-du/rcar_du_plane.c
parent845f46356ba490b654194b8d5c26032841719a78 (diff)
downloadlinux-3e8da87d0c04e585f4af0f223376128f923cf7bc.tar.xz
drm: rcar-du: Wire up atomic state object scaffolding
Hook up the default .reset(), .atomic_duplicate_state() and .atomic_free_state() helpers to ensure that state objects are properly created and destroyed, and call drm_mode_config_reset() at init time to create the initial state objects. Framebuffer reference count also gets maintained automatically by the transitional helpers except for the legacy page flip operation. Maintain it explicitly there. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/rcar-du/rcar_du_plane.c')
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_plane.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
index d4682ac7db03..c4e4fd293eee 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
@@ -12,6 +12,7 @@
*/
#include <drm/drmP.h>
+#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_fb_cma_helper.h>
@@ -486,8 +487,11 @@ static int rcar_du_plane_set_property(struct drm_plane *plane,
static const struct drm_plane_funcs rcar_du_plane_funcs = {
.update_plane = drm_plane_helper_update,
.disable_plane = drm_plane_helper_disable,
+ .reset = drm_atomic_helper_plane_reset,
.set_property = rcar_du_plane_set_property,
.destroy = drm_plane_cleanup,
+ .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
+ .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
};
static const uint32_t formats[] = {