1. 03 Mar, 2022 4 commits
    • Laurent Pinchart's avatar
      media: media-entity: Simplify media_pipeline_start() · 3056a8e9
      Laurent Pinchart authored
      The media_pipeline_start() function has two purposes: it constructs a
      pipeline by recording the entities that are part of it, gathered from a
      graph walk, and validate the media links. The pipeline pointer is stored
      in the media_entity structure as part of this process, and the entity's
      stream count is increased, to record that the entity is streaming.
      
      When multiple video nodes are present in a pipeline,
      media_pipeline_start() is typically called on all of them, with the same
      pipeline pointer. This is taken into account in media_pipeline_start()
      by skipping validation for entities that are already part of the
      pipeline, while returning an error if an entity is part of a different
      pipeline.
      
      It turns out that this process is overly complicated. When
      media_pipeline_start() is called for the first time, it constructs the
      full pipeline, adding all entities and validating all the links.
      Subsequent calls to media_pipeline_start() are then nearly no-ops, they
      only increase the stream count on the pipeline and on all entities.
      
      The media_entity stream_count field is used for two purposes: checking
      if the entity is streaming, and detecting when a call to
      media_pipeline_stop() balances needs to reset the entity pipe pointer to
      NULL. The former can easily be replaced by a check of the pipe pointer.
      
      Simplify media_pipeline_start() by avoiding the pipeline walk on all
      calls but the first one, and drop the media_entity stream_count field.
      media_pipeline_stop() is updated accordingly.
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      [Sakari Ailus: Drop redundant '!= NULL' as discussed]
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      3056a8e9
    • Laurent Pinchart's avatar
      media: media-entity: Add media_pad_is_streaming() helper function · f17bc788
      Laurent Pinchart authored
      Add a function to test if a pad is part of a pipeline currently
      streaming, and use it through drivers to replace direct access to the
      stream_count field. This will help reworking pipeline start/stop without
      disturbing drivers.
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      f17bc788
    • Shawn Tu's avatar
      media: Add a driver for the og01a1b camera sensor · 472377fe
      Shawn Tu authored
      Add a V4L2 sub-device driver for Omnivision og01a1b b&w
      image sensor. This is a camera sensor using the I2C bus
      for control and the CSI-2 bus for data.
      
      This driver supports following features:
      - manual exposure and analog/digital gain control support
      - vblank/hblank control support
      - test pattern support
      - media controller support
      - runtime PM support
      - support following resolutions:
        + 1280x1024 at 120FPS
      Signed-off-by: default avatarShawn Tu <shawnx.tu@intel.com>
      [Sakari Ailus: Update according to recent v4l2-async API changes]
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      472377fe
    • Hans de Goede's avatar
      media: i2c: ov5648: Fix lockdep error · d4cb5d3c
      Hans de Goede authored
      ov5648_state_init() calls ov5648_state_mipi_configure() which uses
      __v4l2_ctrl_s_ctrl[_int64](). This means that sensor->mutex (which
      is also sensor->ctrls.handler.lock) must be locked before calling
      ov5648_state_init().
      
      ov5648_state_mipi_configure() is also used in other places where
      the lock is already held so it cannot be changed itself.
      
      Note this is based on an identical (tested) fix for the ov8865 driver,
      this has only been compile-tested.
      
      Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
      Reviewed-by: default avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      d4cb5d3c
  2. 23 Feb, 2022 1 commit
  3. 17 Feb, 2022 19 commits
  4. 16 Feb, 2022 4 commits
  5. 08 Feb, 2022 12 commits