Re: [PATCHi v2 1/6] davinci vpbe: V4L2 display driver for DM644X SoC

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

 



On Wednesday, December 01, 2010 17:58:35 Hadli, Manjunath wrote:
> >
> > You may want to consider using the new core-assisted locking support. That > will simplify your driver. It seems that this driver just locks at every  > ioctl, so
> > in that case it is easier to let the core do that.
> 
> Hans,
>   I looked into the mailing lists discussion on the core-assisted locking support but could not get a clear picture. Could you point me to the implementation snippet or some example of where it is done? Or for now is it OK to use .unlocked_ioctl?

Sure. But it is documented in v4l2-framework.txt, section 'v4l2_file_operations
and locking'.

The vivi driver uses this in fact.

Basically it is nothing more then assigning a pointer to a mutex to the lock field
of struct video_device:

	vdev->lock = &v4l2_dev->lock;

After that all fops are serialized through this mutex.

Regards,

	Hans

-- 
Hans Verkuil - video4linux developer - sponsored by Cisco
--
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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux