compositor-drm: create heads for all connectors
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 8 Sep 2017 12:48:07 +0000 (15:48 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Wed, 18 Apr 2018 08:53:54 +0000 (11:53 +0300)
commitd2e6242e3ca07f291c3b2ce11ab23fd483096e59
tree31ea4ae4988cdb14d2325b32ab880e6c96d191ea
parent4be248550259a6794157e9bd46d17a1f66f37a72
compositor-drm: create heads for all connectors

In previous patches, all the appropriate fields from drm_output have
been moved into drm_head, and resource allocation has been moved away
from drm_output creation. It is time to throw the switch: this patch
disconnects the drm_output and drm_head lifetimes.

Previously a drm_output was created for a connected connector and
destroyed on disconnection. A drm_head was tied to the drm_output
lifetime just to accommodate the head-based output configuration API
temporarily.

Now all connectors will get a head created regardless of their
connection status. Heads are created and destroyed as connectors appear
and disappear (MST), not when they get connected or disconnected. This
should allow the compositor to force-enable a disconnected connector.

An "empty" drm_output is created with weston_backend::create_output()
hook. This now follows the intent of the head-based output configuration
API.

On hotplug events, all connectors' information is updated regardless of
their connection status changes. It is theoretically possible for a
monitor to change without going through a disconnected state in between.

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