Skip to contentSkip to conversation

virtio-gpu: Allow num_scanouts = 0 for headless mode

PATCH In review Dorinda Bassey 4 participants 4 messages Nov 3 – Nov 18

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio-gpu: Allow num_scanouts = 0 for headless mode

The specification currently requires num_scanouts minimum value of 1, but the Linux kernel has supported num_scanouts = 0 since commit 72122c69d71784 ("drm/virtio: Add option to disable KMS support", 2023) for headless GPU compute workloads.

Update Section 5.7.4.1 to allow minimum value 0, aligning the specification with existing kernel behavior.

---
 device-types/gpu/description.tex | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
device-types/gpu/description.tex +2 -1
index ac3b427..83d2126 100644
@@ -67,7 +67,8 @@ \subsubsection{Device configuration fields}
   Writing a '1' into a bit will clear the corresponding bit in
   \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.
+  supported by the device.  A value of 0 indicates headless mode (no
+  scanout support).  Minimum value is 0, maximum value is 16.
 \item[\field{num_capsets}] specifies the maximum number of capability
   sets supported by the device.  The minimum value is zero.
 \item[\field{blob_alignment}] specifies the minimal alignment, in bytes,
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Dorinda Bassey

The specification currently requires num_scanouts minimum value of 1, but the Linux kernel has supported num_scanouts = 0 since commit 72122c69d71784 ("drm/virtio: Add option to disable KMS support", 2023) for headless GPU compute workloads.

Update Section 5.7.4.1 to allow minimum value 0, aligning the specification with existing kernel behavior.

I think CrOS actually used to use this. A much welcome change.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Dorinda Bassey
Quoted 9 lines · Dorinda Bassey

The specification currently requires num_scanouts minimum value of 1, but the Linux kernel has supported num_scanouts = 0 since commit 72122c69d71784 ("drm/virtio: Add option to disable KMS support", 2023) for headless GPU compute workloads.

Update Section 5.7.4.1 to allow minimum value 0, aligning the specification with existing kernel behavior.

Thanks!
Albert

Quoted 21 lines
---
 device-types/gpu/description.tex | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
device-types/gpu/description.tex +2 -1
index ac3b427..83d2126 100644
@@ -67,7 +67,8 @@ \subsubsection{Device configuration fields}
   Writing a '1' into a bit will clear the corresponding bit in
   \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.
+  supported by the device.  A value of 0 indicates headless mode (no
+  scanout support).  Minimum value is 0, maximum value is 16.
 \item[\field{num_capsets}] specifies the maximum number of capability
   sets supported by the device.  The minimum value is zero.
 \item[\field{blob_alignment}] specifies the minimal alignment, in bytes,
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#3 lore raw
In reply to Dorinda Bassey

Hi Dorinda,

Thanks for the patch!

Quoted 9 lines · Dorinda Bassey

The specification currently requires num_scanouts minimum value of 1, but the Linux kernel has supported num_scanouts = 0 since commit 72122c69d71784 ("drm/virtio: Add option to disable KMS support", 2023) for headless GPU compute workloads.

Update Section 5.7.4.1 to allow minimum value 0, aligning the specification with existing kernel behavior.

Best regards,
Michael

Quoted 18 lines
---
 device-types/gpu/description.tex | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
device-types/gpu/description.tex +2 -1
index ac3b427..83d2126 100644
@@ -67,7 +67,8 @@ \subsubsection{Device configuration fields}
   Writing a '1' into a bit will clear the corresponding bit in
   \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.
+  supported by the device.  A value of 0 indicates headless mode (no
+  scanout support).  Minimum value is 0, maximum value is 16.
 \item[\field{num_capsets}] specifies the maximum number of capability
   sets supported by the device.  The minimum value is zero.
 \item[\field{blob_alignment}] specifies the minimal alignment, in bytes,