[PATCH v6 10/13] virtio-gpu: Add helpers to create and destroy dmabuf objects

2021-05-24 Thread Vivek Kasireddy
These helpers can be useful for creating dmabuf objects from blobs and submitting them to the UI. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-udmabuf.c | 74 + include/hw/virtio/virtio-gpu.h | 15 +++ 2 files changed, 89

[PATCH v6 05/13] virtio-gpu: Refactor virtio_gpu_set_scanout

2021-05-24 Thread Vivek Kasireddy
Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c| 151 +++-- include/hw/virtio/virtio-gpu.h | 8 ++ 2 files changed, 95 insertions(+), 64 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 7b5296f0d0..fdcedfc61e 100644

[PATCH v6 01/13] ui: Get the fd associated with udmabuf driver

2021-05-24 Thread Vivek Kasireddy
Try to open the udmabuf dev node for the first time or return the fd if the device was previously opened. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/console.h | 3 +++ ui/meson.build | 1 + ui/udmabuf.c | 40

[PATCH v6 03/13] virtio-gpu: Add udmabuf helpers

2021-05-24 Thread Vivek Kasireddy
the udmabuf driver, Qemu needs to be lauched with the memfd memory backend like this: qemu-system-x86_64 -m 8192m -object memory-backend-memfd,id=mem1,size=8192M -machine memory-backend=mem1 Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/meson.build

[PATCH v6 00/13] virtio-gpu: Add support for Blob resources feature

2021-05-24 Thread Vivek Kasireddy
in patch #10 Cc: Gerd Hoffmann Vivek Kasireddy (13): ui: Get the fd associated with udmabuf driver headers: Add udmabuf.h virtio-gpu: Add udmabuf helpers virtio-gpu: Add virtio_gpu_find_check_resource virtio-gpu: Refactor virtio_gpu_set_scanout virtio-gpu: Refactor

[PATCH v6 04/13] virtio-gpu: Add virtio_gpu_find_check_resource

2021-05-24 Thread Vivek Kasireddy
Move finding the resource and validating its backing storage into one function. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 66 + 1 file changed, 47 insertions(+), 19 deletions(-) diff

[PATCH v5 13/13] virtio-gpu: Update cursor data using blob

2021-05-18 Thread Vivek Kasireddy
If a blob is available for the cursor, copy the data from the blob. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hw/display/virtio-gpu.c b

[PATCH v5 11/13] virtio-gpu: Factor out update scanout

2021-05-18 Thread Vivek Kasireddy
Creating a small helper function for updating the scanout will be useful in the next patch where this needs to be done early in do_set_scanout before returning. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 35 +++ 1 file changed

[PATCH v5 07/13] virtio-gpu: Add initial definitions for blob resources

2021-05-18 Thread Vivek Kasireddy
Add the property bit, configuration flag and other relevant macros and definitions associated with this feature. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-base.c | 3 +++ hw/display/virtio-gpu.c| 14

[PATCH v5 06/13] virtio-gpu: Refactor virtio_gpu_create_mapping_iov

2021-05-18 Thread Vivek Kasireddy
Instead of passing the attach_backing object to extract nr_entries and offset, explicitly pass these as arguments to this function. This will be helpful when adding create_blob API. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-virgl.c | 3 ++- hw/display/virtio

[PATCH v5 05/13] virtio-gpu: Refactor virtio_gpu_set_scanout

2021-05-18 Thread Vivek Kasireddy
Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c| 151 +++-- include/hw/virtio/virtio-gpu.h | 8 ++ 2 files changed, 95 insertions(+), 64 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 7b5296f0d0..fdcedfc61e 100644

[PATCH v5 03/13] virtio-gpu: Add udmabuf helpers

2021-05-18 Thread Vivek Kasireddy
the udmabuf driver, Qemu needs to be lauched with the memfd memory backend like this: qemu-system-x86_64 -m 8192m -object memory-backend-memfd,id=mem1,size=8192M -machine memory-backend=mem1 Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/meson.build

[PATCH v5 12/13] virtio-gpu: Add virtio_gpu_set_scanout_blob

2021-05-18 Thread Vivek Kasireddy
-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/trace-events | 1 + hw/display/virtio-gpu.c | 102 +-- include/hw/virtio/virtio-gpu-bswap.h | 7 ++ 3 files changed, 103 insertions(+), 7 deletions

[PATCH v5 02/13] headers: Add udmabuf.h

2021-05-18 Thread Vivek Kasireddy
This adds udmabuf header to standard headers so that the relevant udmabuf objects can be accessed in subsequent patches. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/standard-headers/linux/udmabuf.h | 32 scripts/update

[PATCH v5 10/13] virtio-gpu: Add helpers to create and destroy dmabuf objects

2021-05-18 Thread Vivek Kasireddy
These helpers can be useful for creating dmabuf objects from blobs and submitting them to the UI. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-udmabuf.c | 74 + include/hw/virtio/virtio-gpu.h | 15 +++ 2 files changed, 89

[PATCH v5 09/13] ui/pixman: Add qemu_pixman_to_drm_format()

2021-05-18 Thread Vivek Kasireddy
This new function to get the drm_format associated with a pixman format will be useful while creating a dmabuf. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/qemu-pixman.h | 1 + ui/qemu-pixman.c | 35

[PATCH v5 01/13] ui: Get the fd associated with udmabuf driver

2021-05-18 Thread Vivek Kasireddy
Try to open the udmabuf dev node for the first time or return the fd if the device was previously opened. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/console.h | 3 +++ ui/meson.build | 1 + ui/udmabuf.c | 40

[PATCH v5 08/13] virtio-gpu: Add virtio_gpu_resource_create_blob

2021-05-18 Thread Vivek Kasireddy
This API allows Qemu to register the blob allocated by the Guest as a new resource and map its backing storage. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/trace-events | 1 + hw/display/virtio-gpu.c | 75

[PATCH v5 00/13] virtio-gpu: Add support for Blob resources feature (v5)

2021-05-18 Thread Vivek Kasireddy
and use blob and blob_size fields - Fixed indentation issues and made other small changes in set_scanout_blob patch (#12) v5: - Rebase (only #6 - Refactor virtio_gpu_create_mapping_iov) Cc: Gerd Hoffmann Vivek Kasireddy (13): ui: Get the fd associated with udmabuf driver headers: Add udmabuf.h

[PATCH v5 04/13] virtio-gpu: Add virtio_gpu_find_check_resource

2021-05-18 Thread Vivek Kasireddy
Move finding the resource and validating its backing storage into one function. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 66 + 1 file changed, 47 insertions(+), 19 deletions(-) diff

[PATCH v4 09/13] ui/pixman: Add qemu_pixman_to_drm_format()

2021-05-11 Thread Vivek Kasireddy
This new function to get the drm_format associated with a pixman format will be useful while creating a dmabuf. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/qemu-pixman.h | 1 + ui/qemu-pixman.c | 35

[PATCH v4 11/13] virtio-gpu: Factor out update scanout

2021-05-11 Thread Vivek Kasireddy
Creating a small helper function for updating the scanout will be useful in the next patch where this needs to be done early in do_set_scanout before returning. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 35 +++ 1 file changed

[PATCH v4 06/13] virtio-gpu: Refactor virtio_gpu_create_mapping_iov

2021-05-11 Thread Vivek Kasireddy
Instead of passing the attach_backing object to extract nr_entries and offset, explicitly pass these as arguments to this function. This will be helpful when adding create_blob API. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-virgl.c | 3 ++- hw/display/virtio

[PATCH v4 08/13] virtio-gpu: Add virtio_gpu_resource_create_blob

2021-05-11 Thread Vivek Kasireddy
This API allows Qemu to register the blob allocated by the Guest as a new resource and map its backing storage. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/trace-events | 1 + hw/display/virtio-gpu.c | 75

[PATCH v4 00/13] virtio-gpu: Add support for Blob resources feature (v4)

2021-05-11 Thread Vivek Kasireddy
and use blob and blob_size fields - Fixed indentation issues and made other small changes in set_scanout_blob patch (#12) Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Dongwon Kim Cc: Tina Zhang Vivek Kasireddy (13): ui: Get the fd associated with udmabuf driver headers: Add udmabuf.h virtio

[PATCH v4 07/13] virtio-gpu: Add initial definitions for blob resources

2021-05-11 Thread Vivek Kasireddy
Add the property bit, configuration flag and other relevant macros and definitions associated with this feature. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-base.c | 3 +++ hw/display/virtio-gpu.c| 14

[PATCH v4 05/13] virtio-gpu: Refactor virtio_gpu_set_scanout

2021-05-11 Thread Vivek Kasireddy
Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c| 151 +++-- include/hw/virtio/virtio-gpu.h | 8 ++ 2 files changed, 95 insertions(+), 64 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index fec0bcf5c5..6c27d8f42e 100644

[PATCH v4 04/13] virtio-gpu: Add virtio_gpu_find_check_resource

2021-05-11 Thread Vivek Kasireddy
Move finding the resource and validating its backing storage into one function. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 66 + 1 file changed, 47 insertions(+), 19 deletions(-) diff

[PATCH v4 12/13] virtio-gpu: Add virtio_gpu_set_scanout_blob

2021-05-11 Thread Vivek Kasireddy
-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/trace-events | 1 + hw/display/virtio-gpu.c | 102 +-- include/hw/virtio/virtio-gpu-bswap.h | 7 ++ 3 files changed, 103 insertions(+), 7 deletions

[PATCH v4 13/13] virtio-gpu: Update cursor data using blob

2021-05-11 Thread Vivek Kasireddy
If a blob is available for the cursor, copy the data from the blob. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hw/display/virtio-gpu.c b

[PATCH v4 10/13] virtio-gpu: Add helpers to create and destroy dmabuf objects

2021-05-11 Thread Vivek Kasireddy
These helpers can be useful for creating dmabuf objects from blobs and submitting them to the UI. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-udmabuf.c | 74 + include/hw/virtio/virtio-gpu.h | 15 +++ 2 files changed, 89

[PATCH v4 03/13] virtio-gpu: Add udmabuf helpers

2021-05-11 Thread Vivek Kasireddy
the udmabuf driver, Qemu needs to be lauched with the memfd memory backend like this: qemu-system-x86_64 -m 8192m -object memory-backend-memfd,id=mem1,size=8192M -machine memory-backend=mem1 Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/meson.build

[PATCH v4 01/13] ui: Get the fd associated with udmabuf driver

2021-05-11 Thread Vivek Kasireddy
Try to open the udmabuf dev node for the first time or return the fd if the device was previously opened. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/console.h | 3 +++ ui/meson.build | 1 + ui/udmabuf.c | 40

[PATCH v4 02/13] headers: Add udmabuf.h

2021-05-11 Thread Vivek Kasireddy
This adds udmabuf header to standard headers so that the relevant udmabuf objects can be accessed in subsequent patches. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/standard-headers/linux/udmabuf.h | 32 scripts/update

[PATCH v3 17/20] ui: Add egl helpers for synchronization

2021-05-11 Thread Vivek Kasireddy
These egl helpers will be useful for creating a sync object and waiting on it when called from the virtio-gpu wait_flush API. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/console.h | 2 ++ include/ui/egl-helpers.h | 4 ui/egl-helpers.c | 44

[PATCH v3 14/20] virtio-gpu: Add initial definitions for explict flush feature

2021-05-11 Thread Vivek Kasireddy
Add the property bit, conf flag and other relevant declarations associated with this feature. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-base.c| 3 +++ hw/display/virtio-gpu.c | 9 + include/hw/virtio/virtio-gpu.h

[PATCH v3 09/20] ui/pixman: Add qemu_pixman_to_drm_format()

2021-05-11 Thread Vivek Kasireddy
This new function to get the drm_format associated with a pixman format will be useful while creating a dmabuf. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/qemu-pixman.h | 1 + ui/qemu-pixman.c | 35

[PATCH v3 08/20] virtio-gpu: Add virtio_gpu_resource_create_blob

2021-05-11 Thread Vivek Kasireddy
This API allows Qemu to register the blob allocated by the Guest as a new resource and map its backing storage. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/trace-events | 1 + hw/display/virtio-gpu-udmabuf.c | 4 ++ hw

[PATCH v3 19/20] ui/gtk: Create a common release_dmabuf helper

2021-05-11 Thread Vivek Kasireddy
Since the texture release mechanism is same for both gtk-egl and gtk-glarea, move the helper from gtk-egl into common gtk area so that it can be shared by both gtk backends. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/gtk.h | 2 -- ui/gtk-egl.c | 8 ui/gtk.c

[PATCH v3 05/20] virtio-gpu: Refactor virtio_gpu_set_scanout

2021-05-11 Thread Vivek Kasireddy
Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c| 151 +++-- include/hw/virtio/virtio-gpu.h | 8 ++ 2 files changed, 95 insertions(+), 64 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index fec0bcf5c5..6c27d8f42e 100644

[PATCH v3 20/20] virtio-gpu: Add gl_flushed callback

2021-05-11 Thread Vivek Kasireddy
Adding this callback provides a way to determine when the UI has submitted the buffer to the Host windowing system. Making the guest wait for this event will ensure that the dmabuf/buffer updates are synchronized. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c

[PATCH v3 01/20] ui: Get the fd associated with udmabuf driver

2021-05-11 Thread Vivek Kasireddy
Try to open the udmabuf dev node for the first time or return the fd if the device was previously opened. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/console.h | 3 +++ ui/meson.build | 1 + ui/udmabuf.c | 40

[PATCH v3 18/20] ui/gtk-egl: Wait for the draw signal for dmabuf blobs

2021-05-11 Thread Vivek Kasireddy
Instead of immediately drawing and submitting, queue and wait for the draw signal if the dmabuf submitted is a blob. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/gtk.h | 2 ++ ui/gtk-egl.c | 14 ++ ui/gtk.c | 2 +- 3 files changed, 17 insertions

[PATCH v3 07/20] virtio-gpu: Add initial definitions for blob resources

2021-05-11 Thread Vivek Kasireddy
Add the property bit, configuration flag and other relevant macros and definitions associated with this feature. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-base.c | 3 +++ hw/display/virtio-gpu.c| 14

[PATCH v3 16/20] virtio-gpu: Add virtio_gpu_wait_flush API

2021-05-11 Thread Vivek Kasireddy
Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 31 + include/standard-headers/linux/virtio_gpu.h | 10 +++ 2 files changed, 41 insertions(+) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 694d8f550c..59cbc2b1df

[PATCH v3 15/20] virtio-gpu: Add dmabuf helpers for synchronization

2021-05-11 Thread Vivek Kasireddy
These helpers will be used in the next subsequent patches to wait until a dmabuf object (via a texture) has been used by the UI to render and submit its buffer. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-udmabuf.c | 42 + include

[PATCH v3 11/20] virtio-gpu: Factor out update scanout

2021-05-11 Thread Vivek Kasireddy
Creating a small helper function for updating the scanout will be useful in the next patch where this needs to be done early in do_set_scanout before returning. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 35 +++ 1 file changed

[PATCH v3 00/20] virtio-gpu: Add support for Blob resources

2021-05-11 Thread Vivek Kasireddy
of Gerd's virgl device split series - Split the udmabuf helpers patch from the previous version into two - Added explicit flush feature (last 7 patches) Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Dongwon Kim Cc: Tina Zhang Vivek Kasireddy (20): ui: Get the fd associated with udmabuf driver

[PATCH v3 13/20] virtio-gpu: Update cursor data using blob

2021-05-11 Thread Vivek Kasireddy
If a blob is available for the cursor, copy the data from the blob. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hw/display/virtio-gpu.c b

[PATCH v3 10/20] virtio-gpu: Add helpers to create and destroy dmabuf objects

2021-05-11 Thread Vivek Kasireddy
These helpers can be useful for creating dmabuf objects from blobs and submitting them to the UI. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-udmabuf.c | 74 + include/hw/virtio/virtio-gpu.h | 15 +++ 2 files changed, 89

[PATCH v3 04/20] virtio-gpu: Add virtio_gpu_find_check_resource

2021-05-11 Thread Vivek Kasireddy
Move finding the resource and validating its backing storage into one function. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 66 + 1 file changed, 47 insertions(+), 19 deletions(-) diff

[PATCH v3 12/20] virtio-gpu: Add virtio_gpu_set_scanout_blob

2021-05-11 Thread Vivek Kasireddy
-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/trace-events | 1 + hw/display/virtio-gpu.c | 105 +-- include/hw/virtio/virtio-gpu-bswap.h | 7 ++ 3 files changed, 105 insertions(+), 8 deletions

[PATCH v3 03/20] virtio-gpu: Add udmabuf helpers

2021-05-11 Thread Vivek Kasireddy
Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/meson.build | 2 +- hw/display/virtio-gpu-udmabuf.c | 186 include/hw/virtio/virtio-gpu.h | 9 ++ 3 files changed, 196 insertions(+), 1 deletion

[PATCH v3 06/20] virtio-gpu: Refactor virtio_gpu_create_mapping_iov

2021-05-11 Thread Vivek Kasireddy
Instead of passing the attach_backing object to extract nr_entries and offset, explicitly pass these as arguments to this function. This will be helpful when adding create_blob API. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-virgl.c | 3 ++- hw/display/virtio

[PATCH v3 02/20] headers: Add udmabuf.h

2021-05-11 Thread Vivek Kasireddy
This adds udmabuf header to standard headers so that the relevant udmabuf objects can be accessed in subsequent patches. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/standard-headers/linux/udmabuf.h | 32 scripts/update

[PATCH v2 12/12] virtio-gpu: Update cursor data using blob

2021-04-20 Thread Vivek Kasireddy
If a blob is available for the cursor, copy the data from the blob. Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio

[PATCH v2 11/12] virtio-gpu: Add virtio_gpu_set_scanout_blob

2021-04-20 Thread Vivek Kasireddy
-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/trace-events | 1 + hw/display/virtio-gpu.c | 105 +-- include/hw/virtio/virtio-gpu-bswap.h | 7 ++ 3 files changed, 105 insertions(+), 8 deletions(-) diff --git a/hw

[PATCH v2 09/12] virtio-gpu: Add helpers to create and destroy dmabuf objects

2021-04-20 Thread Vivek Kasireddy
These helpers can be useful for creating dmabuf objects from blobs and submitting them to the UI. Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-udmabuf.c | 87 + include/hw/virtio/virtio-gpu.h | 15 ++ 2 files changed, 102 insertions(+) diff

[PATCH v2 07/12] virtio-gpu: Add virtio_gpu_resource_create_blob

2021-04-20 Thread Vivek Kasireddy
This API allows Qemu to register the blob allocated by the Guest as a new resource and map its backing storage. Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/trace-events | 1 + hw/display/virtio-gpu-udmabuf.c | 9 +++- hw/display/virtio

[PATCH v2 10/12] virtio-gpu: Factor out update scanout

2021-04-20 Thread Vivek Kasireddy
Creating a small helper function for updating the scanout will be useful in the next patch where this needs to be done early in do_set_scanout before returning. Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 35 +++ 1 file changed, 23 insertions

[PATCH v2 05/12] virtio-gpu: Refactor virtio_gpu_create_mapping_iov

2021-04-20 Thread Vivek Kasireddy
Instead of passing the attach_backing object to extract nr_entries and offset, explicitly pass these as arguments to this function. This will be helpful when adding create_blob API. Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-3d.c | 3 ++- hw/display/virtio-gpu.c| 22

[PATCH v2 08/12] ui/pixman: Add qemu_pixman_to_drm_format()

2021-04-20 Thread Vivek Kasireddy
This new function to get the drm_format associated with a pixman format will be useful while creating a dmabuf. Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/qemu-pixman.h | 1 + ui/qemu-pixman.c | 35 --- 2 files

[PATCH v2 02/12] virtio-gpu: Add udmabuf helpers

2021-04-20 Thread Vivek Kasireddy
Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/meson.build | 2 +- hw/display/virtio-gpu-udmabuf.c | 183 +++ include/hw/virtio/virtio-gpu.h | 10 ++ include/standard-headers/linux/udmabuf.h | 32

[PATCH v2 00/12] virtio-gpu: Add support for Blob resources feature

2021-04-20 Thread Vivek Kasireddy
: Marc-André Lureau Cc: Dongwon Kim Cc: Tina Zhang Vivek Kasireddy (12): ui: Get the fd associated with udmabuf driver virtio-gpu: Add udmabuf helpers virtio-gpu: Add virtio_gpu_find_check_resource virtio-gpu: Refactor virtio_gpu_set_scanout virtio-gpu: Refactor

[PATCH v2 03/12] virtio-gpu: Add virtio_gpu_find_check_resource

2021-04-20 Thread Vivek Kasireddy
Move finding the resource and validating its backing storage into one function. Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 66 + 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/hw/display

[PATCH v2 06/12] virtio-gpu: Add initial definitions for blob resources

2021-04-20 Thread Vivek Kasireddy
Add the property bit, configuration flag and other relevant macros and definitions associated with this feature. Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-base.c | 3 +++ hw/display/virtio-gpu.c| 14 ++ include/hw/virtio

[PATCH v2 04/12] virtio-gpu: Refactor virtio_gpu_set_scanout

2021-04-20 Thread Vivek Kasireddy
Store the meta-data associated with a FB in a new object (struct virtio_gpu_framebuffer) and pass the object to set_scanout. Also move code in set_scanout into a do_set_scanout function. This will be helpful when adding set_scanout_blob API. Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek

[PATCH v2 01/12] ui: Get the fd associated with udmabuf driver

2021-04-20 Thread Vivek Kasireddy
Try to open the udmabuf dev node for the first time or return the fd if the device was previously opened. Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/console.h | 3 +++ ui/meson.build | 1 + ui/udmabuf.c | 40

[PATCH 11/11] virtio-gpu: Update cursor data using blob

2021-03-30 Thread Vivek Kasireddy
If a blob is available for the cursor, copy the data from the blob. Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio

[PATCH 10/11] virtio-gpu: Add virtio_gpu_set_scanout_blob

2021-03-30 Thread Vivek Kasireddy
-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/trace-events | 1 + hw/display/virtio-gpu-udmabuf.c | 1 + hw/display/virtio-gpu.c | 84 - include/hw/virtio/virtio-gpu-bswap.h| 7

[PATCH 09/11] virtio-gpu: Add helpers to create and destroy dmabuf objects

2021-03-30 Thread Vivek Kasireddy
These helpers can be useful for creating dmabuf objects from blobs and submitting them to the UI. Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-udmabuf.c | 88 + include/hw/virtio/virtio-gpu.h | 15 ++ 2 files changed, 103 insertions(+) diff

[PATCH 08/11] virtio-gpu: Add virtio_gpu_resource_create_blob

2021-03-30 Thread Vivek Kasireddy
This API allows Qemu to register the blob allocated by the Guest as a new resource and map its backing storage. Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/trace-events | 1 + hw/display/virtio-gpu-udmabuf.c | 9 +++- hw/display/virtio

[PATCH 04/11] virtio-gpu: Add virtio_gpu_find_check_resource

2021-03-30 Thread Vivek Kasireddy
Move finding the resource and validating its backing storage into one function. Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 66 + 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/hw/display

[PATCH 06/11] virtio-gpu: Refactor virtio_gpu_create_mapping_iov

2021-03-30 Thread Vivek Kasireddy
Instead of passing the attach_backing object to extract nr_entries and offset, explicitly pass these as arguments to this function. This will be helpful when adding create_blob API. Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-3d.c | 3 ++- hw/display/virtio-gpu.c| 22

[PATCH 00/11] Add support for Blob resources feature

2021-03-30 Thread Vivek Kasireddy
Cc: Dongwon Kim Cc: Tina Zhang Vivek Kasireddy (11): ui: Get the fd associated with udmabuf driver ui/pixman: Add qemu_pixman_to_drm_format() virtio-gpu: Add udmabuf helpers virtio-gpu: Add virtio_gpu_find_check_resource virtio-gpu: Refactor virtio_gpu_set_scanout virtio-gpu: Refactor

[PATCH 07/11] virtio-gpu: Add initial definitions for blob resources

2021-03-30 Thread Vivek Kasireddy
Add the property bit, configuration flag and other relevant macros and definitions associated with this feature. Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-base.c | 3 +++ hw/display/virtio-gpu.c| 27 +++ include

[PATCH 05/11] virtio-gpu: Refactor virtio_gpu_set_scanout

2021-03-30 Thread Vivek Kasireddy
Store the meta-data associated with a FB in a new object (struct virtio_gpu_framebuffer) and pass the object to set_scanout. Also move code in set_scanout into a do_set_scanout function. This will be helpful when adding set_scanout_blob API. Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek

[PATCH 03/11] virtio-gpu: Add udmabuf helpers

2021-03-30 Thread Vivek Kasireddy
Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/meson.build | 2 +- hw/display/virtio-gpu-udmabuf.c | 182 +++ include/hw/virtio/virtio-gpu.h | 10 ++ include/standard-headers/linux/udmabuf.h | 32

[PATCH 01/11] ui: Get the fd associated with udmabuf driver

2021-03-30 Thread Vivek Kasireddy
Try to open the udmabuf dev node for the first time or return the fd if the device was previously opened. Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/console.h | 3 +++ ui/meson.build | 1 + ui/udmabuf.c | 40

[PATCH 02/11] ui/pixman: Add qemu_pixman_to_drm_format()

2021-03-30 Thread Vivek Kasireddy
This new function to get the drm_format associated with a pixman format will be useful while creating a dmabuf. Based-on-patch-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/qemu-pixman.h | 1 + ui/qemu-pixman.c | 35 --- 2 files

[RFC 1/1] virtio-gpu: Use dmabuf for display updates if possible instead of pixman

2021-03-02 Thread Vivek Kasireddy
-by: Vivek Kasireddy --- hw/display/virtio-gpu.c| 133 + include/hw/virtio/virtio-gpu.h | 12 +++ 2 files changed, 145 insertions(+) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 2e4a9822b6..399d46eac3 100644 --- a/hw/display/virtio-gpu.c

[RFC 0/1] Use dmabufs for display updates instead of pixman

2021-03-02 Thread Vivek Kasireddy
ns include caching 2 or more dmabufs and releasing the others but this may not be feasible without having to modify the Guest display server/ compositor to use all color buffers or create a new color buffer each time. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Dongwon Kim Cc: Daniel Vetter Vivek

[RFC 1/1] vhost-vdmabuf: Add virtio based Dmabuf device

2021-02-08 Thread Vivek Kasireddy
and eventually displayed on the screen. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy Signed-off-by: Dongwon Kim --- configure | 8 + hw/virtio/meson.build | 1 + hw/virtio/vhost-backend.c | 10 + hw/virtio/vhost

[RFC 0/1] vhost-vdmabuf: Add virtio based Dmabuf device

2021-02-08 Thread Vivek Kasireddy
here: https://lists.linuxfoundation.org/pipermail/virtualization/2021-February/052233.html Vivek Kasireddy (1): vhost-vdmabuf: Add virtio based Dmabuf device configure | 8 + hw/virtio/meson.build | 1 + hw/virtio/vhost-backend.c

<    1   2