OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [PATCH v1 1/2] virtio-gpu: clarify spec regarding capability sets


Capability sets will be used as a proxy for the context type,
so add more detail regarding their use.

Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
---
 virtio-gpu.tex | 58 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 57 insertions(+), 1 deletion(-)

diff --git a/virtio-gpu.tex b/virtio-gpu.tex
index 7bfb8dd..35c129f 100644
--- a/virtio-gpu.tex
+++ b/virtio-gpu.tex
@@ -53,7 +53,7 @@ \subsection{Device configuration layout}\label{sec:Device Types / GPU Device / D
         le32 events_read;
         le32 events_clear;
         le32 num_scanouts;
-        le32 reserved;
+        le32 num_capsets;
 };
 \end{lstlisting}
 
@@ -67,6 +67,8 @@ \subsubsection{Device configuration fields}
   \field{events_read}, mimicking write-to-clear behavior.
 \item[\field{num_scanouts}] specifies the maximum number of scanouts
   supported by the device.  Minimum value is 1, maximum value is 16.
+\item[\field{num_capsets}] specifies the maximum number of capability
+  sets supported by the device.  The minimum value is zero.
 \end{description}
 
 \subsubsection{Events}
@@ -498,6 +500,60 @@ \subsubsection{Device Operation: controlq}\label{sec:Device Types / GPU Device /
 This detaches any backing pages from a resource, to be used in case of
 guest swapping or object destruction.
 
+\item[VIRTIO_GPU_CMD_GET_CAPSET_INFO] Gets the information associated with
+  a particular \field{capset_index}, which MUST less than \field{num_capsets}
+  defined in the device configuration.  Request data is
+  \field{struct virtio_gpu_get_capset_info}.  Response type is
+  VIRTIO_GPU_RESP_OK_CAPSET_INFO.
+
+  On success, \field{struct virtio_gpu_resp_capset_info} contains the
+  \field{capset_id}, \field{capset_max_version}, \field{capset_max_size}
+  associated with capset at the specified {capset_idex}.  field{capset_id} MUST
+  be one of the following (see listing for values):
+
+  \begin{itemize*}
+  \item \href{https://gitlab.freedesktop.org/virgl/virglrenderer/-/blob/master/src/virgl_hw.h#L526}{VIRTIO_GPU_CAPSET_VIRGL} --
+	the first edition of Virgl (Gallium OpenGL) protocol.
+  \item \href{https://gitlab.freedesktop.org/virgl/virglrenderer/-/blob/master/src/virgl_hw.h#L550}{VIRTIO_GPU_CAPSET_VIRGL2} --
+	the second edition of Virgl (Gallium OpenGL) protocol after the capset fix.
+  \end{itemize*}
+
+\begin{lstlisting}
+struct virtio_gpu_get_capset_info {
+        struct virtio_gpu_ctrl_hdr hdr;
+        le32 capset_index;
+        le32 padding;
+};
+
+#define VIRTIO_GPU_CAPSET_VIRGL 1
+#define VIRTIO_GPU_CAPSET_VIRGL2 2
+struct virtio_gpu_resp_capset_info {
+        struct virtio_gpu_ctrl_hdr hdr;
+        le32 capset_id;
+        le32 capset_max_version;
+        le32 capset_max_size;
+        le32 padding;
+};
+\end{lstlisting}
+
+\item[VIRTIO_GPU_CMD_GET_CAPSET] Gets the capset associated with a
+  particular \field{capset_id} and \field{capset_version}.  Request data is
+  \field{struct virtio_gpu_get_capset}.  Response type is
+  VIRTIO_GPU_RESP_OK_CAPSET.
+
+\begin{lstlisting}
+struct virtio_gpu_get_capset {
+        struct virtio_gpu_ctrl_hdr hdr;
+        le32 capset_id;
+        le32 capset_version;
+};
+
+struct virtio_gpu_resp_capset {
+        struct virtio_gpu_ctrl_hdr hdr;
+        u8 capset_data[];
+};
+\end{lstlisting}
+
 \item[VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID] Creates an exported object from
   a resource. Request data is \field{struct
     virtio_gpu_resource_assign_uuid}.  Response type is
-- 
2.31.0



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]