The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v4 0/5] Add Qualcomm JPEG V4L2 encoder for SM8250
@ 2026-07-06  7:11 Atanas Filipov
  2026-07-06  7:11 ` [PATCH v4 1/5] media: qcom: camss: Populate CAMSS child devices via DT Atanas Filipov
                   ` (6 more replies)
  0 siblings, 7 replies; 33+ messages in thread
From: Atanas Filipov @ 2026-07-06  7:11 UTC (permalink / raw)
  To: linux-media
  Cc: bryan.odonoghue, vladimir.zapolskiy, loic.poulain, mchehab, robh,
	krzk+dt, conor+dt, andersson, konradybcio, linux-arm-msm,
	linux-kernel, devicetree, Atanas Filipov

This series adds support for the Qualcomm JPEG V4L2 mem2mem encoder on SM8250.

The goal is to upstream a standards-based JPEG encode path using the V4L2 M2M
framework, with DT-described hardware resources and SoC DTS integration.

The JPEG encoder is part of the Camera SubSystem (CAMSS) and is described as a
child node of the CAMSS block, allowing of_platform_populate() in camss_probe()
to register and probe it automatically.

Dependencies:
- Patch 1/5 is related to bod's work queued in patchwork:
  https://patchwork.linuxtv.org/project/linux-media/patch/20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-4-5b93415be6dd@linaro.org/

Supported compatibles:
- qcom,sm8250-jenc

Driver scope and design choices:
- uses the standard V4L2 mem2mem + vb2 workflow
- maps runtime resources from DT (clocks/interconnects/iommu/etc.)

Functional validation:
- tested with v4l2-ctl and GStreamer (v4l2jpegenc)
- V4L2 compliance test (v4l2-compliance) passed

Note: The handling of shared camera subsystem resources (power domains,
interconnects) for child IP blocks is still an open design question.
We have followed the established SM8250 pattern for now and would
welcome guidance from maintainers on the preferred approach.

Changes since v3:

  CAMSS binding (dt-bindings: media: qcom,sm8250-camss):
  - Added as new patch 2/5; allows #address-cells, #size-cells, ranges,
    and child nodes using unevaluatedProperties: false so that dtbs_check
    validates child nodes against their own schema without requiring the
    parent binding to enumerate each child type explicitly.

  Binding (dt-bindings: media: qcom,jpeg-encoder):
  - Dropped soc and camss wrapper nodes from example. (Dmitry)
  - Removed opp-level from all OPP table entries. (Dmitry)

  CAMSS (media: qcom: camss):
  - Replaced patch 1/4 with Bryan O'Donoghue's original upstream commit. (Vladimir, bod)

  Driver (media: qcom: jpeg):
  - Cleaned up driver patch commit. (bod)
  - Removed redundant "Provides" section from Kconfig help. (Dmitry)
  - Removed unneeded headers from qcom_jenc_defs.h. (Dmitry)
  - Moved V4L2_CID_QCOM_JPEG_* defines to v4l2-controls.h. (Dmitry)
  - Removed perf level and clock frequency constants. (Dmitry)
  - Replaced register mask enum with direct mask constants. (Dmitry)
  - Replaced manual clock scaling with dev_pm_opp_set_opp(). (Dmitry)
  - Fixed clock teardown order in PM suspend. (Dmitry)
  - Removed ICC management from driver. (Dmitry)
  - Switched to _DEFINE_DEV_PM_OPS for PM operations. (Dmitry)
  - Replaced kzalloc_obj() with devm_kzalloc() in probe. (Dmitry)
  - Added IRQF_NO_AUTOEN to defer IRQ until hardware is acquired. (Dmitry)
  - Used devm_add_action_or_reset() for v4l2_device_unregister cleanup. (Dmitry)
  - Moved generic JPEG marker defines to include/media/jpeg.h. (Dmitry)
  - Reused v4l2-jpeg reference Huffman tables in header generation. (Dmitry)
  - Added usage examples to the driver commit log. (bod)
  - Added baseline performance measurements table. (bod)

  DTS (arm64: dts: qcom: sm8250):
  - Restored camss interconnect-names to original values.
  - Removed icp-mnoc interconnect from jpeg-encoder node. (bod)
  - Added #address-cells, #size-cells and ranges before status. (Dmitry)
  - Padded jpeg-encoder reg address to 8 digits: 0x0ac53000. (Dmitry)
  - Removed TITAN_TOP_GDSC power-domain from jpeg-encoder sub-node. (Dmitry)
  - Removed duplicate iommus entry. (Dmitry)
  - Used ICC defines instead of 0 in interconnects. (Dmitry)

Changes since v2:

  Binding (dt-bindings: media: qcom,jpeg-encoder):
  - IOMMU stream IDs documented in binding description. (bod)
  - Dropped "Properties documented:" section from commit message. (krzk)
  - Dropped clocks minItems constraint. (krzk)
  - Renamed clock-names to match hardware signal names. (krzk)
  - Renamed interconnect-names to reflect path topology. (krzk, Dmitry)

  DTS (arm64: dts: qcom: sm8250):
  - Removed cell-index; use lowercase hex, no 0x0 padding. (Dmitry)
  - Moved jpeg-encoder node into the camss block as a child node. (bod)
  - MMCX power domain not added to jpeg-encoder; on SM8250 MMCX is
    voted by camcc, not by individual IP blocks. (bod, kept as-is)

  CAMSS (media: qcom: camss):
  - Added of_platform_populate() in camss_probe() to register child
    platform devices; no conflicts with existing CAMSS resource
    management observed. (bod)

  Driver (media: qcom: jpeg):
  - Sort obj-y entries alphabetically in qcom/Makefile. (krzk)
  - Use devm_mutex_init() instead of mutex_init(). (Frank Li)
  - Check return value of devm_mutex_init(). (Frank Li)
  - Kept return value check on dma_set_mask_and_coherent(); consistent
    with upstream media driver practice. (Frank Li, kept as-is)

Changes since v1:

  Binding (dt-bindings: media: qcom,jpeg-encoder):
  - Removed qcm6490 and sm8550 compatible strings; this series is SM8250
    only.
  - Fixed clock-names block in the binding example.
  - Added operating-points-v2 property documentation.
  - Fixed reg in the example to use the correct 2-cell (64-bit) format
    matching the sm8250 soc node address/size cells.
  - Dropped reg-names: with a single reg entry it is unnecessary.
  - Removed description literal block scalar (|).
  - Dropped _clk suffix from clock-names.
  - Added iommus description in the properties section with
    minItems/maxItems constraints.

  Driver (media: qcom: jpeg):
  - Trimmed hardware register map and definitions.
  - Migrated to devm_clk_bulk_get_all() replacing per-SoC named clock
    arrays.
  - Migrated to the OPP framework for core clock rate and performance
    level management.
  - Switched to devm_platform_ioremap_resource(pdev, 0).
  - Switched to RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros.
  - platform_set_drvdata() moved to immediately after allocation.
  - .pm uses pm_ptr().

Known limitations:
- scaling is not supported
- width and height must be aligned to 16 pixels


Atanas Filipov (4):
  dt-bindings: media: qcom,sm8250-camss: allow JPEG encoder child node
  dt-bindings: media: qcom: Add JPEG encoder binding
  arm64: dts: qcom: sm8250: Add JPEG encoder node
  media: qcom: jpeg: Add Qualcomm JPEG V4L2 encoder

Bryan O'Donoghue (1):
  media: qcom: camss: Populate CAMSS child devices via DT

 .../bindings/media/qcom,jpeg-encoder.yaml     |  146 ++
 .../bindings/media/qcom,sm8250-camss.yaml     |   10 +-
 arch/arm64/boot/dts/qcom/sm8250.dtsi          |   81 +
 drivers/media/platform/qcom/Kconfig           |    1 +
 drivers/media/platform/qcom/Makefile          |    1 +
 drivers/media/platform/qcom/camss/camss.c     |    3 +
 drivers/media/platform/qcom/jpeg/Kconfig      |   15 +
 drivers/media/platform/qcom/jpeg/Makefile     |    9 +
 .../media/platform/qcom/jpeg/qcom_jenc_defs.h |   37 +
 .../media/platform/qcom/jpeg/qcom_jenc_dev.c  |  314 ++++
 .../media/platform/qcom/jpeg/qcom_jenc_dev.h  |  109 ++
 .../media/platform/qcom/jpeg/qcom_jenc_hdr.c  |  331 ++++
 .../media/platform/qcom/jpeg/qcom_jenc_hdr.h  |  119 ++
 .../media/platform/qcom/jpeg/qcom_jenc_ops.c  | 1625 +++++++++++++++++
 .../media/platform/qcom/jpeg/qcom_jenc_ops.h  |   52 +
 .../media/platform/qcom/jpeg/qcom_jenc_res.c  |   15 +
 .../media/platform/qcom/jpeg/qcom_jenc_res.h  |   19 +
 .../qcom/jpeg/qcom_jenc_v420_hw_info.h        |  410 +++++
 .../media/platform/qcom/jpeg/qcom_jenc_v4l2.c | 1154 ++++++++++++
 .../media/platform/qcom/jpeg/qcom_jenc_v4l2.h |   23 +
 include/media/jpeg.h                          |   33 +
 include/uapi/linux/v4l2-controls.h            |   21 +
 22 files changed, 4527 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/media/qcom,jpeg-encoder.yaml
 create mode 100644 drivers/media/platform/qcom/jpeg/Kconfig
 create mode 100644 drivers/media/platform/qcom/jpeg/Makefile
 create mode 100644 drivers/media/platform/qcom/jpeg/qcom_jenc_defs.h
 create mode 100644 drivers/media/platform/qcom/jpeg/qcom_jenc_dev.c
 create mode 100644 drivers/media/platform/qcom/jpeg/qcom_jenc_dev.h
 create mode 100644 drivers/media/platform/qcom/jpeg/qcom_jenc_hdr.c
 create mode 100644 drivers/media/platform/qcom/jpeg/qcom_jenc_hdr.h
 create mode 100644 drivers/media/platform/qcom/jpeg/qcom_jenc_ops.c
 create mode 100644 drivers/media/platform/qcom/jpeg/qcom_jenc_ops.h
 create mode 100644 drivers/media/platform/qcom/jpeg/qcom_jenc_res.c
 create mode 100644 drivers/media/platform/qcom/jpeg/qcom_jenc_res.h
 create mode 100644 drivers/media/platform/qcom/jpeg/qcom_jenc_v420_hw_info.h
 create mode 100644 drivers/media/platform/qcom/jpeg/qcom_jenc_v4l2.c
 create mode 100644 drivers/media/platform/qcom/jpeg/qcom_jenc_v4l2.h


base-commit: 8d6dbbbe3ba62de0a63e962ee004afb848c8e3ac
-- 
2.34.1


^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2026-07-06 17:13 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06  7:11 [PATCH v4 0/5] Add Qualcomm JPEG V4L2 encoder for SM8250 Atanas Filipov
2026-07-06  7:11 ` [PATCH v4 1/5] media: qcom: camss: Populate CAMSS child devices via DT Atanas Filipov
2026-07-06 12:09   ` Krzysztof Kozlowski
2026-07-06 12:27     ` Bryan O'Donoghue
2026-07-06 12:36       ` Krzysztof Kozlowski
2026-07-06 12:38         ` Bryan O'Donoghue
2026-07-06 12:41   ` Dmitry Baryshkov
2026-07-06  7:11 ` [PATCH v4 2/5] dt-bindings: media: qcom,sm8250-camss: allow JPEG encoder child node Atanas Filipov
2026-07-06 10:07   ` Bryan O'Donoghue
2026-07-06 12:11   ` Krzysztof Kozlowski
2026-07-06  7:11 ` [PATCH v4 3/5] dt-bindings: media: qcom: Add JPEG encoder binding Atanas Filipov
2026-07-06 10:19   ` Bryan O'Donoghue
2026-07-06 12:17   ` Krzysztof Kozlowski
2026-07-06  7:11 ` [PATCH v4 4/5] arm64: dts: qcom: sm8250: Add JPEG encoder node Atanas Filipov
2026-07-06 12:18   ` Krzysztof Kozlowski
2026-07-06 12:45   ` Dmitry Baryshkov
2026-07-06  7:11 ` [PATCH v4 5/5] media: qcom: jpeg: Add Qualcomm JPEG V4L2 encoder Atanas Filipov
2026-07-06  7:46   ` Vladimir Zapolskiy
2026-07-06 10:21   ` Bryan O'Donoghue
2026-07-06 12:19   ` Krzysztof Kozlowski
2026-07-06 13:11   ` Dmitry Baryshkov
2026-07-06 17:13   ` Uwe Kleine-König
2026-07-06 10:12 ` [PATCH v4 0/5] Add Qualcomm JPEG V4L2 encoder for SM8250 Bryan O'Donoghue
2026-07-06 12:00   ` Vladimir Zapolskiy
2026-07-06 12:11     ` Bryan O'Donoghue
2026-07-06 13:02       ` Vladimir Zapolskiy
2026-07-06 13:37         ` Bryan O'Donoghue
2026-07-06 13:57           ` Vladimir Zapolskiy
2026-07-06 14:12             ` Bryan O'Donoghue
2026-07-06 14:35               ` Vladimir Zapolskiy
2026-07-06 14:49                 ` Bryan O'Donoghue
2026-07-06 15:00                   ` Vladimir Zapolskiy
2026-07-06 12:24 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox