History

drm/vmwgfx: Initial DX support

Initial DX support. Co-authored with Sinclair Yeh, Charmaine Lee and Jakob Bornecrantz.

Thomas Hellstrom committed 11 years ago

Commit d80efd51 parent 8ce75f822 files · +5411 −839Browse files

Showing the changes to include/uapi (1 of 22 files). Show all

Unified · Split

include/uapi/drm/vmwgfx_drm.h+32−3
@@ -64,6 +64,7 @@ · 63 unmodified lines
6464 #define DRM_VMW_GB_SURFACE_CREATE 23
6565 #define DRM_VMW_GB_SURFACE_REF 24
6666 #define DRM_VMW_SYNCCPU 25
67+#define DRM_VMW_CREATE_EXTENDED_CONTEXT 26
6768
6869 /*************************************************************************/
6970 /**
@@ -89,6 +90,7 @@ · 19 unmodified lines
8990 #define DRM_VMW_PARAM_MAX_MOB_MEMORY 9
9091 #define DRM_VMW_PARAM_MAX_MOB_SIZE 10
9192 #define DRM_VMW_PARAM_SCREEN_TARGET 11
93+#define DRM_VMW_PARAM_DX 12
9294
9395 /**
9496 * enum drm_vmw_handle_type - handle type for ref ioctls
@@ -297,7 +299,7 @@ union drm_vmw_surface_reference_arg { · 202 unmodified lines
297299 * Argument to the DRM_VMW_EXECBUF Ioctl.
298300 */
299301
300−#define DRM_VMW_EXECBUF_VERSION 1
302+#define DRM_VMW_EXECBUF_VERSION 2
301303
302304 struct drm_vmw_execbuf_arg {
303305 uint64_t commands;
@@ -306,6 +308,8 @@ struct drm_vmw_execbuf_arg { · 2 unmodified lines
306308 uint64_t fence_rep;
307309 uint32_t version;
308310 uint32_t flags;
311+ uint32_t context_handle;
312+ uint32_t pad64;
309313 };
310314
311315 /**
@@ -826,7 +830,6 @@ struct drm_vmw_update_layout_arg { · 514 unmodified lines
826830 enum drm_vmw_shader_type {
827831 drm_vmw_shader_type_vs = 0,
828832 drm_vmw_shader_type_ps,
829− drm_vmw_shader_type_gs
830833 };
831834
832835
@@ -908,6 +911,8 @@ enum drm_vmw_surface_flags { · 75 unmodified lines
908911 * @buffer_handle Buffer handle of backup buffer. SVGA3D_INVALID_ID
909912 * if none.
910913 * @base_size Size of the base mip level for all faces.
914+ * @array_size Must be zero for non-DX hardware, and if non-zero
915+ * svga3d_flags must have proper bind flags setup.
911916 *
912917 * Input argument to the DRM_VMW_GB_SURFACE_CREATE Ioctl.
913918 * Part of output argument for the DRM_VMW_GB_SURFACE_REF Ioctl.
@@ -920,7 +925,7 @@ struct drm_vmw_gb_surface_create_req { · 6 unmodified lines
920925 uint32_t multisample_count;
921926 uint32_t autogen_filter;
922927 uint32_t buffer_handle;
923− uint32_t pad64;
928+ uint32_t array_size;
924929 struct drm_vmw_size base_size;
925930 };
926931
@@ -1060,4 +1065,28 @@ struct drm_vmw_synccpu_arg { · 133 unmodified lines
10601065 uint32_t pad64;
10611066 };
10621067
1068+/*************************************************************************/
1069+/**
1070+ * DRM_VMW_CREATE_EXTENDED_CONTEXT - Create a host context.
1071+ *
1072+ * Allocates a device unique context id, and queues a create context command
1073+ * for the host. Does not wait for host completion.
1074+ */
1075+enum drm_vmw_extended_context {
1076+ drm_vmw_context_legacy,
1077+ drm_vmw_context_dx
1078+};
1079+
1080+/**
1081+ * union drm_vmw_extended_context_arg
1082+ *
1083+ * @req: Context type.
1084+ * @rep: Context identifier.
1085+ *
1086+ * Argument to the DRM_VMW_CREATE_EXTENDED_CONTEXT Ioctl.
1087+ */
1088+union drm_vmw_extended_context_arg {
1089+ enum drm_vmw_extended_context req;
1090+ struct drm_vmw_context_arg rep;
1091+};
10631092 #endif