diff options
author | Tony Lofthouse <a0741364@ti.com> | 2012-09-11 14:56:27 -0500 |
---|---|---|
committer | Daniel Levin <dendy@ti.com> | 2012-11-28 21:16:25 +0200 |
commit | 84274e25fb00d2516c564c339549195155fd97d7 (patch) | |
tree | dfdfa89476324563e2a8a222b9931ad618f37616 | |
parent | 9374529441688bd5e22ac60b7725c1485a33307c (diff) | |
download | hardware_ti_omap4-84274e25fb00d2516c564c339549195155fd97d7.zip hardware_ti_omap4-84274e25fb00d2516c564c339549195155fd97d7.tar.gz hardware_ti_omap4-84274e25fb00d2516c564c339549195155fd97d7.tar.bz2 |
hwc: Check for >1 overlay used in idle timeout
It was observed during ADTF runs than we get repeated redraws when
there are no layers to render.
This is because the check in prepare() will reset force_sgx to 0
when there are 1 or less layers. The side effect of this is to
cause a redraw every idle period.
Instead of doing this, account for the number of overlays used
for the primary display before calling the invalidate() api. This
logic should be satisfactory most current usecases.
Change-Id: I4b9cb44ebe250a6a46a6da27a1db94e88d6f26f3
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
-rw-r--r-- | hwc/hwc.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -1701,10 +1701,6 @@ static int omap4_hwc_prepare(struct hwc_composer_device *dev, hwc_layer_list_t* decide_supported_cloning(hwc_dev, &num); - /* Disable the forced SGX rendering if there is only one layer */ - if (hwc_dev->force_sgx && num.composited_layers <= 1) - hwc_dev->force_sgx = 0; - /* phase 3 logic */ if (can_dss_render_all(hwc_dev, &num)) { /* All layers can be handled by the DSS -- don't use SGX for composition */ @@ -2545,7 +2541,7 @@ static void *omap4_hwc_hdmi_thread(void *data) if (hwc_dev->idle) { if (hwc_dev->procs && hwc_dev->procs->invalidate) { pthread_mutex_lock(&hwc_dev->lock); - invalidate = !hwc_dev->force_sgx; + invalidate = hwc_dev->last_int_ovls > 1 && !hwc_dev->force_sgx; if (invalidate) { hwc_dev->force_sgx = 2; } |