[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4] media: Add stk1160 new driver



Hans,

On Tue, Jul 10, 2012 at 3:39 AM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
>
> Take a look at the latest videobuf2-core.h: I've added helper functions
> that check the owner. You can probably simplify the driver code quite a bit
> by using those helpers.
>

Indeed, using latest vb2_xxx_fop and vb2_ioctl_xxx the driver can be
heavily reduced.
(Great work, by the way)

Almost every function looks like a direct replacement, except for mmap.

If you look at current stk1160, I'm taking the lock for mmap:

        mutex_lock(&dev->v4l_lock);
        rc = vb2_mmap(&dev->vb_vidq, vma);
        mutex_unlock(&dev->v4l_lock);


However, vb2_fop_mmap does no locking. I'm having a hard time understanding
why this is not needed, perhaps you could clarify this a bit?

Thanks,
Ezequiel.
--
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


[Linux Input]     [Video for Linux]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Photos]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Yosemite Backpacking]

Add to Google Powered by Linux