diff options
author | Dan Stoza <stoza@google.com> | 2016-07-13 14:51:09 -0700 |
---|---|---|
committer | Dan Stoza <stoza@google.com> | 2016-07-14 09:10:32 -0700 |
commit | 814421ec1d7df84f848f3458b4925f2d93677254 (patch) | |
tree | ebecfa1cfc83f5d283fd77fc5d9b62aafe43d073 | |
parent | 61187f61ef67e19d20b09994ee31635cee862bb4 (diff) | |
download | libhardware-814421ec1d7df84f848f3458b4925f2d93677254.tar.gz |
HWC2: Redefine retire fence as present fence
Redefines the retire fence returned by presentDisplay to be a present
fence with more strictly defined semantics: this fence should fire
at the vsync when the frame is picked up by hardware, either for
scanout (in the case of video-mode panels) or for transfer to panel
memory (in the case of command-mode panels).
Bug: 29771461
Change-Id: Idf5f86c92a8748426cf3368242c08876a48d81dd
-rw-r--r-- | include/hardware/hwcomposer2.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/include/hardware/hwcomposer2.h b/include/hardware/hwcomposer2.h index a51efd7f..f6a6ebaf 100644 --- a/include/hardware/hwcomposer2.h +++ b/include/hardware/hwcomposer2.h @@ -1328,7 +1328,7 @@ typedef int32_t /*hwc2_error_t*/ (*HWC2_PFN_GET_RELEASE_FENCES)( hwc2_device_t* device, hwc2_display_t display, uint32_t* outNumElements, hwc2_layer_t* outLayers, int32_t* outFences); -/* presentDisplay(..., outRetireFence) +/* presentDisplay(..., outPresentFence) * Descriptor: HWC2_FUNCTION_PRESENT_DISPLAY * Must be provided by all HWC2 devices * @@ -1342,15 +1342,16 @@ typedef int32_t /*hwc2_error_t*/ (*HWC2_PFN_GET_RELEASE_FENCES)( * setLayerBuffer), then it is safe to call this function without first * validating the display. * - * If this call succeeds, outRetireFence will be populated with a file - * descriptor referring to a retire sync fence object. For physical displays, - * this fence will be signaled when the result of composition of the prior frame - * is no longer necessary (because it has been copied or replaced by this - * frame). For virtual displays, this fence will be signaled when writes to the - * output buffer have completed and it is safe to read from it. + * If this call succeeds, outPresentFence will be populated with a file + * descriptor referring to a present sync fence object. For physical displays, + * this fence will be signaled at the vsync when the result of composition of + * this frame starts to appear (for video-mode panels) or starts to transfer to + * panel memory (for command-mode panels). For virtual displays, this fence will + * be signaled when writes to the output buffer have completed and it is safe to + * read from it. * * Parameters: - * outRetireFence - a sync fence file descriptor as described above; pointer + * outPresentFence - a sync fence file descriptor as described above; pointer * will be non-NULL * * Returns HWC2_ERROR_NONE or one of the following errors: @@ -1361,7 +1362,8 @@ typedef int32_t /*hwc2_error_t*/ (*HWC2_PFN_GET_RELEASE_FENCES)( * for this display */ typedef int32_t /*hwc2_error_t*/ (*HWC2_PFN_PRESENT_DISPLAY)( - hwc2_device_t* device, hwc2_display_t display, int32_t* outRetireFence); + hwc2_device_t* device, hwc2_display_t display, + int32_t* outPresentFence); /* setActiveConfig(..., config) * Descriptor: HWC2_FUNCTION_SET_ACTIVE_CONFIG |