-
-
Notifications
You must be signed in to change notification settings - Fork 182
[add] Add Drm fd support #501
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
base: master
Are you sure you want to change the base?
Conversation
This allows to start flutter-pi on a specific DRM fd, instead of letting the tool locking the DRM master. This can be useful if we have several screens and we want to display the flutter-pi content on a specific one, while not locking others. This works well with the drm-lease-manager project (https://github.com/AGLExport/drm-lease-manager/tree/master)
|
Hey, thanks for the PR! I've seen DRM lease manager before; do you have a quick summary on how I would use this together with lease manager? did you build a small shell around flutter-pi that calls |
|
Yes indeed ! (Personally, I created a systemd service for it to start at boot) Then, the idea is to write a wrapper around whatever app you want to launch, as long as it accept a drm fd as input. Again, everything is better with example 😄 Example on how to use the wrapper : with flutterpi-cmd.conf which contains : Other example with gstreamer (that accepts drm fd through kmssink) : with gstreamer-cmd.conf which contains : And here is the lease_launcher.c wrapper : (Comments are in french, sorry 😉 ) |
Hello,
First of all, thanks for this nice project !
I open this PR because I encounter a limitation in my use case.
In fact, I work on an embedded device that have 2 connectors (LVDS-1 and HDMI-A-1), but on the same drm device /dev/dri/card0.
My goal is to have flutter-pi running on the LVDS screen, while the HDMI screen is displaying something else. As far as I can understand, this is not possible because flutter-pi is locking the drm master.
That's why I added the option "--drm-fd" to the flutter-pi command-line that takes a valid and opened drm file descriptor.
I used the drm-lease-manager (https://github.com/AGLExport/drm-lease-manager) to create a lease on the wanted connector, and passed the fd retrieve with the client API.
This works like a charm, and the behaviour is the same as before if the --drm-fd option is not passed :)
I did my best to understand and modify the original code as little as possible.
Any suggestions/improvements/tips are welcome 👍