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

Daniel Stone daniel at fooishbar.org
Tue Feb 14 09:48:24 UTC 2017


Hi Emil,

On 13 February 2017 at 23:42, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> 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.

Sure, I can do this.

>> +               /* 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.

OK, good point. Beginning to wish I never sent this, but will send v5
later on today.

Cheers,
Daniel


More information about the wayland-devel mailing list