Hi Emil, On 14 February 2017 at 09:48, Daniel Stone <[email protected]> wrote: > On 13 February 2017 at 23:42, Emil Velikov <[email protected]> wrote: >> 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.
I couldn't think of quite what was bothering me about your mail, but figured it out on a re-read. 'matches_seat && boot_vga' is _not_ sufficient; if, for whatever reason, our boot_vga device does not actually expose any modesetting primitives, then we cannot use it for modesetting, so we must discard it. IOW, matches_seat and is_kms are _mandatory_ tests, whilst boot_vga is an optional test, used only for preference. So, any (matches_seat && boot_vga && is_kms) device will always be returned by this function, however in the absence of such a device, we may return a (matches_seat && is_kms) device. Any device which fails either of the latter two tests must be discarded. v5 inbound. Cheers, Daniel _______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
