compositor-drm: factor out drm_output_init_crtc()
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 5 Sep 2017 13:11:15 +0000 (16:11 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 12 Feb 2018 14:48:23 +0000 (16:48 +0200)
commitfc5f5d7126e8da9ff5416f15325b6ef30743ad88
treeca51f84b673028c37ea0a00ea6c8864751581333
parentc4db6f762922d76ca200fa4f392c736a3ad9c104
compositor-drm: factor out drm_output_init_crtc()

Factor out drm_output_init_crtc() and drm_output_fini_crtc(), so that
the call sites can later be moved easily.

On fini, reset scanout_plane and cursor_plane to NULL, so that in the
future when the drm_output is not longer destroyed immediately after, we
free the planes for other use.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Ian Ray <ian.ray@ge.com>
[Pekka: set crtc_id/pipe at top, reset both on error]
Reviewed-by: Daniel Stone <daniels@collabora.com>
libweston/compositor-drm.c