-
Notifications
You must be signed in to change notification settings - Fork 53
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
Update drm sys to get new caps #190
Update drm sys to get new caps #190
Conversation
Well this fails as CI generates its own binding for the older version of DRM. |
Fixes #186 as well |
closes #189 as well |
The best solution would be to query the headers from another source. E.g. directly from kernel sources. |
Done, included the kernel headers and added a feature to generate from them instead of libdrm ones. Now it looks like latest nightly rust is not happy about our type casts, that appear to be correct as far as I can tell: Error logs
error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused
--> src/control/mod.rs:1133:34
|
1128 | let event = unsafe { &*(self.event_buf.as_ptr().add(self.i) as *const ffi::drm_event) };
| --------------------------------------------------------------- backing allocation comes from here
...
1133 | unsafe { &*(event as *const _ as *const ffi::drm_event_vblank) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: casting from `drm_event` (8 bytes) to `drm_event_vblank` (32 bytes)
= note: `#[deny(invalid_reference_casting)]` on by default
Anyway, that's unrelated to this PR. Disabled the lint for now |
9241a76
to
614fd85
Compare
Ping, anything more I can do to move this forward? |
Sorry, forgot to take a look at this. Looks mostly good to me, I wonder though, if we can add the update.sh as a step to the |
Added a download headers step right before bindgen is called, and this seems to do the trick (at least on my test repo) |
I am confused, looking through your PR, I saw that we already added downloading kernel headers at some point here: https://github.com/Smithay/drm-rs/pull/176/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR195-R199 So maybe that isn't necessary and we can just merge this without? |
4ad92f6
to
d7467bb
Compare
Dropped the kernel gen commits and created the backup branch for them But yeah, the CI seems to be downgrading the bindings now 🤷 |
The So do we disable regeneration for check steps, or fetch in them as well? |
I guess fetch as well? We would want to use the same ones throughout after all. |
@Drakulix Done, we now fetch on check steps as well, and CI is happy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Atomic async page flip needs new capabilities from the kernel, this updates drm-rs to include those, as well as some unrelated Client caps.
related: Smithay/smithay#1325