public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 00/10] [RFC] Prio handling and v4l2_device release callback
Date: Fri, 31 Dec 2010 09:39:09 -0200	[thread overview]
Message-ID: <4D1DC0DD.7060809@redhat.com> (raw)
In-Reply-To: <201012311225.16349.hverkuil@xs4all.nl>

Em 31-12-2010 09:25, Hans Verkuil escreveu:
> On Friday, December 31, 2010 12:01:17 Mauro Carvalho Chehab wrote:
>> Em 29-12-2010 19:43, Hans Verkuil escreveu:
>>> This patch series adds two new features to the V4L2 framework.
>>>
>>> The first 5 patches add support for VIDIOC_G/S_PRIORITY. All prio handling
>>> will be done in the core for any driver that either uses struct v4l2_fh
>>> (ivtv only at the moment) or has no open and release file operations (true
>>> for many simple (radio) drivers). In all other cases the driver will have
>>> to do the work.
>>
>> It doesn't make sense to implement this at core, and for some this will happen
>> automatically, while, for others, drivers need to do something.
> 
> However, it makes it possible to gradually convert all drivers.

This will likely mean years of conversion.
>  
>>> Eventually all drivers should either use v4l2_fh or never set filp->private_data.
>>
>> I made a series of patches, due to BKL stuff converting the core to always
>> use v4l2_fh on all drivers. This seems to be the right solution for it.
> 
> Can you point me to those patches? I remember seeing them, but can't remember where.

They are at devel/bkl branch. The main one is this:

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=285267378581fbf852f24f3f99d2e937cd200fd5

I remember you had some issues on it, but it is just a matter of fixing them.

> I see two potential problems with this approach:
> 
> 1) A lot of drivers do not actually need to allocate a v4l2_fh struct, so it
>    wastes memory. But on the other hand, it would be nicely consistent.

A typical driver allocates at least 2 buffers of 640x480x2. How much memory a
v4l2_fh struct would require? I didn't calculate, but probably less than 0.01%.
I don't think that the extra consumption of memory will have any real impact, even
on embedded. On the other hand, if you need to add the priority handling via code,
you'll probably waste more on codespace than the size of the struct.

> 2) I prefer for core changes to have the least possible impact to existing drivers,
>    and just convert existing drivers one by one.

A per-driver implementation means per-driver errors. A per-core implementation means
that, once it is fixed, all drivers will be OK. 

> But I would have to see your patch series again to see the impact of such a
> change.
> 

> Regards,
> 
> 	Hans
> 


  reply	other threads:[~2010-12-31 11:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-29 21:43 [PATCH 00/10] [RFC] Prio handling and v4l2_device release callback Hans Verkuil
2010-12-29 21:43 ` [PATCH 01/10] [RFC] v4l2_prio: move from v4l2-common to v4l2-dev Hans Verkuil
2010-12-29 21:43 ` [PATCH 02/10] [RFC] v4l2: add v4l2_prio_state to v4l2_device and video_device Hans Verkuil
2010-12-29 21:43 ` [PATCH 03/10] [RFC] v4l2-fh: implement v4l2_priority support Hans Verkuil
2010-12-29 21:43 ` [PATCH 04/10] [RFC] v4l2-dev: add and support flag V4L2_FH_USE_PRIO Hans Verkuil
2010-12-29 21:43 ` [PATCH 05/10] [RFC] v4l2-ioctl: add priority handling support Hans Verkuil
2010-12-29 21:43 ` [PATCH 06/10] [RFC] ivtv: convert to core priority handling Hans Verkuil
2010-12-29 21:43 ` [PATCH 07/10] [RFC] ivtv: use core-assisted locking Hans Verkuil
2010-12-29 21:43 ` [PATCH 08/10] [RFC] v4l2-framework: update documentation for new prio field Hans Verkuil
2010-12-29 21:43 ` [PATCH 09/10] [RFC] v4l2-device: add kref and a release function Hans Verkuil
2010-12-29 21:43 ` [PATCH 10/10] [RFC] v4l2-framework.txt: document new v4l2_device release() callback Hans Verkuil
2010-12-31 11:01 ` [PATCH 00/10] [RFC] Prio handling and v4l2_device release callback Mauro Carvalho Chehab
2010-12-31 11:25   ` Hans Verkuil
2010-12-31 11:39     ` Mauro Carvalho Chehab [this message]
2010-12-31 12:55       ` Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D1DC0DD.7060809@redhat.com \
    --to=mchehab@redhat.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox