Lines Matching refs:cnt

1665     for (int cnt = 0; cnt < count; cnt++) {  in allocate()  local
1667 err = mWindow->dequeue_buffer(mWindow, &mBufferHandle[cnt], &stride); in allocate()
1669 CDBG("dequeue buf hdl =%p", mBufferHandle[cnt]); in allocate()
1670 mLocalFlag[cnt] = BUFFER_OWNED; in allocate()
1672 mLocalFlag[cnt] = BUFFER_NOT_OWNED; in allocate()
1673 ALOGE("%s: dequeue_buffer idx = %d err = %d", __func__, cnt, err); in allocate()
1676 CDBG("%s: dequeue buf: %p\n", __func__, mBufferHandle[cnt]); in allocate()
1682 for(int i = 0; i < cnt; i++) { in allocate()
1694 mPrivateHandle[cnt] = in allocate()
1695 (struct private_handle_t *)(*mBufferHandle[cnt]); in allocate()
1696 mMemInfo[cnt].main_ion_fd = open("/dev/ion", O_RDONLY); in allocate()
1697 if (mMemInfo[cnt].main_ion_fd < 0) { in allocate()
1699 for(int i = 0; i < cnt; i++) { in allocate()
1718 ion_info_fd.fd = mPrivateHandle[cnt]->fd; in allocate()
1719 if (ioctl(mMemInfo[cnt].main_ion_fd, in allocate()
1722 for(int i = 0; i < cnt; i++) { in allocate()
1738 close(mMemInfo[cnt].main_ion_fd); in allocate()
1744 setMetaData(mPrivateHandle[cnt], UPDATE_COLOR_SPACE, &mColorSpace); in allocate()
1745 mCameraMemory[cnt] = in allocate()
1746 mGetMemory(mPrivateHandle[cnt]->fd, in allocate()
1747 (size_t)mPrivateHandle[cnt]->size, in allocate()
1751 __func__, cnt, mPrivateHandle[cnt]->fd, in allocate()
1752 mPrivateHandle[cnt]->size, in allocate()
1753 mPrivateHandle[cnt]->offset); in allocate()
1754 mMemInfo[cnt].fd = mPrivateHandle[cnt]->fd; in allocate()
1755 mMemInfo[cnt].size = (size_t)mPrivateHandle[cnt]->size; in allocate()
1756 mMemInfo[cnt].handle = ion_info_fd.handle; in allocate()
1805 for (int cnt = 0; cnt < mBufferCount; cnt++) { in deallocate() local
1806 mCameraMemory[cnt]->release(mCameraMemory[cnt]); in deallocate()
1809 ion_handle.handle = mMemInfo[cnt].handle; in deallocate()
1810 if (ioctl(mMemInfo[cnt].main_ion_fd, ION_IOC_FREE, &ion_handle) < 0) { in deallocate()
1813 close(mMemInfo[cnt].main_ion_fd); in deallocate()
1814 if(mLocalFlag[cnt] != BUFFER_NOT_OWNED) { in deallocate()
1816 mWindow->cancel_buffer(mWindow, mBufferHandle[cnt]); in deallocate()
1817 CDBG_HIGH("cancel_buffer: hdl =%p", (*mBufferHandle[cnt])); in deallocate()
1820 (*mBufferHandle[cnt])); in deallocate()
1823 mLocalFlag[cnt] = BUFFER_NOT_OWNED; in deallocate()
1824 CDBG_HIGH("put buffer %d successfully", cnt); in deallocate()