[PATCH v3 00/17] Add MediaTek SoC DRM support for MT8196

paul-pl.chen
2025-05-15T09:35:04Z

From: Paul-pl Chen <paul-pl.chen@mediatek.com>

This patch series adds support for the MediaTek MT8196 SoC's display
subsystem in the DRM driver.

Changes in v3:

- [PATCH v3 06/17]
Refine runtime PM, top clocks and async controls for MMSYS
- [PATCH v3 08/17]
Refactor SOF settings by adding mtk_mutex_get_output_comp_sof() and
extracting SOF logic from mtk_mutex_add_comp()
and mtk_mutex_remove_comp()
- [PATCH v3 10/17]
Export OVL format definitions and format
conversion API
- [PATCH v3 11/17]
Export OVL ignore pixel alpha logic
- [PATCH v3 12/17]
Refactor exdma_config setup to reduce complexity
and consolidate duplicate settings in exdma_layer_config()
- [PATCH v3 13/17]
Refine blender's layer_config driver for improved efficiency
- [PATCH v3 14/17] Refine outproc driver: use readl() and writel() to
replace mtk_ddp_write_mask() for normal mode settings
- [PATCH v3 15/17]
Refine ovlsys_adaptor driver:Use path instead of ovl_adaptor_comp for
searching component type. Improve efficiency of config, start, stop,
and layer_config functions
- [PATCH v3 16/17]
Refine mtk_find_possible_crtcs() function

Changes in v2:
- add support for MT8196's new hardware components (EXDMA, BLENDER,
OUTPROC) following the previous MTK OVL software architecture.
- reuse mtk_ovl drivers in MediaTek DRM display to support the new
MT8196 SoC.
- implement support for multiple mmsys instances within a single
mediatek-drm driver, improving flexibility and scalability.
- refactor existing components (mutex, OVL) to accommodate the new
architecture and improve code reusability.
- update component matching, binding logic, and data structures to
support the new multi-mmsys design.
Nancy Lin (10):
dt-bindings: soc: mediatek: add mutex yaml for MT8196
soc: mediatek: Add runtime PM and top clocks and async controls for
MMSYS
soc: mediatek: add mmsys support for MT8196
soc: mediatek: mutex: add mutex support for MT8196
drm/mediatek: Export OVL formats definitions and format conversion API
drm/mediatek: drm/mediatek: Export OVL ignore pixel alpha function
drm/mediatek: add EXDMA support for MT8196
drm/mediatek: add OUTPROC support for MT8196
drm/mediatek: add ovlsys_adaptor support for MT8196
drm/mediatek: Add support for MT8196 multiple mmsys

Paul-pl Chen (7):
dt-bindings: display: mediatek: add EXDMA yaml for MT8196
dt-bindings: display: mediatek: add BLENDER yaml for MT8196
dt-bindings: display: mediatek: add OUTPROC yaml for MT8196
soc: mediatek: mutex: Reused the switch case for SOF ID
soc: mediatek: mutex: refactor SOF settings for output components
drm/mediatek: add BLENDER support for MT8196
drm/mediatek: Add support for multiple mmsys in the one mediatek-drm
driver

.../display/mediatek/mediatek,blender.yaml | 47 ++
.../display/mediatek/mediatek,outproc.yaml | 54 ++
.../bindings/dma/mediatek,exdma.yaml | 68 ++
.../bindings/soc/mediatek/mediatek,mutex.yaml | 2 +
drivers/gpu/drm/mediatek/Makefile | 4 +
drivers/gpu/drm/mediatek/mtk_crtc.c | 342 ++++++--
drivers/gpu/drm/mediatek/mtk_crtc.h | 6 +-
drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 136 +++-
drivers/gpu/drm/mediatek/mtk_ddp_comp.h | 6 +
drivers/gpu/drm/mediatek/mtk_disp_blender.c | 264 +++++++
drivers/gpu/drm/mediatek/mtk_disp_blender.h | 10 +
drivers/gpu/drm/mediatek/mtk_disp_drv.h | 67 ++
drivers/gpu/drm/mediatek/mtk_disp_exdma.c | 349 +++++++++
drivers/gpu/drm/mediatek/mtk_disp_outproc.c | 240 ++++++
drivers/gpu/drm/mediatek/mtk_disp_outproc.h | 22 +
drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 238 +++---
drivers/gpu/drm/mediatek/mtk_disp_ovl.h | 29 +
.../drm/mediatek/mtk_disp_ovlsys_adaptor.c | 729 ++++++++++++++++++
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 277 +++++--
drivers/gpu/drm/mediatek/mtk_drm_drv.h | 27 +-
drivers/soc/mediatek/mt8196-mmsys.h | 396 ++++++++++
drivers/soc/mediatek/mtk-mmsys.c | 206 ++++-
drivers/soc/mediatek/mtk-mmsys.h | 18 +
drivers/soc/mediatek/mtk-mutex.c | 257 ++++--
include/linux/soc/mediatek/mtk-mmsys.h | 60 ++
include/linux/soc/mediatek/mtk-mutex.h | 4 +
26 files changed, 3555 insertions(+), 303 deletions(-)
create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,blender.yaml
create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,outproc.yaml
create mode 100644 Documentation/devicetree/bindings/dma/mediatek,exdma.yaml
create mode 100644 drivers/gpu/drm/mediatek/mtk_disp_blender.c
create mode 100644 drivers/gpu/drm/mediatek/mtk_disp_blender.h
create mode 100644 drivers/gpu/drm/mediatek/mtk_disp_exdma.c
create mode 100644 drivers/gpu/drm/mediatek/mtk_disp_outproc.c
create mode 100644 drivers/gpu/drm/mediatek/mtk_disp_outproc.h
create mode 100644 drivers/gpu/drm/mediatek/mtk_disp_ovl.h
create mode 100644 drivers/gpu/drm/mediatek/mtk_disp_ovlsys_adaptor.c
create mode 100644 drivers/soc/mediatek/mt8196-mmsys.h

--
2.45.2