Skip to content

fix: select connected DRM card for KMSCube #430

Merged
abbajaj806 merged 2 commits intoqualcomm-linux:mainfrom
smuppand:Display
Apr 29, 2026
Merged

fix: select connected DRM card for KMSCube #430
abbajaj806 merged 2 commits intoqualcomm-linux:mainfrom
smuppand:Display

Conversation

@smuppand
Copy link
Copy Markdown
Contributor

Fixes #420

This PR fixes KMSCube failures on multi-DRM-card platforms where a valid display is connected but kmscube still fails with:

no connected connector!
failed to initialize legacy DRM

Why this PR is needed:

  • On affected platforms such as Lemans RideSX, sysfs reports a connected and enabled display on a specific DRM card, for example card1-DP-3.
  • The existing KMSCube test only checked that some display was connected, but then ran kmscube without specifying the DRM device.
  • On systems with multiple DRM cards, kmscube may auto-open a different card that has no connected connector, causing a false test failure even though a monitor is attached and valid.
  • This is especially visible when kmscube falls back to legacy DRM modesetting, where correct DRM card selection is required.

@smuppand
Copy link
Copy Markdown
Contributor Author

Refer the job with these changes: https://lava.infra.foundries.io/scheduler/job/189609

@bhargav0610 bhargav0610 added CSE_MM This Tag is used for tracking all the MM issues and removed CSE_MM This Tag is used for tracking all the MM issues labels Apr 28, 2026
@smuppand smuppand requested a review from abbajaj806 April 29, 2026 04:22
Comment thread Runner/utils/lib_display.sh
Comment thread Runner/utils/lib_display.sh
Comment thread Runner/suites/Multimedia/Graphics/KMSCube/run.sh
Add display_select_primary_drm_device() to map the selected connected
DRM connector to its owning /dev/dri/cardN device.

This allows DRM/KMS tests to avoid relying on application-side default
card selection on systems with multiple DRM cards.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Update KMSCube to use the DRM card selected from the connected sysfs
connector instead of relying on kmscube default device selection.

On multi-card systems, kmscube may auto-open a card without a connected
connector and fail with "no connected connector!" even when a monitor is
attached to another card. The test now maps the connected connector to
/dev/dri/cardN and passes it to kmscube with -D, while preserving the
existing fallback behavior when the card cannot be resolved.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Copy link
Copy Markdown
Contributor

@abbajaj806 abbajaj806 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abbajaj806 abbajaj806 merged commit cc5d891 into qualcomm-linux:main Apr 29, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Graphics test failure on lemans Ridesx devices

3 participants