Comments (6)
Hey @Drakulix, I would definitely appreciate the help!
The end goal of this crate is to support all the features that the DRM API exposes, and act as a full replacement to mesa's libdrm. I do not have a concrete roadmap, but right now I'd like to get legacy modesetting (as in non-atomic) features working. You can use https://cgit.freedesktop.org/mesa/drm/tree/xf86drmMode.c as a guide of functions to be provided and how libdrm implements them. This is a rough state of how the crate is right now in terms of libdrm's functions:
Basic resources:
- drmModeGetResources
- drmModeGetConnector
- drmModeGetEncoder
- drmModeGetCrtc
- drmModeSetCrtc
- drmModeCrtcGetGamma
- drmModeCrtcSetGamma
- drmModeGetFB
- drmModeAddFB
- drmModeAddFB2
- drmModeAddFB2WithModifiers
- drmModeRmFB
- drmModeDirtyFB
- drmModeConnectorSetProperty (Not sure if this is necessary with below property functions)
Plane and cursor resources:
- drmModeGetPlaneResources
- drmModeGetPlane
- drmModeSetPlane
- drmModeSetCursor
- drmModeSetCursor2
- drmModeMoveCursor
Properties (mostly for atomic-modesetting):
- drmModeObjectGetProperties
- drmModeGetProperty
- drmModeObjectSetProperty
- drmModeGetPropertyBlob
Page flipping:
- drmModePageFlip
- drmModePageFlipTarget
- drmHandleEvent (usually page flipping)
Currently, legacy modesetting works (with drmModeSetCrtc), creating framebuffers from GEM buffers work, and I have also just finished dumb buffer creation and mapping. With those, you can technically get it to work as a backend for more complex rendering programs.
I also apologize for the multiple refactors. I'm still learning new (mostly undocumented) things about the DRM API that require different implementations.
I will try to explain how the library is laid out in the readme. Just give me a day or two.
from drm-rs.
I've added documentation to most of the control
module and a readme with some very basic instructions. I'll go into more depth soon.
Ask any questions you may have.
from drm-rs.
Thanks! This looks like I can just start with some of the easier functions to get a hang of it, once you have written that README and then focus on the stuff, I need.
I will wait, no need to rush anything.
from drm-rs.
Finally got some time. I added some questions to my first PR #4 .
Let me know what you think @Slabity :)
from drm-rs.
Looks good to me. I've cleaned up my warnings and test file a bit. Hopefully the legacy_modeset
test is descriptive enough to refer to.
from drm-rs.
Closing in favor of tracking #25
from drm-rs.
Related Issues (20)
- Support for driver-specific APIs HOT 1
- Missing zero in control/mod.rs? HOT 2
- thread 'main' panicked at 'Could not set CRTC: InvalidArgument' in Examples/legacy_modeset.rs HOT 13
- Atomic mode setting compatibility with libdrm HOT 2
- transmuting Vec might lead to undefined behavior HOT 9
- Failing to get encoders for connector HOT 4
- Atomic modesetting on RPi HOT 12
- Expose drm_sys::drm_clip_rect in the main crate HOT 2
- invalid link HOT 1
- Automate binding updates + Use kernel rather than libdrm HOT 3
- Export drm RDWR/CLOEXEC flags HOT 1
- Async atomic flips
- Various valgrind errors related to uninitialized memory HOT 2
- Consider replacing drm-sys with linux-raw-sys HOT 5
- Taking screenshot HOT 1
- No license file HOT 1
- 0.3.x stable Rust support HOT 4
- Continuous integration using Github Actions HOT 2
- Is the main branch abandoned ? HOT 2
- [Question] Failed to create framebuffer HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drm-rs.