All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: "Wu, Wentong" <wentong.wu@intel.com>
Cc: "hdegoede@redhat.com" <hdegoede@redhat.com>,
	"djrscally@gmail.com" <djrscally@gmail.com>,
	"laurent.pinchart@ideasonboard.com" 
	<laurent.pinchart@ideasonboard.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"bingbu.cao@linux.intel.com" <bingbu.cao@linux.intel.com>,
	"Wang, Zhifeng" <zhifeng.wang@intel.com>,
	"Ye, Xiang" <xiang.ye@intel.com>,
	"Qiu, Tian Shu" <tian.shu.qiu@intel.com>
Subject: Re: [PATCH v3 2/3] media: pci: intel: ivsc: Add ACE submodule
Date: Thu, 30 Mar 2023 11:27:46 +0300	[thread overview]
Message-ID: <ZCVIAg1h/LfrWMJY@kekkonen.localdomain> (raw)
In-Reply-To: <MN2PR11MB4318F9FC62A33A86B9ED64FB8D8E9@MN2PR11MB4318.namprd11.prod.outlook.com>

Hi Wentong,

On Thu, Mar 30, 2023 at 07:32:27AM +0000, Wu, Wentong wrote:
> Hi Sakari,
> 
> Thanks
> 
> > -----Original Message-----
> > From: Sakari Ailus <sakari.ailus@linux.intel.com>
> > Sent: Wednesday, March 29, 2023 4:04 PM
> > 
> > Hi Wentong,
> > 
> > On Mon, Mar 27, 2023 at 02:23:07PM +0800, Wentong Wu wrote:
> > > ACE is a submodule of IVSC which controls camera sensor's ownership,
> > > belonging to host or IVSC. When IVSC owns camera sensor, it is for
> > > algorithm computing. When host wants to control camera sensor, ACE
> > > module needs to be informed of ownership with defined interface.
> > >
> > > The interface is via MEI. There is a separate MEI UUID, which this
> > > driver uses to enumerate.
> > >
> > > To switch ownership of camera sensor between IVSC and host, the caller
> > > specifies the defined ownership information which will be sent to
> > > firmware by sending MEI command.
> > >
> > > Device link(device_link_add) is used to set the right camera sensor
> > > ownership before accessing the sensor via I²C. With DL_FLAG_PM_RUNTIME
> > > and DL_FLAG_RPM_ACTIVE, the supplier device will be PM runtime resumed
> > > before the consumer(camera sensor).
> > > So use runtime PM callbacks to transfer the ownership between host and
> > > IVSC.
> > >
> > > Signed-off-by: Wentong Wu <wentong.wu@intel.com>
> > > ---
> > >  drivers/media/pci/intel/ivsc/Makefile  |   3 +
> > >  drivers/media/pci/intel/ivsc/mei_ace.c | 534
> > > +++++++++++++++++++++++++++++++++
> > >  2 files changed, 537 insertions(+)
> > >  create mode 100644 drivers/media/pci/intel/ivsc/mei_ace.c
> > >
> > > diff --git a/drivers/media/pci/intel/ivsc/Makefile
> > > b/drivers/media/pci/intel/ivsc/Makefile
> > > index 7e4c5f0..a641f14 100644
> > > --- a/drivers/media/pci/intel/ivsc/Makefile
> > > +++ b/drivers/media/pci/intel/ivsc/Makefile
> > > @@ -5,3 +5,6 @@
> > >  obj-$(CONFIG_INTEL_VSC) += ivsc-csi.o  ivsc-csi-y += mei_csi.o
> > > ivsc-csi-y += csi_bridge.o
> > > +
> > > +obj-$(CONFIG_INTEL_VSC) += ivsc-ace.o ivsc-ace-y += mei_ace.o
> > > diff --git a/drivers/media/pci/intel/ivsc/mei_ace.c
> > > b/drivers/media/pci/intel/ivsc/mei_ace.c
> > > new file mode 100644
> > > index 0000000..434b072
> > > --- /dev/null
> > > +++ b/drivers/media/pci/intel/ivsc/mei_ace.c
> > > @@ -0,0 +1,534 @@
> > > +// SPDX-License-Identifier: GPL-2.0-only
> > > +/*
> > > + * Copyright (C) 2023 Intel Corporation. All rights reserved.
> > > + * Intel Visual Sensing Controller ACE Linux driver  */
> > > +
> > > +/*
> > > + * To set ownership of camera sensor, there is specific command,
> > > +which
> > > + * is sent via MEI protocol. That's a two-step scheme where the
> > > +firmware
> > > + * first acks receipt of the command and later responses the command
> > > +was
> > > + * executed. The command sending function uses "completion" as the
> > > + * synchronization mechanism. The notification for command is
> > > +received
> > > + * via a mei callback which wakes up the caller. There can be only
> > > +one
> > > + * outstanding command at a time.
> > 
> > Could you document the dependencies in the sensor initialisation (ace +
> > csi) 
> 
> This is about ownership instead of dependency, if host sensor driver configure
> sensor with ownership on IVSC, probably it will be changed by firmware somehow.
> 
> > and how the sensor is powered (i.e. no direct control of the PMIC from the
> > host?)? 
> 
> The power line is directly connected to IVSC instead of host, when ownership
> switched to host, sensor is already powered up by firmware. 

Good. Please also document this in the comment.

-- 
Kind regards,

Sakari Ailus

  reply	other threads:[~2023-03-30  8:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27  6:23 [PATCH v3 0/3] media: pci: intel: ivsc: Add driver of Intel Visual Sensing Controller(IVSC) Wentong Wu
2023-03-27  6:23 ` [PATCH v3 1/3] media: pci: intel: ivsc: Add CSI submodule Wentong Wu
2023-03-27 10:01   ` kernel test robot
2023-03-28 13:59   ` kernel test robot
2023-03-29  8:48   ` Sakari Ailus
2023-03-30  3:58     ` Wu, Wentong
2023-03-30  8:23       ` Sakari Ailus
2023-03-29  8:49   ` Sakari Ailus
2023-03-27  6:23 ` [PATCH v3 2/3] media: pci: intel: ivsc: Add ACE submodule Wentong Wu
2023-03-29  8:03   ` Sakari Ailus
2023-03-30  7:32     ` Wu, Wentong
2023-03-30  8:27       ` Sakari Ailus [this message]
2023-03-27  6:23 ` [PATCH v3 3/3] ACPI: delay enumeration of devices with a _DEP pointing to INTC1059 device Wentong Wu
2023-03-27  7:06   ` Sakari Ailus
2023-03-27  7:17     ` Wu, Wentong
2023-03-27  7:32       ` Sakari Ailus
2023-03-27  7:36         ` Wu, Wentong
2023-03-27  7:21 ` [PATCH v3 0/3] media: pci: intel: ivsc: Add driver of Intel Visual Sensing Controller(IVSC) Sakari Ailus
2023-03-27  7:33   ` Wu, Wentong
2023-03-27  7:49     ` Sakari Ailus
2023-03-27  8:13       ` Wu, Wentong
2023-03-27  9:36         ` Sakari Ailus
2023-03-28  7:32           ` Wu, Wentong
2023-03-28 19:48             ` Sakari Ailus
2023-03-29  0:42               ` Wu, Wentong
2023-03-29  7:39                 ` 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=ZCVIAg1h/LfrWMJY@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=bingbu.cao@linux.intel.com \
    --cc=djrscally@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=tian.shu.qiu@intel.com \
    --cc=wentong.wu@intel.com \
    --cc=xiang.ye@intel.com \
    --cc=zhifeng.wang@intel.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 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.