Lines Matching refs:usage

60 static bool canFallback(int usage, bool triedSystem)  in canFallback()  argument
74 if(usage & (GRALLOC_HEAP_MASK | GRALLOC_USAGE_PROTECTED)) in canFallback()
76 if(usage & (GRALLOC_HEAP_MASK | GRALLOC_USAGE_PRIVATE_EXTERNAL_ONLY)) in canFallback()
86 static bool useUncached(const int& usage) { in useUncached() argument
87 if ((usage & GRALLOC_USAGE_PROTECTED) or in useUncached()
88 (usage & GRALLOC_USAGE_PRIVATE_UNCACHED) or in useUncached()
89 ((usage & GRALLOC_USAGE_SW_WRITE_MASK) == GRALLOC_USAGE_SW_WRITE_RARELY) or in useUncached()
90 ((usage & GRALLOC_USAGE_SW_READ_MASK) == GRALLOC_USAGE_SW_READ_RARELY)) in useUncached()
167 int usage, int& aligned_w, int& aligned_h) in getAlignedWidthAndHeight() argument
172 int tileEnabled = isMacroTileEnabled(format, usage); in getAlignedWidthAndHeight()
178 if (isUBwcEnabled(format, usage)) { in getAlignedWidthAndHeight()
375 int IonController::allocate(alloc_data& data, int usage) in allocate() argument
380 data.uncached = useUncached(usage); in allocate()
383 if(usage & GRALLOC_USAGE_PRIVATE_SYSTEM_HEAP) in allocate()
386 if(usage & GRALLOC_USAGE_PRIVATE_IOMMU_HEAP) in allocate()
389 if(usage & GRALLOC_USAGE_PROTECTED) { in allocate()
393 if (!(usage & GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY)) { in allocate()
397 } else if(usage & GRALLOC_USAGE_PRIVATE_MM_HEAP) { in allocate()
406 if(usage & GRALLOC_USAGE_PRIVATE_CAMERA_HEAP) in allocate()
409 if(usage & GRALLOC_USAGE_PRIVATE_ADSP_HEAP) in allocate()
426 if(ret < 0 && canFallback(usage, in allocate()
453 bool isMacroTileEnabled(int format, int usage) in isMacroTileEnabled() argument
471 if (usage & (GRALLOC_USAGE_SW_READ_MASK | in isMacroTileEnabled()
486 unsigned int getSize(int format, int width, int height, int usage, in getSize() argument
489 if (isUBwcEnabled(format, usage)) { in getSize()
623 int usage, int& alignedw, int &alignedh) in getBufferSizeAndDimensions() argument
630 usage, in getBufferSizeAndDimensions()
634 size = getSize(format, width, height, usage, alignedw, alignedh); in getBufferSizeAndDimensions()
640 void getBufferAttributes(int width, int height, int format, int usage, in getBufferAttributes() argument
643 tileEnabled = isMacroTileEnabled(format, usage); in getBufferAttributes()
648 usage, in getBufferAttributes()
651 size = getSize(format, width, height, usage, alignedw, alignedh); in getBufferAttributes()
723 int alloc_buffer(private_handle_t **pHnd, int w, int h, int format, int usage) in alloc_buffer() argument
732 data.size = getBufferSizeAndDimensions(w, h, format, usage, alignedw, in alloc_buffer()
736 data.uncached = useUncached(usage); in alloc_buffer()
737 int allocFlags = usage; in alloc_buffer()
796 bool isUBwcEnabled(int format, int usage) in isUBwcEnabled() argument
799 ((usage & GRALLOC_USAGE_PRIVATE_ALLOC_UBWC) && isUBwcSupported(format))) in isUBwcEnabled()
803 !(usage & (GRALLOC_USAGE_SW_READ_MASK | in isUBwcEnabled()