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

Add riscv64 bindings #175

Closed
wants to merge 1 commit into from
Closed

Add riscv64 bindings #175

wants to merge 1 commit into from

Conversation

Vixea
Copy link

@Vixea Vixea commented Oct 24, 2023

No description provided.

@Drakulix
Copy link
Member

I don't think there exists any easily accessible risc-based CI. So... I don't know if we want to include these bindings as a best effort (and make them go outdated frequently) or just advise users to use the use_bindgen feature...

@Vixea
Copy link
Author

Vixea commented Oct 24, 2023

Hmm, what would make these bindings get outdated I basically run my riscv machine constantly so if I could possibly find a way to check that it would be easy to solve

@Drakulix
Copy link
Member

Hmm, what would make these bindings get outdated I basically run my riscv machine constantly so if I could possibly find a way to check that it would be easy to solve

New kernels

@Vixea
Copy link
Author

Vixea commented Oct 24, 2023

Considering this was run on kernel version 5.10 it might already be outdated

@Drakulix
Copy link
Member

Which is exactly why CI would be nice. Looking at our CI file, we already use QEMU + ubuntu-ports for a bunch of targets anyway and they seem to have a riscv64 target, we just don't generate for that, because nobody cared. Could you try to fix that?

@Vixea
Copy link
Author

Vixea commented Oct 24, 2023

I can try again, not exactly a ci master

@ids1024
Copy link
Member

ids1024 commented Oct 24, 2023

or just advise users to use the use_bindgen feature...

It's awkward when using Smithay to have to enable this for several different dependencies.

It could automatically use that when generated bindings don't already exist, but bindgen would have to be a hard dependency. Or Cargo.toml would have to specify it as required on exactly the architecture/OS pairs where there aren't currently bindings.

New kernels

The kernel ABI should be stable, so the existing version continues to work, right? I guess it just needs to be regenerated when their are new ioctls/etc that drm-rs adds support for?

@ids1024
Copy link
Member

ids1024 commented Oct 24, 2023

It seems the bindings here are the same as x86_64 and aarch64. While arm and x86 differ only in the definition of __kernel_size_t.

The same DRM headers are used on Linux and BSDs. See in https://github.com/torvalds/linux/blob/master/include/uapi/drm/drm.h the #elif defined(__linux__), #else /* One of the BSDs */.

So I think we could just generate one version of the bindings if we manually specify __kernel_size_t for Linux architectures where it varies. And drm_handle_t, which is unsigned int on Linux and unsigned long on BSD.

@Vixea Vixea force-pushed the riscv branch 2 times, most recently from 158cef0 to 854c05a Compare October 24, 2023 21:28
@ids1024
Copy link
Member

ids1024 commented Oct 24, 2023

#176 has a possible solution for this, though CI still needs to be updated.

@Vixea
Copy link
Author

Vixea commented Nov 1, 2023

Closed in favor of #176

@Vixea Vixea closed this Nov 1, 2023
@Vixea Vixea deleted the riscv branch November 1, 2023 07:32
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.

3 participants