Lines Matching refs:idx
787 int32_t idx = -1; in registerBuffer() local
805 idx = getFreeIndexLocked(); in registerBuffer()
806 if (0 > idx) { in registerBuffer()
811 mBufferHandle[idx] = buffer; in registerBuffer()
812 mPrivateHandle[idx] = (struct private_handle_t *)(*mBufferHandle[idx]); in registerBuffer()
814 setMetaData(mPrivateHandle[idx], UPDATE_COLOR_SPACE, &colorSpace); in registerBuffer()
821 ion_info_fd.fd = mPrivateHandle[idx]->fd; in registerBuffer()
830 idx, mPrivateHandle[idx]->fd, in registerBuffer()
831 mPrivateHandle[idx]->size, in registerBuffer()
832 mPrivateHandle[idx]->offset); in registerBuffer()
833 mMemInfo[idx].fd = mPrivateHandle[idx]->fd; in registerBuffer()
834 mMemInfo[idx].size = in registerBuffer()
836 mPrivateHandle[idx]->size; in registerBuffer()
837 mMemInfo[idx].handle = ion_info_fd.handle; in registerBuffer()
858 int32_t QCamera3GrallocMemory::unregisterBufferLocked(size_t idx) in unregisterBufferLocked() argument
860 if (mPtr[idx] != nullptr) { in unregisterBufferLocked()
861 munmap(mPtr[idx], mMemInfo[idx].size); in unregisterBufferLocked()
862 mPtr[idx] = nullptr; in unregisterBufferLocked()
867 ion_handle.handle = mMemInfo[idx].handle; in unregisterBufferLocked()
871 memset(&mMemInfo[idx], 0, sizeof(struct QCamera3MemInfo)); in unregisterBufferLocked()
872 mBufferHandle[idx] = NULL; in unregisterBufferLocked()
873 mPrivateHandle[idx] = NULL; in unregisterBufferLocked()
874 mCurrentFrameNumbers[idx] = -1; in unregisterBufferLocked()
892 int32_t QCamera3GrallocMemory::unregisterBuffer(size_t idx) in unregisterBuffer() argument
899 if (MM_CAMERA_MAX_NUM_FRAMES <= idx) { in unregisterBuffer()
901 idx, MM_CAMERA_MAX_NUM_FRAMES); in unregisterBuffer()
904 if (idx < mStartIdx) { in unregisterBuffer()
906 idx, mStartIdx); in unregisterBuffer()
910 if (0 == mMemInfo[idx].handle) { in unregisterBuffer()
912 idx); in unregisterBuffer()
916 rc = unregisterBufferLocked(idx); in unregisterBuffer()