pub fn commit_detach(
device: &Device,
scene: &mut LayerScene,
) -> Result<bool, CoreError>Expand description
Turn off what a rebind left on the old CRTC.
One commit of its own, before the first frame on the new CRTC: every plane
the scene had lit there is detached, and the old CRTC is switched off
(ACTIVE = 0). It has to be separate because the kernel refuses to move a
plane between CRTCs in one commit, and a plane both pipes can use is one
the new frame may want. The CRTC goes off with its planes because some
drivers reject an active CRTC whose primary is disarmed; ACTIVE = 0 keeps
its mode and connector, so a caller that wants the old output back sets it
active again. Upstream’s fix for the same defect (a335bef, drm-cxx#340)
leaves the old CRTC active, and retries without the primary instead.
Returns whether there was anything to commit. On success the scene can
build frames again; on failure the detach stays pending and
build_frame goes on refusing.
§Errors
CoreError if a property cannot be found or the kernel rejects the
commit.