Code Monkey home page Code Monkey logo

Comments (6)

Slabity avatar Slabity commented on August 16, 2024 1

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.

Slabity avatar Slabity commented on August 16, 2024 1

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.

Drakulix avatar Drakulix commented on August 16, 2024

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.

Drakulix avatar Drakulix commented on August 16, 2024

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

from drm-rs.

Slabity avatar Slabity commented on August 16, 2024

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.

Slabity avatar Slabity commented on August 16, 2024

Closing in favor of tracking #25

from drm-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.