summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDima Svetlov <svetlov@ti.com>2012-07-02 16:01:39 -0700
committerJason Simmons <jsimmons@google.com>2012-10-22 15:36:09 -0700
commita9bec459a62ebc71f9e74832047c2d9da8a84ff0 (patch)
tree75c43741ea4ea31d860062291fa6f95e9ebf31e8
parent7cc2b1a368426ac79eac71d625e08324d83a933f (diff)
downloadomap4-aah-a9bec459a62ebc71f9e74832047c2d9da8a84ff0.tar.gz
hwc: fix and simplify the idle timeout logic
Fixes the following issue : when non-blended layers are composited via overlays and blended layers are composited via FB, the idle timeout does not yield invalidation and re-composition of the layers via SGX resulting in the increased power consumption when the UI is idle. The change simplifies the idle timeout logic as follows : SGX only composition is forced after the idle timeout. Rebased from p-ics-mr1: 4573812 hwc: fix and simplify the idle timeout logic Change-Id: I37216892536a6900b5fb58c0e6ac616ef3f3ef72 Signed-off-by: Dima Svetlov <svetlov@ti.com> (cherry picked from commit d62680abaf25e807070c2ba236cdc2d0cc935408)
-rw-r--r--hwc/hwc.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/hwc/hwc.c b/hwc/hwc.c
index ac9a2cb..cdbc8e2 100644
--- a/hwc/hwc.c
+++ b/hwc/hwc.c
@@ -175,7 +175,6 @@ struct omap4_hwc_device {
int force_sgx;
omap4_hwc_ext_t ext; /* external mirroring data */
int idle;
- int ovls_blending;
float primary_m[2][3]; /* internal transformation matrix */
int primary_transform;
@@ -1635,7 +1634,6 @@ static int omap4_hwc_prepare(struct hwc_composer_device_1 *dev, size_t numDispla
/* set up if DSS layers */
unsigned int mem_used = 0;
- hwc_dev->ovls_blending = 0;
for (i = 0; list && i < list->numHwLayers && !blit_all; i++) {
hwc_layer_1_t *layer = &list->hwLayers[i];
IMG_native_handle_t *handle = (IMG_native_handle_t *)layer->handle;
@@ -1666,9 +1664,6 @@ static int omap4_hwc_prepare(struct hwc_composer_device_1 *dev, size_t numDispla
/* clear FB above all opaque layers if rendering via SGX */
if (hwc_dev->use_sgx && !is_BLENDED(layer))
layer->hints |= HWC_HINT_CLEAR_FB;
- /* see if any of the (non-backmost) overlays are doing blending */
- else if (is_BLENDED(layer) && i > 0)
- hwc_dev->ovls_blending = 1;
hwc_dev->buffers[dsscomp->num_ovls] = layer->handle;
@@ -2457,7 +2452,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 && hwc_dev->ovls_blending;
+ invalidate = !hwc_dev->force_sgx;
if (invalidate) {
hwc_dev->force_sgx = 2;
}