While looping for devices, save the match as fdev. if a boot_vga device is found, set that to dev as the device to use,. If one is not found, set dev to fdev, and that will be the device to use
Details
Diff Detail
- Repository
- rEFL core/efl
- Lint
Lint Skipped - Unit
Unit Tests Skipped
I don't know that we should implement any manner of fallback if, say, seat1 has no specified gpu? If seat1 doesn't have a specified gpu it probably shouldn't be capable of running an independent compositor at all?
Shouldn't you just tag a gpu for the seat in udev and make things work that way?
This is fallback for if there is no boot_vga video device. (not that there's no video device at all) It's preferable to use it, but according to Weston, there's only one on a system
https://cgit.freedesktop.org/wayland/weston/tree/libweston/compositor-drm.c#n3730
so it's not guaranteed to be assigned to the seat.
Ah, ok, so the idea is that if the boot_vga device isn't assigned to seat1 but some other gpu is, we work. That makes sense.
I've pushed a slight rework of this patch that should be functionally similar, but simpler in implementation.
src/lib/ecore_drm2/ecore_drm2_device.c | ||
---|---|---|
163 | Broken formatting... |
I am looking at https://git.enlightenment.org/core/efl.git/tree/src/lib/ecore_drm2/ecore_drm2_device.c?id=0d845ce3aa88738e5313d81745f882e011333204#n144
...maybe I'm wrong, but it looks like chosen_dev only gets set if the parent device is PCI, (so I don;t know how that works with DisplayLink devices)...
...I think the
chosen_dev = dev;
should be moved above the
if (dparent)
line IMHO.