Skip to contentSkip to conversation

drm/ci: Update Mesa and Introduce VKMS Support

PATCH In review Helen Koike 3 participants 8 messages Sep 22, 2023 – Oct 9, 2023

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v2 cover drm/ci: Update Mesa and Introduce VKMS Support

This patchset offers two enhancements to drm/ci:

1. Mesa Version Update. drm/ci re-uses components from Mesa project. A recent bug in MesaCI was fixed. The first patch updates drm/ci Mesa's version, re-allowing containers rebuilds when uncached, essencial for new runs.

2. VKMS Driver Testing, together with the -skips.txt and -fails.txt list that were found during the tests.

See pipeline https://gitlab.freedesktop.org/helen.fornazier/linux/-/pipelines/992263
(there is a vgem job on top but it shouldn't affect the result)

v2:
- mesauprev: point to upstream mesa/mesa (solved the TODO and removed RFC tag)
- vkms jov: do not mv modules to /lib/modules in the job definition, leave it to crosvm-runner.sh

Helen Koike (2):
drm/ci: uprev mesa version - fix container build drm/ci: add tests on vkms

 MAINTAINERS                                   |  1 +
 drivers/gpu/drm/ci/build.sh                   |  1 -
 drivers/gpu/drm/ci/gitlab-ci.yml              | 16 +++++++++-
 drivers/gpu/drm/ci/igt_runner.sh              |  6 ++--
 drivers/gpu/drm/ci/image-tags.yml             |  2 +-
 drivers/gpu/drm/ci/lava-submit.sh             |  2 +-
 drivers/gpu/drm/ci/test.yml                   | 23 ++++++++++++++-
 drivers/gpu/drm/ci/x86_64.config              |  1 +
 .../drm/ci/xfails/virtio_gpu-none-flakes.txt  |  0
 drivers/gpu/drm/ci/xfails/vkms-none-fails.txt | 29 +++++++++++++++++++
 drivers/gpu/drm/ci/xfails/vkms-none-skips.txt | 10 +++++++
 11 files changed, 83 insertions(+), 8 deletions(-)
 delete mode 100644 drivers/gpu/drm/ci/xfails/virtio_gpu-none-flakes.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/vkms-none-fails.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/vkms-none-skips.txt
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 1/2 drm/ci: uprev mesa version - fix container build

When building containers, some rust packages were installed without locking the dependencies version, which got updated and started giving errors like:

error: failed to compile bindgen-cli v0.62.0, intermediate artifacts can be found at /tmp/cargo-installkNKRwf Caused by:
package rustix v0.38.13 cannot be built because it requires rustc 1.63 or newer, while the currently active rustc version is 1.60.0

A patch to Mesa was recently added fixing this error, so update it.

---

v2:
- point to upstream mesa/mesa (solved the TODO and removed RFC tag)

---
 drivers/gpu/drm/ci/gitlab-ci.yml  | 15 ++++++++++++++-
 drivers/gpu/drm/ci/lava-submit.sh |  2 +-
 2 files changed, 15 insertions(+), 2 deletions(-)
drivers/gpu/drm/ci/gitlab-ci.yml +14 -1
index 2c4df53f5dfe..522f83db1a07 100644
@@ -1,6 +1,6 @@
 variables:
   DRM_CI_PROJECT_PATH: &drm-ci-project-path mesa/mesa
-  DRM_CI_COMMIT_SHA: &drm-ci-commit-sha 0dc961645c4f0241f8512cb0ec3ad59635842072
+  DRM_CI_COMMIT_SHA: &drm-ci-commit-sha 1cdc4be14b66108ae0e8069686ac3efe52bef3cb
 
   UPSTREAM_REPO: git://anongit.freedesktop.org/drm/drm
   TARGET_BRANCH: drm-next
@@ -24,6 +24,8 @@ variables:
   PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
   # per-job artifact storage on MinIO
   JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
+  # default kernel for rootfs before injecting the current kernel tree
+  KERNEL_IMAGE_BASE: https://${S3_HOST}/mesa-lava/gfx-ci/linux/v6.4.12-for-mesa-ci-f6b4ad45f48d
 
   LAVA_JOB_PRIORITY: 30
 
@@ -86,6 +88,17 @@ include:
       - '/.gitlab-ci/container/gitlab-ci.yml'
       - '/.gitlab-ci/test/gitlab-ci.yml'
       - '/.gitlab-ci/lava/lava-gitlab-ci.yml'
+      - '/src/microsoft/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/zink/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/crocus/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/softpipe/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/llvmpipe/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/virgl/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/nouveau/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/frontends/lavapipe/ci/gitlab-ci-inc.yml'
+      - '/src/intel/ci/gitlab-ci-inc.yml'
+      - '/src/freedreno/ci/gitlab-ci-inc.yml'
+      - '/src/amd/ci/gitlab-ci-inc.yml'
   - drivers/gpu/drm/ci/image-tags.yml
   - drivers/gpu/drm/ci/container.yml
   - drivers/gpu/drm/ci/static-checks.yml
drivers/gpu/drm/ci/lava-submit.sh +1 -1
index 0c4456b21b0f..379f26ea87cc 100755
@@ -22,7 +22,7 @@ cp "$SCRIPTS_DIR"/setup-test-env.sh results/job-rootfs-overlay/
 
 # Prepare env vars for upload.
 section_start variables "Variables passed through:"
-KERNEL_IMAGE_BASE_URL="https://${BASE_SYSTEM_HOST_PATH}" \
+KERNEL_IMAGE_BASE="https://${BASE_SYSTEM_HOST_PATH}" \
 	artifacts/ci-common/generate-env.sh | tee results/job-rootfs-overlay/set-job-env-vars.sh
 section_end variables
 
Signature · 1 line
2.34.1
Tested-by Acked-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] drm/ci: uprev mesa version - fix container build

Quoted 11 lines · Helen Koike

When building containers, some rust packages were installed without locking the dependencies version, which got updated and started giving errors like:

error: failed to compile bindgen-cli v0.62.0, intermediate artifacts can be found at /tmp/cargo-installkNKRwf Caused by:
package rustix v0.38.13 cannot be built because it requires rustc 1.63 or newer, while the currently active rustc version is 1.60.0

A patch to Mesa was recently added fixing this error, so update it.

Quoted 65 lines

---

v2:
- point to upstream mesa/mesa (solved the TODO and removed RFC tag)

---
  drivers/gpu/drm/ci/gitlab-ci.yml  | 15 ++++++++++++++-
  drivers/gpu/drm/ci/lava-submit.sh |  2 +-
  2 files changed, 15 insertions(+), 2 deletions(-)
drivers/gpu/drm/ci/gitlab-ci.yml +14 -1
index 2c4df53f5dfe..522f83db1a07 100644
@@ -1,6 +1,6 @@
  variables:
    DRM_CI_PROJECT_PATH: &drm-ci-project-path mesa/mesa
-  DRM_CI_COMMIT_SHA: &drm-ci-commit-sha 0dc961645c4f0241f8512cb0ec3ad59635842072
+  DRM_CI_COMMIT_SHA: &drm-ci-commit-sha 1cdc4be14b66108ae0e8069686ac3efe52bef3cb
 
    UPSTREAM_REPO: git://anongit.freedesktop.org/drm/drm
    TARGET_BRANCH: drm-next
@@ -24,6 +24,8 @@ variables:
    PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
    # per-job artifact storage on MinIO
    JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
+  # default kernel for rootfs before injecting the current kernel tree
+  KERNEL_IMAGE_BASE: https://${S3_HOST}/mesa-lava/gfx-ci/linux/v6.4.12-for-mesa-ci-f6b4ad45f48d
 
    LAVA_JOB_PRIORITY: 30
 
@@ -86,6 +88,17 @@ include:
        - '/.gitlab-ci/container/gitlab-ci.yml'
        - '/.gitlab-ci/test/gitlab-ci.yml'
        - '/.gitlab-ci/lava/lava-gitlab-ci.yml'
+      - '/src/microsoft/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/zink/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/crocus/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/softpipe/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/llvmpipe/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/virgl/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/nouveau/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/frontends/lavapipe/ci/gitlab-ci-inc.yml'
+      - '/src/intel/ci/gitlab-ci-inc.yml'
+      - '/src/freedreno/ci/gitlab-ci-inc.yml'
+      - '/src/amd/ci/gitlab-ci-inc.yml'
    - drivers/gpu/drm/ci/image-tags.yml
    - drivers/gpu/drm/ci/container.yml
    - drivers/gpu/drm/ci/static-checks.yml
drivers/gpu/drm/ci/lava-submit.sh +1 -1
index 0c4456b21b0f..379f26ea87cc 100755
@@ -22,7 +22,7 @@ cp "$SCRIPTS_DIR"/setup-test-env.sh results/job-rootfs-overlay/
 
  # Prepare env vars for upload.
  section_start variables "Variables passed through:"
-KERNEL_IMAGE_BASE_URL="https://${BASE_SYSTEM_HOST_PATH}" \
+KERNEL_IMAGE_BASE="https://${BASE_SYSTEM_HOST_PATH}" \
  	artifacts/ci-common/generate-env.sh | tee results/job-rootfs-overlay/set-job-env-vars.sh
  section_end variables
 
Signature · 1 line
2.34.1
#3 lore raw

Re: [PATCH v2 1/2] drm/ci: uprev mesa version - fix container build

In reply to Helen Koike

Dear maintainers,

Do not pick this patch, I re-sent it as part of the series
[PATCH 0/9] drm/ci: fixes and improvements

https://lists.freedesktop.org/archives/dri-devel/2023-October/425909.html

Thanks
Regards,
Helen

Quoted 73 lines · Helen Koike

When building containers, some rust packages were installed without locking the dependencies version, which got updated and started giving errors like:

error: failed to compile bindgen-cli v0.62.0, intermediate artifacts can be found at /tmp/cargo-installkNKRwf Caused by:
package rustix v0.38.13 cannot be built because it requires rustc 1.63 or newer, while the currently active rustc version is 1.60.0

A patch to Mesa was recently added fixing this error, so update it.

---

v2:
- point to upstream mesa/mesa (solved the TODO and removed RFC tag)

---
  drivers/gpu/drm/ci/gitlab-ci.yml  | 15 ++++++++++++++-
  drivers/gpu/drm/ci/lava-submit.sh |  2 +-
  2 files changed, 15 insertions(+), 2 deletions(-)
drivers/gpu/drm/ci/gitlab-ci.yml +14 -1
index 2c4df53f5dfe..522f83db1a07 100644
@@ -1,6 +1,6 @@
  variables:
    DRM_CI_PROJECT_PATH: &drm-ci-project-path mesa/mesa
-  DRM_CI_COMMIT_SHA: &drm-ci-commit-sha 0dc961645c4f0241f8512cb0ec3ad59635842072
+  DRM_CI_COMMIT_SHA: &drm-ci-commit-sha 1cdc4be14b66108ae0e8069686ac3efe52bef3cb
 
    UPSTREAM_REPO: git://anongit.freedesktop.org/drm/drm
    TARGET_BRANCH: drm-next
@@ -24,6 +24,8 @@ variables:
    PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
    # per-job artifact storage on MinIO
    JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
+  # default kernel for rootfs before injecting the current kernel tree
+  KERNEL_IMAGE_BASE: https://${S3_HOST}/mesa-lava/gfx-ci/linux/v6.4.12-for-mesa-ci-f6b4ad45f48d
 
    LAVA_JOB_PRIORITY: 30
 
@@ -86,6 +88,17 @@ include:
        - '/.gitlab-ci/container/gitlab-ci.yml'
        - '/.gitlab-ci/test/gitlab-ci.yml'
        - '/.gitlab-ci/lava/lava-gitlab-ci.yml'
+      - '/src/microsoft/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/zink/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/crocus/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/softpipe/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/llvmpipe/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/virgl/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/drivers/nouveau/ci/gitlab-ci-inc.yml'
+      - '/src/gallium/frontends/lavapipe/ci/gitlab-ci-inc.yml'
+      - '/src/intel/ci/gitlab-ci-inc.yml'
+      - '/src/freedreno/ci/gitlab-ci-inc.yml'
+      - '/src/amd/ci/gitlab-ci-inc.yml'
    - drivers/gpu/drm/ci/image-tags.yml
    - drivers/gpu/drm/ci/container.yml
    - drivers/gpu/drm/ci/static-checks.yml
drivers/gpu/drm/ci/lava-submit.sh +1 -1
index 0c4456b21b0f..379f26ea87cc 100755
@@ -22,7 +22,7 @@ cp "$SCRIPTS_DIR"/setup-test-env.sh results/job-rootfs-overlay/
 
  # Prepare env vars for upload.
  section_start variables "Variables passed through:"
-KERNEL_IMAGE_BASE_URL="https://${BASE_SYSTEM_HOST_PATH}" \
+KERNEL_IMAGE_BASE="https://${BASE_SYSTEM_HOST_PATH}" \
  	artifacts/ci-common/generate-env.sh | tee results/job-rootfs-overlay/set-job-env-vars.sh
  section_end variables
 
#4 lore raw

PATCH v2 2/2 drm/ci: add tests on vkms

In reply to Helen Koike

Add job that runs igt on top of vkms.

---

See pipeline: https://gitlab.freedesktop.org/helen.fornazier/linux/-/pipelines/990494

v2:
- do not mv modules to /lib/modules in the job definition, leave it to crosvm-runner.sh

---
 MAINTAINERS                                   |  1 +
 drivers/gpu/drm/ci/build.sh                   |  1 -
 drivers/gpu/drm/ci/gitlab-ci.yml              |  1 +
 drivers/gpu/drm/ci/igt_runner.sh              |  6 ++--
 drivers/gpu/drm/ci/image-tags.yml             |  2 +-
 drivers/gpu/drm/ci/test.yml                   | 23 ++++++++++++++-
 drivers/gpu/drm/ci/x86_64.config              |  1 +
 .../drm/ci/xfails/virtio_gpu-none-flakes.txt  |  0
 drivers/gpu/drm/ci/xfails/vkms-none-fails.txt | 29 +++++++++++++++++++
 drivers/gpu/drm/ci/xfails/vkms-none-skips.txt | 10 +++++++
 10 files changed, 68 insertions(+), 6 deletions(-)
 delete mode 100644 drivers/gpu/drm/ci/xfails/virtio_gpu-none-flakes.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/vkms-none-fails.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/vkms-none-skips.txt
MAINTAINERS +1 -0
index 740a2ce2689c..e47dbe31d221 100644
@@ -6813,6 +6813,7 @@ L:	[email protected]
 S:	Maintained
 T:	git git://anongit.freedesktop.org/drm/drm-misc
 F:	Documentation/gpu/vkms.rst
+F:	drivers/gpu/drm/ci/xfails/vkms*
 F:	drivers/gpu/drm/vkms/
 
 DRM DRIVER FOR VIRTUALBOX VIRTUAL GPU
drivers/gpu/drm/ci/build.sh +0 -1
index 7b014287a041..9e510e77098b 100644
@@ -146,7 +146,6 @@ fi
 
 mkdir -p artifacts/install/lib
 mv install/* artifacts/install/.
-rm -rf artifacts/install/modules
 ln -s common artifacts/install/ci-common
 
 for image in ${KERNEL_IMAGE_NAME}; do
drivers/gpu/drm/ci/gitlab-ci.yml +1 -0
index 522f83db1a07..c86ee5a51012 100644
@@ -120,6 +120,7 @@ stages:
   - rockchip
   - virtio-gpu
   - lint
+  - software-driver
 
 # YAML anchors for rule conditions
 # --------------------------------
drivers/gpu/drm/ci/igt_runner.sh +3 -3
index 2bb759165063..c7f83d1b72e9 100755
@@ -21,9 +21,9 @@ cat /sys/kernel/debug/dri/*/state
 set -e
 
 # Cannot use HWCI_KERNEL_MODULES as at that point we don't have the module in /lib
-if [ "$IGT_FORCE_DRIVER" = "amdgpu" ]; then
-    mv /install/modules/lib/modules/* /lib/modules/.
-    modprobe amdgpu
+if [ "$IGT_FORCE_DRIVER" = "amdgpu" || "$IGT_FORCE_DRIVER" = "vkms" ]; then
+    mv /install/modules/lib/modules/* /lib/modules/. || true
+    modprobe --first-time "$IGT_FORCE_DRIVER"
 fi
 
 if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-skips.txt" ]; then
drivers/gpu/drm/ci/image-tags.yml +1 -1
index f051b6c547c5..e05077ee29d2 100644
@@ -4,7 +4,7 @@ variables:
    DEBIAN_BASE_TAG: "${CONTAINER_TAG}"
 
    DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build"
-   DEBIAN_BUILD_TAG: "${CONTAINER_TAG}"
+   DEBIAN_BUILD_TAG: "2023-09-20-vkms-module-2"
 
    KERNEL_ROOTFS_TAG: "${CONTAINER_TAG}"
 
drivers/gpu/drm/ci/test.yml +22 -1
index 6473cddaa7a9..69a5337fd989 100644
@@ -332,4 +332,25 @@ virtio_gpu:none:
     - igt:x86_64
   rules:
     # TODO: current issue: malloc(): corrupted top size. Fix and remove this rule.
-    - when: never
\ No newline at end of file
+    - when: never
+
+vkms:none:
+  stage: software-driver
+  variables:
+    DRIVER_NAME: vkms
+    GPU_VERSION: none
+  extends:
+    - .test-gl
+  tags:
+    - kvm
+  script:
+    - ln -sf $CI_PROJECT_DIR/install /install
+    - mv install/bzImage /lava-files/bzImage
+    - mkdir -p /lib/modules
+    - mkdir -p $CI_PROJECT_DIR/results
+    - ln -sf $CI_PROJECT_DIR/results /results
+    - ./install/crosvm-runner.sh ./install/igt_runner.sh
+  needs:
+    - debian/x86_64_test-gl
+    - testing:x86_64
+    - igt:x86_64
\ No newline at end of file
drivers/gpu/drm/ci/x86_64.config +1 -0
index 1cbd49a5b23a..8eaba388b141 100644
@@ -24,6 +24,7 @@ CONFIG_DRM=y
 CONFIG_DRM_PANEL_SIMPLE=y
 CONFIG_PWM_CROS_EC=y
 CONFIG_BACKLIGHT_PWM=y
+CONFIG_DRM_VKMS=m
 
 # Strip out some stuff we don't need for graphics testing, to reduce
 # the build.
drivers/gpu/drm/ci/xfails/virtio_gpu-none-flakes.txt deleted +0 -0
deleted file mode 100644
index e69de29bb2d1..000000000000
drivers/gpu/drm/ci/xfails/vkms-none-fails.txt new file +29 -0
new file mode 100644
index 000000000000..a65196a19222
@@ -0,0 +1,29 @@
+kms_cursor_crc@cursor-rapid-movement-128x128,Fail
+kms_cursor_crc@cursor-rapid-movement-128x42,Fail
+kms_cursor_crc@cursor-rapid-movement-256x256,Fail
+kms_cursor_crc@cursor-rapid-movement-256x85,Fail
+kms_cursor_crc@cursor-rapid-movement-32x10,Fail
+kms_cursor_crc@cursor-rapid-movement-32x32,Fail
+kms_cursor_crc@cursor-rapid-movement-512x170,Fail
+kms_cursor_crc@cursor-rapid-movement-512x512,Fail
+kms_cursor_crc@cursor-rapid-movement-64x21,Fail
+kms_cursor_crc@cursor-rapid-movement-64x64,Fail
+kms_cursor_legacy@basic-flip-before-cursor-atomic,Fail
+kms_cursor_legacy@basic-flip-before-cursor-legacy,Fail
+kms_cursor_legacy@cursor-vs-flip-atomic,Fail
+kms_cursor_legacy@cursor-vs-flip-legacy,Fail
+kms_cursor_legacy@cursor-vs-flip-toggle,Fail
+kms_cursor_legacy@cursor-vs-flip-varying-size,Fail
+kms_cursor_legacy@cursorA-vs-flipA-toggle,Fail
+kms_cursor_legacy@flip-vs-cursor-atomic,Fail
+kms_cursor_legacy@flip-vs-cursor-crc-atomic,Fail
+kms_cursor_legacy@flip-vs-cursor-crc-legacy,Fail
+kms_cursor_legacy@flip-vs-cursor-legacy,Fail
+kms_flip@flip-vs-expired-vblank-interruptible,Fail
+kms_flip@plain-flip-fb-recreate,Fail
+kms_pipe_crc_basic@nonblocking-crc,Fail
+kms_pipe_crc_basic@nonblocking-crc-frame-sequence,Fail
+kms_pipe_crc_basic@suspend-read-crc,Fail
+kms_plane@plane-panning-bottom-right-suspend,Fail
+kms_universal_plane@universal-plane-pipe-A-sanity,Fail
+kms_vblank@pipe-A-ts-continuation-dpms-suspend,Fail
\ No newline at end of file
drivers/gpu/drm/ci/xfails/vkms-none-skips.txt new file +10 -0
new file mode 100644
index 000000000000..07aa62cff108
@@ -0,0 +1,10 @@
+# Hits:
+# rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
+# rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P749/1:b..l
+kms_prop_blob@invalid-get-prop
+
+# keeps printing vkms_vblank_simulate: vblank timer overrun and never ends
+kms_invalid_mode@int-max-clock
+
+# Suspend seems to be broken
+.*suspend.*
\ No newline at end of file
Signature · 1 line
2.34.1
Tested-by Acked-by on v2 2/2
#6 lore raw

Re: [PATCH v2 2/2] drm/ci: add tests on vkms

In reply to Helen Koike
Quoted 3 lines · Helen Koike

Add job that runs igt on top of vkms.

Quoted 194 lines

---

See pipeline: https://gitlab.freedesktop.org/helen.fornazier/linux/-/pipelines/990494

v2:
- do not mv modules to /lib/modules in the job definition, leave it to crosvm-runner.sh

---
  MAINTAINERS                                   |  1 +
  drivers/gpu/drm/ci/build.sh                   |  1 -
  drivers/gpu/drm/ci/gitlab-ci.yml              |  1 +
  drivers/gpu/drm/ci/igt_runner.sh              |  6 ++--
  drivers/gpu/drm/ci/image-tags.yml             |  2 +-
  drivers/gpu/drm/ci/test.yml                   | 23 ++++++++++++++-
  drivers/gpu/drm/ci/x86_64.config              |  1 +
  .../drm/ci/xfails/virtio_gpu-none-flakes.txt  |  0
  drivers/gpu/drm/ci/xfails/vkms-none-fails.txt | 29 +++++++++++++++++++
  drivers/gpu/drm/ci/xfails/vkms-none-skips.txt | 10 +++++++
  10 files changed, 68 insertions(+), 6 deletions(-)

delete mode 100644 drivers/gpu/drm/ci/xfails/virtio_gpu-none-flakes.txt create mode 100644 drivers/gpu/drm/ci/xfails/vkms-none-fails.txt create mode 100644 drivers/gpu/drm/ci/xfails/vkms-none-skips.txt

MAINTAINERS +1 -0
index 740a2ce2689c..e47dbe31d221 100644
@@ -6813,6 +6813,7 @@ L:	[email protected]
  S:	Maintained
  T:	git git://anongit.freedesktop.org/drm/drm-misc
  F:	Documentation/gpu/vkms.rst
+F:	drivers/gpu/drm/ci/xfails/vkms*
  F:	drivers/gpu/drm/vkms/
 
  DRM DRIVER FOR VIRTUALBOX VIRTUAL GPU
drivers/gpu/drm/ci/build.sh +0 -1
index 7b014287a041..9e510e77098b 100644
@@ -146,7 +146,6 @@ fi
 
  mkdir -p artifacts/install/lib
  mv install/* artifacts/install/.
-rm -rf artifacts/install/modules
  ln -s common artifacts/install/ci-common
 
  for image in ${KERNEL_IMAGE_NAME}; do
drivers/gpu/drm/ci/gitlab-ci.yml +1 -0
index 522f83db1a07..c86ee5a51012 100644
@@ -120,6 +120,7 @@ stages:
    - rockchip
    - virtio-gpu
    - lint
+  - software-driver
 
  # YAML anchors for rule conditions
  # --------------------------------
drivers/gpu/drm/ci/igt_runner.sh +3 -3
index 2bb759165063..c7f83d1b72e9 100755
@@ -21,9 +21,9 @@ cat /sys/kernel/debug/dri/*/state
  set -e
 
  # Cannot use HWCI_KERNEL_MODULES as at that point we don't have the module in /lib
-if [ "$IGT_FORCE_DRIVER" = "amdgpu" ]; then
-    mv /install/modules/lib/modules/* /lib/modules/.
-    modprobe amdgpu
+if [ "$IGT_FORCE_DRIVER" = "amdgpu" || "$IGT_FORCE_DRIVER" = "vkms" ]; then
+    mv /install/modules/lib/modules/* /lib/modules/. || true
+    modprobe --first-time "$IGT_FORCE_DRIVER"
  fi
 
  if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-skips.txt" ]; then
drivers/gpu/drm/ci/image-tags.yml +1 -1
index f051b6c547c5..e05077ee29d2 100644
@@ -4,7 +4,7 @@ variables:
     DEBIAN_BASE_TAG: "${CONTAINER_TAG}"
 
     DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build"
-   DEBIAN_BUILD_TAG: "${CONTAINER_TAG}"
+   DEBIAN_BUILD_TAG: "2023-09-20-vkms-module-2"
 
     KERNEL_ROOTFS_TAG: "${CONTAINER_TAG}"
 
drivers/gpu/drm/ci/test.yml +22 -1
index 6473cddaa7a9..69a5337fd989 100644
@@ -332,4 +332,25 @@ virtio_gpu:none:
      - igt:x86_64
    rules:
      # TODO: current issue: malloc(): corrupted top size. Fix and remove this rule.
-    - when: never
\ No newline at end of file
+    - when: never
+
+vkms:none:
+  stage: software-driver
+  variables:
+    DRIVER_NAME: vkms
+    GPU_VERSION: none
+  extends:
+    - .test-gl
+  tags:
+    - kvm
+  script:
+    - ln -sf $CI_PROJECT_DIR/install /install
+    - mv install/bzImage /lava-files/bzImage
+    - mkdir -p /lib/modules
+    - mkdir -p $CI_PROJECT_DIR/results
+    - ln -sf $CI_PROJECT_DIR/results /results
+    - ./install/crosvm-runner.sh ./install/igt_runner.sh
+  needs:
+    - debian/x86_64_test-gl
+    - testing:x86_64
+    - igt:x86_64
\ No newline at end of file
drivers/gpu/drm/ci/x86_64.config +1 -0
index 1cbd49a5b23a..8eaba388b141 100644
@@ -24,6 +24,7 @@ CONFIG_DRM=y
  CONFIG_DRM_PANEL_SIMPLE=y
  CONFIG_PWM_CROS_EC=y
  CONFIG_BACKLIGHT_PWM=y
+CONFIG_DRM_VKMS=m
 
  # Strip out some stuff we don't need for graphics testing, to reduce
  # the build.
drivers/gpu/drm/ci/xfails/virtio_gpu-none-flakes.txt deleted +0 -0
deleted file mode 100644
index e69de29bb2d1..000000000000
drivers/gpu/drm/ci/xfails/vkms-none-fails.txt new file +29 -0
new file mode 100644
index 000000000000..a65196a19222
@@ -0,0 +1,29 @@
+kms_cursor_crc@cursor-rapid-movement-128x128,Fail
+kms_cursor_crc@cursor-rapid-movement-128x42,Fail
+kms_cursor_crc@cursor-rapid-movement-256x256,Fail
+kms_cursor_crc@cursor-rapid-movement-256x85,Fail
+kms_cursor_crc@cursor-rapid-movement-32x10,Fail
+kms_cursor_crc@cursor-rapid-movement-32x32,Fail
+kms_cursor_crc@cursor-rapid-movement-512x170,Fail
+kms_cursor_crc@cursor-rapid-movement-512x512,Fail
+kms_cursor_crc@cursor-rapid-movement-64x21,Fail
+kms_cursor_crc@cursor-rapid-movement-64x64,Fail
+kms_cursor_legacy@basic-flip-before-cursor-atomic,Fail
+kms_cursor_legacy@basic-flip-before-cursor-legacy,Fail
+kms_cursor_legacy@cursor-vs-flip-atomic,Fail
+kms_cursor_legacy@cursor-vs-flip-legacy,Fail
+kms_cursor_legacy@cursor-vs-flip-toggle,Fail
+kms_cursor_legacy@cursor-vs-flip-varying-size,Fail
+kms_cursor_legacy@cursorA-vs-flipA-toggle,Fail
+kms_cursor_legacy@flip-vs-cursor-atomic,Fail
+kms_cursor_legacy@flip-vs-cursor-crc-atomic,Fail
+kms_cursor_legacy@flip-vs-cursor-crc-legacy,Fail
+kms_cursor_legacy@flip-vs-cursor-legacy,Fail
+kms_flip@flip-vs-expired-vblank-interruptible,Fail
+kms_flip@plain-flip-fb-recreate,Fail
+kms_pipe_crc_basic@nonblocking-crc,Fail
+kms_pipe_crc_basic@nonblocking-crc-frame-sequence,Fail
+kms_pipe_crc_basic@suspend-read-crc,Fail
+kms_plane@plane-panning-bottom-right-suspend,Fail
+kms_universal_plane@universal-plane-pipe-A-sanity,Fail
+kms_vblank@pipe-A-ts-continuation-dpms-suspend,Fail
\ No newline at end of file
drivers/gpu/drm/ci/xfails/vkms-none-skips.txt new file +10 -0
new file mode 100644
index 000000000000..07aa62cff108
@@ -0,0 +1,10 @@
+# Hits:
+# rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
+# rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P749/1:b..l
+kms_prop_blob@invalid-get-prop
+
+# keeps printing vkms_vblank_simulate: vblank timer overrun and never ends
+kms_invalid_mode@int-max-clock
+
+# Suspend seems to be broken
+.*suspend.*
\ No newline at end of file
Signature · 1 line
2.34.1
#7 lore raw

Re: [PATCH v2 2/2] drm/ci: add tests on vkms

Quoted 9 lines · Jessica Zhang
Quoted 3 lines · Helen Koike

Add job that runs igt on top of vkms.

Thanks for the tests and reviews.

For some reason this is broken with the latest kernel, there is a memory issue with crosvm which is under investigation, so, maintainers, please do not pick this patch for now.

Thanks
Helen

Quoted 187 lines
Quoted 187 lines

---

See pipeline: https://gitlab.freedesktop.org/helen.fornazier/linux/-/pipelines/990494

v2:
- do not mv modules to /lib/modules in the job definition, leave it to crosvm-runner.sh
---
  MAINTAINERS                                   |  1 + drivers/gpu/drm/ci/build.sh                   |  1 - drivers/gpu/drm/ci/gitlab-ci.yml              |  1 + drivers/gpu/drm/ci/igt_runner.sh              |  6 ++-- drivers/gpu/drm/ci/image-tags.yml             |  2 +- drivers/gpu/drm/ci/test.yml                   | 23 ++++++++++++++- drivers/gpu/drm/ci/x86_64.config              |  1 + .../drm/ci/xfails/virtio_gpu-none-flakes.txt  |  0 drivers/gpu/drm/ci/xfails/vkms-none-fails.txt | 29 +++++++++++++++++++ drivers/gpu/drm/ci/xfails/vkms-none-skips.txt | 10 +++++++

  10 files changed, 68 insertions(+), 6 deletions(-)

  delete mode 100644 drivers/gpu/drm/ci/xfails/virtio_gpu-none-flakes.txt create mode 100644 drivers/gpu/drm/ci/xfails/vkms-none-fails.txt create mode 100644 drivers/gpu/drm/ci/xfails/vkms-none-skips.txt

MAINTAINERS +0 -0
index 740a2ce2689c..e47dbe31d221 100644
@@ -6813,6 +6813,7 @@ L:    [email protected]

  S:    Maintained
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  F:    Documentation/gpu/vkms.rst
+F:    drivers/gpu/drm/ci/xfails/vkms*
  F:    drivers/gpu/drm/vkms/
  DRM DRIVER FOR VIRTUALBOX VIRTUAL GPU

drivers/gpu/drm/ci/build.sh +0 -0
index 7b014287a041..9e510e77098b 100644
@@ -146,7 +146,6 @@ fi

  mkdir -p artifacts/install/lib
  mv install/* artifacts/install/.
-rm -rf artifacts/install/modules
  ln -s common artifacts/install/ci-common
  for image in ${KERNEL_IMAGE_NAME}; do

drivers/gpu/drm/ci/gitlab-ci.yml +0 -0
index 522f83db1a07..c86ee5a51012 100644
@@ -120,6 +120,7 @@ stages:

    - rockchip
    - virtio-gpu
    - lint
+  - software-driver
  # YAML anchors for rule conditions
  # --------------------------------

drivers/gpu/drm/ci/igt_runner.sh +0 -0
index 2bb759165063..c7f83d1b72e9 100755
@@ -21,9 +21,9 @@ cat /sys/kernel/debug/dri/*/state

  set -e
  # Cannot use HWCI_KERNEL_MODULES as at that point we don't have the module in /lib

drivers/gpu/drm/ci/igt_runner.sh +1 -3
-if [ "$IGT_FORCE_DRIVER" = "amdgpu" ]; then
-    mv /install/modules/lib/modules/* /lib/modules/.
-    modprobe amdgpu
+if [ "$IGT_FORCE_DRIVER" = "amdgpu" || "$IGT_FORCE_DRIVER" = "vkms" 

]; then
+    mv /install/modules/lib/modules/* /lib/modules/. || true +    modprobe --first-time "$IGT_FORCE_DRIVER"
  fi
  if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-skips.txt" ]; then

drivers/gpu/drm/ci/image-tags.yml +0 -0
index f051b6c547c5..e05077ee29d2 100644
@@ -4,7 +4,7 @@ variables:

     DEBIAN_BASE_TAG: "${CONTAINER_TAG}" DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build" -   DEBIAN_BUILD_TAG: "${CONTAINER_TAG}"
+   DEBIAN_BUILD_TAG: "2023-09-20-vkms-module-2"
     KERNEL_ROOTFS_TAG: "${CONTAINER_TAG}"

drivers/gpu/drm/ci/test.yml +0 -0
index 6473cddaa7a9..69a5337fd989 100644
@@ -332,4 +332,25 @@ virtio_gpu:none:

      - igt:x86_64
    rules:
      # TODO: current issue: malloc(): corrupted top size. Fix and remove this rule. -    - when: never
\ No newline at end of file
+    - when: never

drivers/gpu/drm/ci/test.yml +21 -0
+
+vkms:none:
+  stage: software-driver
+  variables:
+    DRIVER_NAME: vkms
+    GPU_VERSION: none
+  extends:
+    - .test-gl
+  tags:
+    - kvm
+  script:
+    - ln -sf $CI_PROJECT_DIR/install /install
+    - mv install/bzImage /lava-files/bzImage
+    - mkdir -p /lib/modules
+    - mkdir -p $CI_PROJECT_DIR/results
+    - ln -sf $CI_PROJECT_DIR/results /results
+    - ./install/crosvm-runner.sh ./install/igt_runner.sh
+  needs:
+    - debian/x86_64_test-gl
+    - testing:x86_64
+    - igt:x86_64
\ No newline at end of file
drivers/gpu/drm/ci/x86_64.config +0 -0
index 1cbd49a5b23a..8eaba388b141 100644
@@ -24,6 +24,7 @@ CONFIG_DRM=y

  CONFIG_DRM_PANEL_SIMPLE=y
  CONFIG_PWM_CROS_EC=y
  CONFIG_BACKLIGHT_PWM=y
+CONFIG_DRM_VKMS=m
  # Strip out some stuff we don't need for graphics testing, to reduce

  # the build.
drivers/gpu/drm/ci/xfails/virtio_gpu-none-flakes.txt deleted +0 -0
deleted file mode 100644
index e69de29bb2d1..000000000000
drivers/gpu/drm/ci/xfails/vkms-none-fails.txt new file +29 -0
new file mode 100644
index 000000000000..a65196a19222
@@ -0,0 +1,29 @@
+kms_cursor_crc@cursor-rapid-movement-128x128,Fail
+kms_cursor_crc@cursor-rapid-movement-128x42,Fail
+kms_cursor_crc@cursor-rapid-movement-256x256,Fail
+kms_cursor_crc@cursor-rapid-movement-256x85,Fail
+kms_cursor_crc@cursor-rapid-movement-32x10,Fail
+kms_cursor_crc@cursor-rapid-movement-32x32,Fail
+kms_cursor_crc@cursor-rapid-movement-512x170,Fail
+kms_cursor_crc@cursor-rapid-movement-512x512,Fail
+kms_cursor_crc@cursor-rapid-movement-64x21,Fail
+kms_cursor_crc@cursor-rapid-movement-64x64,Fail
+kms_cursor_legacy@basic-flip-before-cursor-atomic,Fail
+kms_cursor_legacy@basic-flip-before-cursor-legacy,Fail
+kms_cursor_legacy@cursor-vs-flip-atomic,Fail
+kms_cursor_legacy@cursor-vs-flip-legacy,Fail
+kms_cursor_legacy@cursor-vs-flip-toggle,Fail
+kms_cursor_legacy@cursor-vs-flip-varying-size,Fail
+kms_cursor_legacy@cursorA-vs-flipA-toggle,Fail
+kms_cursor_legacy@flip-vs-cursor-atomic,Fail
+kms_cursor_legacy@flip-vs-cursor-crc-atomic,Fail
+kms_cursor_legacy@flip-vs-cursor-crc-legacy,Fail
+kms_cursor_legacy@flip-vs-cursor-legacy,Fail
+kms_flip@flip-vs-expired-vblank-interruptible,Fail
+kms_flip@plain-flip-fb-recreate,Fail
+kms_pipe_crc_basic@nonblocking-crc,Fail
+kms_pipe_crc_basic@nonblocking-crc-frame-sequence,Fail
+kms_pipe_crc_basic@suspend-read-crc,Fail
+kms_plane@plane-panning-bottom-right-suspend,Fail
+kms_universal_plane@universal-plane-pipe-A-sanity,Fail
+kms_vblank@pipe-A-ts-continuation-dpms-suspend,Fail
\ No newline at end of file
drivers/gpu/drm/ci/xfails/vkms-none-skips.txt new file +6 -0
new file mode 100644
index 000000000000..07aa62cff108
@@ -0,0 +1,10 @@
+# Hits:
+# rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
+# rcu:     Tasks blocked on level-0 rcu_node (CPUs 0-1): P749/1:b..l
+kms_prop_blob@invalid-get-prop
+
+# keeps printing vkms_vblank_simulate: vblank timer overrun and never 

ends

drivers/gpu/drm/ci/xfails/vkms-none-skips.txt new file +4 -0
+kms_invalid_mode@int-max-clock
+
+# Suspend seems to be broken
+.*suspend.*
\ No newline at end of file
Signature · 1 line
2.34.1