Skip to contentSkip to conversation

MAINTAINERS: update vmwgfx info

PATCH In review Zack Rusin 2 participants 6 messages Jun 15, 2021 – Jun 16, 2021

Subsystems (3)
lore
Share & tools
lore

Zack Rusin

author
#0 lore raw

PATCH 1/5 MAINTAINERS: update vmwgfx info

Roland will be focusing on lavapipe over the next few months and won't have time for vmwgfx.
vmwgfx is now maintained within drm-misc.

---
 MAINTAINERS | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
MAINTAINERS +1 -2
index a4ba46fb803a..cae0c6148590 100644
@@ -5962,11 +5962,10 @@ F:	drivers/gpu/drm/vboxvideo/
 
 DRM DRIVER FOR VMWARE VIRTUAL GPU
 M:	"VMware Graphics" <[email protected]>
-M:	Roland Scheidegger <[email protected]>
 M:	Zack Rusin <[email protected]>
 L:	[email protected]
 S:	Supported
-T:	git git://people.freedesktop.org/~sroland/linux
+T:	git git://anongit.freedesktop.org/drm/drm-misc
 F:	drivers/gpu/drm/vmwgfx/
 F:	include/uapi/drm/vmwgfx_drm.h
 
Signature · 1 line
2.30.2
author
#1 lore raw

PATCH 2/5 drm/vmwgfx: Update device headers

Historically our device headers have been forked versions of the internal device headers, this has made maintaining them a bit of a burden. To fix the situation, going forward, the device headers will be verbatim copies of the internal headers.
To do that the driver code has to be adapted to use pristine device headers. This will make future update to the device headers trivial and automatic.

---
 .../drm/vmwgfx/device_include/includeCheck.h  |    3 -
 .../drm/vmwgfx/device_include/svga3d_caps.h   |  111 -
 .../drm/vmwgfx/device_include/svga3d_cmd.h    | 3680 +++++++----------
 .../vmwgfx/device_include/svga3d_devcaps.h    |  793 ++--
 .../gpu/drm/vmwgfx/device_include/svga3d_dx.h | 3503 +++++++---------
 .../drm/vmwgfx/device_include/svga3d_limits.h |  101 +-
 .../drm/vmwgfx/device_include/svga3d_reg.h    |   15 +-
 .../device_include/svga3d_surfacedefs.h       | 3132 +++++++-------
 .../drm/vmwgfx/device_include/svga3d_types.h  | 3020 ++++++--------
 .../drm/vmwgfx/device_include/svga_escape.h   |   68 +-
 .../drm/vmwgfx/device_include/svga_overlay.h  |  203 +-
 .../gpu/drm/vmwgfx/device_include/svga_reg.h  | 2847 ++++---------
 .../{svga_types.h => vm_basic_types.h}        |   14 +-
 .../vmwgfx/device_include/vmware_pack_begin.h |    2 -
 .../vmwgfx/device_include/vmware_pack_end.h   |    2 -
 drivers/gpu/drm/vmwgfx/vmw_surface_cache.h    |  539 +++
 drivers/gpu/drm/vmwgfx/vmwgfx_binding.c       |    4 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_context.c       |    4 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_devcaps.c       |   10 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_devcaps.h       |    2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c           |    9 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h           |    2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c       |    2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c         |    2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c           |    6 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_mob.c           |   36 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c          |    2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_surface.c       |   75 +-
 28 files changed, 7624 insertions(+), 10563 deletions(-)
 delete mode 100644 drivers/gpu/drm/vmwgfx/device_include/includeCheck.h
 delete mode 100644 drivers/gpu/drm/vmwgfx/device_include/svga3d_caps.h
 rename drivers/gpu/drm/vmwgfx/device_include/{svga_types.h => vm_basic_types.h} (95%)
 delete mode 100644 drivers/gpu/drm/vmwgfx/device_include/vmware_pack_begin.h
 delete mode 100644 drivers/gpu/drm/vmwgfx/device_include/vmware_pack_end.h
 create mode 100644 drivers/gpu/drm/vmwgfx/vmw_surface_cache.h
drivers/gpu/drm/vmwgfx/device_include/includeCheck.h deleted +0 -3
deleted file mode 100644
index 8cce7f15b6eb..000000000000
@@ -1,3 +0,0 @@
-/*
- * Intentionally empty file.
- */
drivers/gpu/drm/vmwgfx/device_include/svga3d_caps.h deleted +0 -111

111 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/device_include/svga3d_cmd.h +1459 -2221

2,886 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/device_include/svga3d_devcaps.h +327 -466

793 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/device_include/svga3d_dx.h +1580 -1923

3,503 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/device_include/svga3d_limits.h +28 -73

101 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/device_include/svga3d_reg.h +5 -10
index bdfc404c91e3..988d8509c472 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/device_include/svga3d_surfacedefs.h +1513 -1619

3,132 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/device_include/svga3d_types.h +1288 -1732

3,020 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/device_include/svga_escape.h +17 -51

68 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/device_include/svga_overlay.h +60 -143

203 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/device_include/svga_reg.h +720 -2127

2,847 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/device_include/vm_basic_types.h renamed from drivers/gpu/drm/vmwgfx/device_include/svga_types.h +11 -3
similarity index 95%
rename from drivers/gpu/drm/vmwgfx/device_include/svga_types.h
rename to drivers/gpu/drm/vmwgfx/device_include/vm_basic_types.h
index f5f79b114fac..35bd2852189f 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/device_include/vmware_pack_begin.h deleted +0 -2
deleted file mode 100644
index 75308bd0d970..000000000000

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/device_include/vmware_pack_end.h deleted +0 -2
deleted file mode 100644
index e93d6f28b68c..000000000000

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/vmw_surface_cache.h new file +539 -0

539 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/vmwgfx_binding.c +2 -2
index ea6d8c86985f..6f27d69bad0e 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/vmwgfx_context.c +2 -2
index dffe3804ad3e..4446758b6880 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/vmwgfx_devcaps.c +5 -5
index 04fc67d53563..829df395c2ed 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/vmwgfx_devcaps.h +1 -1
index b7c43e5f07c3..f70e923ac3e6 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +4 -5
index 48a62fb0da2f..086dc75e7b42 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +1 -1
index 9422967659d7..0dd5a3e06f5f 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +1 -1
index cc8b1d943c55..5f2ffa9de5c8 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c +1 -1
index c34f61ac4ce4..28af34ab6ed6 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +3 -3
index 220f9fd0d420..2ddf4932d62c 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/vmwgfx_mob.c +18 -18
index fefd7a71d764..895088924ce3 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +1 -1
index 9e236f9f8a8a..365ed93dd3e8 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/vmwgfx/vmwgfx_surface.c +38 -37

75 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.30.2

Part of the diff is not shown here. View the raw message.

author
#2 lore raw

PATCH 3/5 drm/vmwgfx: Fix a 64bit regression on svga3

In reply to Zack Rusin

Register accesses are always 4bytes, accidently this was changed to a void pointer whwqich badly breaks 64bit archs when running on top of svga3.

Fixes 2cd80dbd3551 ("drm/vmwgfx: Add basic support for SVGA3")
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +1 -1
index 0dd5a3e06f5f..356f82c26f59 100644
@@ -492,7 +492,7 @@ struct vmw_private {
 	resource_size_t vram_start;
 	resource_size_t vram_size;
 	resource_size_t max_primary_mem;
-	void __iomem *rmmio;
+	u32 __iomem *rmmio;
 	u32 *fifo_mem;
 	resource_size_t fifo_mem_size;
 	uint32_t fb_max_width;
Signature · 1 line
2.30.2
author
#3 lore raw

PATCH 4/5 drm/vmwgfx: Fix a bad merge in otable batch takedown

In reply to Zack Rusin

Change
2ef4fb92363c ("drm/vmwgfx: Make sure bo's are unpinned before putting them back") caused a conflict in one of the drm trees and the merge commit
68a32ba14177 ("Merge tag 'drm-next-2021-04-28' of git://anongit.freedesktop.org/drm/drm")
accidently re-added code that the original change was removing.
Fixed by removing the incorrect buffer unpin - it has already been unpinned two lines above.

Fixes 68a32ba14177 ("Merge tag 'drm-next-2021-04-28' of git://anongit.freedesktop.org/drm/drm")
---
 drivers/gpu/drm/vmwgfx/vmwgfx_mob.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/vmwgfx/vmwgfx_mob.c +0 -1
index 895088924ce3..c8e578f63c9c 100644
@@ -354,7 +354,6 @@ static void vmw_otable_batch_takedown(struct vmw_private *dev_priv,
 	ttm_bo_unpin(bo);
 	ttm_bo_unreserve(bo);
 
-	ttm_bo_unpin(batch->otable_bo);
 	ttm_bo_put(batch->otable_bo);
 	batch->otable_bo = NULL;
 }
Signature · 1 line
2.30.2
Acked-by on v1 1/5
#4 lore raw
In reply to Zack Rusin
Quoted 7 lines · Zack Rusin

Roland will be focusing on lavapipe over the next few months and won't have time for vmwgfx.
vmwgfx is now maintained within drm-misc.

Quoted 24 lines
---
 MAINTAINERS | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
MAINTAINERS +1 -3
index a4ba46fb803a..cae0c6148590 100644
@@ -5962,11 +5962,10 @@ F:      drivers/gpu/drm/vboxvideo/
 
 DRM DRIVER FOR VMWARE VIRTUAL GPU
 M:     "VMware Graphics" <[email protected]>
-M:     Roland Scheidegger <[email protected]>
 M:     Zack Rusin <[email protected]>
 L:     [email protected]
 S:     Supported
-T:     git git://people.freedesktop.org/~sroland/linux
+T:     git git://anongit.freedesktop.org/drm/drm-misc
 F:     drivers/gpu/drm/vmwgfx/
 F:     include/uapi/drm/vmwgfx_drm.h
 
--

2.30.2

author
#5 lore raw

PATCH 5/5 drm/vmwgfx: Fix build issues in mksGuestStats discovered by the kernel test robot

In reply to Zack Rusin

From: Martin Krastev <[email protected]>

Fixes for ARCH
i386
* printk format specifier warnings
* inconsistent operand constraints in an ‘asm’ errors
arm64
* not targeted by the commit being fixed

Fixes 7a7a933edd6c ("drm/vmwgfx: Introduce VMware mks-guest-stats")
---
 drivers/gpu/drm/vmwgfx/Kconfig      | 1 +
 drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/vmwgfx/Kconfig +1 -0
index a9052fae0bbc..c9ce47c448e0 100644
@@ -25,6 +25,7 @@ config DRM_VMWGFX_FBCON
 config DRM_VMWGFX_MKSSTATS
 	bool "Enable mksGuestStats instrumentation of vmwgfx by default"
 	depends on DRM_VMWGFX
+	depends on X86
 	default n
 	help
 	   Choose this option to instrument the kernel driver for mksGuestStats.
drivers/gpu/drm/vmwgfx/vmwgfx_msg.c +4 -4
index 74a3f09ad664..ed9c7b3a1e08 100644
@@ -665,7 +665,7 @@ static inline void hypervisor_ppn_add(PPN64 pfn)
 	unsigned long eax, ebx, ecx, edx, si = 0, di = 0;
 
 	VMW_PORT(VMW_PORT_CMD_MKSGS_ADD_PPN,
-		pfn, si, di,
+		(unsigned long)pfn, si, di,
 		0,
 		VMW_HYPERVISOR_MAGIC,
 		eax, ebx, ecx, edx, si, di);
@@ -682,7 +682,7 @@ static inline void hypervisor_ppn_remove(PPN64 pfn)
 	unsigned long eax, ebx, ecx, edx, si = 0, di = 0;
 
 	VMW_PORT(VMW_PORT_CMD_MKSGS_REMOVE_PPN,
-		pfn, si, di,
+		(unsigned long)pfn, si, di,
 		0,
 		VMW_HYPERVISOR_MAGIC,
 		eax, ebx, ecx, edx, si, di);
@@ -1115,7 +1115,7 @@ int vmw_mksstat_add_ioctl(struct drm_device *dev, void *data,
 
 	arg->id = slot;
 
-	DRM_DEV_INFO(dev->dev, "pid=%d arg.description='%.*s' id=%lu\n", current->pid, (int)desc_len, pdesc->description, slot);
+	DRM_DEV_INFO(dev->dev, "pid=%d arg.description='%.*s' id=%zu\n", current->pid, (int)desc_len, pdesc->description, slot);
 
 	return 0;
 
@@ -1163,7 +1163,7 @@ int vmw_mksstat_remove_ioctl(struct drm_device *dev, void *data,
 	if (slot >= ARRAY_SIZE(dev_priv->mksstat_user_pids))
 		return -EINVAL;
 
-	DRM_DEV_INFO(dev->dev, "pid=%d arg.id=%lu\n", current->pid, slot);
+	DRM_DEV_INFO(dev->dev, "pid=%d arg.id=%zu\n", current->pid, slot);
 
 	pgid = task_pgrp_vnr(current);
 	pid = atomic_cmpxchg(&dev_priv->mksstat_user_pids[slot], pgid, MKSSTAT_PID_RESERVED);
Signature · 1 line
2.30.2