Skip to content

Commit 6f91f44

Browse files
gbittencourtRodrigo Siqueira
authored andcommitted
drm/doc: Add VKMS module description and use to "Testing and Validation"
Add a description on VKMS module and the cases in which it should be used. There's a brief explanation on how to set it and use it in a VM, along with an example of running an igt-test. Changes since V3: Rodrigo: - Change the log message to imperative - Fix some bad spelling/writing - Add a blank line before enumeration Changes since V2: Andre: - Avoid repetition of words in the same sentence; - Make the explanation on 'setting the kernel' shorter, eliminate the 'make menuconfig' command; - Add tab on enumeration to have one line per item; - Clarify from each machine igt-tests commands should be ran on. Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Signed-off-by: Gabriela Bittencourt <gabrielabittencourt00@gmail.com> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191104162705.19735-1-gabrielabittencourt00@gmail.com
1 parent f794890 commit 6f91f44

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

‎Documentation/gpu/drm-uapi.rst‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,43 @@ core don't regress existing functionality. This test suite is called IGT and
257257
its code and instructions to build and run can be found in
258258
https://gitlab.freedesktop.org/drm/igt-gpu-tools/.
259259

260+
Using VKMS to test DRM API
261+
--------------------------
262+
263+
VKMS is a software-only model of a KMS driver that is useful for testing
264+
and for running compositors. VKMS aims to enable a virtual display without
265+
the need for a hardware display capability. These characteristics made VKMS
266+
a perfect tool for validating the DRM core behavior and also support the
267+
compositor developer. VKMS makes it possible to test DRM functions in a
268+
virtual machine without display, simplifying the validation of some of the
269+
core changes.
270+
271+
To Validate changes in DRM API with VKMS, start setting the kernel: make
272+
sure to enable VKMS module; compile the kernel with the VKMS enabled and
273+
install it in the target machine. VKMS can be run in a Virtual Machine
274+
(QEMU, virtme or similar). It's recommended the use of KVM with the minimum
275+
of 1GB of RAM and four cores.
276+
277+
It's possible to run the IGT-tests in a VM in two ways:
278+
279+
1. Use IGT inside a VM
280+
2. Use IGT from the host machine and write the results in a shared directory.
281+
282+
As follow, there is an example of using a VM with a shared directory with
283+
the host machine to run igt-tests. As an example it's used virtme::
284+
285+
$ virtme-run --rwdir /path/for/shared_dir --kdir=path/for/kernel/directory --mods=auto
286+
287+
Run the igt-tests in the guest machine, as example it's ran the 'kms_flip'
288+
tests::
289+
290+
$ /path/for/igt-gpu-tools/scripts/run-tests.sh -p -s -t "kms_flip.*" -v
291+
292+
In this example, instead of build the igt_runner, Piglit is used
293+
(-p option); it's created html summary of the tests results and it's saved
294+
in the folder "igt-gpu-tools/results"; it's executed only the igt-tests
295+
matching the -t option.
296+
260297
Display CRC Support
261298
-------------------
262299

0 commit comments

Comments
 (0)