From f792059f3a98e55435b221c899c04dbb4103aef7 Mon Sep 17 00:00:00 2001 From: codeworkx Date: Tue, 27 Nov 2012 11:58:03 +0100 Subject: GraphicBuffer: exynos4: set FIMC1 usage bit on samsung specific formats Change-Id: Ia8cde7e594f8be464ef15eaae453872ee5aa2768 --- libs/ui/GraphicBufferAllocator.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libs/ui') diff --git a/libs/ui/GraphicBufferAllocator.cpp b/libs/ui/GraphicBufferAllocator.cpp index ff550d9..7d6507d 100644 --- a/libs/ui/GraphicBufferAllocator.cpp +++ b/libs/ui/GraphicBufferAllocator.cpp @@ -101,7 +101,15 @@ status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat forma // we have a h/w allocator and h/w buffer is requested status_t err; - + +#ifdef EXYNOS4_ENHANCEMENTS + if ((format == 0x101) || (format == 0x105)) { + // 0x101 = HAL_PIXEL_FORMAT_YCbCr_420_P (Samsung-specific pixel format) + // 0x105 = HAL_PIXEL_FORMAT_YCbCr_420_SP (Samsung-specific pixel format) + usage |= GRALLOC_USAGE_HW_FIMC1; // Exynos HWC wants FIMC-friendly memory allocation + } +#endif + err = mAllocDev->alloc(mAllocDev, w, h, format, usage, handle, stride); ALOGW_IF(err, "alloc(%u, %u, %d, %08x, ...) failed %d (%s)", -- cgit v1.1