diff options
author | Gowtham Tammana <g-tammana@ti.com> | 2016-03-16 14:50:45 -0500 |
---|---|---|
committer | Marcus Cooksey <mcooksey@ti.com> | 2016-03-16 16:14:26 -0500 |
commit | db85c96be1df704ef159e06f58df34ff7459e860 (patch) | |
tree | 809586ec6446db09b2d9d72cd3f869ed1f4c438b | |
parent | 41aaf71402541060d9ada85a4daf751750193290 (diff) | |
download | dra7xx-db85c96be1df704ef159e06f58df34ff7459e860.tar.gz |
hwc: use relative offset of 1 for fence during bootup.
The first frame after hwc boot is posted using drmModeSetCrtc() and
is on display.
Change-Id: Ie7713eaf10b7cfb8a093b82f28998dee328ee312
Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
-rw-r--r-- | hwcomposer/display.c | 8 | ||||
-rw-r--r-- | hwcomposer/display.h | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/hwcomposer/display.c b/hwcomposer/display.c index 16f087e..69bb80e 100644 --- a/hwcomposer/display.c +++ b/hwcomposer/display.c @@ -792,12 +792,14 @@ int update_display(omap_hwc_device_t *ctx, int disp, } } target->releaseFenceFd = - timeline_create_fence(&display->retire_sync, FENCE_NEW_BUF); + timeline_create_fence(&display->retire_sync, + kdisp->is_crtc_set ? TWO_FLIP_EVENTS : ONE_FLIP_EVENT); } /* we currently make no distinction between release and retire fences, * and use a single fence to signal them. */ - list->retireFenceFd = timeline_create_fence(&display->retire_sync, FENCE_NEW_BUF); + list->retireFenceFd = timeline_create_fence(&display->retire_sync, + kdisp->is_crtc_set? TWO_FLIP_EVENTS : ONE_FLIP_EVENT); width = hnd->iWidth; height = hnd->iHeight; @@ -1478,7 +1480,7 @@ int set_nv12_planes(omap_hwc_device_t *hwc_dev, uint32_t *bo, uint32_t width, in } } layer->releaseFenceFd = - timeline_create_fence(&display->retire_sync, FENCE_NEW_BUF); + timeline_create_fence(&display->retire_sync, TWO_FLIP_EVENTS); ret = drmPrimeFDToHandle (hwc_dev->drm_fd, layer->handle->data[0], &bo[0]); if (ret) { diff --git a/hwcomposer/display.h b/hwcomposer/display.h index 5673593..52c8b05 100644 --- a/hwcomposer/display.h +++ b/hwcomposer/display.h @@ -157,11 +157,13 @@ typedef struct kms_display { } kms_display_t; -/* FENCE_NEW_BUF - relative offset at which the fence will be signaled +/* TWO_FLIP_EVENTS - relative offset at which the fence will be signaled * in timeline. Buffer gets on to display on first increment and will * be replaced on second increment in timeline. */ -#define FENCE_NEW_BUF 2 +#define TWO_FLIP_EVENTS 2 +#define ONE_FLIP_EVENT 1 + /* Sync timeline: A seperate timeline is maintained for each display and * the timeline is incremented on every flip. |