summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_plane_helper.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-10-29 13:13:47 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-11-05 20:44:59 +0300
commit2f324b42b7b24a48fe3f8a7af60ec3c9024255fa (patch)
treec139710b3ae55fb59bc61912423e809904dc3578 /drivers/gpu/drm/drm_plane_helper.c
parentacf24a395c5a9290189b080383564437101d411c (diff)
downloadlinux-2f324b42b7b24a48fe3f8a7af60ec3c9024255fa.tar.xz
drm/crtc-helper: Transitional functions using atomic plane helpers
These two functions allow drivers to reuse their atomic plane helpers functions for the primary plane to implement the interfaces required by the crtc helpers for the legacy ->set_config callback. This is purely transitional and won't be used once the driver is fully converted. But it allows partial conversions to the atomic plane helpers which are functional. v2: - Use ->atomic_duplicate_state if available. - Don't forget to run crtc_funcs->atomic_check. v3: Shift source coordinates correctly for 16.16 fixed point. v4: Don't forget to call ->atomic_destroy_state if available. v5: Fixup kerneldoc. v6: Reuse the plane_commit function from the transitional plane helpers to avoid too much duplication. v7: - Remove some stale comment. - Correctly handle the lack of plane->state object, necessary for transitional use. v8: Fixup an embarrassing h/vdisplay mixup. Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_plane_helper.c')
-rw-r--r--drivers/gpu/drm/drm_plane_helper.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
index a202b89e14eb..a5a295872fbb 100644
--- a/drivers/gpu/drm/drm_plane_helper.c
+++ b/drivers/gpu/drm/drm_plane_helper.c
@@ -370,9 +370,9 @@ int drm_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
}
EXPORT_SYMBOL(drm_crtc_init);
-static int
-plane_commit(struct drm_plane *plane, struct drm_plane_state *plane_state,
- struct drm_framebuffer *old_fb)
+int drm_plane_helper_commit(struct drm_plane *plane,
+ struct drm_plane_state *plane_state,
+ struct drm_framebuffer *old_fb)
{
struct drm_plane_helper_funcs *plane_funcs;
struct drm_crtc *crtc[2];
@@ -497,7 +497,7 @@ int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
plane_state->src_h = src_h;
plane_state->src_w = src_w;
- return plane_commit(plane, plane_state, plane->fb);
+ return drm_plane_helper_commit(plane, plane_state, plane->fb);
}
EXPORT_SYMBOL(drm_plane_helper_update);
@@ -536,6 +536,6 @@ int drm_plane_helper_disable(struct drm_plane *plane)
plane_state->crtc = NULL;
plane_state->fb = NULL;
- return plane_commit(plane, plane_state, plane->fb);
+ return drm_plane_helper_commit(plane, plane_state, plane->fb);
}
EXPORT_SYMBOL(drm_plane_helper_disable);