Lines Matching refs:usage
90 static bool useUncached(const int& usage) { in useUncached() argument
91 if ((usage & GRALLOC_USAGE_PROTECTED) or in useUncached()
92 (usage & GRALLOC_USAGE_PRIVATE_UNCACHED) or in useUncached()
93 ((usage & GRALLOC_USAGE_SW_WRITE_MASK) == GRALLOC_USAGE_SW_WRITE_RARELY) or in useUncached()
94 ((usage & GRALLOC_USAGE_SW_READ_MASK) == GRALLOC_USAGE_SW_READ_RARELY)) in useUncached()
168 int usage = 0; in getAlignedWidthAndHeight() local
171 usage = GRALLOC_USAGE_PRIVATE_ALLOC_UBWC; in getAlignedWidthAndHeight()
174 getAlignedWidthAndHeight(w, h, f, usage, aligned_w, aligned_h); in getAlignedWidthAndHeight()
218 int usage, int& aligned_w, int& aligned_h) in getAlignedWidthAndHeight() argument
220 bool ubwc_enabled = isUBwcEnabled(format, usage); in getAlignedWidthAndHeight()
224 int tileEnabled = ubwc_enabled || isMacroTileEnabled(format, usage); in getAlignedWidthAndHeight()
450 int IonController::allocate(alloc_data& data, int usage) in allocate() argument
456 data.uncached = useUncached(usage); in allocate()
459 if(usage & GRALLOC_USAGE_PROTECTED) { in allocate()
460 if (usage & GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY) { in allocate()
471 } else if(usage & GRALLOC_USAGE_PRIVATE_MM_HEAP) { in allocate()
480 if(usage & GRALLOC_USAGE_PRIVATE_CAMERA_HEAP) in allocate()
483 if(usage & GRALLOC_USAGE_PRIVATE_ADSP_HEAP) in allocate()
520 bool isMacroTileEnabled(int format, int usage) in isMacroTileEnabled() argument
538 if (usage & (GRALLOC_USAGE_SW_READ_MASK | in isMacroTileEnabled()
553 unsigned int getSize(int format, int width, int height, int usage, in getSize() argument
556 if (isUBwcEnabled(format, usage)) { in getSize()
702 int usage, int& alignedw, int &alignedh) in getBufferSizeAndDimensions() argument
709 usage, in getBufferSizeAndDimensions()
713 size = getSize(format, width, height, usage, alignedw, alignedh); in getBufferSizeAndDimensions()
719 void getBufferAttributes(int width, int height, int format, int usage, in getBufferAttributes() argument
722 tiled = isUBwcEnabled(format, usage) || isMacroTileEnabled(format, usage); in getBufferAttributes()
727 usage, in getBufferAttributes()
730 size = getSize(format, width, height, usage, alignedw, alignedh); in getBufferAttributes()
796 int usage = 0; in getYUVPlaneInfo() local
799 usage = GRALLOC_USAGE_PRIVATE_ALLOC_UBWC; in getYUVPlaneInfo()
803 metadata->bufferDim.sliceHeight, format, usage, width, height); in getYUVPlaneInfo()
873 int alloc_buffer(private_handle_t **pHnd, int w, int h, int format, int usage) in alloc_buffer() argument
882 data.size = getBufferSizeAndDimensions(w, h, format, usage, alignedw, in alloc_buffer()
886 data.uncached = useUncached(usage); in alloc_buffer()
887 int allocFlags = usage; in alloc_buffer()
895 if(isUBwcEnabled(format, usage)) { in alloc_buffer()
957 bool isUBwcEnabled(int format, int usage) in isUBwcEnabled() argument
963 if ((usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) && in isUBwcEnabled()
969 if ((usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) && (usage & GRALLOC_USAGE_HW_COMPOSER)) { in isUBwcEnabled()
977 bool enable = (usage & GRALLOC_USAGE_PRIVATE_ALLOC_UBWC) | in isUBwcEnabled()
978 (usage & GRALLOC_USAGE_HW_FB); in isUBwcEnabled()
981 (usage & (GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_RENDER))) { in isUBwcEnabled()
985 if (enable && !(usage & (GRALLOC_USAGE_SW_READ_MASK | in isUBwcEnabled()