Hi Hans, On 04/11/2014 10:11 AM, Hans Verkuil wrote: > From: Hans Verkuil <hans.verkuil@xxxxxxxxx> > > Added a vb2_fileio_is_active inline function that returns true if fileio > is in progress. Check for this too in mmap() (you don't want apps mmap()ing > buffers used by fileio) and expbuf() (same reason). Why? I expect that there is no sane use case for using mmap() and expbuf in read/write mode but why forbidding this. Could you provide a reason? Regard, Tomasz Stanislawski > > In addition drivers should be able to check for this in queue_setup() to > return an error if an attempt is made to read() or write() with > V4L2_FIELD_ALTERNATE being configured. This is illegal (there is no way > to pass the TOP/BOTTOM information around using file I/O). > > However, in order to be able to check for this the init_fileio function > needs to set q->fileio early on, before the buffers are allocated. So switch > to using internal functions (__reqbufs, vb2_internal_qbuf and > vb2_internal_streamon) to skip the fileio check. Well, that's why the internal > functions were created... > > Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx> > Acked-by: Pawel Osciak <pawel@xxxxxxxxxx> > Acked-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html