Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples/drm: Don't force card{i} enumeration to start at 0 #245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MarijnS95
Copy link
Member

On my setup with an AMD RX6800XT GPU (same happens with an Intel Arc GPU) there is only card1 and renderD128. The example would fail with a "File not found" error for /dev/dri/card0 when it should instead continue to iterate to find the first valid DRM device.

A more future-proof solution would be to replace the 0..10 range with a readdir()-like iterator over the contents of /dev/dri if that's accepted for an example. Note that drm 0.14.0 added wrappers for dealing with /dev/dri files and Smithay/drm-rs#208 is adding exactly the iterator we need to find the first valid device, which I'd recommend to use in our iterator instead when released :)

On my setup with an AMD RX6800XT GPU (same happens with an Intel Arc
GPU) there is only `card1` and `renderD128`.  The example would fail
with a "File not found" error for `/dev/dri/card0` when it should
instead continue to iterate to find the first valid DRM device.

A more future-proof solution would be to replace the `0..10` range with
a `readdir()`-like iterator over the contents of `/dev/dri` if that's
accepted for an example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant