Skip to content

arm/arm64: mediatek: Fix mmsys device probing

[email protected] dri-devel linux-arm-kernel linux-clk linux-devicetree linux-media linux-mediatek lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest13 patches 8 repliesIn review
  2. v6 posting 2/212 patches 21 repliesSuperseded
  3. v6 posting 1/212 patches 0 repliesSuperseded

Changes in v7 from the cover letter

- move the binding description
- add hint to the mmsys binding document
- make mmsys description generic
- fix typo in commit message
- fix check of return value of of_clk_get
- free clk_data->clks as well
- get rid of private data structure

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13dt-bindings: arm: move mmsys description to displayDocumentation/devicetree/bindings/display/mediatek/mediatek,mmsys.txt+0 -04 replies
2/13dt-bindings: display: mediatek: Add mmsys binding descriptionDocumentation/devicetree/bindings/display/mediatek/mediatek,disp.txt Documentation/devicetree/bindings/display/mediatek/mediatek,mmsys.txt+4 -81 reply
3/13dt-bindings: mediatek: Add compatible for mt7623Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt+2 -00 replies
4/13drm/mediatek: Use regmap for register accessdrivers/gpu/drm/mediatek/mtk_drm_crtc.c drivers/gpu/drm/mediatek/mtk_drm_ddp.c drivers/gpu/drm/mediatek/mtk_drm_ddp.h +2 more+30 -430 replies
5/13drm: mediatek: Omit warning on probe defersdrivers/gpu/drm/mediatek/mtk_disp_color.c drivers/gpu/drm/mediatek/mtk_disp_ovl.c drivers/gpu/drm/mediatek/mtk_disp_rdma.c +4 more+32 -100 replies
6/13media: mtk-mdp: Check return value of of_clk_getdrivers/media/platform/mtk-mdp/mtk_mdp_comp.c+6 -02 replies
7/13clk: mediatek: mt2701: switch mmsys to platform device probingdrivers/clk/mediatek/clk-mt2701-mm.c+23 -110 replies
8/13clk: mediatek: mt2712e: switch to platform device probingdrivers/clk/mediatek/clk-mt2712-mm.c+21 -110 replies
9/13clk: mediatek: mt6779: switch mmsys to platform device probingdrivers/clk/mediatek/clk-mt6779-mm.c+21 -110 replies
10/13clk: mediatek: mt6797: switch to platform device probingdrivers/clk/mediatek/clk-mt6797-mm.c+23 -110 replies
11/13clk: mediatek: mt8183: switch mmsys to platform device probingdrivers/clk/mediatek/clk-mt8183-mm.c+20 -101 reply
12/13clk: mediatek: mt8173: switch mmsys to platform device probingdrivers/clk/mediatek/clk-mt8173.c+39 -60 replies
13/13drm/mediatek: Add support for mmsys through a pdevdrivers/gpu/drm/mediatek/mtk_drm_drv.c drivers/gpu/drm/mediatek/mtk_drm_drv.h+26 -00 replies

Reviews trailers per patch

4 of 13 patches have a Reviewed-by or Acked-by.

PatchRob HerringPhilipp ZabelCK HuEnric Balletbo i Serra
1/13
2/13
3/13A-b
4/13R-b R-b
5/13R-b
6/13
7/13
8/13
9/13
10/13
11/13
12/13
13/13R-b

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

Read the v7 thread

Cover letter [PATCH v7 00/13] arm/arm64: mediatek: Fix mmsys device probing

From: Matthias Brugger <[email protected]>

This is version seven of the series. The biggest change is, that I added a first patch that actually moves the mmsys binding from arm/mediatek to display/mediatek, as in effect the mmsys is part of the display subsystem.

Since version five, the clock probing is implemented through a platform driver. The corresponding platform device get's created in the DRM driver. I converted all the clock drivers to platform drivers and tested the approach on the Acer Chromebook R13 (mt8173 based).
Apart from that I reordered the patches so that the DT bindings update are the first patches.

MMSYS in Mediatek SoCs has some registers to control clock gates (which is used in the clk driver) and some registers to set the routing and enable the differnet blocks of the display subsystem.

Up to now both drivers, clock and drm are probed with the same device tree compatible. But only the first driver get probed, which in effect breaks graphics on mt8173 and mt2701.

This patch uses a platform device registration in the DRM driver, which will trigger the probe of the corresponding clock driver. It was tested on the Acer R13 Chromebook.

Changes in v7:
- move the binding description
- add hint to the mmsys binding document
- make mmsys description generic
- fix typo in commit message
- fix check of return value of of_clk_get
- free clk_data->clks as well
- get rid of private data structure

Changes in v6:
- re-arrange the patch order
- generate platform_device for mmsys clock driver inside the DRM driver
- fix DTS binding accordingly
- switch all mmsys clock driver to platform probing
- fix mt8173 platform driver remove function
- fix probe defer path in HDMI driver
- fix probe defer path in mtk_mdp_comp
- fix identation of error messages

Changes in v5:
- fix missing regmap accessors in drm diver (patch 1)
- omit probe deffered warning on all drivers (patch 5)
- update drm and clk bindings (patch 6 and 7)
- put mmsys clock part in dts child node of mmsys. Only done for HW where no dts backport compatible breakage is expected (either DRM driver not yet implemented or no HW available to the public) (patch 9 to 12)

Changes in v4:
- use platform device to probe clock driver
- add Acked-by CK Hu for the probe deferred patch

Changes in v3:
- fix kconfig typo (shame on me)
- delete __initconst from mm_clocks as converted to a platform driver

Changes in v2:
- add binding documentation
- ddp: use regmap_update_bits
- ddp: ignore EPROBE_DEFER on clock probing
- mfd: delete mmsys_private
- add Reviewed-by and Acked-by tags

Matthias Brugger (13):
dt-bindings: arm: move mmsys description to display
dt-bindings: display: mediatek: Add mmsys binding description
dt-bindings: mediatek: Add compatible for mt7623 drm/mediatek: Use regmap for register access
drm: mediatek: Omit warning on probe defers
media: mtk-mdp: Check return value of of_clk_get
clk: mediatek: mt2701: switch mmsys to platform device probing
clk: mediatek: mt2712e: switch to platform device probing
clk: mediatek: mt6779: switch mmsys to platform device probing
clk: mediatek: mt6797: switch to platform device probing
clk: mediatek: mt8183: switch mmsys to platform device probing
clk: mediatek: mt8173: switch mmsys to platform device probing drm/mediatek: Add support for mmsys through a pdev

 .../display/mediatek/mediatek,disp.txt        |  5 ++
 .../mediatek/mediatek,mmsys.txt               |  9 +---
 drivers/clk/mediatek/clk-mt2701-mm.c          | 34 ++++++++----
 drivers/clk/mediatek/clk-mt2712-mm.c          | 32 +++++++----
 drivers/clk/mediatek/clk-mt6779-mm.c          | 32 +++++++----
 drivers/clk/mediatek/clk-mt6797-mm.c          | 34 ++++++++----
 drivers/clk/mediatek/clk-mt8173.c             | 45 +++++++++++++---
 drivers/clk/mediatek/clk-mt8183-mm.c          | 30 +++++++----
 drivers/gpu/drm/mediatek/mtk_disp_color.c     |  5 +-
 drivers/gpu/drm/mediatek/mtk_disp_ovl.c       |  5 +-
 drivers/gpu/drm/mediatek/mtk_disp_rdma.c      |  5 +-
 drivers/gpu/drm/mediatek/mtk_dpi.c            | 12 +++--
 drivers/gpu/drm/mediatek/mtk_drm_crtc.c       |  4 +-
 drivers/gpu/drm/mediatek/mtk_drm_ddp.c        | 53 ++++++++-----------
 drivers/gpu/drm/mediatek/mtk_drm_ddp.h        |  4 +-
 drivers/gpu/drm/mediatek/mtk_drm_drv.c        | 35 +++++++++---
 drivers/gpu/drm/mediatek/mtk_drm_drv.h        |  4 +-
 drivers/gpu/drm/mediatek/mtk_dsi.c            |  8 ++-
 drivers/gpu/drm/mediatek/mtk_hdmi.c           |  4 +-
 drivers/media/platform/mtk-mdp/mtk_mdp_comp.c |  6 +++
 20 files changed, 246 insertions(+), 120 deletions(-)
 rename Documentation/devicetree/bindings/{arm => display}/mediatek/mediatek,mmsys.txt (61%)
Signature · 6 lines
2.24.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel