[PATCH 3/3] drm/virtio: Implement device_attach

2024-12-07 Thread Julia Zhang
er before calling drm_gem_map_attach(). Signed-off-by: Julia Zhang --- drivers/gpu/drm/virtio/virtgpu_prime.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c index 4960620eba02..4f6bce79e1

[PATCH 2/3] virtgpu: get p2pdma_distance

2024-12-07 Thread Julia Zhang
pci devices from guest to host. Host will handle ioctl to calculate p2pdma_distance for this two pci devices on the host with pci notations sent from guest virtgpu driver. Signed-off-by: Julia Zhang --- drivers/gpu/drm/virtio/virtgpu_drv.h | 17 + drivers/gpu/drm/virtio/virtgpu_prime.c

[PATCH 1/3] xen:get p2pdma_distance

2024-12-07 Thread Julia Zhang
To get the p2pdma_distance, this create a new privcmd ioctl to calculate p2pdma_distance for two pci devices on the host with pci notations sent from guest virtgpu driver. Signed-off-by: Julia Zhang --- drivers/xen/privcmd.c | 42 ++ include/uapi/xen

[PATCH 0/3] virtgpu: check if P2P is possiable or not

2024-12-07 Thread Julia Zhang
p2pdma_distance. So this series introduce an implementation of virtgpu device_attach callback to get p2pdma_distance. And also adds a new virtgpu command to pass PCI notations from guest to host and a new xen privcmd to get physical p2pdma_distance according to the PCI notations in host. Julia Zhang (3

[PATCH v2 1/1] drm/virtio: Implement device_attach

2024-01-29 Thread Julia Zhang
bjects and vram objects. Signed-off-by: Julia Zhang --- drivers/gpu/drm/virtio/virtgpu_prime.c | 40 +++--- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c index 44425f20d91a..b4

[PATCH v2 0/1] Implement device_attach for virtio gpu

2024-01-29 Thread Julia Zhang
ma_buf and implement virtgpu specific map/unmap/attach callbacks to support both of shmem objects and vram objects. Changes from v1 to v2: -Reimplement virtgpu_gem_device_attach() -Remove calling drm dma-buf funcs in virtgpu callbacks and reimplement virtgpu specific dma-buf callbacks. Julia Zhang

[PATCH 1/1] drm/virtio: Implement device_attach

2024-01-10 Thread Julia Zhang
drm_gem_map_attach for both of these two kinds of object. Signed-off-by: Julia Zhang --- drivers/gpu/drm/virtio/virtgpu_prime.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c index

[PATCH 0/1] Implement device_attach for virtio gpu

2024-01-10 Thread Julia Zhang
requirement was added. Julia Zhang (1): drm/virtio: Implement device_attach drivers/gpu/drm/virtio/virtgpu_prime.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) -- 2.34.1

[PATCH 1/1] drm/virtio: Implement RESOURCE_GET_LAYOUT ioctl

2023-12-21 Thread Julia Zhang
st. Signed-off-by: Daniel Stone Co-developed-by: Julia Zhang # support query stride before it's created Signed-off-by: Julia Zhang --- drivers/gpu/drm/virtio/virtgpu_drv.c | 1 + drivers/gpu/drm/virtio/virtgpu_drv.h | 22 - drivers/gpu/drm/virtio/virt

[PATCH v2 0/1] Implementation of resource_query_layout

2023-12-21 Thread Julia Zhang
Hi all, Sorry to late reply. This is v2 of the implementation of resource_query_layout. This adds a new ioctl to let guest query information of host resource, which is originally from Daniel Stone. We add some changes to support query the correct stride of host resource before it's created, which

[PATCH 2/2] drm/virtio: Modify RESOURCE_GET_LAYOUT ioctl

2023-11-09 Thread Julia Zhang
Modify RESOURCE_GET_LAYOUT ioctl to handle the use case that query correct stride for guest linear resource before it is created. Signed-off-by: Julia Zhang --- drivers/gpu/drm/virtio/virtgpu_drv.h | 26 -- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 47

[PATCH 1/2] drm/virtio: Implement RESOURCE_GET_LAYOUT ioctl

2023-11-09 Thread Julia Zhang
From: Daniel Stone This ioctl allows the guest to discover how the guest actually allocated the underlying buffer, which allows buffers to be used for GL<->Vulkan interop and through standard window systems. It's also a step towards properly supporting modifiers in the guest. --- drivers/gpu/drm

[PATCH 0/2] Add RESOURCE_GET_LAYOUT ioctl

2023-11-09 Thread Julia Zhang
/23896 Daniel Stone (1): drm/virtio: Implement RESOURCE_GET_LAYOUT ioctl Julia Zhang (1): drm/virtio: Modify RESOURCE_GET_LAYOUT ioctl drivers/gpu/drm/virtio/virtgpu_drv.c | 1 + drivers/gpu/drm/virtio/virtgpu_drv.h | 22 - drivers/gpu/drm/virtio/virtgpu_ioctl.c | 66

[PATCH] virtio-gpu: Remove stride and layer_stride check for dGPU prime on VM

2023-07-04 Thread Julia Zhang
Remove stride and layer_stride check in virtio-gpu so that virgl can send transfer data command with non zero stride to sync up data from guest to host for dGPU prime on VM. Link: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23896 Signed-off-by: Julia Zhang --- drivers/gpu/drm