compositor-drm: move connector fields into drm_head
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 31 Aug 2017 13:18:48 +0000 (16:18 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Wed, 18 Apr 2018 08:44:30 +0000 (11:44 +0300)
commitc1e89ba2f4f0a29ddfe5b99e9cd8efaec19a6371
tree15a55a68695ef20944794751be211bc713b3f705
parentce72424d296aa70d1e056a64a26a8bea29a1fa39
compositor-drm: move connector fields into drm_head

Move the connector related fields from drm_output to the drm_head. A
drm_head represents a connector for now.

The code in drm_head_create() to update connector data, monitor
information, etc. is moved into a new function. This will be useful when
DRM-backend starts creating heads for all connectors regardless of their
connection status and will need to update them on hotplug events.

While incurring the churn to move several fields into struct drm_head,
also refactor out drm_head_assign_connector_info(). This function is
needed later when drm_heads will exist regardless of connected status,
as every hotplug event will need to update the state of all connectors.
At that point we will also start handling connector changes that do not
go through an intermediate disconnected state. This refactoring is
trivial enough to be in this patch to reduce the total amount of changes
to be reviewed.

v6:
- adapt to the new places of updating unused_connectors
- free connector in create_output_for_connector() error path

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Derek Foreman <derekf@osg.samsung.com>
libweston/compositor-drm.c