Lines Matching refs:cnt
1450 for (int cnt = 0; cnt < count; cnt++) { in allocate() local
1452 err = mWindow->dequeue_buffer(mWindow, &mBufferHandle[cnt], &stride); in allocate()
1454 CDBG("dequeue buf hdl =%p", mBufferHandle[cnt]); in allocate()
1455 mLocalFlag[cnt] = BUFFER_OWNED; in allocate()
1457 mLocalFlag[cnt] = BUFFER_NOT_OWNED; in allocate()
1458 ALOGE("%s: dequeue_buffer idx = %d err = %d", __func__, cnt, err); in allocate()
1461 CDBG("%s: dequeue buf: %p\n", __func__, mBufferHandle[cnt]); in allocate()
1467 for(int i = 0; i < cnt; i++) { in allocate()
1479 mPrivateHandle[cnt] = in allocate()
1480 (struct private_handle_t *)(*mBufferHandle[cnt]); in allocate()
1481 mMemInfo[cnt].main_ion_fd = open("/dev/ion", O_RDONLY); in allocate()
1482 if (mMemInfo[cnt].main_ion_fd < 0) { in allocate()
1484 for(int i = 0; i < cnt; i++) { in allocate()
1503 ion_info_fd.fd = mPrivateHandle[cnt]->fd; in allocate()
1504 if (ioctl(mMemInfo[cnt].main_ion_fd, in allocate()
1507 for(int i = 0; i < cnt; i++) { in allocate()
1523 close(mMemInfo[cnt].main_ion_fd); in allocate()
1529 setMetaData(mPrivateHandle[cnt], UPDATE_COLOR_SPACE, &mColorSpace); in allocate()
1530 mCameraMemory[cnt] = in allocate()
1531 mGetMemory(mPrivateHandle[cnt]->fd, in allocate()
1532 mPrivateHandle[cnt]->size, in allocate()
1536 __func__, cnt, mPrivateHandle[cnt]->fd, in allocate()
1537 mPrivateHandle[cnt]->size, in allocate()
1538 mPrivateHandle[cnt]->offset); in allocate()
1539 mMemInfo[cnt].fd = in allocate()
1540 mPrivateHandle[cnt]->fd; in allocate()
1541 mMemInfo[cnt].size = in allocate()
1542 mPrivateHandle[cnt]->size; in allocate()
1543 mMemInfo[cnt].handle = ion_info_fd.handle; in allocate()
1591 for (int cnt = 0; cnt < mBufferCount; cnt++) { in deallocate() local
1592 mCameraMemory[cnt]->release(mCameraMemory[cnt]); in deallocate()
1595 ion_handle.handle = mMemInfo[cnt].handle; in deallocate()
1596 if (ioctl(mMemInfo[cnt].main_ion_fd, ION_IOC_FREE, &ion_handle) < 0) { in deallocate()
1599 close(mMemInfo[cnt].main_ion_fd); in deallocate()
1600 if(mLocalFlag[cnt] != BUFFER_NOT_OWNED) { in deallocate()
1602 mWindow->cancel_buffer(mWindow, mBufferHandle[cnt]); in deallocate()
1603 CDBG_HIGH("cancel_buffer: hdl =%p", (*mBufferHandle[cnt])); in deallocate()
1606 (*mBufferHandle[cnt])); in deallocate()
1609 mLocalFlag[cnt] = BUFFER_NOT_OWNED; in deallocate()
1610 CDBG_HIGH("put buffer %d successfully", cnt); in deallocate()