Skip to content

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.
Copy link
Member

@notgull notgull left a comment

Choose a reason for hiding this comment

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

Thanks!

@notgull notgull merged commit c020394 into master Jan 1, 2025
38 checks passed
@notgull notgull deleted the drm-card1 branch January 1, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants