diff options
author | Mykola Ostrovskyy <mykola@ti.com> | 2012-12-10 17:15:27 +0200 |
---|---|---|
committer | Mykola Ostrovskyy <mykola@ti.com> | 2012-12-18 14:37:58 +0200 |
commit | 842c6b84a2b2e94d9fcd8145639e0653c82f7647 (patch) | |
tree | e0fe5337798a03bf30ce83e088fd4d83e561b4b1 /hwc | |
parent | 7419292f9ce1d986437e4812b7948019f841403d (diff) | |
download | hardware_ti_omap4-842c6b84a2b2e94d9fcd8145639e0653c82f7647.zip hardware_ti_omap4-842c6b84a2b2e94d9fcd8145639e0653c82f7647.tar.gz hardware_ti_omap4-842c6b84a2b2e94d9fcd8145639e0653c82f7647.tar.bz2 |
hwc: Support HWC_FRAMEBUFFER_TARGET layers
Layers with HWC_FRAMEBUFFER_TARGET composition type should be
skipped from normal DSS mapping and mapped to FB oberlay instead.
Change-Id: I1085cc93a7df53e7a4d4a9f1a1584cd8fc12a4a8
Signed-off-by: Mykola Ostrovskyy <mykola@ti.com>
Diffstat (limited to 'hwc')
-rw-r--r-- | hwc/hwc.c | 19 | ||||
-rw-r--r-- | hwc/hwc_dev.h | 1 |
2 files changed, 19 insertions, 1 deletions
@@ -784,6 +784,9 @@ static bool is_valid_layer(omap_hwc_device_t *hwc_dev, hwc_layer_1_t *layer, IMG if ((layer->flags & HWC_SKIP_LAYER) || !handle) return false; + if (layer->compositionType == HWC_FRAMEBUFFER_TARGET) + return false; + if (!is_valid_format(handle->iFormat)) return false; @@ -969,7 +972,12 @@ static void gather_layer_statistics(omap_hwc_device_t *hwc_dev, hwc_display_cont uint32_t s3d_layout_type = get_s3d_layout_type(layer); #endif - layer->compositionType = HWC_FRAMEBUFFER; + if (layer->compositionType == HWC_FRAMEBUFFER_TARGET) { + num->framebuffer++; + num->composited_layers--; + } else { + layer->compositionType = HWC_FRAMEBUFFER; + } if (is_valid_layer(hwc_dev, layer, handle)) { #ifdef OMAP_ENHANCEMENT_S3D @@ -1966,6 +1974,15 @@ static int hwc_set(struct hwc_composer_device_1 *dev, err = HWC_EGL_ERROR; goto err_out; } + if (list) { + if (hwc_dev->counts.framebuffer) { + /* Layer with HWC_FRAMEBUFFER_TARGET should be last in the list. The buffer handle + * is updated by SurfaceFlinger after prepare() call, so FB slot has to be updated + * in set(). + */ + hwc_dev->buffers[0] = list->hwLayers[list->numHwLayers - 1].handle; + } + } } //dump_dsscomp(dsscomp); diff --git a/hwc/hwc_dev.h b/hwc/hwc_dev.h index d1d0fa3..9acc9aa 100644 --- a/hwc/hwc_dev.h +++ b/hwc/hwc_dev.h @@ -103,6 +103,7 @@ struct counts { uint32_t NV12; uint32_t dockable; uint32_t protected; + uint32_t framebuffer; #ifdef OMAP_ENHANCEMENT_S3D uint32_t s3d; #endif |