Devicetree
 help / color / mirror / Atom feed
* [PATCH v20 00/15] media: mediatek: jpeg: add MT8196 JPEG support
@ 2026-11-25  6:16 Kyrie Wu
  2026-11-25  6:16 ` [PATCH v20 01/15] media: mediatek: jpeg: fix jpeg cores' amounts setting Kyrie Wu
                   ` (14 more replies)
  0 siblings, 15 replies; 23+ messages in thread
From: Kyrie Wu @ 2026-11-25  6:16 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
	Bin Liu, kyrie wu, Hans Verkuil, irui wang, Nicolas Dufresne,
	linux-media, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek
  Cc: Kyrie Wu

From: Kyrie Wu (吴晗) <kyrie.wu@mediatek.com>

This series fixes multi-core JPEG buffer handling, resolution changes,
streaming stop and clock management, and adds MT8196 JPEG decoder and
encoder support. The MT8196 support includes compatible strings and
SMMU stream-ID configuration through the shared JPEG syscon.

Review scope and tags in v20:
In v19, I folded the SMMU property changes already present in v18 patch 12
into the previously reviewed compatible patches, v19 patches 10 and 11.
I also removed the Reviewed-by tags from Krzysztof Kozlowski and
AngeloGioacchino Del Regno. The word "agreed" in the v19 cover was
incorrect: it did not reflect reviewer consent to that scope/tag change.

This revision separates those scopes:
- v19 patch 10 becomes v20 patch 10 (decoder compatibles only) and
  v20 patch 11 (decoder SMMU phandle and its conditional requirement).
- v19 patch 11 becomes v20 patch 12 (encoder compatibles only) and
  v20 patch 13 (encoder SMMU phandle, conditional requirement and both
  parent/child iommus stream-ID descriptions).

The diffs and commit descriptions of v20 patches 10 and 12 match the
reviewed v18 compatible-only patches exactly. Their Krzysztof Kozlowski
and AngeloGioacchino Del Regno Reviewed-by tags are restored only for
that unchanged scope. Those tags are not carried onto the SMMU changes.

Patch 9 uses the common mfd/syscon.yaml binding, per Rob Herring's review,
in place of the standalone JPEG SMMU schema.
Patches 9, 11 and 13 carry only the existing Signed-off-by and require
fresh DT review. All other Reviewed-by tags present in the published
v19 patches are retained. Patch 5 additionally carries
AngeloGioacchino Del Regno's new public Reviewed-by after review of the
multi-core power-management change.

Historical testing reported for v18 (not rerun for v19 or v20):
The v18 series was tested on MT8196 with tast. JPEG encoding and
decoding worked.

Patches 1-8 contain JPEG driver fixes.
Patch 9 adds the MT8196 JPEG SMMU compatible to the common syscon binding.
Patches 10 and 12 contain the reviewed decoder and encoder compatibles.
Patches 11 and 13 contain decoder and encoder SMMU properties.
Patch 14 adds the driver compatible strings for MT8196.
Patch 15 adds jpeg smmu sid setting.
---
Changes in v20 (relative to v19):
--Rebased on mainline 8d7fe9885c62fc9a95bf55d9db244d9672a8aadc.
--Bound the dynamic core count in the existing multi-core branch before
  assigning max_hw_count, preserving the existing probe structure.
--Correct patch 5's dispatch-versus-hardware-completion description;
  add AngeloGioacchino Del Regno's public Reviewed-by. No PM code change.
--Correct patch 6's description: restart the done-queue scan after each
  expected frame and release consecutive completed frames in order.
--Use the common syscon binding for the MT8196 JPEG SMMU compatible,
  remove the standalone schema and its MAINTAINERS file entry, and keep
  the existing JPEG media-binding coverage.
--Split the decoder and encoder binding changes into the reviewed
  compatible-only scopes and independent SMMU property patches, with
  the exact review-tag ownership described above. The series has 15 patches.

Changes in v19 (relative to v18; patch numbers below refer to v19):
--Rebased on mainline 23c62304dde29abe92013d85910d03a77dada35d.
--Initialize hw_rdy before populating children to preserve probe counts.
--Drain ready queues before waiting for in-flight buffers at STREAMOFF.
--Reject component suspend with -EBUSY while hardware is active; restore
  M2M scheduling on failure and use pm_ptr() for component PM operations.
--Publish decoder completion metadata before arming the timeout.
--Keep queue-format updates under CAPTURE STREAMOFF locking and check
  SOURCE_CHANGE state before comparing resolutions.
--Unlink prepared buffers before arming timeout or starting hardware.
--Introduce the shared SMMU schema before complete MT8196 decoder and
  encoder bindings, including their required smmu-config phandles.
--Clarify MT8196 SMMU stream IDs in encoder iommus descriptions and use
  the soc binding prefix for the shared SMMU schema patch.
--Complete SMMU initialization before allocating a child index and
  publishing child pointers, preserving parent state on probe failure.
--Update descriptions. v19 removed Reviewed-by tags from the changed
  code patches 7, 8 and 13 and from the combined binding patches 10 and
  11. The handling of the binding scope and tags is corrected in v20.

Changes in v18 (relative to v17):
--Keep suspend/resume callbacks and clock ownership on multi-hw component
  devices. Leave single-hw callbacks on the master, and wait for the active
  job before disabling component clocks.
--Add a standalone DT binding patch for mediatek,smmu-config and the
  dedicated MT8196 JPEG SMMU configuration syscon at 0x38d0000.

Changes in v17 (relative to v16):
--Rebased on top of the latest media tree

Changes in v16 (relative to v15):
--Set max_hw_count from the DT child count and update hw_rdy from child hardware probes in patch 1.
--Fix patch 2 commit message wording per review.
--Rework patch 6 commit message per review.
--Remove redundant devm_clk_bulk_get() calls in patch 5 per review comments.
--Use %pe to print smmu_regmap error pointer in patch 12 to fix media-ci/static warnings.

Changes in v15 (relative to v14):
--Rebased on top of the latest media tree

Changes in v14 (relative to v13):
--Rebased on top of the latest media tree

Changes in v13 (relative to v12):
--Rebased on top of the latest media tree
--fix kernel rebot build warnings in patch 5

Changes in v12 (relative to v11):
--Rebased on top of the latest media tree
--Some modifications for patch v11's review comments.
--add reviewer to commit messages

Changes in v11 (relative to v10):
--Rebased on top of the latest media tree
--add reviewer to commit messages

Changes in v10 (relative to v9):
--Rebased on top of the latest media tree

Changes in v9 (relative to v8):
--Rebased on top of the latest media tree

Changes in v8 (relative to v7):
--Rebased on top of the latest media tree

Changes in v7 (relative to v6):
--Rebased on top of the latest media tree

Changes in v6 (relative to v5):
--reorder the patches set.
--fix commit message of patch 1-8.

Changes in v5 (relative to v4):
--fix kernel robot build errors for patch 4.
--add reviewer for patch 1 and patch 2.

Changes in v4 (relative to v3):
--change patch subject of jpeg encoder and decoder compatible.

Changes in v3 (relative to v2):
--refactor smmu sid setting function interface
--Some modifications for patch v2's review comments.

Changes in v2 (relative to v1):
--refine jpeg dt-bindings for MT8196
--optimize software code to manage jpeg HW count
--refactor smmu sid setting function interface
--Some modifications for patch v1's review comments.

Kyrie Wu (15):
  media: mediatek: jpeg: fix jpeg cores' amounts setting
  media: mediatek: jpeg: fix jpeg buffer payload size setting
  media: mediatek: jpeg: fix buffer structure size and layout
  media: mediatek: jpeg: Fix buffer completion on multi-core streaming
    stop
  media: mediatek: jpeg: Fix multi-core clk suspend and resume setting
  media: mediatek: jpeg: fix buffer state update timing
  media: mediatek: jpeg: fix resolution change event handling in decoder
  media: mediatek: jpeg: fix remove buffer removal timing for multi-core
  dt-bindings: mfd: syscon: Add MT8196 JPEG SMMU compatible
  media: dt-bindings: mediatek,jpeg: Add mediatek, mt8196-jpgdec
    compatible
  dt-bindings: media: mediatek,jpeg: Add MT8196 decoder SMMU
    configuration
  media: dt-bindings: mediatek,jpeg: Add mediatek, mt8196-jpgenc
    compatible
  dt-bindings: media: mediatek,jpeg: Add MT8196 encoder SMMU
    configuration
  media: mediatek: jpeg: add jpeg compatible
  media: mediatek: jpeg: add jpeg smmu sid setting

 .../media/mediatek,mt8195-jpegdec.yaml        |  24 ++-
 .../media/mediatek,mt8195-jpegenc.yaml        |  39 +++-
 .../devicetree/bindings/mfd/syscon.yaml       |   1 +
 MAINTAINERS                                   |   1 +
 .../platform/mediatek/jpeg/mtk_jpeg_core.c    | 169 +++++++++++++-----
 .../platform/mediatek/jpeg/mtk_jpeg_core.h    |  19 +-
 .../platform/mediatek/jpeg/mtk_jpeg_dec_hw.c  |  96 +++++++++-
 .../platform/mediatek/jpeg/mtk_jpeg_enc_hw.c  |  94 +++++++++-
 8 files changed, 377 insertions(+), 66 deletions(-)


base-commit: 8d7fe9885c62fc9a95bf55d9db244d9672a8aadc
-- 
2.51.0.windows.2


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

end of thread, other threads:[~2026-11-25  6:44 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25  6:16 [PATCH v20 00/15] media: mediatek: jpeg: add MT8196 JPEG support Kyrie Wu
2026-11-25  6:16 ` [PATCH v20 01/15] media: mediatek: jpeg: fix jpeg cores' amounts setting Kyrie Wu
2026-11-25  6:29   ` sashiko-bot
2026-11-25  6:16 ` [PATCH v20 02/15] media: mediatek: jpeg: fix jpeg buffer payload size setting Kyrie Wu
2026-11-25  6:16 ` [PATCH v20 03/15] media: mediatek: jpeg: fix buffer structure size and layout Kyrie Wu
2026-11-25  6:16 ` [PATCH v20 04/15] media: mediatek: jpeg: Fix buffer completion on multi-core streaming stop Kyrie Wu
2026-11-25  6:16 ` [PATCH v20 05/15] media: mediatek: jpeg: Fix multi-core clk suspend and resume setting Kyrie Wu
2026-11-25  6:38   ` sashiko-bot
2026-11-25  6:16 ` [PATCH v20 06/15] media: mediatek: jpeg: fix buffer state update timing Kyrie Wu
2026-11-25  6:16 ` [PATCH v20 07/15] media: mediatek: jpeg: fix resolution change event handling in decoder Kyrie Wu
2026-11-25  6:32   ` sashiko-bot
2026-11-25  6:16 ` [PATCH v20 08/15] media: mediatek: jpeg: fix remove buffer removal timing for multi-core Kyrie Wu
2026-11-25  6:16 ` [PATCH v20 09/15] dt-bindings: mfd: syscon: Add MT8196 JPEG SMMU compatible Kyrie Wu
2026-11-25  6:21   ` sashiko-bot
2026-11-25  6:16 ` [PATCH v20 10/15] media: dt-bindings: mediatek,jpeg: Add mediatek, mt8196-jpgdec compatible Kyrie Wu
2026-11-25  6:16 ` [PATCH v20 11/15] dt-bindings: media: mediatek,jpeg: Add MT8196 decoder SMMU configuration Kyrie Wu
2026-11-25  6:25   ` sashiko-bot
2026-11-25  6:16 ` [PATCH v20 12/15] media: dt-bindings: mediatek,jpeg: Add mediatek, mt8196-jpgenc compatible Kyrie Wu
2026-11-25  6:16 ` [PATCH v20 13/15] dt-bindings: media: mediatek,jpeg: Add MT8196 encoder SMMU configuration Kyrie Wu
2026-11-25  6:16 ` [PATCH v20 14/15] media: mediatek: jpeg: add jpeg compatible Kyrie Wu
2026-11-25  6:44   ` sashiko-bot
2026-11-25  6:16 ` [PATCH v20 15/15] media: mediatek: jpeg: add jpeg smmu sid setting Kyrie Wu
2026-11-25  6:38   ` sashiko-bot

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