summaryrefslogtreecommitdiff
path: root/vmwgfx/vmwgfx_drmi.h
diff options
context:
space:
mode:
Diffstat (limited to 'vmwgfx/vmwgfx_drmi.h')
-rw-r--r--vmwgfx/vmwgfx_drmi.h87
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
37struct vmwgfx_dma_ctx;
38
39extern int
40vmwgfx_present_readback(int drm_fd, uint32_t fb_id, RegionPtr region);
41
42extern int
43vmwgfx_present(int drm_fd, uint32_t fb_id, unsigned int dst_x,
44 unsigned int dst_y, RegionPtr region, uint32_t handle);
45
46struct vmwgfx_dmabuf {
47 uint32_t handle;
48 uint32_t gmr_id;
49 uint32_t gmr_offset;
50 size_t size;
51};
52
53extern struct vmwgfx_dmabuf*
54vmwgfx_dmabuf_alloc(int drm_fd, size_t size);
55extern void
56vmwgfx_dmabuf_destroy(struct vmwgfx_dmabuf *buf);
57extern void *
58vmwgfx_dmabuf_map(struct vmwgfx_dmabuf *buf);
59extern void
60vmwgfx_dmabuf_unmap(struct vmwgfx_dmabuf *buf);
61
62extern int
63vmwgfx_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
67extern int
68vmwgfx_num_streams(int drm_fd, uint32_t *ntot, uint32_t *nfree);
69
70extern int
71vmwgfx_claim_stream(int drm_fd, uint32_t *out);
72
73extern int
74vmwgfx_unref_stream(int drm_fd, uint32_t stream_id);
75
76int
77vmwgfx_cursor_bypass(int drm_fd, int xhot, int yhot);
78
79int
80vmwgfx_max_fb_size(int drm_fd, size_t *size);
81
82int
83vmwgfx_update_gui_layout(int drm_fd, unsigned int num_rects,
84 struct drm_vmw_rect *rects);
85int
86vmwgfx_get_param(int drm_fd, uint32_t param, uint64_t *out);
87#endif