aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-12-17 22:14:46 -0500
committerDave Airlie <airlied@linux.ie>2008-12-29 02:47:27 -0500
commit3c4fdcfb2941dc36b6a16bc509a2adb97c131716 (patch)
tree36fba683165c72b36037035f5c383cc18e7e8db8 /include/drm
parentd1e22c6ed05f3bfb3a7de0947498e7f3c868b296 (diff)
drm: pin new and unpin old buffer when setting a mode.
This removes the requirement for user space to pin a buffer before setting a mode that is backed by the pixels from that buffer. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_crtc_helper.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index a341828d1d15..4bc04cf460a7 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -55,10 +55,12 @@ struct drm_crtc_helper_funcs {
55 struct drm_display_mode *adjusted_mode); 55 struct drm_display_mode *adjusted_mode);
56 /* Actually set the mode */ 56 /* Actually set the mode */
57 void (*mode_set)(struct drm_crtc *crtc, struct drm_display_mode *mode, 57 void (*mode_set)(struct drm_crtc *crtc, struct drm_display_mode *mode,
58 struct drm_display_mode *adjusted_mode, int x, int y); 58 struct drm_display_mode *adjusted_mode, int x, int y,
59 struct drm_framebuffer *old_fb);
59 60
60 /* Move the crtc on the current fb to the given position *optional* */ 61 /* Move the crtc on the current fb to the given position *optional* */
61 void (*mode_set_base)(struct drm_crtc *crtc, int x, int y); 62 void (*mode_set_base)(struct drm_crtc *crtc, int x, int y,
63 struct drm_framebuffer *old_fb);
62}; 64};
63 65
64struct drm_encoder_helper_funcs { 66struct drm_encoder_helper_funcs {
@@ -93,7 +95,8 @@ extern bool drm_helper_initial_config(struct drm_device *dev, bool can_grow);
93extern int drm_crtc_helper_set_config(struct drm_mode_set *set); 95extern int drm_crtc_helper_set_config(struct drm_mode_set *set);
94extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, 96extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
95 struct drm_display_mode *mode, 97 struct drm_display_mode *mode,
96 int x, int y); 98 int x, int y,
99 struct drm_framebuffer *old_fb);
97extern bool drm_helper_crtc_in_use(struct drm_crtc *crtc); 100extern bool drm_helper_crtc_in_use(struct drm_crtc *crtc);
98 101
99extern int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb, 102extern int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,