aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-02-11 20:25:16 +0100
committerMarek Olšák <[email protected]>2015-02-17 17:31:48 +0100
commitc688988b0d68ffee2d8f1d64b0d402e23e8ce49e (patch)
treeac29a9a2fd87e58f9467f24f69f7db228d2e3b84 /src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
parent064847122a4c6dae6fdee41a4862948352cd929f (diff)
winsys/radeon: test the userptr ioctl to see if it's present
There is no other way to check for support. Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/winsys/radeon/drm/radeon_drm_winsys.h')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
index 1e0c632be99..5711ffa8e53 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
@@ -32,6 +32,25 @@
#include "radeon_winsys.h"
#include "os/os_thread.h"
+#include <radeon_drm.h>
+
+#ifndef DRM_RADEON_GEM_USERPTR
+
+#define DRM_RADEON_GEM_USERPTR 0x2d
+
+#define RADEON_GEM_USERPTR_READONLY (1 << 0)
+#define RADEON_GEM_USERPTR_ANONONLY (1 << 1)
+#define RADEON_GEM_USERPTR_VALIDATE (1 << 2)
+#define RADEON_GEM_USERPTR_REGISTER (1 << 3)
+
+struct drm_radeon_gem_userptr {
+ uint64_t addr;
+ uint64_t size;
+ uint32_t flags;
+ uint32_t handle;
+};
+
+#endif
struct radeon_drm_cs;