On 21/05/15 07:03, Hans Verkuil wrote: > On 05/20/2015 06:39 PM, William Towle wrote: >> rcar_vin requires physically contiguous buffer, so shouldn't advertise >> support for USERPTR. >> >> Signed-off-by: Rob Taylor <rob.taylor@xxxxxxxxxxxxxxx> >> Reviewed-by: William Towle <william.towle@xxxxxxxxxxxxxxx> >> --- >> drivers/media/platform/soc_camera/rcar_vin.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c >> index 222002a..b530503 100644 >> --- a/drivers/media/platform/soc_camera/rcar_vin.c >> +++ b/drivers/media/platform/soc_camera/rcar_vin.c >> @@ -1824,7 +1824,7 @@ static int rcar_vin_init_videobuf2(struct vb2_queue *vq, >> struct soc_camera_host *ici = to_soc_camera_host(icd->parent); >> >> vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; >> - vq->io_modes = VB2_MMAP | VB2_USERPTR; >> + vq->io_modes = VB2_MMAP; > > NACK. > > USERPTR can be used, but the user pointer must point to physically contig > memory (and this is checked). There are cases where the system will carve out > phys. contig. memory and userspace has pointers to that. I'm pretty sure some of > this is used by systems where soc-camera is run. > > Unfortunately, userspace has currently no way of knowing such userptr restrictions. > That's a failing of the API. It's ugly as hell, but it is in use today and can't > be dropped. Ah, that is ugly - I assumed because there wasn't an interface to query restrictions it would be necessary to drop support. We can drop this patch for now. It seems rcar_vin doesn't pass compliance with USERPTR, but we'll have to look into fixing that at a later date. Thanks, Rob > Regards, > > Hans > >> vq->drv_priv = icd; >> vq->ops = &rcar_vin_vb2_ops; >> vq->mem_ops = &vb2_dma_contig_memops; >> > -- 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