Permalink
Browse files

exynos: Apply format usage flag hack to YUV420P

This is needed for planar format video in
addition to semiplanar.  Also, update the flag
to be more representative of what it REALLY does,
which is merely to add GRALLOC_USAGE_HW_FIMC1.

This fixes Netflix on Note 10.1 so it no
longer needs Developer Options hacks.

Change-Id: I31df87c252779e66a056b79b1f48779024ec0f30
  • Loading branch information...
1 parent f5acb39 commit 68810ee26594bd7a80e3e6419258904de44b0545 @Entropy512 Entropy512 committed with PierPP Sep 22, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 libs/ui/GraphicBufferAllocator.cpp
View
8 libs/ui/GraphicBufferAllocator.cpp
@@ -114,12 +114,10 @@ status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h,
status_t err;
#ifdef EXYNOS4_ENHANCEMENTS
- if (format == 0x105) {
+ 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; // Samsung specific flag for video rendering
- usage |= GRALLOC_USAGE_EXTERNAL_DISP;
- usage |= GRALLOC_USAGE_HW_COMPOSER;
- usage |= GRALLOC_USAGE_HW_TEXTURE;
+ usage |= GRALLOC_USAGE_HW_FIMC1; // Exynos HWC wants FIMC-friendly memory allocation
}
#endif

0 comments on commit 68810ee

Please sign in to comment.