aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2015-03-03 09:22:31 -0500
committerDave Airlie <airlied@redhat.com>2015-03-04 18:49:02 -0500
commitd136dfeec84bfe3e4238bacd23f21e161268deac (patch)
tree0b12433e23cbf549e0698269535a166f8f6bbf2f /include/drm
parent7547af91868f0ea940abc25460accc4025c5ce0a (diff)
drm: Pass in new and old plane state to prepare_fb and cleanup_fb
Use cases like rotation require these hooks to have some context so they know how to prepare and cleanup the frame buffer correctly. For i915 specifically, object backing pages need to be mapped differently for different rotation modes and the driver needs to know which mapping to instantiate and which to tear down when transitioning between them. v2: Made passed in states const. (Daniel Vetter) [airlied: add mdp5 and atmel fixups] Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: dri-devel@lists.freedesktop.org Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_plane_helper.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h
index 31c11d36fae6..72ddab02ebd9 100644
--- a/include/drm/drm_plane_helper.h
+++ b/include/drm/drm_plane_helper.h
@@ -59,9 +59,11 @@ extern int drm_crtc_init(struct drm_device *dev,
59 */ 59 */
60struct drm_plane_helper_funcs { 60struct drm_plane_helper_funcs {
61 int (*prepare_fb)(struct drm_plane *plane, 61 int (*prepare_fb)(struct drm_plane *plane,
62 struct drm_framebuffer *fb); 62 struct drm_framebuffer *fb,
63 const struct drm_plane_state *new_state);
63 void (*cleanup_fb)(struct drm_plane *plane, 64 void (*cleanup_fb)(struct drm_plane *plane,
64 struct drm_framebuffer *fb); 65 struct drm_framebuffer *fb,
66 const struct drm_plane_state *old_state);
65 67
66 int (*atomic_check)(struct drm_plane *plane, 68 int (*atomic_check)(struct drm_plane *plane,
67 struct drm_plane_state *state); 69 struct drm_plane_state *state);