Re: [RFC/PATCH v2] media: Add stk1160 new driver

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

 



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?
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);

Just checking,
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


[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