I’m using /dev/nvhost-vic to do colorspace conversion from ABGR to YUV420M. I’m using the unix poll(2) library call to monitor the v4l file descriptor for /dev/nvhost-vic. based on the documentation here: https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/func-poll.html, i expect POLLIN to be set when there is a capture buffer available to be DQ’d, and POLLOUT to be set when there is an output buffer available to be DQ’d.
This is the sequence of events i’m seeing:
Q 2 capture buffers
Q 1 output buffer
POLLOUT FIRES, DQ 1 output buffer
POLLIN FIRES, DQ 1 capture buffer, Q 1 capture buffer
POLLOUT FIRES, DQ 1 output buffer
POLLIN FIRES, Try to DQ 1 capture buffer, hang because I haven’t Q’d a second output buffer yet.
Am I misunderstanding how poll(2) works with V4L? it seems to me POLLIN shouldn’t fire until after i’ve passed new data through the converter. is there a deadline that I have to meet when Qing new output buffers? what is that deadline?