Skip to contentSkip to conversation

drm/vkms: Add setup and testing information

PATCH Superseded Sumera Priyadarsini 3 participants 5 messages Dec 8, 2020 – Dec 9, 2020

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/vkms: Add setup and testing information

Update the vkms documentation to contain steps to:

- setup the vkms driver
- run tests using igt

___
Changes in v2:
- Change heading to title case (Daniel)
- Add examples to run tests directly (Daniel)
- Add examples to run subtests (Melissa)

---
 Documentation/gpu/vkms.rst | 67 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
Documentation/gpu/vkms.rst +67 -0
index 13bab1d93bb3..d6739fbbe503 100644
@@ -7,6 +7,73 @@
 .. kernel-doc:: drivers/gpu/drm/vkms/vkms_drv.c
    :doc: vkms (Virtual Kernel Modesetting)
 
+Setup
+=====
+
+The VKMS driver can be setup with the following steps:
+
+To check if VKMS is loaded, run::
+
+  lsmod | grep vkms
+
+This should list the VKMS driver. If no output is obtained, then
+you need to enable and/or load the VKMS driver.
+Ensure that the VKMS driver has been set as a loadable module in your
+kernel config file. Do::
+
+  make nconfig
+
+  Go to `Device Drivers> Graphics support`
+
+  Enable `Virtual KMS (EXPERIMENTAL)`
+
+Compile and build the kernel for the changes to get reflected.
+Now, to load the driver, use::
+
+  sudo modprobe vkms
+
+On running the lsmod command now, the VKMS driver will appear listed.
+You can also observe the driver being loaded in the dmesg logs.
+
+To disable the driver, use ::
+
+  sudo modprobe -r vkms
+
+Testing With IGT
+================
+
+The IGT GPU Tools is a test suite used specifically for debugging and
+development of the DRM drivers.
+The IGT Tools can be installed from
+`here <https://gitlab.freedesktop.org/drm/igt-gpu-tools>`_ .
+
+The tests need to be run without a compositor, so you need to switch to text
+only mode. You can do this by::
+
+  sudo systemctl isolate multi-user.target
+
+To return to graphical mode, do::
+
+  sudo systemctl isolate graphical.target
+
+Once you are in text only mode, you can run tests using the --device switch
+or IGT_DEVICE variable to specify the device filter for the driver we want
+to test::
+
+  sudo ./build/tests/<name of test> --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/<name of test>
+
+For example, to test the functionality of the writeback library,
+we can run the kms_writeback test::
+
+  sudo ./build/tests/kms_writeback --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/kms_writeback
+
+You can also run subtests if you do not want to run the entire test::
+
+  sudo ./build/tests/kms_flip --run-subtest basic-plain-flip --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/kms_flip --run-subtest basic-plain-flip
+
 TODO
 ====
 
Signature · 6 lines
2.25.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v2 1/1
#1 lore raw
Quoted 79 lines · Sumera Priyadarsini

Update the vkms documentation to contain steps to:

- setup the vkms driver
- run tests using igt

___
Changes in v2:
- Change heading to title case (Daniel)
- Add examples to run tests directly (Daniel)
- Add examples to run subtests (Melissa)

---
 Documentation/gpu/vkms.rst | 67 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
Documentation/gpu/vkms.rst +56 -0
index 13bab1d93bb3..d6739fbbe503 100644
@@ -7,6 +7,73 @@
 .. kernel-doc:: drivers/gpu/drm/vkms/vkms_drv.c
    :doc: vkms (Virtual Kernel Modesetting)
 
+Setup
+=====
+
+The VKMS driver can be setup with the following steps:
+
+To check if VKMS is loaded, run::
+
+  lsmod | grep vkms
+
+This should list the VKMS driver. If no output is obtained, then
+you need to enable and/or load the VKMS driver.
+Ensure that the VKMS driver has been set as a loadable module in your
+kernel config file. Do::
+
+  make nconfig
+
+  Go to `Device Drivers> Graphics support`
+
+  Enable `Virtual KMS (EXPERIMENTAL)`
+
+Compile and build the kernel for the changes to get reflected.
+Now, to load the driver, use::
+
+  sudo modprobe vkms
+
+On running the lsmod command now, the VKMS driver will appear listed.
+You can also observe the driver being loaded in the dmesg logs.
+
+To disable the driver, use ::
+
+  sudo modprobe -r vkms
+
+Testing With IGT
+================
+
+The IGT GPU Tools is a test suite used specifically for debugging and
+development of the DRM drivers.
+The IGT Tools can be installed from
+`here <https://gitlab.freedesktop.org/drm/igt-gpu-tools>`_ .
+
+The tests need to be run without a compositor, so you need to switch to text
+only mode. You can do this by::
+
+  sudo systemctl isolate multi-user.target
+
+To return to graphical mode, do::
+
+  sudo systemctl isolate graphical.target
+
+Once you are in text only mode, you can run tests using the --device switch
+or IGT_DEVICE variable to specify the device filter for the driver we want
+to test::
+
+  sudo ./build/tests/<name of test> --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/<name of test>
+

Documentation/gpu/vkms.rst line 75

Quoted 10 lines
Documentation/gpu/vkms.rst +10 -0
+For example, to test the functionality of the writeback library,
+we can run the kms_writeback test::
+
+  sudo ./build/tests/kms_writeback --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/kms_writeback
+
+You can also run subtests if you do not want to run the entire test::
+
+  sudo ./build/tests/kms_flip --run-subtest basic-plain-flip --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/kms_flip --run-subtest basic-plain-flip

Does IGT_DEVICE also work with run-tests.sh? Aside from my curious question, patch looks good to me, thanks a lot.

Quoted 7 lines
Documentation/gpu/vkms.rst +1 -0
+
 TODO
 ====
 
Signature · 1 line
2.25.1
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
Quoted 86 lines · Daniel Vetter
Quoted 84 lines · Sumera Priyadarsini

Update the vkms documentation to contain steps to:

- setup the vkms driver
- run tests using igt

___
Changes in v2:
- Change heading to title case (Daniel)
- Add examples to run tests directly (Daniel)
- Add examples to run subtests (Melissa)

---
 Documentation/gpu/vkms.rst | 67 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
Documentation/gpu/vkms.rst +61 -0
index 13bab1d93bb3..d6739fbbe503 100644
@@ -7,6 +7,73 @@
 .. kernel-doc:: drivers/gpu/drm/vkms/vkms_drv.c
    :doc: vkms (Virtual Kernel Modesetting)
 
+Setup
+=====
+
+The VKMS driver can be setup with the following steps:
+
+To check if VKMS is loaded, run::
+
+  lsmod | grep vkms
+
+This should list the VKMS driver. If no output is obtained, then
+you need to enable and/or load the VKMS driver.
+Ensure that the VKMS driver has been set as a loadable module in your
+kernel config file. Do::
+
+  make nconfig
+
+  Go to `Device Drivers> Graphics support`
+
+  Enable `Virtual KMS (EXPERIMENTAL)`
+
+Compile and build the kernel for the changes to get reflected.
+Now, to load the driver, use::
+
+  sudo modprobe vkms
+
+On running the lsmod command now, the VKMS driver will appear listed.
+You can also observe the driver being loaded in the dmesg logs.
+
+To disable the driver, use ::
+
+  sudo modprobe -r vkms
+
+Testing With IGT
+================
+
+The IGT GPU Tools is a test suite used specifically for debugging and
+development of the DRM drivers.
+The IGT Tools can be installed from
+`here <https://gitlab.freedesktop.org/drm/igt-gpu-tools>`_ .
+
+The tests need to be run without a compositor, so you need to switch to text
+only mode. You can do this by::
+
+  sudo systemctl isolate multi-user.target
+
+To return to graphical mode, do::
+
+  sudo systemctl isolate graphical.target
+
+Once you are in text only mode, you can run tests using the --device switch
+or IGT_DEVICE variable to specify the device filter for the driver we want
+to test::
+
+  sudo ./build/tests/<name of test> --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/<name of test>
+
+For example, to test the functionality of the writeback library,
+we can run the kms_writeback test::
+
+  sudo ./build/tests/kms_writeback --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/kms_writeback
Quoted 8 lines

Documentation/gpu/vkms.rst line 75

Quoted 5 lines
Documentation/gpu/vkms.rst +5 -0
+
+You can also run subtests if you do not want to run the entire test::
+
+  sudo ./build/tests/kms_flip --run-subtest basic-plain-flip --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/kms_flip --run-subtest basic-plain-flip

Does IGT_DEVICE also work with run-tests.sh? Aside from my curious question, patch looks good to me, thanks a lot.

Good catch, it does.

Melissa, IGT_FORCE_DRIVER also works. I think I was used test/kms_flip earlier instead of
./build/test/kms_flip hence the fluke.

Should I add these also to the docs, was wondering if it will get too confusing....

Quoted 7 lines
Quoted 4 lines
Documentation/gpu/vkms.rst +1 -0
+
 TODO
 ====
 
Quoted 8 lines
Quoted 3 lines

--
2.25.1

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./scripts/run-tests.sh -t kms_writeback

[9445.317993] [1/4] kms_writeback (writeback-pixel-formats)
[9445.623499] [2/4] kms_writeback (writeback-invalid-parameters)
[9447.076263] [3/4] kms_writeback (writeback-fb-id)
[9447.371402] [4/4] kms_writeback (writeback-check-output)

Done.

sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/kms_writeback

IGT-Version: 1.25-gc36f7973 (x86_64) (Linux: 5.10.0-rc2drmsumo+ x86_64) Starting subtest: writeback-pixel-formats
Subtest writeback-pixel-formats: SUCCESS (0.000s)
Starting subtest: writeback-invalid-parameters
Subtest writeback-invalid-parameters: SUCCESS (0.000s) Starting subtest: writeback-fb-id
Subtest writeback-fb-id: SUCCESS (0.017s)
Starting subtest: writeback-check-output
Subtest writeback-check-output: SUCCESS (0.125s)

sudo IGT_FORCE_DRIVER=vkms build/tests/kms_writeback

IGT-Version: 1.25-gc36f7973 (x86_64) (Linux: 5.10.0-rc2drmsumo+ x86_64) Starting subtest: writeback-pixel-formats
Subtest writeback-pixel-formats: SUCCESS (0.000s)
Starting subtest: writeback-invalid-parameters
Subtest writeback-invalid-parameters: SUCCESS (0.000s) Starting subtest: writeback-fb-id
Subtest writeback-fb-id: SUCCESS (0.017s)
Starting subtest: writeback-check-output
Subtest writeback-check-output: SUCCESS (0.126s)

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
Quoted 97 lines · Sumera Priyadarsini
Quoted 86 lines · Daniel Vetter
Quoted 84 lines · Sumera Priyadarsini

Update the vkms documentation to contain steps to:

- setup the vkms driver
- run tests using igt

___
Changes in v2:
- Change heading to title case (Daniel)
- Add examples to run tests directly (Daniel)
- Add examples to run subtests (Melissa)

---
 Documentation/gpu/vkms.rst | 67 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
Documentation/gpu/vkms.rst +61 -0
index 13bab1d93bb3..d6739fbbe503 100644
@@ -7,6 +7,73 @@
 .. kernel-doc:: drivers/gpu/drm/vkms/vkms_drv.c
    :doc: vkms (Virtual Kernel Modesetting)
 
+Setup
+=====
+
+The VKMS driver can be setup with the following steps:
+
+To check if VKMS is loaded, run::
+
+  lsmod | grep vkms
+
+This should list the VKMS driver. If no output is obtained, then
+you need to enable and/or load the VKMS driver.
+Ensure that the VKMS driver has been set as a loadable module in your
+kernel config file. Do::
+
+  make nconfig
+
+  Go to `Device Drivers> Graphics support`
+
+  Enable `Virtual KMS (EXPERIMENTAL)`
+
+Compile and build the kernel for the changes to get reflected.
+Now, to load the driver, use::
+
+  sudo modprobe vkms
+
+On running the lsmod command now, the VKMS driver will appear listed.
+You can also observe the driver being loaded in the dmesg logs.
+
+To disable the driver, use ::
+
+  sudo modprobe -r vkms
+
+Testing With IGT
+================
+
+The IGT GPU Tools is a test suite used specifically for debugging and
+development of the DRM drivers.
+The IGT Tools can be installed from
+`here <https://gitlab.freedesktop.org/drm/igt-gpu-tools>`_ .
+
+The tests need to be run without a compositor, so you need to switch to text
+only mode. You can do this by::
+
+  sudo systemctl isolate multi-user.target
+
+To return to graphical mode, do::
+
+  sudo systemctl isolate graphical.target
+
+Once you are in text only mode, you can run tests using the --device switch
+or IGT_DEVICE variable to specify the device filter for the driver we want
+to test::
+
+  sudo ./build/tests/<name of test> --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/<name of test>
+
+For example, to test the functionality of the writeback library,
+we can run the kms_writeback test::
+
+  sudo ./build/tests/kms_writeback --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/kms_writeback
Quoted 8 lines

Documentation/gpu/vkms.rst line 75

Quoted 5 lines
Documentation/gpu/vkms.rst +5 -0
+
+You can also run subtests if you do not want to run the entire test::
+
+  sudo ./build/tests/kms_flip --run-subtest basic-plain-flip --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/kms_flip --run-subtest basic-plain-flip

Does IGT_DEVICE also work with run-tests.sh? Aside from my curious question, patch looks good to me, thanks a lot.

Quoted 8 lines

Good catch, it does.

Melissa, IGT_FORCE_DRIVER also works. I think I was used test/kms_flip earlier instead of
./build/test/kms_flip hence the fluke.

Should I add these also to the docs, was wondering if it will get too confusing....

I think IGT_FORCE_DRIVER is deprecated, so better not to mention that. IGT_DEVICE and --device are the new thing. I think just adding a sentence that IGT_DEVICE also works with the run-tests scripts would be good perhaps.
-Daniel

Quoted 20 lines
Quoted 8 lines
Quoted 4 lines
Documentation/gpu/vkms.rst +1 -0
+
 TODO
 ====
 
Quoted 8 lines
Quoted 3 lines

--
2.25.1

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
reviewer
#4 lore raw
Quoted 105 lines · Daniel Vetter
Quoted 103 lines · Sumera Priyadarsini
Quoted 86 lines · Daniel Vetter
Quoted 84 lines · Sumera Priyadarsini

Update the vkms documentation to contain steps to:

- setup the vkms driver
- run tests using igt

___
Changes in v2:
- Change heading to title case (Daniel)
- Add examples to run tests directly (Daniel)
- Add examples to run subtests (Melissa)

---
 Documentation/gpu/vkms.rst | 67 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
Documentation/gpu/vkms.rst +61 -0
index 13bab1d93bb3..d6739fbbe503 100644
@@ -7,6 +7,73 @@
 .. kernel-doc:: drivers/gpu/drm/vkms/vkms_drv.c
    :doc: vkms (Virtual Kernel Modesetting)
 
+Setup
+=====
+
+The VKMS driver can be setup with the following steps:
+
+To check if VKMS is loaded, run::
+
+  lsmod | grep vkms
+
+This should list the VKMS driver. If no output is obtained, then
+you need to enable and/or load the VKMS driver.
+Ensure that the VKMS driver has been set as a loadable module in your
+kernel config file. Do::
+
+  make nconfig
+
+  Go to `Device Drivers> Graphics support`
+
+  Enable `Virtual KMS (EXPERIMENTAL)`
+
+Compile and build the kernel for the changes to get reflected.
+Now, to load the driver, use::
+
+  sudo modprobe vkms
+
+On running the lsmod command now, the VKMS driver will appear listed.
+You can also observe the driver being loaded in the dmesg logs.
+
+To disable the driver, use ::
+
+  sudo modprobe -r vkms
+
+Testing With IGT
+================
+
+The IGT GPU Tools is a test suite used specifically for debugging and
+development of the DRM drivers.
+The IGT Tools can be installed from
+`here <https://gitlab.freedesktop.org/drm/igt-gpu-tools>`_ .
+
+The tests need to be run without a compositor, so you need to switch to text
+only mode. You can do this by::
+
+  sudo systemctl isolate multi-user.target
+
+To return to graphical mode, do::
+
+  sudo systemctl isolate graphical.target
+
+Once you are in text only mode, you can run tests using the --device switch
+or IGT_DEVICE variable to specify the device filter for the driver we want
+to test::
+
+  sudo ./build/tests/<name of test> --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/<name of test>
+
+For example, to test the functionality of the writeback library,
+we can run the kms_writeback test::
+
+  sudo ./build/tests/kms_writeback --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/kms_writeback
Quoted 8 lines

Documentation/gpu/vkms.rst line 75

Quoted 5 lines
Documentation/gpu/vkms.rst +5 -0
+
+You can also run subtests if you do not want to run the entire test::
+
+  sudo ./build/tests/kms_flip --run-subtest basic-plain-flip --device "sys:/sys/devices/platform/vkms"
+  sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/kms_flip --run-subtest basic-plain-flip

Does IGT_DEVICE also work with run-tests.sh? Aside from my curious question, patch looks good to me, thanks a lot.

Good catch, it does.

Melissa, IGT_FORCE_DRIVER also works. I think I was used test/kms_flip earlier instead of
./build/test/kms_flip hence the fluke.

Quoted 7 lines
Quoted 2 lines

Should I add these also to the docs, was wondering if it will get too confusing....

I think IGT_FORCE_DRIVER is deprecated, so better not to mention that. IGT_DEVICE and --device are the new thing. I think just adding a sentence that IGT_DEVICE also works with the run-tests scripts would be good perhaps.

Yes, that's what I think too

Good work!

Melissa

Quoted 14 lines

-Daniel

Quoted 12 lines
Quoted 12 lines
Quoted 7 lines
Documentation/gpu/vkms.rst +1 -1
+
 TODO
 ====
 
--

2.25.1

Quoted 15 lines
Quoted 8 lines
Quoted 4 lines

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel