/*=========================================================================== * FUNCTION : cacheOps * * DESCRIPTION: ion related memory cache operations * * PARAMETERS : * @index : index of the buffer * @cmd : cache ops command * * RETURN : int32_t type of status * NO_ERROR -- success * none-zero failure code *==========================================================================*/ int QCamera3GrallocMemory::cacheOps(uint32_t index, unsigned int cmd) { if (index >= MM_CAMERA_MAX_NUM_FRAMES) { ALOGE("%s: Index out of bounds", __func__); return -1; } if (index < mStartIdx) { ALOGE("%s: buffer index %d less than starting index %d", __func__, index, mStartIdx); return BAD_INDEX; } return cacheOpsInternal(index, cmd, mPtr[index]); }
/*=========================================================================== * FUNCTION : cacheOps * * DESCRIPTION: ion related memory cache operations * * PARAMETERS : * @index : index of the buffer * @cmd : cache ops command * * RETURN : int32_t type of status * NO_ERROR -- success * none-zero failure code *==========================================================================*/ int QCamera3GrallocMemory::cacheOps(int index, unsigned int cmd) { if (index >= mBufferCount) return BAD_INDEX; return cacheOpsInternal(index, cmd, mPtr[index]); }
/*=========================================================================== * FUNCTION : cacheOps * * DESCRIPTION: ion related memory cache operations * * PARAMETERS : * @index : index of the buffer * @cmd : cache ops command * * RETURN : int32_t type of status * NO_ERROR -- success * none-zero failure code *==========================================================================*/ int QCamera3GrallocMemory::cacheOps(int index, unsigned int cmd) { return cacheOpsInternal(index, cmd, mPtr[index]); }
/*=========================================================================== * FUNCTION : cacheOps * * DESCRIPTION: ion related memory cache operations * * PARAMETERS : * @index : index of the buffer * @cmd : cache ops command * * RETURN : int32_t type of status * NO_ERROR -- success * none-zero failure code *==========================================================================*/ int QCameraStreamMemory::cacheOps(int index, unsigned int cmd) { if (index >= mBufferCount) return BAD_INDEX; return cacheOpsInternal(index, cmd, mCameraMemory[index]->data); }