Skip to contentSkip to conversation

drm/virtio: add definitions for gfxstream and venus capset

PATCH In review Huang Rui 3 participants 4 messages Oct 10, 2023

Subsystems (2)
lore
Share & tools
lore

Huang Rui

author
#0 lore raw

PATCH v2 1/1 drm/virtio: add definitions for gfxstream and venus capset

These definitions are used fro qemu, and qemu imports this marco in the headers to enable gfxstream or venus for virtio gpu. So it should add it even kernel doesn't use this.

---

Changes V1 -> V2:
- Add all capsets including gfxstream and venus in kernel header (Dmitry Osipenko)

v1: https://lore.kernel.org/lkml/[email protected]/

 include/uapi/linux/virtio_gpu.h | 2 ++
 1 file changed, 2 insertions(+)
include/uapi/linux/virtio_gpu.h +2 -0
index f556fde07b76..327792658bdc 100644
@@ -309,6 +309,8 @@ struct virtio_gpu_cmd_submit {
 
 #define VIRTIO_GPU_CAPSET_VIRGL 1
 #define VIRTIO_GPU_CAPSET_VIRGL2 2
+#define VIRTIO_GPU_CAPSET_GFXSTREAM 3
+#define VIRTIO_GPU_CAPSET_VENUS 4
 
 /* VIRTIO_GPU_CMD_GET_CAPSET_INFO */
 struct virtio_gpu_get_capset_info {
Signature · 1 line
2.25.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 20 lines · Huang Rui

These definitions are used fro qemu, and qemu imports this marco in the headers to enable gfxstream or venus for virtio gpu. So it should add it even kernel doesn't use this.

---

Changes V1 -> V2:
- Add all capsets including gfxstream and venus in kernel header (Dmitry Osipenko)

v1: https://lore.kernel.org/lkml/[email protected]/

  include/uapi/linux/virtio_gpu.h | 2 ++
  1 file changed, 2 insertions(+)
include/uapi/linux/virtio_gpu.h +0 -0
index f556fde07b76..327792658bdc 100644

include/uapi/linux/virtio_gpu.h struct virtio_gpu_cmd_submit { · line 316

Quoted 8 lines
include/uapi/linux/virtio_gpu.h +2 -0
@@ -309,6 +309,8 @@ struct virtio_gpu_cmd_submit {
 
  #define VIRTIO_GPU_CAPSET_VIRGL 1
  #define VIRTIO_GPU_CAPSET_VIRGL2 2
+#define VIRTIO_GPU_CAPSET_GFXSTREAM 3
+#define VIRTIO_GPU_CAPSET_VENUS 4
 
  /* VIRTIO_GPU_CMD_GET_CAPSET_INFO */
  struct virtio_gpu_get_capset_info {
maintainer
#2 lore raw
In reply to Huang Rui

Hi,

Quoted 20 lines · Huang Rui

These definitions are used fro qemu, and qemu imports this marco in the headers to enable gfxstream or venus for virtio gpu. So it should add it even kernel doesn't use this.

---

Changes V1 -> V2:
- Add all capsets including gfxstream and venus in kernel header (Dmitry Osipenko)

v1: https://lore.kernel.org/lkml/[email protected]/

 include/uapi/linux/virtio_gpu.h | 2 ++
 1 file changed, 2 insertions(+)
include/uapi/linux/virtio_gpu.h +0 -0
index f556fde07b76..327792658bdc 100644

include/uapi/linux/virtio_gpu.h struct virtio_gpu_cmd_submit { · line 316

Quoted 8 lines
include/uapi/linux/virtio_gpu.h +2 -0
@@ -309,6 +309,8 @@ struct virtio_gpu_cmd_submit {
 
 #define VIRTIO_GPU_CAPSET_VIRGL 1
 #define VIRTIO_GPU_CAPSET_VIRGL2 2
+#define VIRTIO_GPU_CAPSET_GFXSTREAM 3
+#define VIRTIO_GPU_CAPSET_VENUS 4
 
 /* VIRTIO_GPU_CMD_GET_CAPSET_INFO */
 struct virtio_gpu_get_capset_info {

By the "all" capsets, I meant to pick up all definitions from crosvm. There should be VIRTIO_GPU_CAPSET_DRM at minimum, could you please add it?

Signature · 2 lines
Best regards,
Dmitry
author
#3 lore raw
Quoted 29 lines · Dmitry Osipenko

Hi,

Quoted 26 lines · Huang Rui

These definitions are used fro qemu, and qemu imports this marco in the headers to enable gfxstream or venus for virtio gpu. So it should add it even kernel doesn't use this.

---

Changes V1 -> V2:
- Add all capsets including gfxstream and venus in kernel header (Dmitry Osipenko)

v1: https://lore.kernel.org/lkml/[email protected]/

 include/uapi/linux/virtio_gpu.h | 2 ++
 1 file changed, 2 insertions(+)
include/uapi/linux/virtio_gpu.h +2 -0
index f556fde07b76..327792658bdc 100644
@@ -309,6 +309,8 @@ struct virtio_gpu_cmd_submit {
 
 #define VIRTIO_GPU_CAPSET_VIRGL 1
 #define VIRTIO_GPU_CAPSET_VIRGL2 2
+#define VIRTIO_GPU_CAPSET_GFXSTREAM 3
+#define VIRTIO_GPU_CAPSET_VENUS 4
 
Quoted 6 lines

include/uapi/linux/virtio_gpu.h struct virtio_gpu_cmd_submit { · line 316

Quoted 2 lines
include/uapi/linux/virtio_gpu.h +0 -0
 /* VIRTIO_GPU_CMD_GET_CAPSET_INFO */
 struct virtio_gpu_get_capset_info {

By the "all" capsets, I meant to pick up all definitions from crosvm. There should be VIRTIO_GPU_CAPSET_DRM at minimum, could you please add it?

Sure. Thanks for the reminder.

Best Regards,
Ray