summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drmdisplaycomposition.cpp5
-rw-r--r--drmdisplaycompositor.cpp18
2 files changed, 23 insertions, 0 deletions
diff --git a/drmdisplaycomposition.cpp b/drmdisplaycomposition.cpp
index 949f4a3..ce0bb62 100644
--- a/drmdisplaycomposition.cpp
+++ b/drmdisplaycomposition.cpp
@@ -254,6 +254,11 @@ int DrmDisplayComposition::CreateAndAssignReleaseFences() {
}
}
+ /*
+ *TODO: the fence creation here should go away in favor of
+ real fences returned by drm.
+ */
+
for (DrmHwcLayer *layer : squash_layers) {
if (!layer->release_fence)
continue;
diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp
index 1ca1212..79cfb13 100644
--- a/drmdisplaycompositor.cpp
+++ b/drmdisplaycompositor.cpp
@@ -500,6 +500,11 @@ int DrmDisplayCompositor::DisablePlanes(DrmDisplayComposition *display_comp) {
}
}
+ /*
+ * TODO: call drmModeAtomicAddOutFences() here to request out_fences
+ * also add NONBLOCKING flag to the AtomicCommit
+ */
+
ret = drmModeAtomicCommit(drm_->fd(), pset, 0, drm_);
if (ret) {
ALOGE("Failed to commit pset ret=%d\n", ret);
@@ -507,6 +512,13 @@ int DrmDisplayCompositor::DisablePlanes(DrmDisplayComposition *display_comp) {
return ret;
}
+ /*
+ * TODO: get back the CRTC out_fence and set use them as HWC's retire
+ * and release fences.
+ *
+ * However there is a different semantic here, ret
+ */
+
drmModeAtomicFree(pset);
return 0;
}
@@ -678,6 +690,12 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp,
if (!test_only && layer.acquire_fence.get() >= 0) {
int acquire_fence = layer.acquire_fence.get();
int total_fence_timeout = 0;
+
+ /*
+ * TODO: the block below should be removed and we should
+ * pass the fence directly to the kernel in the FENCE_FD
+ * plane property.
+ */
for (int i = 0; i < kAcquireWaitTries; ++i) {
int fence_timeout = kAcquireWaitTimeoutMs * (1 << i);
total_fence_timeout += fence_timeout;