xref: /linux/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h (revision 8fbf9d92a7bc4cadd3a0139698cf17031dfcdfca)
1fb1d9738SJakob Bornecrantz /**************************************************************************
2fb1d9738SJakob Bornecrantz  *
354fbde8aSSinclair Yeh  * Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA
4fb1d9738SJakob Bornecrantz  * All Rights Reserved.
5fb1d9738SJakob Bornecrantz  *
6fb1d9738SJakob Bornecrantz  * Permission is hereby granted, free of charge, to any person obtaining a
7fb1d9738SJakob Bornecrantz  * copy of this software and associated documentation files (the
8fb1d9738SJakob Bornecrantz  * "Software"), to deal in the Software without restriction, including
9fb1d9738SJakob Bornecrantz  * without limitation the rights to use, copy, modify, merge, publish,
10fb1d9738SJakob Bornecrantz  * distribute, sub license, and/or sell copies of the Software, and to
11fb1d9738SJakob Bornecrantz  * permit persons to whom the Software is furnished to do so, subject to
12fb1d9738SJakob Bornecrantz  * the following conditions:
13fb1d9738SJakob Bornecrantz  *
14fb1d9738SJakob Bornecrantz  * The above copyright notice and this permission notice (including the
15fb1d9738SJakob Bornecrantz  * next paragraph) shall be included in all copies or substantial portions
16fb1d9738SJakob Bornecrantz  * of the Software.
17fb1d9738SJakob Bornecrantz  *
18fb1d9738SJakob Bornecrantz  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19fb1d9738SJakob Bornecrantz  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20fb1d9738SJakob Bornecrantz  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
21fb1d9738SJakob Bornecrantz  * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
22fb1d9738SJakob Bornecrantz  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
23fb1d9738SJakob Bornecrantz  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
24fb1d9738SJakob Bornecrantz  * USE OR OTHER DEALINGS IN THE SOFTWARE.
25fb1d9738SJakob Bornecrantz  *
26fb1d9738SJakob Bornecrantz  **************************************************************************/
27fb1d9738SJakob Bornecrantz 
28fb1d9738SJakob Bornecrantz #ifndef VMWGFX_KMS_H_
29fb1d9738SJakob Bornecrantz #define VMWGFX_KMS_H_
30fb1d9738SJakob Bornecrantz 
31760285e7SDavid Howells #include <drm/drmP.h>
32760285e7SDavid Howells #include <drm/drm_crtc_helper.h>
33fb1d9738SJakob Bornecrantz #include "vmwgfx_drv.h"
34fb1d9738SJakob Bornecrantz 
351a4b172aSThomas Hellstrom /**
361a4b172aSThomas Hellstrom  * struct vmw_kms_dirty - closure structure for the vmw_kms_helper_dirty
371a4b172aSThomas Hellstrom  * function.
381a4b172aSThomas Hellstrom  *
391a4b172aSThomas Hellstrom  * @fifo_commit: Callback that is called once for each display unit after
401a4b172aSThomas Hellstrom  * all clip rects. This function must commit the fifo space reserved by the
411a4b172aSThomas Hellstrom  * helper. Set up by the caller.
421a4b172aSThomas Hellstrom  * @clip: Callback that is called for each cliprect on each display unit.
431a4b172aSThomas Hellstrom  * Set up by the caller.
441a4b172aSThomas Hellstrom  * @fifo_reserve_size: Fifo size that the helper should try to allocat for
451a4b172aSThomas Hellstrom  * each display unit. Set up by the caller.
461a4b172aSThomas Hellstrom  * @dev_priv: Pointer to the device private. Set up by the helper.
471a4b172aSThomas Hellstrom  * @unit: The current display unit. Set up by the helper before a call to @clip.
481a4b172aSThomas Hellstrom  * @cmd: The allocated fifo space. Set up by the helper before the first @clip
491a4b172aSThomas Hellstrom  * call.
501a4b172aSThomas Hellstrom  * @num_hits: Number of clip rect commands for this display unit.
511a4b172aSThomas Hellstrom  * Cleared by the helper before the first @clip call. Updated by the @clip
521a4b172aSThomas Hellstrom  * callback.
531a4b172aSThomas Hellstrom  * @fb_x: Clip rect left side in framebuffer coordinates.
541a4b172aSThomas Hellstrom  * @fb_y: Clip rect right side in framebuffer coordinates.
551a4b172aSThomas Hellstrom  * @unit_x1: Clip rect left side in crtc coordinates.
561a4b172aSThomas Hellstrom  * @unit_y1: Clip rect top side in crtc coordinates.
571a4b172aSThomas Hellstrom  * @unit_x2: Clip rect right side in crtc coordinates.
581a4b172aSThomas Hellstrom  * @unit_y2: Clip rect bottom side in crtc coordinates.
591a4b172aSThomas Hellstrom  *
601a4b172aSThomas Hellstrom  * The clip rect coordinates are updated by the helper for each @clip call.
611a4b172aSThomas Hellstrom  * Note that this may be derived from if more info needs to be passed between
621a4b172aSThomas Hellstrom  * helper caller and helper callbacks.
631a4b172aSThomas Hellstrom  */
641a4b172aSThomas Hellstrom struct vmw_kms_dirty {
651a4b172aSThomas Hellstrom 	void (*fifo_commit)(struct vmw_kms_dirty *);
661a4b172aSThomas Hellstrom 	void (*clip)(struct vmw_kms_dirty *);
671a4b172aSThomas Hellstrom 	size_t fifo_reserve_size;
681a4b172aSThomas Hellstrom 	struct vmw_private *dev_priv;
691a4b172aSThomas Hellstrom 	struct vmw_display_unit *unit;
701a4b172aSThomas Hellstrom 	void *cmd;
711a4b172aSThomas Hellstrom 	u32 num_hits;
721a4b172aSThomas Hellstrom 	s32 fb_x;
731a4b172aSThomas Hellstrom 	s32 fb_y;
741a4b172aSThomas Hellstrom 	s32 unit_x1;
751a4b172aSThomas Hellstrom 	s32 unit_y1;
761a4b172aSThomas Hellstrom 	s32 unit_x2;
771a4b172aSThomas Hellstrom 	s32 unit_y2;
781a4b172aSThomas Hellstrom };
79c8261a96SSinclair Yeh 
8056d1c78dSJakob Bornecrantz #define VMWGFX_NUM_DISPLAY_UNITS 8
8156d1c78dSJakob Bornecrantz 
82fb1d9738SJakob Bornecrantz 
83fb1d9738SJakob Bornecrantz #define vmw_framebuffer_to_vfb(x) \
84fb1d9738SJakob Bornecrantz 	container_of(x, struct vmw_framebuffer, base)
85c8261a96SSinclair Yeh #define vmw_framebuffer_to_vfbs(x) \
86c8261a96SSinclair Yeh 	container_of(x, struct vmw_framebuffer_surface, base.base)
87c8261a96SSinclair Yeh #define vmw_framebuffer_to_vfbd(x) \
88c8261a96SSinclair Yeh 	container_of(x, struct vmw_framebuffer_dmabuf, base.base)
89fb1d9738SJakob Bornecrantz 
90fb1d9738SJakob Bornecrantz /**
91fb1d9738SJakob Bornecrantz  * Base class for framebuffers
92fb1d9738SJakob Bornecrantz  *
93fb1d9738SJakob Bornecrantz  * @pin is called the when ever a crtc uses this framebuffer
94fb1d9738SJakob Bornecrantz  * @unpin is called
95fb1d9738SJakob Bornecrantz  */
96fb1d9738SJakob Bornecrantz struct vmw_framebuffer {
97fb1d9738SJakob Bornecrantz 	struct drm_framebuffer base;
98fb1d9738SJakob Bornecrantz 	int (*pin)(struct vmw_framebuffer *fb);
99fb1d9738SJakob Bornecrantz 	int (*unpin)(struct vmw_framebuffer *fb);
1002fcd5a73SJakob Bornecrantz 	bool dmabuf;
10190ff18bcSThomas Hellstrom 	struct ttm_base_object *user_obj;
10290ff18bcSThomas Hellstrom 	uint32_t user_handle;
103fb1d9738SJakob Bornecrantz };
104fb1d9738SJakob Bornecrantz 
105c8261a96SSinclair Yeh /*
106c8261a96SSinclair Yeh  * Clip rectangle
107c8261a96SSinclair Yeh  */
108c8261a96SSinclair Yeh struct vmw_clip_rect {
109c8261a96SSinclair Yeh 	int x1, x2, y1, y2;
110c8261a96SSinclair Yeh };
111fb1d9738SJakob Bornecrantz 
112c8261a96SSinclair Yeh struct vmw_framebuffer_surface {
113c8261a96SSinclair Yeh 	struct vmw_framebuffer base;
114c8261a96SSinclair Yeh 	struct vmw_surface *surface;
115c8261a96SSinclair Yeh 	struct vmw_dma_buffer *buffer;
116c8261a96SSinclair Yeh 	struct list_head head;
117f89c6c32SSinclair Yeh 	bool is_dmabuf_proxy;  /* true if this is proxy surface for DMA buf */
118c8261a96SSinclair Yeh };
119c8261a96SSinclair Yeh 
120c8261a96SSinclair Yeh 
121c8261a96SSinclair Yeh struct vmw_framebuffer_dmabuf {
122c8261a96SSinclair Yeh 	struct vmw_framebuffer base;
123c8261a96SSinclair Yeh 	struct vmw_dma_buffer *buffer;
124c8261a96SSinclair Yeh };
125c8261a96SSinclair Yeh 
126fb1d9738SJakob Bornecrantz 
127fb1d9738SJakob Bornecrantz /*
128fb1d9738SJakob Bornecrantz  * Basic cursor manipulation
129fb1d9738SJakob Bornecrantz  */
130fb1d9738SJakob Bornecrantz int vmw_cursor_update_image(struct vmw_private *dev_priv,
131fb1d9738SJakob Bornecrantz 			    u32 *image, u32 width, u32 height,
132fb1d9738SJakob Bornecrantz 			    u32 hotspotX, u32 hotspotY);
133bfc2638dSJakob Bornecrantz int vmw_cursor_update_dmabuf(struct vmw_private *dev_priv,
134bfc2638dSJakob Bornecrantz 			     struct vmw_dma_buffer *dmabuf,
135bfc2638dSJakob Bornecrantz 			     u32 width, u32 height,
136bfc2638dSJakob Bornecrantz 			     u32 hotspotX, u32 hotspotY);
137fb1d9738SJakob Bornecrantz void vmw_cursor_update_position(struct vmw_private *dev_priv,
138fb1d9738SJakob Bornecrantz 				bool show, int x, int y);
139fb1d9738SJakob Bornecrantz 
140bfc2638dSJakob Bornecrantz 
141fb1d9738SJakob Bornecrantz /**
142fb1d9738SJakob Bornecrantz  * Base class display unit.
143fb1d9738SJakob Bornecrantz  *
144fb1d9738SJakob Bornecrantz  * Since the SVGA hw doesn't have a concept of a crtc, encoder or connector
145fb1d9738SJakob Bornecrantz  * so the display unit is all of them at the same time. This is true for both
146fb1d9738SJakob Bornecrantz  * legacy multimon and screen objects.
147fb1d9738SJakob Bornecrantz  */
148fb1d9738SJakob Bornecrantz struct vmw_display_unit {
149fb1d9738SJakob Bornecrantz 	struct drm_crtc crtc;
150fb1d9738SJakob Bornecrantz 	struct drm_encoder encoder;
151fb1d9738SJakob Bornecrantz 	struct drm_connector connector;
152fb1d9738SJakob Bornecrantz 
153fb1d9738SJakob Bornecrantz 	struct vmw_surface *cursor_surface;
154fb1d9738SJakob Bornecrantz 	struct vmw_dma_buffer *cursor_dmabuf;
155fb1d9738SJakob Bornecrantz 	size_t cursor_age;
156fb1d9738SJakob Bornecrantz 
157fb1d9738SJakob Bornecrantz 	int cursor_x;
158fb1d9738SJakob Bornecrantz 	int cursor_y;
159fb1d9738SJakob Bornecrantz 
160fb1d9738SJakob Bornecrantz 	int hotspot_x;
161fb1d9738SJakob Bornecrantz 	int hotspot_y;
162*8fbf9d92SThomas Hellstrom 	s32 core_hotspot_x;
163*8fbf9d92SThomas Hellstrom 	s32 core_hotspot_y;
164fb1d9738SJakob Bornecrantz 
165fb1d9738SJakob Bornecrantz 	unsigned unit;
166626ab771SJakob Bornecrantz 
167626ab771SJakob Bornecrantz 	/*
168626ab771SJakob Bornecrantz 	 * Prefered mode tracking.
169626ab771SJakob Bornecrantz 	 */
170626ab771SJakob Bornecrantz 	unsigned pref_width;
171626ab771SJakob Bornecrantz 	unsigned pref_height;
172626ab771SJakob Bornecrantz 	bool pref_active;
173626ab771SJakob Bornecrantz 	struct drm_display_mode *pref_mode;
174cd2b89e7SThomas Hellstrom 
175cd2b89e7SThomas Hellstrom 	/*
176cd2b89e7SThomas Hellstrom 	 * Gui positioning
177cd2b89e7SThomas Hellstrom 	 */
178cd2b89e7SThomas Hellstrom 	int gui_x;
179cd2b89e7SThomas Hellstrom 	int gui_y;
1806987427aSThomas Hellstrom 	bool is_implicit;
181fb1d9738SJakob Bornecrantz };
182fb1d9738SJakob Bornecrantz 
1832fcd5a73SJakob Bornecrantz #define vmw_crtc_to_du(x) \
1842fcd5a73SJakob Bornecrantz 	container_of(x, struct vmw_display_unit, crtc)
185626ab771SJakob Bornecrantz #define vmw_connector_to_du(x) \
186626ab771SJakob Bornecrantz 	container_of(x, struct vmw_display_unit, connector)
187626ab771SJakob Bornecrantz 
188626ab771SJakob Bornecrantz 
189fb1d9738SJakob Bornecrantz /*
190fb1d9738SJakob Bornecrantz  * Shared display unit functions - vmwgfx_kms.c
191fb1d9738SJakob Bornecrantz  */
192c8261a96SSinclair Yeh void vmw_du_cleanup(struct vmw_display_unit *du);
193626ab771SJakob Bornecrantz void vmw_du_crtc_save(struct drm_crtc *crtc);
194626ab771SJakob Bornecrantz void vmw_du_crtc_restore(struct drm_crtc *crtc);
195626ab771SJakob Bornecrantz void vmw_du_crtc_gamma_set(struct drm_crtc *crtc,
196626ab771SJakob Bornecrantz 			   u16 *r, u16 *g, u16 *b,
197626ab771SJakob Bornecrantz 			   uint32_t start, uint32_t size);
198*8fbf9d92SThomas Hellstrom int vmw_du_crtc_cursor_set2(struct drm_crtc *crtc, struct drm_file *file_priv,
199*8fbf9d92SThomas Hellstrom 			    uint32_t handle, uint32_t width, uint32_t height,
200*8fbf9d92SThomas Hellstrom 			    int32_t hot_x, int32_t hot_y);
201fb1d9738SJakob Bornecrantz int vmw_du_crtc_cursor_move(struct drm_crtc *crtc, int x, int y);
2029a69a9acSMaarten Lankhorst int vmw_du_connector_dpms(struct drm_connector *connector, int mode);
203626ab771SJakob Bornecrantz void vmw_du_connector_save(struct drm_connector *connector);
204626ab771SJakob Bornecrantz void vmw_du_connector_restore(struct drm_connector *connector);
205626ab771SJakob Bornecrantz enum drm_connector_status
206626ab771SJakob Bornecrantz vmw_du_connector_detect(struct drm_connector *connector, bool force);
207626ab771SJakob Bornecrantz int vmw_du_connector_fill_modes(struct drm_connector *connector,
208626ab771SJakob Bornecrantz 				uint32_t max_width, uint32_t max_height);
209626ab771SJakob Bornecrantz int vmw_du_connector_set_property(struct drm_connector *connector,
210626ab771SJakob Bornecrantz 				  struct drm_property *property,
211626ab771SJakob Bornecrantz 				  uint64_t val);
2121a4b172aSThomas Hellstrom int vmw_kms_helper_dirty(struct vmw_private *dev_priv,
2131a4b172aSThomas Hellstrom 			 struct vmw_framebuffer *framebuffer,
2141a4b172aSThomas Hellstrom 			 const struct drm_clip_rect *clips,
2151a4b172aSThomas Hellstrom 			 const struct drm_vmw_rect *vclips,
2161a4b172aSThomas Hellstrom 			 s32 dest_x, s32 dest_y,
2171a4b172aSThomas Hellstrom 			 int num_clips,
2181a4b172aSThomas Hellstrom 			 int increment,
2191a4b172aSThomas Hellstrom 			 struct vmw_kms_dirty *dirty);
220cd2b89e7SThomas Hellstrom 
2211a4b172aSThomas Hellstrom int vmw_kms_helper_buffer_prepare(struct vmw_private *dev_priv,
2221a4b172aSThomas Hellstrom 				  struct vmw_dma_buffer *buf,
2231a4b172aSThomas Hellstrom 				  bool interruptible,
2241a4b172aSThomas Hellstrom 				  bool validate_as_mob);
2251a4b172aSThomas Hellstrom void vmw_kms_helper_buffer_revert(struct vmw_dma_buffer *buf);
2261a4b172aSThomas Hellstrom void vmw_kms_helper_buffer_finish(struct vmw_private *dev_priv,
2271a4b172aSThomas Hellstrom 				  struct drm_file *file_priv,
2281a4b172aSThomas Hellstrom 				  struct vmw_dma_buffer *buf,
2291a4b172aSThomas Hellstrom 				  struct vmw_fence_obj **out_fence,
2301a4b172aSThomas Hellstrom 				  struct drm_vmw_fence_rep __user *
2311a4b172aSThomas Hellstrom 				  user_fence_rep);
2321a4b172aSThomas Hellstrom int vmw_kms_helper_resource_prepare(struct vmw_resource *res,
2331a4b172aSThomas Hellstrom 				    bool interruptible);
2341a4b172aSThomas Hellstrom void vmw_kms_helper_resource_revert(struct vmw_resource *res);
2351a4b172aSThomas Hellstrom void vmw_kms_helper_resource_finish(struct vmw_resource *res,
2361a4b172aSThomas Hellstrom 				    struct vmw_fence_obj **out_fence);
23710b1e0caSThomas Hellstrom int vmw_kms_readback(struct vmw_private *dev_priv,
23810b1e0caSThomas Hellstrom 		     struct drm_file *file_priv,
23910b1e0caSThomas Hellstrom 		     struct vmw_framebuffer *vfb,
24010b1e0caSThomas Hellstrom 		     struct drm_vmw_fence_rep __user *user_fence_rep,
24110b1e0caSThomas Hellstrom 		     struct drm_vmw_rect *vclips,
24210b1e0caSThomas Hellstrom 		     uint32_t num_clips);
243fd006a43SThomas Hellstrom struct vmw_framebuffer *
244fd006a43SThomas Hellstrom vmw_kms_new_framebuffer(struct vmw_private *dev_priv,
245fd006a43SThomas Hellstrom 			struct vmw_dma_buffer *dmabuf,
246fd006a43SThomas Hellstrom 			struct vmw_surface *surface,
247fd006a43SThomas Hellstrom 			bool only_2d,
248fd006a43SThomas Hellstrom 			const struct drm_mode_fb_cmd *mode_cmd);
249a278724aSThomas Hellstrom int vmw_kms_fbdev_init_data(struct vmw_private *dev_priv,
250a278724aSThomas Hellstrom 			    unsigned unit,
251a278724aSThomas Hellstrom 			    u32 max_width,
252a278724aSThomas Hellstrom 			    u32 max_height,
253a278724aSThomas Hellstrom 			    struct drm_connector **p_con,
254a278724aSThomas Hellstrom 			    struct drm_crtc **p_crtc,
255a278724aSThomas Hellstrom 			    struct drm_display_mode **p_mode);
256a278724aSThomas Hellstrom void vmw_guess_mode_timing(struct drm_display_mode *mode);
257fb1d9738SJakob Bornecrantz 
258fb1d9738SJakob Bornecrantz /*
259d8bd19d2SJakob Bornecrantz  * Legacy display unit functions - vmwgfx_ldu.c
260fb1d9738SJakob Bornecrantz  */
261c8261a96SSinclair Yeh int vmw_kms_ldu_init_display(struct vmw_private *dev_priv);
262c8261a96SSinclair Yeh int vmw_kms_ldu_close_display(struct vmw_private *dev_priv);
263c8261a96SSinclair Yeh int vmw_kms_ldu_do_dmabuf_dirty(struct vmw_private *dev_priv,
264c8261a96SSinclair Yeh 				struct vmw_framebuffer *framebuffer,
265c8261a96SSinclair Yeh 				unsigned flags, unsigned color,
266c8261a96SSinclair Yeh 				struct drm_clip_rect *clips,
267c8261a96SSinclair Yeh 				unsigned num_clips, int increment);
2686bf6bf03SThomas Hellstrom int vmw_kms_update_proxy(struct vmw_resource *res,
2696bf6bf03SThomas Hellstrom 			 const struct drm_clip_rect *clips,
2706bf6bf03SThomas Hellstrom 			 unsigned num_clips,
2716bf6bf03SThomas Hellstrom 			 int increment);
272fb1d9738SJakob Bornecrantz 
27356d1c78dSJakob Bornecrantz /*
27456d1c78dSJakob Bornecrantz  * Screen Objects display functions - vmwgfx_scrn.c
27556d1c78dSJakob Bornecrantz  */
276c8261a96SSinclair Yeh int vmw_kms_sou_init_display(struct vmw_private *dev_priv);
277c8261a96SSinclair Yeh int vmw_kms_sou_close_display(struct vmw_private *dev_priv);
278c8261a96SSinclair Yeh int vmw_kms_sou_do_surface_dirty(struct vmw_private *dev_priv,
279c8261a96SSinclair Yeh 				 struct vmw_framebuffer *framebuffer,
280c8261a96SSinclair Yeh 				 struct drm_clip_rect *clips,
28110b1e0caSThomas Hellstrom 				 struct drm_vmw_rect *vclips,
28210b1e0caSThomas Hellstrom 				 struct vmw_resource *srf,
28310b1e0caSThomas Hellstrom 				 s32 dest_x,
28410b1e0caSThomas Hellstrom 				 s32 dest_y,
285c8261a96SSinclair Yeh 				 unsigned num_clips, int inc,
286c8261a96SSinclair Yeh 				 struct vmw_fence_obj **out_fence);
28710b1e0caSThomas Hellstrom int vmw_kms_sou_do_dmabuf_dirty(struct vmw_private *dev_priv,
288c8261a96SSinclair Yeh 				struct vmw_framebuffer *framebuffer,
289c8261a96SSinclair Yeh 				struct drm_clip_rect *clips,
290c8261a96SSinclair Yeh 				unsigned num_clips, int increment,
29110b1e0caSThomas Hellstrom 				bool interruptible,
292c8261a96SSinclair Yeh 				struct vmw_fence_obj **out_fence);
29310b1e0caSThomas Hellstrom int vmw_kms_sou_readback(struct vmw_private *dev_priv,
29410b1e0caSThomas Hellstrom 			 struct drm_file *file_priv,
29510b1e0caSThomas Hellstrom 			 struct vmw_framebuffer *vfb,
29610b1e0caSThomas Hellstrom 			 struct drm_vmw_fence_rep __user *user_fence_rep,
29710b1e0caSThomas Hellstrom 			 struct drm_vmw_rect *vclips,
29810b1e0caSThomas Hellstrom 			 uint32_t num_clips);
29935c05125SSinclair Yeh 
30035c05125SSinclair Yeh /*
30135c05125SSinclair Yeh  * Screen Target Display Unit functions - vmwgfx_stdu.c
30235c05125SSinclair Yeh  */
30335c05125SSinclair Yeh int vmw_kms_stdu_init_display(struct vmw_private *dev_priv);
30435c05125SSinclair Yeh int vmw_kms_stdu_close_display(struct vmw_private *dev_priv);
3056bf6bf03SThomas Hellstrom int vmw_kms_stdu_surface_dirty(struct vmw_private *dev_priv,
30635c05125SSinclair Yeh 			       struct vmw_framebuffer *framebuffer,
30735c05125SSinclair Yeh 			       struct drm_clip_rect *clips,
3086bf6bf03SThomas Hellstrom 			       struct drm_vmw_rect *vclips,
3096bf6bf03SThomas Hellstrom 			       struct vmw_resource *srf,
3106bf6bf03SThomas Hellstrom 			       s32 dest_x,
3116bf6bf03SThomas Hellstrom 			       s32 dest_y,
3126bf6bf03SThomas Hellstrom 			       unsigned num_clips, int inc,
3136bf6bf03SThomas Hellstrom 			       struct vmw_fence_obj **out_fence);
3146bf6bf03SThomas Hellstrom int vmw_kms_stdu_dma(struct vmw_private *dev_priv,
31535c05125SSinclair Yeh 		     struct drm_file *file_priv,
31635c05125SSinclair Yeh 		     struct vmw_framebuffer *vfb,
3176bf6bf03SThomas Hellstrom 		     struct drm_vmw_fence_rep __user *user_fence_rep,
3186bf6bf03SThomas Hellstrom 		     struct drm_clip_rect *clips,
3196bf6bf03SThomas Hellstrom 		     struct drm_vmw_rect *vclips,
3206bf6bf03SThomas Hellstrom 		     uint32_t num_clips,
3216bf6bf03SThomas Hellstrom 		     int increment,
3226bf6bf03SThomas Hellstrom 		     bool to_surface,
3236bf6bf03SThomas Hellstrom 		     bool interruptible);
324b5ec427eSJakob Bornecrantz 
32556d1c78dSJakob Bornecrantz 
326fb1d9738SJakob Bornecrantz #endif
327