1. 14 Aug, 2023 3 commits
    • Wentong Wu's avatar
      media: pci: intel: Add IVSC support for IPU bridge driver · c66821f3
      Wentong Wu authored
      Previously on ACPI platforms, sensors that are intended to be connected
      to an IPU device for use with the ipu3-cio2 driver lacking the necessary
      connection information in firmware. IPU bridge driver is to connect
      sensors to IPU device via software nodes.
      
      Currently IVSC located between IPU device and sensors is available in
      existing commercial platforms from multiple OEMs. But the connection
      information between them in firmware is also not enough to build V4L2
      connection graph. This patch parses the connection properties from the
      SSDB buffer in DSDT and build the connection using software nodes.
      
      IVSC driver is based on MEI framework (previously known as HECI), it
      has two MEI clients, MEI CSI and MEI ACE. Both clients are used to
      communicate messages with IVSC firmware. Linux abstracts MEI client
      as a device, whose bus type is MEI. And the device is addressed by a
      GUID/UUID which is part of the device name of MEI client. After figured
      out MEI CSI via the UUID composed device name, this patch setup the
      connection between MEI CSI and IPU, and the connection between MEI CSI
      and sensor via software nodes.
      Signed-off-by: default avatarWentong Wu <wentong.wu@intel.com>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
      c66821f3
    • Wentong Wu's avatar
      media: pci: intel: ivsc: Add ACE submodule · 78876f71
      Wentong Wu authored
      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 I2C. 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: default avatarWentong Wu <wentong.wu@intel.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
      78876f71
    • Wentong Wu's avatar
      media: pci: intel: ivsc: Add CSI submodule · 29006e19
      Wentong Wu authored
      CSI is a submodule of IVSC which can route camera sensor data
      to the outbound MIPI CSI-2 interface.
      
      The interface communicating with firmware is via MEI. There is
      a separate MEI UUID, which this driver uses to enumerate.
      
      To route camera sensor data to host, the information of link
      frequency and number of data lanes is sent to firmware by
      sending MEI command when starting stream.
      
      CSI also provides a privacy mode. When privacy mode is turned
      on, camera sensor can't be used. This means that both IVSC and
      host Image Processing Unit(IPU) can't get image data. And when
      this mode is turned on, user is notified via v4l2 control
      callback.
      
      Link: https://lore.kernel.org/linux-media/20230803115550.1601965-2-sakari.ailus@linux.intel.comSigned-off-by: default avatarWentong Wu <wentong.wu@intel.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
      29006e19
  2. 10 Aug, 2023 37 commits