weston should turn off unplugged pipes
Steps to repro:
- Launch weston with a removable display
- Unplug display
Expected behavior:
- turns off the crtc/encoder/connector to save power
Actual behavior:
- all planes are disabled, but the crtc/encoder/connector are left on
- device will continue to scan out black pixels to nowhere
drm logs on unplug (debug=0x16):
From Dragonboard 410c:
[ +8.063165] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:29:HDMI-A-1]
[ +0.000885] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:29:HDMI-A-1] disconnected
[ +0.000385] [drm:msm_framebuffer_destroy] destroy: FB ID: 0 (000000006599c6c8)
[ +0.000068] [drm:drm_atomic_state_init] Allocated atomic state 00000000fb118117
[ +0.000019] [drm:drm_atomic_get_plane_state] Added [PLANE:30:plane-0] 000000002bef9e83 state to 00000000fb118117
[ +0.000014] [drm:drm_atomic_get_crtc_state] Added [CRTC:39:crtc-0] 00000000acbd6758 state to 00000000fb118117
[ +0.000006] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for plane state 000000002bef9e83
[ +0.000007] [drm:drm_atomic_set_crtc_for_plane] Link plane state 000000002bef9e83 to [NOCRTC]
[ +0.000007] [drm:drm_atomic_check_only] checking 00000000fb118117
[ +0.000012] [drm:mdp5_plane_atomic_check] plane-0: check (1 -> 1)
[ +0.000012] [drm:drm_atomic_get_private_obj_state] Added new private object 00000000bb38088b state 00000000d3aa6148 to 00000000fb118117
[ +0.000006] [drm:mdp5_pipe_release] DMA0: release from plane plane-0
[ +0.000005] [drm:mdp5_pipe_release] DMA0: free SMP blocks
[ +0.000007] [drm:mdp5_crtc_atomic_check] crtc-0: check
[ +0.000006] [drm:drm_atomic_commit] committing 00000000fb118117
[ +0.000025] [drm:mdp5_crtc_atomic_begin] crtc-0: begin
[ +0.000006] [drm:mdp5_plane_atomic_update] plane-0: update
[ +0.000006] [drm:mdp5_crtc_atomic_flush] crtc-0: event: 0000000076b12383
[ +0.000005] [drm:blend_setup] Border Color is enabled
[ +0.000012] [drm:mdp5_ctl_blend] lm0: blend config = 0x03000000. ext_cfg = 0x00000000
[ +0.000006] [drm:crtc_flush.isra.2] crtc-0: flush=00000040
[ +0.000011] [drm:msm_enable_vblank] dev=0000000012eadf3b, crtc=0
[ +0.002368] [drm:mdp5_crtc_vblank_irq] crtc-0: send event: 0000000076b12383
[ +0.002451] [drm:mdp5_smp_complete_commit] release DMA0
[ +0.014527] [drm:mdp5_plane_cleanup_fb] plane-0: cleanup: FB[74]
[ +0.000028] [drm:drm_atomic_state_default_clear] Clearing atomic state 00000000fb118117
[ +0.000025] [drm:__drm_atomic_state_free] Freeing atomic state 00000000fb118117
[ +0.000023] [drm:msm_framebuffer_destroy] destroy: FB ID: 0 (00000000ff21dd31)
[ +0.016301] [drm:msm_disable_vblank] dev=0000000012eadf3b, crtc=0