drm_hwcomposer: Teardown the pipeline and DRM resources on disconnect
This commit properly tears down the display pieline when the display is disconnected. This frees up the DRM CRTC and other resources used by the connector. This ensures that the consecutive hotplugs work correctly to reallocate the CRTCs when new displays are connected. This was verified by ensuring the CRTCs, mode, connectors are freed up in modetest. Change-Id: Icdca56433b5cd565d1658b1a415565adc7980088 Signed-off-by: Manasi Navare <navaremanasi@google.com>
This commit is contained in:
parent
de1b4f40c3
commit
025ea5bfbb
1 changed files with 8 additions and 1 deletions
|
|
@ -120,9 +120,16 @@ auto DrmAtomicStateManager::CommitFrame(AtomicCommitArgs &args) -> int {
|
|||
nonblock = false;
|
||||
new_frame_state.crtc_active_state = *args.active;
|
||||
if (!crtc->GetActiveProperty().AtomicSet(*pset, *args.active ? 1 : 0) ||
|
||||
!connector->GetCrtcIdProperty().AtomicSet(*pset, crtc->GetId())) {
|
||||
!connector->GetCrtcIdProperty().AtomicSet(*pset, *args.active
|
||||
? crtc->GetId()
|
||||
: 0)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!*args.active) {
|
||||
if (!crtc->GetModeProperty().AtomicSet(*pset, 0)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto *drm = pipe_->device;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue