On Mon June 4 2012 21:50:46 Ezequiel Garcia wrote: > On Mon, Jun 4, 2012 at 5:47 AM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote: > > > >> Would you care to explain me this change in your patch? > >> + set_bit(V4L2_FL_USE_FH_PRIO, &dev->vdev.flags); > > > > See Documentation/video4linux/v4l2-framework.txt: > > > > "flags: optional. Set to V4L2_FL_USE_FH_PRIO if you want to let the framework > > handle the VIDIOC_G/S_PRIORITY ioctls. This requires that you use struct > > v4l2_fh. Eventually this flag will disappear once all drivers use the core > > priority handling. But for now it has to be set explicitly." > > > > So, by using v4l2_fh and setting V4L2_FL_USE_FH_PRIO, I can have > {g,s}_priority ioctls for free, right? Yes. > As far as I can see __video_do_ioctl checks if the ioctl is possible, like this: > > 520 if (test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags)) { > 521 vfh = file->private_data; > 522 use_fh_prio = test_bit(V4L2_FL_USE_FH_PRIO, &vfd->flags); > 523 } > 524 > 525 if (use_fh_prio) > 526 ret_prio = v4l2_prio_check(vfd->prio, vfh->prio); And V4L2_FL_USES_V4L2_FH is set by v4l2_fh_init() (called by v4l2_fh_open()). Regards, Hans -- 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