cms-colord: find a good head
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 4 Apr 2017 13:36:07 +0000 (16:36 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 12 Apr 2018 11:26:17 +0000 (14:26 +0300)
commitcf0a476b8e22950b2f4183b12b0690d8ab392d92
tree52e07ea2cd943ad843b62db63aa3f92fffb9380a
parent06f99efc9c417eefb8046bf64a84869d698a0be5
cms-colord: find a good head

The 'head' member of 'struct weston_output' is going to go unused and
then disappear, so stop using it and find a head from the proper list.

However, this leaves a problem in cms-colord: if you have multiple
monitors driver with the same CRTC, what do you say to the color
management system? The monitors could be different, but all the color
LUTs etc. are in the CRTC and are shared, as is the framebuffer.

Do the simple hack here and just use whatever head happens to be the
first in the list.

The warning is printed in get_output_id(), because if heads are added or
removed while the output is enabled, the id could change.

v6:
- add weston_output_get_first_head(), at first use
- add warning message for nr. heads > 1

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Ian Ray <ian.ray@ge.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Derek Foreman <derekf@osg.samsung.com>
compositor/cms-colord.c
libweston/compositor.c
libweston/compositor.h