All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gurchetan Singh <gurchetansingh@chromium.org>
To: virtio-comment@lists.oasis-open.org
Cc: kraxel@redhat.com
Subject: [virtio-comment] [RFC PATCH 1/2] virtio-gpu: clarify spec regarding capability sets
Date: Wed, 25 Aug 2021 19:13:12 -0700	[thread overview]
Message-ID: <20210826021313.378-2-gurchetansingh@chromium.org> (raw)
In-Reply-To: <20210826021313.378-1-gurchetansingh@chromium.org>

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


This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/


  reply	other threads:[~2021-08-26  2:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26  2:13 [virtio-comment] [RFC PATCH 0/2] Context init virtio-gpu spec Gurchetan Singh
2021-08-26  2:13 ` Gurchetan Singh [this message]
2021-08-26  2:13 ` [virtio-comment] [RFC PATCH 2/2] virtio-gpu: add context init support Gurchetan Singh
2021-08-30 19:41   ` [virtio-comment] [RFC PATCH v2 " Gurchetan Singh
2021-09-02 10:31     ` [virtio-comment] " Gerd Hoffmann
2021-09-02 16:58     ` [virtio-comment] " Chia-I Wu
2021-09-09  1:32       ` Gurchetan Singh
2021-09-09 22:45         ` Chia-I Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210826021313.378-2-gurchetansingh@chromium.org \
    --to=gurchetansingh@chromium.org \
    --cc=kraxel@redhat.com \
    --cc=virtio-comment@lists.oasis-open.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.