[PATCH weston v4] compositor-drm: Ignore non-KMS devices

Emil Velikov emil.l.velikov at gmail.com
Mon Feb 13 23:42:51 UTC 2017


On 13 February 2017 at 18:57, Daniel Stone <daniels at collabora.com> wrote:

>  /*
>   * Find primary GPU
>   * Some systems may have multiple DRM devices attached to a single seat. This
Completely forgot: we want to update the comment above the function.

> +               /* Make sure this device is actually capable of modesetting. */
> +               if (!drm_device_is_kms(b, device)) {
> +                       udev_device_unref(device);
> +                       continue;
> +               }
> +
Thinking about this a bit more this won't fly either, I'm afraid. In
the previous version we'll keep potentially old/unwanted device open,
leaking. While this this version we'll never call
weston_launcher_open() in the case of boot_vga=1.
I would split out the is_kms heuristic from the setup part, as the the
latter must be common for both boot_vga and is_kms cases.

So you'll need some tracking of the [first] fd & filename similar to
how drm_device is handled. Thus, as newer more suitable device (either
matches_seat && boot_vga or matches_seat && is_kms) is found the old
data is torn down.

Thanks
Emil


More information about the wayland-devel mailing list