drm_hwcomposer: Add links to the HWC2 API description
Some part of the API is not streightforward and wrong implementation
may cause leaks and other hard-to-debug runtime issues.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/DrmHwcTwo.cpp b/DrmHwcTwo.cpp
index 4db60cc..413d9c3 100644
--- a/DrmHwcTwo.cpp
+++ b/DrmHwcTwo.cpp
@@ -582,6 +582,9 @@
return HWC2::Error::None;
}
+/* Find API details at:
+ * https://cs.android.com/android/platform/superproject/+/android-11.0.0_r3:hardware/libhardware/include/hardware/hwcomposer2.h;l=1767
+ */
HWC2::Error DrmHwcTwo::HwcDisplay::GetReleaseFences(uint32_t *num_elements,
hwc2_layer_t *layers,
int32_t *fences) {
@@ -700,6 +703,9 @@
return HWC2::Error::None;
}
+/* Find API details at:
+ * https://cs.android.com/android/platform/superproject/+/android-11.0.0_r3:hardware/libhardware/include/hardware/hwcomposer2.h;l=1805
+ */
HWC2::Error DrmHwcTwo::HwcDisplay::PresentDisplay(int32_t *present_fence) {
supported(__func__);
HWC2::Error ret;
@@ -760,6 +766,9 @@
return HWC2::Error::None;
}
+/* Find API details at:
+ * https://cs.android.com/android/platform/superproject/+/android-11.0.0_r3:hardware/libhardware/include/hardware/hwcomposer2.h;l=1861
+ */
HWC2::Error DrmHwcTwo::HwcDisplay::SetClientTarget(buffer_handle_t target,
int32_t acquire_fence,
int32_t dataspace,
@@ -1046,6 +1055,9 @@
return HWC2::Error::None;
}
+/* Find API details at:
+ * https://cs.android.com/android/platform/superproject/+/android-11.0.0_r3:hardware/libhardware/include/hardware/hwcomposer2.h;l=2314
+ */
HWC2::Error DrmHwcTwo::HwcLayer::SetLayerBuffer(buffer_handle_t buffer,
int32_t acquire_fence) {
supported(__func__);
diff --git a/DrmHwcTwo.h b/DrmHwcTwo.h
index 748fc81..111c664 100644
--- a/DrmHwcTwo.h
+++ b/DrmHwcTwo.h
@@ -119,6 +119,12 @@
UniqueFd acquire_fence_;
+ /*
+ * Release fence is not used.
+ * There is no release fence support available in the DRM/KMS. In case no
+ * release fence provided application will use this buffer for writing when
+ * the next frame present fence is signaled.
+ */
UniqueFd release_fence_;
private: