public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Shuzhen Wang" <shuzhenw@codeaurora.org>
To: "'Mauro Carvalho Chehab'" <mchehab@redhat.com>,
	"'Hans Verkuil'" <hverkuil@xs4all.nl>
Cc: <linux-media@vger.kernel.org>, <hzhong@codeaurora.org>,
	"Yan, Yupeng" <yyan@quicinc.com>
Subject: RE: RFC: V4L2 driver for Qualcomm MSM camera.
Date: Tue, 28 Dec 2010 10:35:05 -0800	[thread overview]
Message-ID: <000001cba6bd$f2c94ea0$d85bebe0$@org> (raw)
In-Reply-To: <4D188285.8090603@redhat.com>

> -----Original Message-----
> From: Mauro Carvalho Chehab [mailto:mchehab@redhat.com]
> Sent: Monday, December 27, 2010 4:12 AM
> To: Hans Verkuil
> Cc: Shuzhen Wang; linux-media@vger.kernel.org; hzhong@codeaurora.org
> Subject: Re: RFC: V4L2 driver for Qualcomm MSM camera.
> 
> Em 24-12-2010 09:19, Hans Verkuil escreveu:
> >> MSM_CAM_IOCTL_SENSOR_IO_CFG
> >>         Get or set sensor configurations: fps, line_pf, pixels_pl,
> >>         exposure and gain, etc. The setting is stored in
> sensor_cfg_data
> >>         structure.
> 
> This doesn't make much sense to me as-is. The V4L2 API can set fps,
> exposure,
> gain and other things. Please only use private ioctl's for those things
> that
> aren't provided elsewhere and can't be mapped into some CTRL.
> 

In our design, all these private ioctls are only called from the service
daemon, so they are transparent to the application. For example, when a
standard V4L2 API is called from the app to change fps, it gets translated
to MSM_CAM_IOCTL_SENSOR_IO_CFG in the daemon, and sent to the sensor
hardware.

> >> MSM_CAM_IOCTL_CONFIG_VFE
> >>         Change settings of different components of VFE hardware.
> 
> Hard to analyze it, as you didn't provide any details ;)
> 
> Maybe the media controller API will be the right place for it. As Hans
> pointed,
> the hardware should be able to work without private ioctl's and/or
> media
> controller stuff.
> 

Because all the private ioctl's are only called from daemon, they are not
very big concern here IMHO. The fact that a lot of stuff is done in daemon
does make it harder to decouple. 

MSM_CAM_IOCTL_CONFIG_VFE ioctl calls pass in a structure like this:
struct msm_vfe_cfg_cmd {
        int cmd_type;
        uint16_t length;
        void *value;
};
Where cmd_type indicates what component of the VFE pipeline to configure,
For example, enable/disable stats, VFE buffers configuration, demosaic,
color conversion/correction, etc. The value field will contain the
appropriate data for the said cmd_type.

> >> MSM_CAM_IOCTL_CTRL_CMD_DONE
> >>         Notify the driver that the ctrl command is finished.
> 
> Just looking at the ioctl name, this doesn't make much sense. If you
> open a
> device on normal way, the ioctl it will block until the operation is
> completed.
> 
> Could you please provide more details about it?

The idea is that the kernel driver delegates the control command to the
service daemon ( by means of v4l2_event ). The V4L2 control command call
from the app is blocked until the service daemon is done with operation.

For example, for a VIDIOC_S_CTRL, the driver wraps the v4l2_ctrl structure
in a v4l2_event, publishes it to the daemon, and blocks. The daemon then
calls either MSM_CAM_IOCTL_CONFIG_VFE or MSM_CAM_IOCTL_SENSOR_IO_CFG or
both to configure the hardware. Once thoese ioctls return, it then call 
MSM_CAM_IOCTL_CTRL_CMD_DONE to notify the driver so that it can wake up
the application.

> >> MSM_CAM_IOCTL_AXI_CONFIG
> >>         Configure AXI bus parameters (frame buffer addresses,
> offsets) to
> >>         the VFE hardware.
> 
> Hard to analyze it, as you didn't provide any details ;)
> 
> The same comments I did for MSM_CAM_IOCTL_CONFIG_VFE apply here.

This registers buffers with VFE hardware. Like all other private ioctls, 
It's called from the daemon. 


Thanks!
-Shuzhen


  reply	other threads:[~2010-12-28 18:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-23 19:38 RFC: V4L2 driver for Qualcomm MSM camera Shuzhen Wang
2010-12-24 11:19 ` Hans Verkuil
2010-12-27  6:45   ` Shuzhen Wang
2010-12-27 12:11   ` Mauro Carvalho Chehab
2010-12-28 18:35     ` Shuzhen Wang [this message]
2010-12-28 20:23       ` Laurent Pinchart
2011-01-04  2:37         ` Shuzhen Wang
2011-01-04  6:14           ` Haibo Zhong
2011-01-04  8:46             ` Laurent Pinchart
2011-01-04 10:40               ` Hans Verkuil
2011-01-04 14:29                 ` Mauro Carvalho Chehab
2011-01-04 18:08                   ` Markus Rechberger
2011-01-04 19:37                     ` Yan, Yupeng
2011-01-05  0:15                       ` Laurent Pinchart
2011-01-07  0:03                         ` Yupeng Yan
2011-01-07 14:37                           ` Laurent Pinchart
2011-01-04  8:35           ` Laurent Pinchart
2011-01-04 11:30           ` Sakari Ailus

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='000001cba6bd$f2c94ea0$d85bebe0$@org' \
    --to=shuzhenw@codeaurora.org \
    --cc=hverkuil@xs4all.nl \
    --cc=hzhong@codeaurora.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=yyan@quicinc.com \
    /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