summaryrefslogtreecommitdiff
path: root/include/drm/drm_plane_helper.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-07-29 15:33:05 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-11-05 18:07:01 +0100
commitacf24a395c5a9290189b080383564437101d411c (patch)
tree45d73ab57dd816b4429a5856c695a8ee2d33b394 /include/drm/drm_plane_helper.h
parentc2fcd274bce521cd824d96d7f26dfa57ea06478c (diff)
downloadlwn-acf24a395c5a9290189b080383564437101d411c.tar.gz
lwn-acf24a395c5a9290189b080383564437101d411c.zip
drm/plane-helper: transitional atomic plane helpers
Converting a driver to the atomic interface can be a daunting undertaking. One of the prerequisites is to have full universal planes support. To make that transition a bit easier this patch provides plane helpers which use the new atomic helper callbacks just only for the plane changes. This way the plane update functionality can be tested without being forced to convert everything at once. Of course a real atomic update capable driver will implement the all plane properties through the atomic interface, so these helpers are mostly transitional. But they can be used to enable proper universal plane support, especially once the crtc helpers have also been adapted. v2: Use ->atomic_duplicate_state if available. v3: Don't forget to call ->atomic_destroy_state if available. v4: Fixup kerneldoc, reported by Paulo. v5: Extract a common plane_commit helper and fix some bugs in the plane_state setup of the plane_disable implementation. v6: Fix issues with the cleanup of the old fb. Since transitional helpers can be mixed we need to assume that the old fb has been set up by a legacy path (e.g. set_config or page_flip when the primary plane is converted to use these functions already). Hence pass an additional old_fb parameter to plane_commit to do that cleanup work correctly. v7: - Fix spurious WARNING (crtc helpers really love to disable stuff harder) and fix array index bonghits. - Correctly handle the lack of plane->state object, necessary for transitional use. - Don't indicate failure if drm_vblank_get doesn't work - that's expected when the pipe is in dpms off mode. v8: Review from Sean: - s/fail/out/ to make the meaning of a label more clear. - spelling fix in the commit message. Cc: Paulo Zanoni <przanoni@gmail.com> Cc: Sean Paul <seanpaul@chromium.org> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/drm/drm_plane_helper.h')
-rw-r--r--include/drm/drm_plane_helper.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h
index 8577ec8f3e6c..92bceccaa62a 100644
--- a/include/drm/drm_plane_helper.h
+++ b/include/drm/drm_plane_helper.h
@@ -95,4 +95,12 @@ extern struct drm_plane *drm_primary_helper_create_plane(struct drm_device *dev,
int num_formats);
+int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
+ struct drm_framebuffer *fb,
+ int crtc_x, int crtc_y,
+ unsigned int crtc_w, unsigned int crtc_h,
+ uint32_t src_x, uint32_t src_y,
+ uint32_t src_w, uint32_t src_h);
+int drm_plane_helper_disable(struct drm_plane *plane);
+
#endif