vmwgfx GL3 support
Subsystems (3)
PATCH 3/7 drm/vmwgfx: Initial DX support
In reply to Thomas HellstromInitial DX support.
Co-authored with Sinclair Yeh, Charmaine Lee and Jakob Bornecrantz.
--- drivers/gpu/drm/vmwgfx/Makefile | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_binding.c | 1294 ++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_binding.h | 209 ++++ drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 24 +- drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 735 ++++++------- drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 662 +++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 54 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 175 ++- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 1468 ++++++++++++++++++++++--- drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 28 +- drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 7 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 15 +- drivers/gpu/drm/vmwgfx/vmwgfx_mob.c | 169 +-- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 48 +- drivers/gpu/drm/vmwgfx/vmwgfx_resource_priv.h | 12 +- drivers/gpu/drm/vmwgfx/vmwgfx_shader.c | 484 +++++++- drivers/gpu/drm/vmwgfx/vmwgfx_so.c | 555 ++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_so.h | 160 +++ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 109 +- include/uapi/drm/vmwgfx_drm.h | 35 +- 22 files changed, 5411 insertions(+), 839 deletions(-) create mode 100644 drivers/gpu/drm/vmwgfx/vmwgfx_binding.c create mode 100644 drivers/gpu/drm/vmwgfx/vmwgfx_binding.h create mode 100644 drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c create mode 100644 drivers/gpu/drm/vmwgfx/vmwgfx_so.c create mode 100644 drivers/gpu/drm/vmwgfx/vmwgfx_so.h
drivers/gpu/drm/vmwgfx/Makefile +1 -0
@@ -8,5 +8,6 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ vmwgfx_fence.o vmwgfx_dmabuf.o vmwgfx_scrn.o vmwgfx_context.o \ vmwgfx_surface.o vmwgfx_prime.o vmwgfx_mob.o vmwgfx_shader.o \ vmwgfx_cmdbuf_res.o vmwgfx_cmdbuf.o vmwgfx_stdu.o \ + vmwgfx_cotable.o vmwgfx_so.o vmwgfx_binding.o obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.o
drivers/gpu/drm/vmwgfx/vmwgfx_binding.c new file +1294 -0
1,294 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_binding.h new file +209 -0
209 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c +2 -3
@@ -916,9 +916,8 @@ static void *vmw_cmdbuf_reserve_cur(struct vmw_cmdbuf_man *man, cur = man->cur;if (cur && (size + man->cur_pos > cur->size || - (ctx_id !=SVGA3D_INVALID_ID && - (cur->cb_header->flags &SVGA_CB_FLAG_DX_CONTEXT ) && - ctx_id != cur->cb_header->dxContext))) + ((cur->cb_header->flags &SVGA_CB_FLAG_DX_CONTEXT ) && + ctx_id != cur->cb_header->dxContext)))__vmw_cmdbuf_cur_flush (man);if (!man->cur) {
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c +14 -10
@@ -26,15 +26,10 @@**************************************************************************/ #include "vmwgfx_drv.h" +#include "vmwgfx_resource_priv.h" #define VMW_CMDBUF_RES_MAN_HT_ORDER 12 -enum vmw_cmdbuf_res_state { -VMW_CMDBUF_RES_COMMITED , -VMW_CMDBUF_RES_ADD , -VMW_CMDBUF_RES_DEL -}; -/** * struct vmw_cmdbuf_res - Command buffer managed resource entry. *
@@ -132,9 +127,12 @@ void vmw_cmdbuf_res_commit(struct list_head *list)list_for_each_entry_safe (entry, next, list, head) {list_del (&entry->head); +if (entry->res->func->commit_notify) + entry->res->func->commit_notify (entry->res, + entry->state);switch (entry->state) {case VMW_CMDBUF_RES_ADD : - entry->state =VMW_CMDBUF_RES_COMMITED ; + entry->state =VMW_CMDBUF_RES_COMMITTED ;list_add_tail (&entry->head, &entry->man->list);break ;case VMW_CMDBUF_RES_DEL :
@@ -175,7 +173,7 @@ void vmw_cmdbuf_res_revert(struct list_head *list) &entry->hash);list_del (&entry->head);list_add_tail (&entry->head, &entry->man->list); - entry->state =VMW_CMDBUF_RES_COMMITED ; + entry->state =VMW_CMDBUF_RES_COMMITTED ;break ;default :BUG ();
@@ -231,6 +229,9 @@ out_invalid_key:* @res_type: The resource type. * @user_key: The user-space id of the resource. * @list: The staging list. +* @res_p: If the resource is in an already committed state, points to the +* struct vmw_resource on successful return. The pointer will be +* non ref-counted. * * This function looks up the struct vmw_cmdbuf_res entry from the manager * hash table and, if it exists, removes it. Depending on its current staging
@@ -240,7 +241,8 @@ out_invalid_key:int vmw_cmdbuf_res_remove (struct vmw_cmdbuf_res_manager *man,enum vmw_cmdbuf_res_type res_type,u32 user_key, -struct list_head *list) +struct list_head *list, +struct vmw_resource **res_p) {struct vmw_cmdbuf_res *entry;struct drm_hash_item *hash;
@@ -256,12 +258,14 @@ int vmw_cmdbuf_res_remove(struct vmw_cmdbuf_res_manager *man,switch (entry->state) {case VMW_CMDBUF_RES_ADD :vmw_cmdbuf_res_free (man, entry); + *res_p =NULL ;break ; -case VMW_CMDBUF_RES_COMMITED : +case VMW_CMDBUF_RES_COMMITTED : (void )drm_ht_remove_item (&man->resources, &entry->hash);list_del (&entry->head); entry->state =VMW_CMDBUF_RES_DEL ;list_add_tail (&entry->head, list); + *res_p = entry->res;break ;default :BUG ();
drivers/gpu/drm/vmwgfx/vmwgfx_context.c +341 -394
899 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c new file +662 -0
511 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +46 -8
54 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +86 -89
175 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +1292 -176
1,468 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_mob.c +105 -64
169 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +34 -14
48 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_resource_priv.h +11 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/vmwgfx/vmwgfx_shader.c +440 -44
484 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_so.c new file +555 -0
555 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_so.h new file +160 -0
160 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c +87 -22
109 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 7 lines
2.1.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Part of the diff is not shown here. View the raw message.
PATCH 2/7 drm/vmwgfx: Update device includes for DX device functionality
In reply to Thomas HellstromFrom: Sinclair Yeh <[email protected]>
Add DX includes and move all device includes to a separate directory.
Co-authored with Thomas Hellstrom, Charmaine Lee and above all, the VMware device team.
--- .../gpu/drm/vmwgfx/device_include/includeCheck.h | 3 + .../gpu/drm/vmwgfx/device_include/svga3d_caps.h | 110 + drivers/gpu/drm/vmwgfx/device_include/svga3d_cmd.h | 2071 +++++++++++++++ .../gpu/drm/vmwgfx/device_include/svga3d_devcaps.h | 457 ++++ drivers/gpu/drm/vmwgfx/device_include/svga3d_dx.h | 1487 +++++++++++ .../gpu/drm/vmwgfx/device_include/svga3d_limits.h | 99 + drivers/gpu/drm/vmwgfx/device_include/svga3d_reg.h | 50 + .../drm/vmwgfx/device_include/svga3d_surfacedefs.h | 1204 +++++++++ .../gpu/drm/vmwgfx/device_include/svga3d_types.h | 1633 ++++++++++++ .../gpu/drm/vmwgfx/device_include/svga_escape.h | 89 + .../gpu/drm/vmwgfx/device_include/svga_overlay.h | 199 ++ drivers/gpu/drm/vmwgfx/device_include/svga_reg.h | 1936 ++++++++++++++ drivers/gpu/drm/vmwgfx/device_include/svga_types.h | 46 + .../gpu/drm/vmwgfx/device_include/vm_basic_types.h | 21 + .../drm/vmwgfx/device_include/vmware_pack_begin.h | 25 + .../drm/vmwgfx/device_include/vmware_pack_end.h | 25 + drivers/gpu/drm/vmwgfx/svga3d_reg.h | 2675 -------------------- drivers/gpu/drm/vmwgfx/svga3d_surfacedefs.h | 973 ------- drivers/gpu/drm/vmwgfx/svga_escape.h | 89 - drivers/gpu/drm/vmwgfx/svga_overlay.h | 201 -- drivers/gpu/drm/vmwgfx/svga_reg.h | 1751 ------------- drivers/gpu/drm/vmwgfx/svga_types.h | 48 - drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 12 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 - drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 3 +- drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_mob.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_reg.h | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +- 34 files changed, 9474 insertions(+), 5756 deletions(-) create mode 100644 drivers/gpu/drm/vmwgfx/device_include/includeCheck.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/svga3d_caps.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/svga3d_cmd.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/svga3d_devcaps.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/svga3d_dx.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/svga3d_limits.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/svga3d_reg.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/svga3d_surfacedefs.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/svga3d_types.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/svga_escape.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/svga_overlay.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/svga_reg.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/svga_types.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/vm_basic_types.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/vmware_pack_begin.h create mode 100644 drivers/gpu/drm/vmwgfx/device_include/vmware_pack_end.h delete mode 100644 drivers/gpu/drm/vmwgfx/svga3d_reg.h delete mode 100644 drivers/gpu/drm/vmwgfx/svga3d_surfacedefs.h delete mode 100644 drivers/gpu/drm/vmwgfx/svga_escape.h delete mode 100644 drivers/gpu/drm/vmwgfx/svga_overlay.h delete mode 100644 drivers/gpu/drm/vmwgfx/svga_reg.h delete mode 100644 drivers/gpu/drm/vmwgfx/svga_types.h
drivers/gpu/drm/vmwgfx/device_include/includeCheck.h new file +3 -0
@@ -0,0 +1,3 @@ +/* +* Intentionally empty file. +*/
drivers/gpu/drm/vmwgfx/device_include/svga3d_caps.h new file +110 -0
110 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/device_include/svga3d_cmd.h new file +2071 -0
2,071 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/device_include/svga3d_devcaps.h new file +457 -0
457 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/device_include/svga3d_dx.h new file +1487 -0
359 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/device_include/svga3d_limits.h new file +99 -0
99 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/device_include/svga3d_reg.h new file +50 -0
50 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/device_include/svga3d_surfacedefs.h new file +1204 -0
1,204 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/device_include/svga3d_types.h new file +1633 -0
1,633 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/device_include/svga_escape.h new file +89 -0
89 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/device_include/svga_overlay.h new file +199 -0
199 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/device_include/svga_reg.h new file +1936 -0
1,936 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/device_include/svga_types.h new file +46 -0
46 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/device_include/vm_basic_types.h new file +21 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/vmwgfx/device_include/vmware_pack_begin.h new file +25 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/vmwgfx/device_include/vmware_pack_end.h new file +25 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/vmwgfx/svga3d_reg.h deleted +0 -2675
2,675 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/svga3d_surfacedefs.h deleted +0 -973
973 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/svga_escape.h deleted +0 -89
89 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/svga_overlay.h deleted +0 -201
201 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/svga_reg.h deleted +0 -1751
1,751 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/svga_types.h deleted +0 -48
48 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_context.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +0 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c +1 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 7 lines
2.1.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Part of the diff is not shown here. View the raw message.
cover vmwgfx GL3 support
Support for the new device interface, "DX", that enables us to implement GL3. User-space component (mesa/gallium) will published in the near timeframe.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/7 drm: export the DRM permission check code
This way drm_ioctl_permit() can be used by drivers
--- drivers/gpu/drm/drm_ioctl.c | 3 ++- include/drm/drmP.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_ioctl.c +2 -1
@@ -480,7 +480,7 @@ static int drm_version(struct drm_device *dev, void *data,* indicated permissions. If so, returns zero. Otherwise returns an * error code suitable for ioctl return. */ -static int drm_ioctl_permit (u32 flags,struct drm_file *file_priv) +int drm_ioctl_permit (u32 flags,struct drm_file *file_priv) {/* ROOT_ONLY is only for CAP_SYS_ADMIN */ if (unlikely ((flags &DRM_ROOT_ONLY ) && !capable (CAP_SYS_ADMIN )))
@@ -508,6 +508,7 @@ static int drm_ioctl_permit(u32 flags, struct drm_file *file_priv)return 0 ; } +EXPORT_SYMBOL (drm_ioctl_permit);#define DRM_IOCTL_DEF (ioctl, _func, _flags) \ [DRM_IOCTL_NR(ioctl)] = { \
include/drm/drmP.h +1 -0
@@ -887,6 +887,7 @@ static inline bool drm_is_primary_client(const struct drm_file *file_priv)/*@{*/ /* Driver support (drm_drv.h) */ +extern int drm_ioctl_permit (u32 flags,struct drm_file *file_priv);extern long drm_ioctl (struct file *filp,unsigned int cmd,unsigned long arg); extern long drm_compat_ioctl(struct file *filp,
Signature · 7 lines
2.1.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/7 drm/vmwgfx: Command parser fixes for DX
In reply to Thomas HellstromFrom: Charmaine Lee <[email protected]>
Implement support for a couple of missing commands and fix a command parser error path. Also fix uninitialized devcaps and surface size computation.
--- drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 98 ++++++++++++++++++++++++++++----- drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 1 + 4 files changed, 89 insertions(+), 15 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_context.c +1 -0
@@ -37,6 +37,7 @@ struct vmw_user_context {struct vmw_cmdbuf_res_manager *man;struct vmw_resource *cotables[SVGA_COTABLE_DX10_MAX ];spinlock_t cotable_lock; +struct vmw_dma_buffer *dx_query_mob; };static void vmw_user_context_free (struct vmw_resource *res);
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +85 -13
152 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c +2 -2
@@ -196,8 +196,8 @@ int vmw_get_cap_3d_ioctl(struct drm_device *dev, void *data,uint32_t *bounce32 = (uint32_t *) bounce; num = size /sizeof (uint32_t ); -if (num >SVGA3D_DEVCAP_DX ) - num =SVGA3D_DEVCAP_DX ; +if (num >SVGA3D_DEVCAP_MAX ) + num =SVGA3D_DEVCAP_MAX ;spin_lock (&dev_priv->cap_lock);for (i =0 ; i < num; ++i) {
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c +1 -0
@@ -1533,6 +1533,7 @@ int vmw_surface_gb_priv_define(struct drm_device *dev, srf->offsets =NULL ; srf->base_size = size; srf->autogen_filter =SVGA3D_TEX_FILTER_NONE ; + srf->array_size = array_size; srf->multisample_count = multisample_count;if (array_size)
Signature · 7 lines
2.1.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 5/7 drm/vmwgfx: Add command parser support for a couple of DX commands
In reply to Thomas HellstromFrom: Neha Bhende <[email protected]>
Add support for SVGA_3D_CMD_DX_BUFFER_COPY andSVGA_3D_CMD_DX_PRED_COPY_REGION
--- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 50 +++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +48 -2
@@ -909,6 +909,50 @@ static int vmw_cmd_surface_copy_check(struct vmw_private *dev_priv, &cmd->body.dest.sid, NULL); } +static int vmw_cmd_buffer_copy_check (struct vmw_private *dev_priv, +struct vmw_sw_context *sw_context, +SVGA3dCmdHeader *header) +{ +struct { +SVGA3dCmdHeader header; +SVGA3dCmdDXBufferCopy body; + } *cmd; +int ret; + + cmd =container_of (header,typeof (*cmd), header); + ret =vmw_cmd_res_check (dev_priv, sw_context, vmw_res_surface, + user_surface_converter, + &cmd->body.src,NULL ); +if (ret !=0 ) +return ret; + +return vmw_cmd_res_check (dev_priv, sw_context, vmw_res_surface, + user_surface_converter, + &cmd->body.dest,NULL ); +} + +static int vmw_cmd_pred_copy_check (struct vmw_private *dev_priv, +struct vmw_sw_context *sw_context, +SVGA3dCmdHeader *header) +{ +struct { +SVGA3dCmdHeader header; +SVGA3dCmdDXPredCopyRegion body; + } *cmd; +int ret; + + cmd =container_of (header,typeof (*cmd), header); + ret =vmw_cmd_res_check (dev_priv, sw_context, vmw_res_surface, + user_surface_converter, + &cmd->body.srcSid,NULL ); +if (ret !=0 ) +return ret; + +return vmw_cmd_res_check (dev_priv, sw_context, vmw_res_surface, + user_surface_converter, + &cmd->body.dstSid,NULL ); +} +static int vmw_cmd_stretch_blt_check (struct vmw_private *dev_priv,struct vmw_sw_context *sw_context,SVGA3dCmdHeader *header)
@@ -3075,8 +3119,6 @@ static const struct vmw_cmd_entry vmw_cmd_entries[SVGA_3D_CMD_MAX] = { &vmw_cmd_dx_clear_rendertarget_view, true, false, true),VMW_CMD_DEF (SVGA_3D_CMD_DX_CLEAR_DEPTHSTENCIL_VIEW , &vmw_cmd_dx_clear_depthstencil_view, true, false, true), -VMW_CMD_DEF (SVGA_3D_CMD_DX_PRED_COPY_REGION , &vmw_cmd_invalid, - true, false, true),VMW_CMD_DEF (SVGA_3D_CMD_DX_PRED_COPY , &vmw_cmd_invalid, true, false, true), VMW_CMD_DEF(SVGA_3D_CMD_DX_GENMIPS, &vmw_cmd_invalid,
@@ -3137,6 +3179,10 @@ static const struct vmw_cmd_entry vmw_cmd_entries[SVGA_3D_CMD_MAX] = { &vmw_cmd_dx_cid_check, true, false, true),VMW_CMD_DEF (SVGA_3D_CMD_DX_SET_TOPOLOGY , &vmw_cmd_dx_cid_check, true, false, true), +VMW_CMD_DEF (SVGA_3D_CMD_DX_BUFFER_COPY , + &vmw_cmd_buffer_copy_check, true, false, true), +VMW_CMD_DEF (SVGA_3D_CMD_DX_PRED_COPY_REGION , + &vmw_cmd_pred_copy_check, true, false, true), }; static int vmw_cmd_check(struct vmw_private *dev_priv,
Signature · 7 lines
2.1.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 6/7 drm/vmwgfx: Add DX query support. Various fixes.
In reply to Thomas HellstromFrom: Sinclair Yeh <[email protected]>
Add support for vgpu10 queries. Functional- and formatting fixes.
--- drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | 9 +- drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 70 ++++++++++- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 10 ++ drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 209 ++++++++++++++++++++++++++++--- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 101 ++++++++++++++- 5 files changed, 373 insertions(+), 26 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c +5 -4
@@ -817,9 +817,9 @@ static int vmw_ttm_fault_reserve_notify(struct ttm_buffer_object *bo)/** * vmw_move_notify - TTM move_notify_callback * -* @bo: The TTM buffer object about to move. -* @mem: The truct ttm_mem_reg indicating to what memory -* region the move is taking place. +* @bo: The TTM buffer object about to move. +* @mem: The struct ttm_mem_reg indicating to what memory +* region the move is taking place. * * Calls move_notify for all subsystems needing it. * (currently only resources).
@@ -828,13 +828,14 @@ static void vmw_move_notify(struct ttm_buffer_object *bo, struct ttm_mem_reg *mem) {vmw_resource_move_notify (bo, mem); +vmw_query_move_notify (bo, mem); }/** * vmw_swap_notify - TTM move_notify_callback * -* @bo: The TTM buffer object about to be swapped out. +* @bo: The TTM buffer object about to be swapped out. */ static void vmw_swap_notify (struct ttm_buffer_object *bo) {
drivers/gpu/drm/vmwgfx/vmwgfx_context.c +69 -1
97 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +10 -0
@@ -88,6 +88,8 @@ struct vmw_dma_buffer {struct ttm_buffer_object base;struct list_head res_list;s32 pin_count; +/* Not ref-counted. Protected by binding_mutex */ +struct vmw_resource *dx_query_ctx; };/**
@@ -658,6 +660,9 @@ extern void vmw_resource_unreserve(struct vmw_resource *res, unsigned long new_backup_offset);extern void vmw_resource_move_notify (struct ttm_buffer_object *bo,struct ttm_mem_reg *mem); +extern void vmw_query_move_notify (struct ttm_buffer_object *bo, +struct ttm_mem_reg *mem); +extern int vmw_query_readback_all (struct vmw_dma_buffer *dx_query_mob);extern void vmw_fence_single_bo (struct ttm_buffer_object *bo,struct vmw_fence_obj *fence);extern void vmw_resource_evict_all (struct vmw_private *dev_priv);
@@ -1011,6 +1016,11 @@ extern struct vmw_ctx_binding_state * vmw_context_binding_state(struct vmw_resource *ctx);extern void vmw_dx_context_scrub_cotables (struct vmw_resource *ctx,bool readback); +extern int vmw_context_bind_dx_query (struct vmw_resource *ctx_res, +struct vmw_dma_buffer *mob); +extern struct vmw_dma_buffer * +vmw_context_get_dx_query_mob (struct vmw_resource *ctx_res); +/* * Surface management - vmwgfx_surface.c
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +191 -18
304 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +98 -3
113 lines not on this page · raw message
Signature · 7 lines
2.1.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 7/7 drm/vmwgfx: Fix copyright headers
In reply to Thomas HellstromFrom: Sinclair Yeh <[email protected]>
Updating and fixing copyright headers.
Bump version minor to signal vgpu10 support.
--- drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 6 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_fence.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_irq.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_mob.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_reg.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_resource_priv.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_shader.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_so.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_so.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c | 2 +- include/uapi/drm/vmwgfx_drm.h | 2 +- 30 files changed, 32 insertions(+), 32 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2014 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2014-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_context.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009-2012 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2014 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2014-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2011 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2011-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +3 -3
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009-2014 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
@@ -40,9 +40,9 @@#include <drm/ttm/ttm_module.h> #include "vmwgfx_fence.h" -#define VMWGFX_DRIVER_DATE "20150626" +#define VMWGFX_DRIVER_DATE "20150810"#define VMWGFX_DRIVER_MAJOR 2 -#define VMWGFX_DRIVER_MINOR 7 +#define VMWGFX_DRIVER_MINOR 9#define VMWGFX_DRIVER_PATCHLEVEL 0#define VMWGFX_FILE_PAGE_OFFSET 0x00100000#define VMWGFX_FIFO_STATIC_SIZE (1024*1024)
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +1 -1
@@ -1,7 +1,7 @@/************************************************************************** * * Copyright © 2007 David Airlie -* Copyright © 2009 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2011 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2011-2014 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_fence.h +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2011 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2011-2012 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009-2011 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_irq.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009-2014 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009-2014 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_mob.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2012 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2012-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2014 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_reg.h +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2014 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_resource_priv.h +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2012 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2012-2014 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2011-2014 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2011-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_shader.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009-2012 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_so.c +1 -1
@@ -1,5 +1,5 @@/************************************************************************** -* Copyright © 2014 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2014-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_so.h +1 -1
@@ -1,5 +1,5 @@/************************************************************************** -* Copyright © 2014 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2014-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +1 -1
@@ -1,6 +1,6 @@/****************************************************************************** * -* COPYRIGHT © 2014 VMware, Inc., Palo Alto, CA., USA +* COPYRIGHT © 2014-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009-2014 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2011 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
include/uapi/drm/vmwgfx_drm.h +1 -1
@@ -1,6 +1,6 @@/************************************************************************** * -* Copyright © 2009 VMware, Inc., Palo Alto, CA., USA +* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a
Signature · 7 lines
2.1.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/7] drm/vmwgfx: Initial DX support
In reply to Thomas HellstromHi Thomas,
On 13 August 2015 at 06:49, Thomas Hellstrom <[email protected]> wrote:
[snip]
include/uapi/drm/vmwgfx_drm.h struct drm_vmw_update_layout_arg { · line 834
Quoted 10 lines
include/uapi/drm/vmwgfx_drm.h +0
-1@@ -826,7 +830,6 @@ struct drm_vmw_update_layout_arg {enum drm_vmw_shader_type { drm_vmw_shader_type_vs =0 , drm_vmw_shader_type_ps, - drm_vmw_shader_type_gs };
Won't this hunk cause API/ABI breakage ? I guess one could get away if no users ever relied upon it.
Thanks
Emil
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/7] drm/vmwgfx: Initial DX support
Quoted 4 lines · Emil Velikov
Hi Thomas,
On 13 August 2015 at 06:49, Thomas Hellstrom <[email protected]> wrote:
[snip]
Quoted 11 lines
include/uapi/drm/vmwgfx_drm.h struct drm_vmw_update_layout_arg { · line 834
Quoted 9 lines
include/uapi/drm/vmwgfx_drm.h +0
-1@@ -826,7 +830,6 @@ struct drm_vmw_update_layout_arg {enum drm_vmw_shader_type { drm_vmw_shader_type_vs =0 , drm_vmw_shader_type_ps, - drm_vmw_shader_type_gs };Won't this hunk cause API/ABI breakage ? I guess one could get away if no users ever relied upon it.
Hi, Emil,
You're right. However, the kernel driver (other than in-house development versions) should never have supported the gs shader type anyway, so we don't break anything existing. With the current version, geometry shaders are created using the GPU command stream.
Thanks,
Thomas
Quoted 7 lines
Thanks
Emil
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel