Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76cc0993 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Steve Kondik
Browse files

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

Change-Id: Ia8cde7e594f8be464ef15eaae453872ee5aa2768

Conflicts:
	libs/ui/GraphicBufferAllocator.cpp
parent 62dcf7b5
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -120,6 +120,15 @@ status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h,
    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)",
            w, h, format, usage, err, strerror(-err));