All of lore.kernel.org
 help / color / mirror / Atom feed
[parent not found: <Acl1IyQQvIDQejCAQ5O/QnkHIBmt3w==>]
* Re: [REVIEW PATCH 11/14] OMAP34XXCAM: Add driver
@ 2009-03-04  8:12 Hans Verkuil
  0 siblings, 0 replies; 43+ messages in thread
From: Hans Verkuil @ 2009-03-04  8:12 UTC (permalink / raw)
  To: Tuukka.O Toivonen
  Cc: DongSoo Kim, Hiremath, Vaibhav, Aguirre Rodriguez,
	Sergio Alberto, linux-omap, Ailus Sakari, Nagalla, Hari,
	linux-media


> On Wednesday 04 March 2009 09:39:48 ext Hans Verkuil wrote:
>> BTW, do I understand correctly that e.g. lens drivers also get their
>> own /dev/videoX node? Please tell me I'm mistaken! Since that would be
>> so
>> very wrong.
>
> You're mistaken :)
>
> With the v4l2-int-interface/omap34xxcam camera driver one device
> node consists of all slaves (sensor, lens, flash, ...) making up
> the complete camera device.

Phew! That's a relief. I got scared there for a moment :-)

Regards,

         Hans

>> I hope that the conversion to v4l2_subdev will take place soon. You are
>> basically stuck in a technological dead-end :-(
>
> Ok :(
>
> - Tuukka
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


^ permalink raw reply	[flat|nested] 43+ messages in thread
* Re: [REVIEW PATCH 11/14] OMAP34XXCAM: Add driver
@ 2009-03-10 13:34 Hans Verkuil
  0 siblings, 0 replies; 43+ messages in thread
From: Hans Verkuil @ 2009-03-10 13:34 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Aguirre Rodriguez, Sergio Alberto, DongSoo Kim, Hiremath,
	Vaibhav, Toivonen Tuukka.O, linux-omap, Nagalla, Hari,
	linux-media


> Hans Verkuil wrote:
>>> Sergio has posted earlier a patchset containing a driver for using the
>>> ISP to process images from memory to memory. The ISP driver is used
>>> roughly the same way as with the omap34xxcam and real sensors. The
>>> interface towards the userspace offered by the driver, however, is
>>> different, you probably saw it (preview and resizer wrappers).
>>>
>>> My opinion has been that the memory-to-memory operation of the ISP
>>> should also offer V4L2 interface. V4L2, however, doesn't support such
>>> devices at the moment. The only differences that I can see is that
>>>
>>> 1. the input is a video buffer instead of sensor and
>>>
>>> 2. the source format needs to be specified somehow since the ISP can
>>> also do format conversion. So it's output and input at the same time.
>>>
>>> But if we had one video device per ISP, then memory-to-memory operation
>>> would be just one... input or output or what? :)
>>>
>>> Earlier we were thinking of creating one device node for it.
>>
>> This sounds like a codec interface as 'described' here:
>>
>> http://www.xs4all.nl/~hverkuil/spec/v4l2.html#CODEC
>>
>> It would be a first for V4L2 to have a driver that can do this, but I
>> agree
>> that that would be a single device that has both 'output' and 'capture'.
>
> Ok. Although this work most probably will be left for future at this
> point.
>
>>> Currently you can have just one device node using the ISP open.
>>> omap34xxcam_open() calls isp_get() which fails if the ISP use count was
>>> non-zero (means one).
>>>
>>> Or did I misunderstood something?
>>
>> Oh dear. Please don't use 'use counts'. It is perfectly acceptable and
>> desirable to have multiple opens on the same video node. Only one file
>
>> Use counts are really bad and totally unnecessary. Only if another file
>> handle is in streaming mode (and when using VIDIOC_S_PRIORITY) does it
>> make
>> sense to return -EBUSY for certain ioctls or read/write operations.
>> Otherwise you shouldn't limit the user from opening the same device node
>> as
>> many times as he wants and use that to query the video device.
>
> ?
>
> Having a use count doesn't prevent multiple file handles nor otherwise
> artificially limit functionality. We need to be able to shut down the
> slaves when they are no longer needed. IMO having an use count to do
> this is fine (unless otherwise proven).

Yes, it is fine for such purposes. As long as it isn't abused to restrict
functionality on subsequent opens. Several drivers use it for that, and
that is NOT right. But it's OK for powersaving implementations. I should
have mentioned that.

> Also the camera driver does try_module_get() to the slaves when it's
> opened by the first user. module_put() is called on those when the last
> user goes away.

This is to allow those modules to be unloaded?

> We'd also like to get rid of the current way of directly telling the
> slaves what their power state should be. Rather we'd like to tell the
> slaves what's expected from them. This could translate to
> open/release/streamon/streamoff commands. To be able to do this, the use
> count is required --- unless this task is given to the slaves
> (v4l2_subdevs).

Sounds interesting. I would have to see a proposal or proof-of-concept
code to determine how useful it is. It's however better to do this after
the v4l2-subdev conversion.

>> BTW, I looked at omap24xxcam_open(): data like fh->pix does *not* belong
>> to
>> the filehandle struct, it should be part of the top-level data
>> structure.
>
> That's fixed in the omap34xxcam.c. :)

Yay!

>> You want to be able to do simple things like querying a video node for
>> the
>> currently selected format. You can't do that if the format is stored in
>> the
>> filehandle! E.g.: you are streaming and you want to run
>> v4l2-ctl --get-fmt-video to check what video format is being used.
>> Things
>> like this must be supported by a well-written v4l2 driver. Again, sadly
>> quite a few v4l2 drivers do this wrong as well :-(
>>
>> I also see that cam->users is not decreased by one if
>> omap24xxcam_sensor_enable() fails.
>>
>> Note that I'm looking at the code in the v4l-dvb repository, the
>> linux-omap
>> git tree might have fixed that already.
>
> I'm afraid it's still there. Will fix that.

OK.

Thanks,

       Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2009-03-10 13:35 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Aclb0Ghhhph2tRyARSuubB27tGfovg==>
2008-12-11 20:38 ` [REVIEW PATCH 11/14] OMAP34XXCAM: Add driver Aguirre Rodriguez, Sergio Alberto
2009-02-23  8:08   ` DongSoo(Nathaniel) Kim
2009-02-23  8:50     ` Tuukka.O Toivonen
2009-03-03  2:48       ` DongSoo(Nathaniel) Kim
2009-03-03  3:53         ` Hiremath, Vaibhav
2009-03-03  5:13           ` DongSoo(Nathaniel) Kim
2009-03-03  5:13             ` DongSoo(Nathaniel) Kim
2009-03-03  7:36             ` Hans Verkuil
2009-03-03  7:36               ` Hans Verkuil
2009-03-04  0:42               ` DongSoo(Nathaniel) Kim
2009-03-04  0:42                 ` DongSoo(Nathaniel) Kim
2009-03-04  7:39                 ` Hans Verkuil
2009-03-04  7:39                   ` Hans Verkuil
2009-03-04  7:49                   ` Tuukka.O Toivonen
2009-03-04 19:22                   ` Sakari Ailus
2009-03-04 21:05                     ` Hans Verkuil
2009-03-04 21:46                       ` Aguirre Rodriguez, Sergio Alberto
2009-03-04 22:44                         ` Hans Verkuil
2009-03-04 23:30                           ` Aguirre Rodriguez, Sergio Alberto
2009-03-05  7:39                             ` Hans Verkuil
2009-03-05 20:11                           ` Sakari Ailus
2009-03-05 21:24                             ` Hans Verkuil
2009-03-10 12:14                               ` Sakari Ailus
2009-03-04 23:42                         ` Trent Piepho
2009-03-05  2:25                           ` hermann pitton
2009-03-03  7:38             ` Sakari Ailus
2009-03-03  7:25         ` Sakari Ailus
2009-03-03  7:40           ` DongSoo(Nathaniel) Kim
2009-02-23  8:26   ` DongSoo(Nathaniel) Kim
     [not found] <Acl1IyQQvIDQejCAQ5O/QnkHIBmt3w==>
2009-01-13  2:03 ` Aguirre Rodriguez, Sergio Alberto
2009-01-13  2:03   ` Aguirre Rodriguez, Sergio Alberto
2009-01-13  7:24   ` Hans Verkuil
2009-01-13  7:24     ` Hans Verkuil
2009-02-06  2:26   ` DongSoo Kim
2009-02-11  4:00   ` DongSoo Kim
2009-02-12  7:09     ` Sakari Ailus
2009-02-12  7:52       ` DongSoo Kim
2009-02-13  9:31         ` Arun KS
2009-02-13 10:04           ` DongSoo(Nathaniel) Kim
2009-02-13 10:02         ` Sakari Ailus
2009-02-13 10:11           ` DongSoo(Nathaniel) Kim
2009-03-04  8:12 Hans Verkuil
2009-03-10 13:34 Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.