aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Stratiienko <r.stratiienko@gmail.com>2021-05-21 14:33:28 +0300
committerRoman Stratiienko <r.stratiienko@gmail.com>2021-07-24 17:59:58 +0300
commit3e2f9e725a90d7fd5abd13693e3b450b8afb3f5b (patch)
treeb739415d8daa5258cb8a305f13d02be894785ed8
parent0fade37afd60c3f0e387172e03759e055f831d30 (diff)
downloaddrm_hwcomposer-3e2f9e725a90d7fd5abd13693e3b450b8afb3f5b.tar.gz
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>
-rw-r--r--DrmHwcTwo.cpp12
-rw-r--r--DrmHwcTwo.h6
2 files changed, 18 insertions, 0 deletions
diff --git a/DrmHwcTwo.cpp b/DrmHwcTwo.cpp
index 4db60cc..413d9c3 100644
--- a/DrmHwcTwo.cpp
+++ b/DrmHwcTwo.cpp
@@ -582,6 +582,9 @@ HWC2::Error DrmHwcTwo::HwcDisplay::GetHdrCapabilities(
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 @@ HWC2::Error DrmHwcTwo::HwcDisplay::CreateComposition(bool test) {
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 @@ HWC2::Error DrmHwcTwo::HwcDisplay::SetActiveConfig(hwc2_config_t config) {
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 @@ HWC2::Error DrmHwcTwo::HwcLayer::SetLayerBlendMode(int32_t mode) {
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 @@ class DrmHwcTwo : public hwc2_device_t {
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: