Head-based output configuration API a.k.a clone mode infrastructure

Submitted by Pekka Paalanen on Oct. 31, 2017, 11:48 a.m.

Details

Reviewer None
Submitted Oct. 31, 2017, 11:48 a.m.
Last Updated June 6, 2018, 11:30 a.m.
Revision 5

Cover Letter

From: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

Hi all,

all of the clone mode infrastructure has landed. There is just this one
patch remaining that actually allows one to use it through weston.ini.

Mind, this may be hard to test, because most contemporary PC graphics
devices might not support shared-CRTC clone mode at all. So if you try
this and face a frozen or black screen, it's likely that your hardware
just doesn't support this. An indication of no support is an error in
Weston log saying "atomic: couldn't commit new state" or "set mode
failed". Unfortunately, Weston does not recover from modeset failures
yet, but you should be able to quit gracefully with the usual
Ctrl+Alt+Backspace. You can still see in the Weston log how Weston tried
to configure clone mode.

I have used an i.MX6 based system to test.

This is also available in a GitLab(!) branch here along with the other
patch (force-on output) depending on this one:
https://gitlab.freedesktop.org/pq/weston/commits/clonemode-v10


The old Phabricator task (obsolete):
https://phabricator.freedesktop.org/T7727
The GitLab issue:
https://gitlab.freedesktop.org/wayland/weston/issues/22


Thanks,
pq

Pekka Paalanen (1):
  weston: support clone mode on DRM-frontend

 compositor/main.c  | 492 ++++++++++++++++++++++++++++++++++++++++++++++++++---
 man/weston-drm.man |  12 ++
 2 files changed, 484 insertions(+), 20 deletions(-)
  

Revisions

Patches download mbox

# Name Submitter State
[weston,v3,01/36] weston: arm SEGV handler earlier Pekka Paalanen Accepted
[weston,v3,02/36] libweston: introduce weston_head Pekka Paalanen Superseded
[weston,v3,03/36] libweston: move wl_output to weston_head Pekka Paalanen Superseded
[weston,v3,04/36] libweston: use head in wl_output global Pekka Paalanen Superseded
[weston,v3,05/36] libweston: make wl_output point to weston_head Pekka Paalanen Superseded
[weston,v3,06/36] libweston: refactor weston_mode_switch_finish Pekka Paalanen Accepted
[weston,v3,07/36] libweston: introduce weston_output::head_list Pekka Paalanen Superseded
[weston,v3,08/36] libweston: strdup head make, model, serial_number Pekka Paalanen Accepted
[weston,v3,09/36] cms-colord: find a good head Pekka Paalanen Superseded
[weston,v3,10/36] libweston: add name to weston_head Pekka Paalanen Accepted
[weston,v3,11/36] libweston: add weston_head::connected Pekka Paalanen Superseded
[weston,v3,12/36] libweston: add compositor list of heads Pekka Paalanen Accepted
[weston,v3,13/36] libweston: add heads_changed hook Pekka Paalanen Superseded
[weston,v3,14/36] libweston: new head-based output management API Pekka Paalanen Superseded
[weston,v3,15/36] libweston: add weston_head destroy signal Pekka Paalanen Accepted
[weston,v3,16/36] libweston: add weston_head_is_device_changed() API Pekka Paalanen Superseded
[weston,v3,17/36] weston: move weston_output_enable() into callers Pekka Paalanen Accepted
[weston,v3,18/36] weston: migrate headless to head-based output API Pekka Paalanen Superseded
[weston,v3,19/36] weston: migrate x11 to head-based output API Pekka Paalanen Accepted
[weston,v3,20/36] weston: migrate wayland to head-based output API Pekka Paalanen Accepted
[weston,v3,21/36] weston: migrate fbdev to head-based output API Pekka Paalanen Superseded
[weston,v3,22/36] weston: migrate RDP to head-based output API Pekka Paalanen Superseded
[weston,v3,23/36] weston: migrate DRM to head-based output API Pekka Paalanen Superseded
[weston,v3,24/36] libweston: change windowed_output_api output_create to create_head Pekka Paalanen Accepted
[weston,v3,25/36] libweston: remove output_pending_signal Pekka Paalanen Superseded
[weston,v3,26/36] libweston: stop auto-adding the implicit head Pekka Paalanen Accepted
[weston,v3,27/36] libweston: assert make/model in weston_output_enable() Pekka Paalanen Accepted
[weston,v3,28/36] libweston: assert current_mode in weston_output_enable() Pekka Paalanen Accepted
[weston,v3,29/36] libweston: cancel idle_repaint on output destroy Pekka Paalanen Accepted
[weston,v3,30/36] compositor-headless: migrate to head-based output API Pekka Paalanen Superseded
[weston,v3,31/36] compositor-rdp: migrate to head-based output API Pekka Paalanen Superseded
[weston,v3,32/36] compositor-fbdev: make re-enable less drastic Pekka Paalanen Accepted
[weston,v3,33/36] compositor-fbdev: migrate to head-based output API Pekka Paalanen Superseded
[weston,v3,34/36] compositor-x11: migrate to head-based output API Pekka Paalanen Superseded
[weston,v3,35/36] compositor-wayland: strict surface create/destroy Pekka Paalanen Accepted
[weston,v3,36/36] compositor-wayland: migrate to head-based output API Pekka Paalanen Superseded

Patches download mbox

# Name Submitter State
[weston,v5,01/36] libweston: introduce weston_head Pekka Paalanen Superseded
[weston,v5,02/36] libweston: move wl_output to weston_head Pekka Paalanen Superseded
[weston,v5,03/36] libweston: use head in wl_output global Pekka Paalanen Accepted
[weston,v5,04/36] libweston: make wl_output point to weston_head Pekka Paalanen Superseded
[weston,v5,05/36] libweston: refactor weston_mode_switch_finish Pekka Paalanen Superseded
[weston,v5,06/36] libweston: introduce weston_output::head_list Pekka Paalanen Superseded
[weston,v5,07/36] libweston: properly orphan wl_output resources Pekka Paalanen Accepted
[weston,v5,08/36] libweston: strdup head make, model, serial_number Pekka Paalanen Superseded
[weston,v5,09/36] cms-colord: find a good head Pekka Paalanen Superseded
[weston,v5,10/36] libweston: add name to weston_head Pekka Paalanen Superseded
[weston,v5,11/36] libweston: add weston_head::connected Pekka Paalanen Superseded
[weston,v5,12/36] libweston: add compositor list of heads Pekka Paalanen Superseded
[weston,v5,13/36] libweston: add heads_changed hook Pekka Paalanen Superseded
[weston,v5,14/36] libweston: new head-based output management API Pekka Paalanen Superseded
[weston,v5,15/36] libweston: add weston_head destroy signal Pekka Paalanen Superseded
[weston,v5,16/36] libweston: add weston_head_is_device_changed() API Pekka Paalanen Superseded
[weston,v5,17/36] weston: move weston_output_enable() into callers Pekka Paalanen Superseded
[weston,v5,18/36] weston: migrate headless to head-based output API Pekka Paalanen Superseded
[weston,v5,19/36] weston: migrate x11 to head-based output API Pekka Paalanen Superseded
[weston,v5,20/36] weston: migrate wayland to head-based output API Pekka Paalanen Superseded
[weston,v5,21/36] weston: migrate fbdev to head-based output API Pekka Paalanen Superseded
[weston,v5,22/36] weston: migrate RDP to head-based output API Pekka Paalanen Superseded
[weston,v5,23/36] weston: migrate DRM to head-based output API Pekka Paalanen Superseded
[weston,v5,24/36] libweston: change windowed_output_api output_create to create_head Pekka Paalanen Superseded
[weston,v5,25/36] libweston: remove output_pending_signal Pekka Paalanen Superseded
[weston,v5,26/36] libweston: stop auto-adding the implicit head Pekka Paalanen Superseded
[weston,v5,27/36] libweston: assert make/model in weston_output_enable() Pekka Paalanen Superseded
[weston,v5,28/36] libweston: assert current_mode in weston_output_enable() Pekka Paalanen Superseded
[weston,v5,29/36] libweston: cancel idle_repaint on output destroy Pekka Paalanen Superseded
[weston,v5,30/36] compositor-headless: migrate to head-based output API Pekka Paalanen Superseded
[weston,v5,31/36] compositor-rdp: migrate to head-based output API Pekka Paalanen Superseded
[weston,v5,32/36] compositor-fbdev: make re-enable less drastic Pekka Paalanen Superseded
[weston,v5,33/36] compositor-fbdev: migrate to head-based output API Pekka Paalanen Superseded
[weston,v5,34/36] compositor-x11: migrate to head-based output API Pekka Paalanen Superseded
[weston,v5,35/36] compositor-wayland: strict surface create/destroy Pekka Paalanen Superseded
[weston,v5,36/36] compositor-wayland: migrate to head-based output API Pekka Paalanen Superseded

Patches download mbox

# Name Submitter State
[weston,v6,01/73] libweston: introduce weston_head Pekka Paalanen Accepted
[weston,v6,02/73] libweston: move wl_output to weston_head Pekka Paalanen Accepted
[weston,v6,03/73] libweston: use head in wl_output global Pekka Paalanen Accepted
[weston,v6,04/73] libweston: make wl_output point to weston_head Pekka Paalanen Accepted
[weston,v6,05/73] libweston: refactor weston_mode_switch_finish Pekka Paalanen Accepted
[weston,v6,06/73] libweston: introduce weston_output::head_list Pekka Paalanen Accepted
[weston,v6,07/73] libweston: properly orphan wl_output resources Pekka Paalanen Accepted
[weston,v6,08/73] libweston: strdup head make, model, serial_number Pekka Paalanen Accepted
[weston,v6,09/73] cms-colord: find a good head Pekka Paalanen Accepted
[weston,v6,10/73] libweston: add name to weston_head Pekka Paalanen Accepted
[weston,v6,11/73] libweston: add weston_head::connected Pekka Paalanen Accepted
[weston,v6,12/73] libweston: add weston_head_is_enabled() Pekka Paalanen Accepted
[weston,v6,13/73] libweston: add compositor list of heads Pekka Paalanen Accepted
[weston,v6,14/73] libweston: add heads_changed hook Pekka Paalanen Accepted
[weston,v6,15/73] libweston: new head-based output management API Pekka Paalanen Accepted
[weston,v6,16/73] libweston: add weston_head destroy signal Pekka Paalanen Accepted
[weston,v6,17/73] libweston: add weston_head_is_device_changed() API Pekka Paalanen Accepted
[weston,v6,18/73] weston: move weston_output_enable() into callers Pekka Paalanen Accepted
[weston,v6,19/73] weston: migrate headless to head-based output API Pekka Paalanen Accepted
[weston,v6,20/73] weston: migrate x11 to head-based output API Pekka Paalanen Accepted
[weston,v6,21/73] weston: migrate wayland to head-based output API Pekka Paalanen Accepted
[weston,v6,22/73] weston: migrate fbdev to head-based output API Pekka Paalanen Accepted
[weston,v6,23/73] weston: migrate RDP to head-based output API Pekka Paalanen Accepted
[weston,v6,24/73] weston: migrate DRM to head-based output API Pekka Paalanen Accepted
[weston,v6,25/73] libweston: change windowed_output_api output_create to create_head Pekka Paalanen Accepted
[weston,v6,26/73] libweston: remove output_pending_signal Pekka Paalanen Accepted
[weston,v6,27/73] libweston: stop auto-adding the implicit head Pekka Paalanen Accepted
[weston,v6,28/73] libweston: assert make/model in weston_output_enable() Pekka Paalanen Accepted
[weston,v6,29/73] libweston: assert current_mode in weston_output_enable() Pekka Paalanen Accepted
[weston,v6,30/73] libweston: cancel idle_repaint on output destroy Pekka Paalanen Accepted
[weston,v6,31/73] compositor-headless: migrate to head-based output API Pekka Paalanen Accepted
[weston,v6,32/73] compositor-rdp: migrate to head-based output API Pekka Paalanen Accepted
[weston,v6,33/73] compositor-fbdev: make re-enable less drastic Pekka Paalanen Accepted
[weston,v6,34/73] compositor-fbdev: migrate to head-based output API Pekka Paalanen Accepted
[weston,v6,35/73] compositor-x11: migrate to head-based output API Pekka Paalanen Accepted
[weston,v6,36/73] compositor-wayland: strict surface create/destroy Pekka Paalanen Accepted
[weston,v6,37/73] compositor-wayland: migrate to head-based output API Pekka Paalanen Accepted
[weston,v6,38/73] compositor-drm: start migration to head-based output API Pekka Paalanen Accepted
[weston,v6,39/73] libweston: remove weston_output::head Pekka Paalanen Accepted
[weston,v6,40/73] libweston: print head names on output enable Pekka Paalanen Accepted
[weston,v6,41/73] libweston: create/find output by name Pekka Paalanen Accepted
[weston,v6,42/73] libweston: support user data on weston_output Pekka Paalanen Accepted
[weston,v6,43/73] libweston: allow attaching heads to enabled outputs Pekka Paalanen Accepted
[weston,v6,44/73] libweston: log head detach on enabled output Pekka Paalanen Accepted
[weston,v6,45/73] compositor-drm: drm_output_find_by_connector from head_list Pekka Paalanen Accepted
[weston,v6,46/73] compositor-drm: use head_find_by_connector in update_unused_outputs Pekka Paalanen Accepted
[weston,v6,47/73] compositor-drm: find disconnects from head_list Pekka Paalanen Accepted
[weston,v6,48/73] compositor-drm: move backlight into drm_head Pekka Paalanen Accepted
[weston,v6,49/73] compositor-drm: move connector fields into drm_head Pekka Paalanen Accepted
[weston,v6,50/73] compositor-drm: allocate CRTC on enable() Pekka Paalanen Accepted
[weston,v6,51/73] compositor-drm: simplify drm_output_find_by_crtc() Pekka Paalanen Accepted
[weston,v6,52/73] compositor-drm: simplify drm_output_find_special_plane() Pekka Paalanen Accepted
[weston,v6,53/73] compositor-drm: get current mode on head discovery Pekka Paalanen Accepted
[weston,v6,54/73] compositor-drm: move mode list to set_mode() Pekka Paalanen Accepted
[weston,v6,55/73] compositor-drm: create heads for all connectors Pekka Paalanen Accepted
[weston,v6,56/73] compositor-drm: remove unused_connectors array Pekka Paalanen Accepted
[weston,v6,57/73] compositor-drm: drm_output_apply_state_legacy heads Pekka Paalanen Accepted
[weston,v6,58/73] compositor-drm: drm_output_apply_state_atomic heads Pekka Paalanen Accepted
[weston,v6,59/73] compositor-drm: drm_set_backlight heads Pekka Paalanen Accepted
[weston,v6,60/73] compositor-drm: unify head status logging Pekka Paalanen Accepted
[weston,v6,61/73] compositor-drm: combine mode list from heads Pekka Paalanen Accepted
[weston,v6,62/73] compositor-drm: backlight control for all heads Pekka Paalanen Accepted
[weston,v6,63/73] compositor-drm: update video mode printing Pekka Paalanen Accepted
[weston,v6,64/73] compositor-drm: introduce drm_head_read_current_setup() Pekka Paalanen Accepted
[weston,v6,65/73] compositor-drm: no need to clear inherited_mode Pekka Paalanen Accepted
[weston,v6,66/73] compositor-drm: rewrite crtc picking for clone mode Pekka Paalanen Accepted
[weston,v6,67/73] compositor-drm: preserve CRTC routing harder Pekka Paalanen Accepted
[weston,v6,68/73] compositor-drm: head detach requires a modeset Pekka Paalanen Accepted
[weston,v6,69/73] compositor-drm: head attach requires a modeset Pekka Paalanen Superseded
[weston,v6,70/73] compositor-drm: allow shared-CRTC cloning Pekka Paalanen Accepted
[weston,v6,71/73] weston: store weston_compositor in wet_compositor Pekka Paalanen Superseded
[weston,v6,72/73] weston: use wet.compositor consistently in main() Pekka Paalanen Accepted
[weston,v6,73/73] weston: support clone mode on DRM-frontend Pekka Paalanen Superseded