summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Lofthouse <a0741364@ti.com>2012-09-11 14:56:27 -0500
committerJason Simmons <jsimmons@google.com>2012-10-22 16:01:47 -0700
commitb78f671651e83c2cd7b77cd67a8ba3abdb519388 (patch)
tree83d3a46c91cc9f057a4b330bb4aa22083be1526b
parent8594f3edb1632ad900d7a5f06e2819e65114924b (diff)
downloadomap4-aah-b78f671651e83c2cd7b77cd67a8ba3abdb519388.tar.gz
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> (cherry picked from commit c044e832219dd2aa81ae11e4ec883d09bf2fb885)
-rw-r--r--hwc/hwc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/hwc/hwc.c b/hwc/hwc.c
index 5c9af98..5f6a06f 100644
--- a/hwc/hwc.c
+++ b/hwc/hwc.c
@@ -1667,10 +1667,6 @@ static int omap4_hwc_prepare(struct hwc_composer_device_1 *dev, size_t numDispla
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 */
@@ -2553,7 +2549,7 @@ static void *omap4_hwc_hdmi_thread(void *data)
if (hwc_dev->idle && (now >= idle_wakeup)) {
if (hwc_dev->procs) {
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;
}