summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Diaz Prado <a0273371@ti.com>2012-08-24 18:08:04 -0500
committerJason Simmons <jsimmons@google.com>2012-10-22 16:00:59 -0700
commitee551a5488c74639359303d978673405f3522f43 (patch)
tree40bb1c7265a7c425f5f0b44440edbeb928bd6414
parentb29f69b6b65a33ec0052036e8b6bf0c219cc157e (diff)
downloadomap4-aah-ee551a5488c74639359303d978673405f3522f43.tar.gz
hwc: rgz: Workaround, do not blit if there is a video layer
This is a workaround for a performance degradation found while a video is playing and the GC320 is used at the same time. Avoid blitting if there is a NV12 layer in the hwc layer list. Change-Id: I12e789b9dd95e8b0d435aac1ae67ff65d4511396 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com> (cherry picked from commit 52aa03dd27808e773f2133910ae233a1e4d42106)
-rw-r--r--hwc/rgz_2d.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hwc/rgz_2d.c b/hwc/rgz_2d.c
index 5a74377..9da80e5 100644
--- a/hwc/rgz_2d.c
+++ b/hwc/rgz_2d.c
@@ -656,6 +656,15 @@ static int rgz_in_hwccheck(rgz_in_params_t *p, rgz_t *rgz)
*/
int l, memidx = 0;
for (l = 0; l < layerno; l++) {
+ /*
+ * Workaround: If a NV12 layer is present in the list, don't even try
+ * to blit. There is a performance degradation while playing video and
+ * using GC at the same time.
+ */
+ IMG_native_handle_t *handle = (IMG_native_handle_t *)layers[l].handle;
+ if (!(layers[l].flags & HWC_SKIP_LAYER) && handle && is_NV12(handle->iFormat))
+ return -1;
+
if (layers[l].compositionType == HWC_OVERLAY)
memidx++;
}