summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqctecmdr <qctecmdr@localhost>2022-07-26 10:40:38 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2022-07-26 10:40:38 -0700
commitda454cc9a68dccdd854393374f41b05bd5f2ce5d (patch)
tree79c6ca41140e6212487d75b8661f6276970c0dc6
parentccc573dadda676d926c2e34d0252188d661c929f (diff)
parent2ebcf32f4ac1f430b1b9e2c9e8178d262ed73765 (diff)
Merge "sdm: populate retire fence on external display power off."
-rw-r--r--sdm/libs/core/drm/hw_tv_drm.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/sdm/libs/core/drm/hw_tv_drm.cpp b/sdm/libs/core/drm/hw_tv_drm.cpp
index 67fe39db..4834a542 100644
--- a/sdm/libs/core/drm/hw_tv_drm.cpp
+++ b/sdm/libs/core/drm/hw_tv_drm.cpp
@@ -254,12 +254,19 @@ DisplayError HWTVDRM::PowerOff(bool teardown, SyncPoints *sync_points) {
// LP connecter prop N/A for External
drm_atomic_intf_->Perform(DRMOps::CRTC_SET_ACTIVE, token_.crtc_id, 0);
}
+
+ int64_t retire_fence_fd = -1;
+ drm_atomic_intf_->Perform(DRMOps::CONNECTOR_GET_RETIRE_FENCE, token_.conn_id, &retire_fence_fd);
+
int ret = drm_atomic_intf_->Commit(true /* synchronous */, false /* retain_planes*/);
+ shared_ptr<Fence> retire_fence = Fence::Create(INT(retire_fence_fd), "retire_power_off");
if (ret) {
DLOGE("%s failed with error %d", __FUNCTION__, ret);
return kErrorHardware;
}
+ sync_points->retire_fence = retire_fence;
+
return kErrorNone;
}