summaryrefslogtreecommitdiffstats
path: root/hwc
diff options
context:
space:
mode:
authorGustavo Diaz Prado <a0273371@ti.com>2012-08-24 18:08:04 -0500
committerDaniel Levin <dendy@ti.com>2012-11-28 21:16:24 +0200
commitb490df5f108eff571fcece0a2f72c46dc121f510 (patch)
tree6a6a1b71bf811ecd52cc8b947707b8a89a377338 /hwc
parentebe419deed81c66911a36d3ada4bc0991dd05c5b (diff)
downloadhardware_ti_omap4-b490df5f108eff571fcece0a2f72c46dc121f510.zip
hardware_ti_omap4-b490df5f108eff571fcece0a2f72c46dc121f510.tar.gz
hardware_ti_omap4-b490df5f108eff571fcece0a2f72c46dc121f510.tar.bz2
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>
Diffstat (limited to 'hwc')
-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++;
}