Skip to content

FROMLIST: media: qcom: camss: Add CAMSS Offline Processing Engine driver - #1906

Merged
svankada merged 1 commit into
qualcomm-linux:tech/mm/camssfrom
nihal231998:camss_fix
Sep 24, 2026
Merged

svankada merged 1 commit into
qualcomm-linux:tech/mm/camssfrom
nihal231998:camss_fix

Conversation

@nihal231998

Copy link
Copy Markdown

Add an image processing driver for the Qualcomm Offline Processing Engine (OPE). OPE is a memory-to-memory ISP block that converts raw Bayer frames to YUV, performing white balance, demosaic, chroma enhancement, color correction and downscaling.

The hardware architecture consists of Fetch Engines and Write Engines, connected through intermediate pipeline modules for pix processing.

The driver exposes three video nodes per pipeline instance:

  • ope_input: Bayer RAW input (V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
  • ope_disp_output: YUV output (V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
  • ope_params: ISP parameters (V4L2_BUF_TYPE_META_OUTPUT)

Hardware features:

  • Stripe-based processing (up to 336 pixels wide per stripe)
  • White balance (CLC_WB)
  • Demosaic / Bayer-to-RGB (CLC_DEMO)
  • RGB-to-YUV conversion (CLC_CHROMA_ENHAN)
  • Color correction matrix (CLC_CC)
  • MN downscaler for chroma and luma planes

Default configuration values are based on public standards such as BT.601.

Processing Model:
OPE processes frames in stripes of up to 336 pixels. Therefore, frames must be split into stripes for processing. Each stripe is configured after the previous one has been acquired (double buffered registers). To minimize inter-stripe latency, stripe configurations are generated ahead of time.

The driver is split into three source files under the ope/ directory:

  • core.c: the OPE m2m driver itself: probe, power management, V4L2/media device setup, format handling, stripe generation and hardware programming.

  • pipeline.c/.h: a small declarative media-controller topology builder. Drivers describe their entire media graph, entities (video devices, subdevs, or base entities), their pads, and the links between them, in a static descriptor table. The builder validates the table, allocates and registers all entities, and creates all MC pad links. It is kept generic but currently only used by OPE.

  • params.c/.h: V4L2 ISP parameter buffer validation and dispatch. It wraps the extensible V4L2 ISP parameters buffer format, validating the buffer size and each per-block header before forwarding every block to its driver-supplied handler.

Co-developed-by: Hans de Goede johannes.goede@oss.qualcomm.com

Upstream-Status: Submitted [https://lore.kernel.org/all/20260724-camss-isp-ope-v5-4-e70ad4fa39ce@oss.qualcomm.com/]

Add an image processing driver for the Qualcomm Offline Processing Engine
(OPE). OPE is a memory-to-memory ISP block that converts raw Bayer
frames to YUV, performing white balance, demosaic, chroma enhancement,
color correction and downscaling.

The hardware architecture consists of Fetch Engines and Write Engines,
connected through intermediate pipeline modules for pix processing.

The driver exposes three video nodes per pipeline instance:
  - ope_input: Bayer RAW input (V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
  - ope_disp_output: YUV output     (V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
  - ope_params: ISP parameters (V4L2_BUF_TYPE_META_OUTPUT)

Hardware features:
  - Stripe-based processing (up to 336 pixels wide per stripe)
  - White balance (CLC_WB)
  - Demosaic / Bayer-to-RGB (CLC_DEMO)
  - RGB-to-YUV conversion (CLC_CHROMA_ENHAN)
  - Color correction matrix (CLC_CC)
  - MN downscaler for chroma and luma planes

Default configuration values are based on public standards such as BT.601.

Processing Model:
OPE processes frames in stripes of up to 336 pixels. Therefore, frames
must be split into stripes for processing. Each stripe is configured after
the previous one has been acquired (double buffered registers). To minimize
inter-stripe latency, stripe configurations are generated ahead of time.

The driver is split into three source files under the ope/ directory:

  - core.c: the OPE m2m driver itself: probe, power management, V4L2/media
    device setup, format handling, stripe generation and hardware
    programming.

  - pipeline.c/.h: a small declarative media-controller topology builder.
    Drivers describe their entire media graph, entities (video devices,
    subdevs, or base entities), their pads, and the links between them, in
    a static descriptor table. The builder validates the table, allocates
    and registers all entities, and creates all MC pad links. It is kept
    generic but currently only used by OPE.

  - params.c/.h: V4L2 ISP parameter buffer validation and dispatch. It
    wraps the extensible V4L2 ISP parameters buffer format, validating
    the buffer size and each per-block header before forwarding every
    block to its driver-supplied handler.

Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Co-developed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Upstream-Status: Submitted [https://lore.kernel.org/all/20260724-camss-isp-ope-v5-4-e70ad4fa39ce@oss.qualcomm.com/]

Signed-off-by: Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com>
@qcomlnxci
qcomlnxci requested review from a team, quic-vikramsa, svankada and Wenmeng Liu (wenmliu) and removed request for a team September 24, 2026 14:00
@svankada
svankada merged commit 73f9fb0 into qualcomm-linux:tech/mm/camss Sep 24, 2026
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants