public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Strubel <hackfin@section5.ch>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org
Subject: Re: v4l2 device property framework in userspace
Date: Tue, 31 May 2011 10:27:38 +0200	[thread overview]
Message-ID: <4DE4A67A.9070007@section5.ch> (raw)
In-Reply-To: <201105311001.40826.hverkuil@xs4all.nl>


> 
> Userspace tells the driver what it should do and the driver decides how to do it.
> That's how it works.

Sounds a little religious. Not sure if you've been listening..

> 
>> And for us it is even more reusable, because we can run the
>> same thing on a standalone 'OS' (no OS really) and for example RTEMS.
> 
> That is never a consideration for linux. Hardware abstraction layers are not
> allowed. Blame Linus, not me, although I completely agree with him on this.
> 

This is new to me. What should be the reason not to abstract hardware?
To give people a coding job?

>> So for the various OS specifics, we only have one video acquisition
>> driver which has no knowledge of the attached sensor. All generic v4l2
>> properties again are tunneled through userspace to the "sensor daemon".
>> I still don't see what is (technically) wrong with that.
> 
> It's the tunneling to a sensor daemon that is wrong. You can write a sensor
> driver as a V4L subdevice driver and it is reusable by any 'video acquisition;
> driver (aka V4L2 bridge/platform driver) without going through userspace and
> requiring userspace daemons.
> 

> It's the tunneling to a sensor daemon that is wrong. You can write a sensor
> driver as a V4L subdevice driver and it is reusable by any 'video acquisition;
> driver (aka V4L2 bridge/platform driver) without going through userspace and
> requiring userspace daemons.

You keep saying it is wrong, but I have so far seen no technically firm
argument. Please tell me why.

> 
>> For me, it works like a driver, plus it is way more flexible as I don't
>> have to go through ioctls for special sensor properties.
> 
> You still have to go through the kernel to set registers. That's just as
> expensive as an ioctl.
> 


Not sure if you understand: I do not have to implement or generate ioctl
handlers and call them. This is definitely less expensive in terms of
coding. All the register access is handled *automatically* using the HW
description layer.

> 
> Sure, no problem. It's open source after all. Just be aware that all the
> maintenance effort is for you as long as you remain out of tree.
> 

We have to do this anyhow. But we'd prefer to do it the way that
requires least maintenance as described.
We need to have a *solution*. Not some academic hack that is "not wrong".

I think we can end the discussion here. I was hoping for more
technically valuable input, really.

  reply	other threads:[~2011-05-31  8:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-29 13:07 v4l2 device property framework in userspace Martin Strubel
2011-05-30  7:32 ` Hans Verkuil
2011-05-30  9:38   ` Martin Strubel
2011-05-30 10:52     ` Hans Verkuil
2011-05-30 12:07       ` Martin Strubel
2011-05-30 12:53         ` Hans Verkuil
2011-05-30 13:30           ` Martin Strubel
2011-05-31  8:01             ` Hans Verkuil
2011-05-31  8:27               ` Martin Strubel [this message]
2011-05-31 10:55                 ` Hans Verkuil
2011-05-31 11:33                   ` Martin Strubel
2011-05-31 12:58                     ` Mauro Carvalho Chehab
2011-06-06 11:00                     ` Sakari Ailus
2011-05-31  6:38         ` Kim, HeungJun

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=4DE4A67A.9070007@section5.ch \
    --to=hackfin@section5.ch \
    --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