summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_crtc.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2015-03-05 20:38:16 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2015-06-12 21:52:47 +0200
commit69a12263f6f919cd53b10c849e1674e38931e74e (patch)
tree95e77810048a18171c400cadeec46fd8ce809a6d /drivers/gpu/drm/omapdrm/omap_crtc.c
parentdrm: omapdrm: Implement encoder .disable() and .enable() operations (diff)
downloadlinux-69a12263f6f919cd53b10c849e1674e38931e74e.tar.xz
linux-69a12263f6f919cd53b10c849e1674e38931e74e.zip
drm: omapdrm: 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@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_crtc.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_crtc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 0359a67f8f8d..5f4f5ad93345 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -19,6 +19,8 @@
#include <linux/completion.h>
+#include <drm/drm_atomic.h>
+#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_mode.h>
@@ -742,6 +744,7 @@ static int omap_crtc_page_flip(struct drm_crtc *crtc,
omap_crtc->flip_event = event;
omap_crtc->flip_state = OMAP_PAGE_FLIP_WAIT;
+ drm_atomic_set_fb_for_plane(primary->state, fb);
primary->fb = fb;
spin_unlock_irqrestore(&dev->event_lock, flags);
@@ -771,10 +774,13 @@ static int omap_crtc_set_property(struct drm_crtc *crtc,
}
static const struct drm_crtc_funcs omap_crtc_funcs = {
+ .reset = drm_atomic_helper_crtc_reset,
.set_config = drm_crtc_helper_set_config,
.destroy = omap_crtc_destroy,
.page_flip = omap_crtc_page_flip,
.set_property = omap_crtc_set_property,
+ .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
+ .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
};
static const struct drm_crtc_helper_funcs omap_crtc_helper_funcs = {