diff options
Diffstat (limited to 'vmwgfx/vmwgfx_drmi.h')
-rw-r--r-- | vmwgfx/vmwgfx_drmi.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/vmwgfx/vmwgfx_drmi.h b/vmwgfx/vmwgfx_drmi.h new file mode 100644 index 0000000..2435009 --- /dev/null +++ b/vmwgfx/vmwgfx_drmi.h | |||
@@ -0,0 +1,87 @@ | |||
1 | /* | ||
2 | * Copyright 2011 VMWare, Inc. | ||
3 | * All Rights Reserved. | ||
4 | * | ||
5 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
6 | * copy of this software and associated documentation files (the | ||
7 | * "Software"), to deal in the Software without restriction, including | ||
8 | * without limitation the rights to use, copy, modify, merge, publish, | ||
9 | * distribute, sub license, and/or sell copies of the Software, and to | ||
10 | * permit persons to whom the Software is furnished to do so, subject to | ||
11 | * the following conditions: | ||
12 | * | ||
13 | * The above copyright notice and this permission notice (including the | ||
14 | * next paragraph) shall be included in all copies or substantial portions | ||
15 | * of the Software. | ||
16 | * | ||
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
18 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. | ||
20 | * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR | ||
21 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
24 | * | ||
25 | * Author: Jakob Bornecrantz <wallbraker@gmail.com> | ||
26 | * Author: Thomas Hellstrom <thellstrom@vmware.com> | ||
27 | */ | ||
28 | |||
29 | #ifndef _VMWGFX_DRMI_H_ | ||
30 | #define _VMWGFX_DRMI_H_ | ||
31 | |||
32 | #include <xorg-server.h> | ||
33 | #include <regionstr.h> | ||
34 | #include <stdint.h> | ||
35 | #include "vmwgfx_drm.h" | ||
36 | |||
37 | struct vmwgfx_dma_ctx; | ||
38 | |||
39 | extern int | ||
40 | vmwgfx_present_readback(int drm_fd, uint32_t fb_id, RegionPtr region); | ||
41 | |||
42 | extern int | ||
43 | vmwgfx_present(int drm_fd, uint32_t fb_id, unsigned int dst_x, | ||
44 | unsigned int dst_y, RegionPtr region, uint32_t handle); | ||
45 | |||
46 | struct vmwgfx_dmabuf { | ||
47 | uint32_t handle; | ||
48 | uint32_t gmr_id; | ||
49 | uint32_t gmr_offset; | ||
50 | size_t size; | ||
51 | }; | ||
52 | |||
53 | extern struct vmwgfx_dmabuf* | ||
54 | vmwgfx_dmabuf_alloc(int drm_fd, size_t size); | ||
55 | extern void | ||
56 | vmwgfx_dmabuf_destroy(struct vmwgfx_dmabuf *buf); | ||
57 | extern void * | ||
58 | vmwgfx_dmabuf_map(struct vmwgfx_dmabuf *buf); | ||
59 | extern void | ||
60 | vmwgfx_dmabuf_unmap(struct vmwgfx_dmabuf *buf); | ||
61 | |||
62 | extern int | ||
63 | vmwgfx_dma(unsigned int host_x, unsigned int host_y, | ||
64 | RegionPtr region, struct vmwgfx_dmabuf *buf, | ||
65 | uint32_t buf_pitch, uint32_t surface_handle, int to_surface); | ||
66 | |||
67 | extern int | ||
68 | vmwgfx_num_streams(int drm_fd, uint32_t *ntot, uint32_t *nfree); | ||
69 | |||
70 | extern int | ||
71 | vmwgfx_claim_stream(int drm_fd, uint32_t *out); | ||
72 | |||
73 | extern int | ||
74 | vmwgfx_unref_stream(int drm_fd, uint32_t stream_id); | ||
75 | |||
76 | int | ||
77 | vmwgfx_cursor_bypass(int drm_fd, int xhot, int yhot); | ||
78 | |||
79 | int | ||
80 | vmwgfx_max_fb_size(int drm_fd, size_t *size); | ||
81 | |||
82 | int | ||
83 | vmwgfx_update_gui_layout(int drm_fd, unsigned int num_rects, | ||
84 | struct drm_vmw_rect *rects); | ||
85 | int | ||
86 | vmwgfx_get_param(int drm_fd, uint32_t param, uint64_t *out); | ||
87 | #endif | ||