[PATCH v5 0/6] drm/mediatek: Add PQ components support for MT8196

Jay Liu
2026-04-27T11:21:41Z

This series adds Picture Quality (PQ) component support for the MT8196 SoC,
including device tree bindings and driver implementations for GAMMA, DITHER,
CCORR, and TDSHP modules.

Patch 1: Add GAMMA compatible string for MT8196
Patch 2: Add DITHER compatible string for MT8196
Patch 3: Add CCORR compatible string for MT8196
Patch 4: Add TDSHP dt-binding documentation
Patch 5: Add support for multiple CCORR components
Patch 6: Add TDSHP driver support for MT8196

Architecture notes:
MT8196 display pipeline includes two CCORR instances that must be chained
in the hardware path, but the CTM API only configures one. Patch 5 ensures
the second CCORR instance does not interfere with the configured one.

Testing:
- Verified dt-bindings pass dt_binding_check
- Tested display pipeline with all PQ components on MT8196 EVB
- Confirmed color correction (CCORR CTM and GAMMA LUT) functionality
- Confirmed sharpness enhancement (TDSHP) functionality in relay mode
- Note: dtbs_check will be validated when MT8196 DTS is upstreamed

Changes in v5:
- Cover letter: Fix subject spelling and add subsystem prefix
- tdshp dt-binding: Replace 'disp-tdshp' with 'tdshp' in dt-binding (suggested by Krzysztof)
- Add complete version history and lore links for tracking (suggested by Krzysztof)

Changes in v4:
- tdshp dt-binding: Remove unused 'Sibling' description (suggested by Krzysztof)
- tdshp dt-binding: Use enum directly instead of items list for compatible property
- tdshp dt-binding: Fix indentation and remove extra blank line in example section
- ccorr driver: Rebase on linux-next to resolve conflicts

Changes in v3:
- Fix dt_binding_check errors in all binding patches
- Remove incorrect Signed-off-by line
- Move standalone ccorr fix out of this series

Changes in v2:
- Optimize ccorr ctm_set process to avoid affecting other SoCs
- Remove unnecessary code from tdshp driver
- Update tdshp dt-bindings (clocks, description, examples)

Link to v4: https://lore.kernel.org/all/20260324125315.4715-1-jay.liu@mediatek.com/
Link to v3: https://lore.kernel.org/all/20250808125512.9788-1-jay.liu@mediatek.com/
Link to v2: https://lore.kernel.org/all/20250727071609.26037-1-jay.liu@mediatek.com/
Link to v1: https://lore.kernel.org/all/20250219092040.11227-1-jay.liu@mediatek.com/

Dependencies:
This series depends on the MT8196 display pipeline foundation patches [1].

[1] "Add display path components support for MT8196"
https://patchwork.kernel.org/project/linux-mediatek/list/?series=955361

Jay Liu (6):
dt-bindings: display: mediatek: gamma: Add support for MT8196
dt-bindings: display: mediatek: dither: Add support for MT8196
dt-bindings: display: mediatek: ccorr: Add support for MT8196
dt-bindings: display: mediatek: tdshp: Add support for MT8196
drm/mediatek: Support multiple CCORR component
drm/mediatek: Add TDSHP component support for MT8196

.../display/mediatek/mediatek,ccorr.yaml | 1 +
.../display/mediatek/mediatek,dither.yaml | 1 +
.../display/mediatek/mediatek,gamma.yaml | 1 +
.../display/mediatek/mediatek,tdshp.yaml | 46 ++++++++++++++++
drivers/gpu/drm/mediatek/mtk_crtc.c | 5 +-
drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 52 ++++++++++++++++++-
drivers/gpu/drm/mediatek/mtk_ddp_comp.h | 8 +--
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 6 ++-
drivers/gpu/drm/mediatek/mtk_disp_drv.h | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 +
10 files changed, 116 insertions(+), 8 deletions(-)
create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,tdshp.yaml

--
2.46.0