Skip to content

drm/mediatek: Add mt8195 DisplayPort driver

Guillaume Ranquet dri-devel linux-arm-kernel linux-devicetree linux-fbdev linux-mediatek linux-phy lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest21 patches 68 repliesIn review
  2. v922 patches 44 repliesSuperseded
  3. v819 patches 43 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v78 patches7 repliesSuperseded
v67 patches24 repliesSuperseded

Changes in v10 from the cover letter

- The DP-Phy is back to being a child device of the DP driver (as in v8)
- hot plug detection has been added back to Embedded Display Port... as after discussing with mediatek experts, this is needed eventhough the Embedded Display port is not un-pluggable
- rebased on linux-next
- simplified/split train_handler function, as suggested by Rex
- added comments on the sleep/delays present in the code
- removed previous patch introducing retries when receiving AUX_DEFER as this is already handled in the dp_aux framework
- added max-lane and max-linkrate device tree u8 properties instead of hardcoded #defines

Patches in v10 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21dt-bindings: mediatek,dpi: Add DPINTF compatibleDocumentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml+8 -56 replies
2/21dt-bindings: mediatek,dp: Add Display Port bindingDocumentation/devicetree/bindings/display/mediatek/mediatek,dp.yaml+99 -05 replies
3/21drm/edid: Convert cea_sad helper struct to kernelDocinclude/drm/drm_edid.h+9 -34 replies
4/21drm/edid: Add cea_sad helpers for freq/lengthdrivers/gpu/drm/drm_edid.c include/drm/drm_edid.h+88 -02 replies
5/21video/hdmi: Add audio_infoframe packing for DPdrivers/video/hdmi.c include/drm/dp/drm_dp_helper.h include/linux/hdmi.h+71 -202 replies
6/21drm/mediatek: dpi: move dpi limits to SoC configdrivers/gpu/drm/mediatek/mtk_dpi.c+16 -90 replies
7/21drm/mediatek: dpi: implement a CK/DE pol toggle in SoC configdrivers/gpu/drm/mediatek/mtk_dpi.c+17 -52 replies
8/21drm/mediatek: dpi: implement a swap_input toggle in SoC configdrivers/gpu/drm/mediatek/mtk_dpi.c+11 -32 replies
9/21drm/mediatek: dpi: move dimension mask to SoC configdrivers/gpu/drm/mediatek/mtk_dpi.c+16 -101 reply
10/21drm/mediatek: dpi: move hvsize_mask to SoC configdrivers/gpu/drm/mediatek/mtk_dpi.c+10 -21 reply
11/21drm/mediatek: dpi: move swap_shift to SoC configdrivers/gpu/drm/mediatek/mtk_dpi.c+7 -13 replies
12/21drm/mediatek: dpi: move the yuv422_en_bit to SoC configdrivers/gpu/drm/mediatek/mtk_dpi.c+7 -11 reply
13/21drm/mediatek: dpi: move the csc_enable bit to SoC configdrivers/gpu/drm/mediatek/mtk_dpi.c+7 -10 replies
14/21drm/mediatek: dpi: Add dpintf supportdrivers/gpu/drm/mediatek/mtk_dpi.c drivers/gpu/drm/mediatek/mtk_dpi_regs.h drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +3 more+159 -204 replies
15/21drm/mediatek: dpi: Only enable dpi after the bridge is enableddrivers/gpu/drm/mediatek/mtk_dpi.c+1 -10 replies
16/21drm/meditek: dpi: Add matrix_sel helperdrivers/gpu/drm/mediatek/mtk_dpi.c drivers/gpu/drm/mediatek/mtk_dpi_regs.h+24 -00 replies
17/21phy: phy-mtk-dp: Add driver for DP phyMAINTAINERS drivers/phy/mediatek/Kconfig drivers/phy/mediatek/Makefile +1 more+210 -01 reply
18/21drm/mediatek: Add mt8195 Embedded DisplayPort driverdrivers/gpu/drm/mediatek/Kconfig drivers/gpu/drm/mediatek/Makefile drivers/gpu/drm/mediatek/mtk_dp.c +3 more+586 -031 replies
19/21drm/mediatek: Add mt8195 External DisplayPort supportdrivers/gpu/drm/mediatek/mtk_dp.c+81 -231 reply
20/21drm/mediatek: add hpd debouncedrivers/gpu/drm/mediatek/mtk_dp.c+21 -00 replies
21/21drm/mediatek: DP audio support for mt8195drivers/gpu/drm/mediatek/mtk_dp.c+776 -70 replies

Reviews trailers per patch

10 of 21 patches have a Reviewed-by or Acked-by.

PatchAngeloGioacchino Del RegnoRex-BC ChenCK Hu
1/21
2/21
3/21R-b
4/21
5/21
6/21R-b R-b
7/21R-b R-b
8/21R-b R-b
9/21R-b R-b R-b
10/21R-b R-b R-b
11/21R-b R-b
12/21R-b R-b R-b
13/21R-b R-b
14/21
15/21
16/21
17/21
18/21
19/21
20/21T-b R-b
21/21

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v10 thread

Cover letter [PATCH v10 00/21] drm/mediatek: Add mt8195 DisplayPort driver

this series is built around the DisplayPort driver. The dpi/dpintf driver and the added helper functions are required for the DisplayPort driver to work.

This v10 still has some un-answered comments and TODOs for v11.

This has been tested sucessfully on a 5.18-next based "vendor branch".

There's a missing dependency in the mediatek clock framework to allow a mux clock to change it's parent automatically on rate change. Without this change, the dpi driver won't properly set the clocks on mode change and thus nothing will be displayed on screen.

Changes from v9:
- The DP-Phy is back to being a child device of the DP driver (as in v8)
- hot plug detection has been added back to Embedded Display Port... as after discussing with mediatek experts, this is needed eventhough the Embedded Display port is not un-pluggable
- rebased on linux-next
- simplified/split train_handler function, as suggested by Rex
- added comments on the sleep/delays present in the code
- removed previous patch introducing retries when receiving AUX_DEFER as this is already handled in the dp_aux framework
- added max-lane and max-linkrate device tree u8 properties instead of hardcoded #defines

Things that are in my todolist for v11:
- retrieve CK/DE support from panel driver instead of hardcoding it into the dpi driver
- refcount the dp driver "enabled" status for "future proofing"
- review the drm_dp_helpers for features/functions that have been re-implemented in the mediatek dp drivers

Older revisions:
RFC - https://lore.kernel.org/linux-mediatek/[email protected]/

v1  - https://lore.kernel.org/linux-mediatek/[email protected]/
v2  - https://lore.kernel.org/linux-mediatek/[email protected]/
v3  - https://lore.kernel.org/linux-mediatek/[email protected]/
v4  - https://lore.kernel.org/linux-mediatek/[email protected]/
v5  - https://lore.kernel.org/all/[email protected]/
v6  - https://lore.kernel.org/linux-mediatek/[email protected]/
v7  - https://lore.kernel.org/linux-mediatek/[email protected]/
v8  - https://lore.kernel.org/linux-mediatek/[email protected]/
v9  - https://lore.kernel.org/all/[email protected]/

Functional dependencies are:
- Add Mediatek Soc DRM (vdosys0) support for mt8195
https://lore.kernel.org/linux-mediatek/[email protected]/
- Add MediaTek SoC DRM (vdosys1) support for mt8195
https://lore.kernel.org/linux-mediatek/[email protected]/

Guillaume Ranquet (15):
drm/edid: Convert cea_sad helper struct to kernelDoc drm/edid: Add cea_sad helpers for freq/length drm/mediatek: dpi: move dpi limits to SoC config drm/mediatek: dpi: implement a CK/DE pol toggle in SoC config drm/mediatek: dpi: implement a swap_input toggle in SoC config drm/mediatek: dpi: move dimension mask to SoC config drm/mediatek: dpi: move hvsize_mask to SoC config drm/mediatek: dpi: move swap_shift to SoC config drm/mediatek: dpi: move the yuv422_en_bit to SoC config drm/mediatek: dpi: move the csc_enable bit to SoC config drm/mediatek: dpi: Add dpintf support
drm/mediatek: dpi: Only enable dpi after the bridge is enabled drm/meditek: dpi: Add matrix_sel helper drm/mediatek: Add mt8195 External DisplayPort support drm/mediatek: DP audio support for mt8195

Jitao Shi (1):
drm/mediatek: add hpd debounce

Markus Schneider-Pargmann (5):
dt-bindings: mediatek,dpi: Add DPINTF compatible
dt-bindings: mediatek,dp: Add Display Port binding video/hdmi: Add audio_infoframe packing for DP
phy: phy-mtk-dp: Add driver for DP phy drm/mediatek: Add mt8195 Embedded DisplayPort driver

 .../display/mediatek/mediatek,dp.yaml         |   99 +
 .../display/mediatek/mediatek,dpi.yaml        |   13 +-
 MAINTAINERS                                   |    1 +
 drivers/gpu/drm/drm_edid.c                    |   74 +
 drivers/gpu/drm/mediatek/Kconfig              |    8 +
 drivers/gpu/drm/mediatek/Makefile             |    2 +
 drivers/gpu/drm/mediatek/mtk_dp.c             | 3419 +++++++++++++++++
 drivers/gpu/drm/mediatek/mtk_dp_reg.h         |  570 +++
 drivers/gpu/drm/mediatek/mtk_dpi.c            |  272 +-
 drivers/gpu/drm/mediatek/mtk_dpi_regs.h       |   38 +
 drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c   |    8 +
 drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h   |    1 +
 drivers/gpu/drm/mediatek/mtk_drm_drv.c        |    8 +-
 drivers/gpu/drm/mediatek/mtk_drm_drv.h        |    3 +
 drivers/phy/mediatek/Kconfig                  |    8 +
 drivers/phy/mediatek/Makefile                 |    1 +
 drivers/phy/mediatek/phy-mtk-dp.c             |  200 +
 drivers/video/hdmi.c                          |   82 +-
 include/drm/dp/drm_dp_helper.h                |    2 +
 include/drm/drm_edid.h                        |   26 +-
 include/linux/hdmi.h                          |    7 +-
 include/linux/soc/mediatek/mtk-mmsys.h        |    4 +-
 22 files changed, 4765 insertions(+), 81 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,dp.yaml
 create mode 100644 drivers/gpu/drm/mediatek/mtk_dp.c
 create mode 100644 drivers/gpu/drm/mediatek/mtk_dp_reg.h
 create mode 100644 drivers/phy/mediatek/phy-mtk-dp.c
Signature · 1 line
2.35.1