compositor-fbdev: migrate to head-based output API
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 14 Sep 2017 13:50:44 +0000 (16:50 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 17 Apr 2018 12:19:57 +0000 (15:19 +0300)
commit2305812296a23bb7e3c1d36831700b233ac9036d
treea45cf6ad7caa8e48921f2790d9922b5e4ef7cb1d
parent55916d54ceb0b94321946a4b497208992768cb9b
compositor-fbdev: migrate to head-based output API

Implement the head-based output API in this backend, and stop relying on
the implicit weston_output::head.

The split between fbdev_head and fbdev_output is somewhat arbitrary.
There is no hotplug or unplug, and there is always 1:1 relationship.
Struct fbdev_screeninfo could have been split as well, but it would not
have made much difference.

I chose fbdev_output to carry the mmap details (buffer_length is now
duplicated here), and fbdev_head to carry the display parameters and
device node path. The device node identifies the head, similar to a
connector.

The backend init creates a head. The compositor uses it to create an
output. Libweston core attaches the head automatically after creating
the output. The attach hook is a suitable place to set up the video
modes on the output as they are dictated by the head, it would be too
late at enable() time.

v7:
- use name argument instead of hardcoded "fbdev" in
  fbdev_output_create()

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