Skip to content
Permalink
Browse files

GraphicBuffer: exynos4: set FIMC1 usage bit on samsung specific formats

Change-Id: Ia8cde7e594f8be464ef15eaae453872ee5aa2768

Conflicts:
	libs/ui/GraphicBufferAllocator.cpp
  • Loading branch information...
codeworkx authored and xplodwild committed Nov 27, 2012
1 parent 6441112 commit d9805a9a80128421c5fbf5fb8300f0fdf11fd3d1
Showing with 20 additions and 2 deletions.
  1. +20 −2 libs/ui/GraphicBufferAllocator.cpp
@@ -100,8 +100,26 @@ status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat forma
w = h = 1;

// we have a h/w allocator and h/w buffer is requested
status_t err;

status_t err;
#ifdef QCOM_BSP
if(bufferSize) {
err = mAllocDev->allocSize(mAllocDev, w, h,
format, usage, handle, stride, bufferSize);
} else {
err = mAllocDev->alloc(mAllocDev, w, h, format, usage, handle, stride);
}
ALOGW_IF(err, "alloc(%u, %u, %d, %08x, %d ...) failed %d (%s)",
w, h, format, usage, bufferSize, err, strerror(-err));
#else

#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)",

0 comments on commit d9805a9

Please sign in to comment.
You can’t perform that action at this time.