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

Looking to contributing / Roadmap? #3

Closed
Drakulix opened this issue Jul 13, 2017 · 6 comments
Closed

Looking to contributing / Roadmap? #3

Drakulix opened this issue Jul 13, 2017 · 6 comments

Comments

@Drakulix
Copy link
Member

Hey there,
as I am currently trying to develop a drm backend for smithay and I am in need of a working drm library I am looking into contributing to this library.

Do you have some kind of roadmap what still needs to be done? It currently seems to be lacking quite a bit functionality, I immediately did run into problems trying to find something like drmHandleEvent and I expect more to be missing, but this looks the most promising of all of them.

I do not have very deep knowledge about libdrm, so some hints on whats easy to do and some references would be nice.

Thanks for you work,
Drakulix

@Slabity
Copy link
Collaborator

Slabity commented Jul 14, 2017

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.

@Drakulix
Copy link
Member Author

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.

@Slabity
Copy link
Collaborator

Slabity commented Jul 17, 2017

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.

@Drakulix
Copy link
Member Author

Drakulix commented Jul 28, 2017

Finally got some time. I added some questions to my first PR #4 .
Let me know what you think @Slabity :)

@Slabity
Copy link
Collaborator

Slabity commented Jul 28, 2017

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.

@Slabity
Copy link
Collaborator

Slabity commented Feb 12, 2018

Closing in favor of tracking #25

@Slabity Slabity closed this as completed Feb 12, 2018
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

No branches or pull requests

2 participants