linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 00/34] Add support for MT8195/88 DPI, HDMIv2 and DDCv2
@ 2025-01-13 14:51 AngeloGioacchino Del Regno
  2025-01-13 14:51 ` [PATCH v5 01/34] dt-bindings: display: mediatek: dpi: Add MT8195 and MT8188 compat AngeloGioacchino Del Regno
                   ` (33 more replies)
  0 siblings, 34 replies; 72+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-01-13 14:51 UTC (permalink / raw)
  To: chunkuang.hu
  Cc: p.zabel, airlied, simona, maarten.lankhorst, mripard, tzimmermann,
	robh, krzk+dt, conor+dt, matthias.bgg, angelogioacchino.delregno,
	ck.hu, jitao.shi, jie.qiu, junzhi.zhao, dri-devel, linux-mediatek,
	devicetree, linux-kernel, linux-arm-kernel, kernel,
	dmitry.baryshkov, lewis.liao, ives.chenjh, tommyyl.chen,
	jason-jh.lin

Changes in v5:
 - Rebased over next-20250113
 - Resolved merge issues with next-20250113
 - Added bitfield.h inclusion in mtk_dpi in commit [02/33] to resolve
   build issue from 0day CI
 - Removed .atomic_check callback from mtk_hdmi_v2 as it is now part
   of drm_bridge_connector as pointed out by Dmitry B
 - Removed call to pm_runtime_disable() as the driver uses devm
 - Tested again :-)

Changes in v4:
 - DDCv2 binding erroneously dropped in v3 is included again (oops!)
 - Added reference to dai-common.yaml in HDMIv2 binding
 - Dropped pinctrl entries from HDMIv2 binding
 - Fixed required list in HDMIv2 binding and changed node name to
   'hdmi' instead of 'hdmi-tx'
 - Fixed issue in mtk_hdmi derived from wrong commit splitting action
   from version 3
 - Exported necessary symbols and added namespaces for those
 - Fixed module build for both HDMIv1 and HDMIv2
 - Other cleanups

Changes in v3:
 - Added hpd_enable() and hpd_disable() callbacks as suggested by Dmitry B
 - Removed audio mute call in bridge_enable() as suggested by CK
 - Reworked commonization commits for mtk_hdmi/mtk_hdmi_common and split
   out debugfs/abist implementation as suggested by CK
 - Removed .mode_valid() callback as it is now provided by the bridge
   API in drm_bridge_connector_helper_funcs
 - A bit of cleanups here and there
 - Tested again on HW especially for new hpd_enable/disable callbacks.

Changes in v2:
 - Merged series "Add support for MT8195/8188 and Pattern Generator"
   and "drm/mediatek: Add support for HDMIv2 and DDCv2 IPs" in one
   as they are directly related, as requested by CK Hu
 - More commonization: moved some audio functions to mtk_hdmi_common
 - Fixed a bug in DDCv2 driver to allow sending a message with len=1
 - Renamed some functions in HDMIv2 to consistently use the prefix
   mtk_hdmi_v2_ across the driver
 - Added .mode_valid() callback to HDMIv2
 - Added .atomic_check() callback to HDMIv2
 - Reordered drm_bridge_funcs in HDMIv2 driver
 - Rewritten .edid_read() callback in HDMIv2 to move checking audio
   availability to bridge_pre_enable() stage, and to stop using the
   drm_edid_read_ddc() in favor of drm_edid_read()
 - Added support for API provided HDMI Helpers
 - Added .tmds_char_rate_valid() callback to HDMIv2 for HDMI helpers
 - Added .hdmi_{read,write}_infoframe() callback to HDMIv2 for helpers
 - Added support for Vendor infoframes in HDMIv2
 - Added missing audio-dai-cells to HDMIv2 binding to fix check error
 - Added more information to the HDMIv2 binding for clocks and PHY
 - Added some comments to the HDMIv2 code to clarify why the controller
   is preconfigured in bridge_pre_enable() instead of bridge_enable()
 - Added a mention of the differences in HPD between v1 and v2 to the
   commit introducing the v2 driver (v2 is not using CEC for HPD)
 - ...and tested again on HW! :-)


This series adds support for the HDMI-TX v2 Encoder and DDCv2, and for
the direct connection DPI as found in MT8195, MT8188 and their variants.

Tested on Genio 700 EVK:
 - ABIST ON: ok, pattern generated internally from HDMI is shown on
   HDMI screen at the correct resolution;
 - ABIST OFF + DPI Pattern Generator ON: ok, pattern coming from DPI is
   shown on HDMI screen at the correct resolution;
 - Can negotiate up to 4k60

and on MT8395 Radxa NIO 12L:
 - ABIST ON: ok, pattern generated internally from HDMI is shown on
   HDMI screen at the correct resolution;
 - ABIST OFF + DPI Pattern Generator ON: ok, pattern coming from DPI is
   shown on HDMI screen at the correct resolution;
 - Dual screen usecase validated (DSI + HDMI 3840x2160p 60Hz)
 - Can negotiate up to 4k60

Please note that this submission does *not* include support for HDCP
nor for CECv2, as I want this to be upstream before implementing
additional features which are not strictly required for simple
HDMI output.

Bonus in this series is the addition of support for the Pattern Generator
found in the DPI HW: since I needed this for debugging during development,
I had to code in the actual support bits and it looked like a waste of
time to just remove it.
I instead decided to clean it up and upstream it, as this will anyway come
handy for multiple things, of which the most important (imo) are:
 - Adding support for new SoCs in the future will be less time consuming
   as this driver already has the pattern generator in;
 - CI Testing might be able to make use of this to validate that the
   data that comes out is not garbled (so, to help testing display
   support in an automated manner).

AngeloGioacchino Del Regno (33):
  dt-bindings: display: mediatek: dpi: Add MT8195 and MT8188 compat
  drm/mediatek: mtk_dpi: Add support for Pattern Generator in debugfs
  drm/mediatek: mtk_dpi: Use an array for pixclk factor calculation
  drm/mediatek: mtk_dpi: Move pixel clock setting flow to function
  drm/mediatek: mtk_dpi: Add checks for reg_h_fre_con existence
  drm/mediatek: Add support for MT8195 Digital Parallel Interface
  dt-bindings: display: mediatek: Add binding for HDMIv2 DDC
  dt-bindings: display: mediatek: Add binding for MT8195 HDMI-TX v2
  drm/mediatek: mtk_cec: Switch to register as module_platform_driver
  drm/mediatek: mtk_hdmi_ddc: Switch to register as
    module_platform_driver
  drm/mediatek: mtk_hdmi: Convert to module_platform_driver macro
  drm/mediatek: mtk_hdmi: Unregister audio platform device on failure
  drm/mediatek: mtk_hdmi: Fix typo for aud_sampe_size member
  drm/mediatek: mtk_hdmi: Disgregate function mtk_hdmi_audio_set_param()
  drm/mediatek: mtk_hdmi: Move audio params selection to new function
  drm/mediatek: mtk_hdmi: Move plugged_cb/codec_dev setting to new
    function
  drm/mediatek: mtk_hdmi: Move N/CTS setting to new function
  drm/mediatek: mtk_hdmi: Move vendor/product strings to drm_bridge
  drm/mediatek: mtk_hdmi: Use dev_err_probe() in
    mtk_hdmi_dt_parse_pdata()
  drm/mediatek: mtk_hdmi: Move CEC device parsing in new function
  drm/mediatek: mtk_hdmi: Remove unused members of struct mtk_hdmi
  drm/mediatek: mtk_hdmi: Move output init to
    mtk_hdmi_register_audio_driver()
  drm/mediatek: mtk_hdmi: Use devm managed version of drm_bridge_add
  drm/mediatek: mtk_hdmi: Remove ifdef for CONFIG_PM_SLEEP
  drm/mediatek: mtk_hdmi: Remove goto in mtk_hdmi_clk_enable_audio()
  drm/mediatek: mtk_hdmi: Cleanup function mtk_hdmi_resume()
  drm/mediatek: mtk_hdmi: Improve mtk_hdmi_get_all_clk() flexibility
  drm/mediatek: mtk_hdmi: Split driver and add common probe function
  drm/mediatek: mtk_hdmi_common: Assign DDC adapter pointer to bridge
  drm/mediatek: mtk_hdmi_common: Add OP_HDMI if helper funcs assigned
  drm/mediatek: Introduce HDMI/DDC v2 for MT8195/MT8188
  drm/mediatek: mtk_hdmi_common: Add var to enable interlaced modes
  drm/mediatek: mtk_hdmi_v2: Add debugfs ops and implement ABIST

Guillaume Ranquet (1):
  drm/mediatek: hdmi: Use regmap instead of iomem for main registers

 .../display/mediatek/mediatek,dpi.yaml        |    5 +
 .../mediatek/mediatek,mt8195-hdmi-ddc.yaml    |   41 +
 .../mediatek/mediatek,mt8195-hdmi.yaml        |  151 ++
 drivers/gpu/drm/mediatek/Kconfig              |   18 +-
 drivers/gpu/drm/mediatek/Makefile             |   11 +-
 drivers/gpu/drm/mediatek/mtk_cec.c            |    7 +-
 drivers/gpu/drm/mediatek/mtk_dpi.c            |  312 +++-
 drivers/gpu/drm/mediatek/mtk_dpi_regs.h       |   10 +
 drivers/gpu/drm/mediatek/mtk_drm_drv.c        |    2 +
 drivers/gpu/drm/mediatek/mtk_hdmi.c           |  811 ++-------
 drivers/gpu/drm/mediatek/mtk_hdmi.h           |   14 -
 drivers/gpu/drm/mediatek/mtk_hdmi_common.c    |  443 +++++
 drivers/gpu/drm/mediatek/mtk_hdmi_common.h    |  198 +++
 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c       |    2 +-
 drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c    |  403 +++++
 drivers/gpu/drm/mediatek/mtk_hdmi_regs_v2.h   |  263 +++
 drivers/gpu/drm/mediatek/mtk_hdmi_v2.c        | 1492 +++++++++++++++++
 17 files changed, 3386 insertions(+), 797 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml
 create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi.yaml
 delete mode 100644 drivers/gpu/drm/mediatek/mtk_hdmi.h
 create mode 100644 drivers/gpu/drm/mediatek/mtk_hdmi_common.c
 create mode 100644 drivers/gpu/drm/mediatek/mtk_hdmi_common.h
 create mode 100644 drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c
 create mode 100644 drivers/gpu/drm/mediatek/mtk_hdmi_regs_v2.h
 create mode 100644 drivers/gpu/drm/mediatek/mtk_hdmi_v2.c

-- 
2.47.0



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

end of thread, other threads:[~2025-02-11  2:27 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-13 14:51 [PATCH v5 00/34] Add support for MT8195/88 DPI, HDMIv2 and DDCv2 AngeloGioacchino Del Regno
2025-01-13 14:51 ` [PATCH v5 01/34] dt-bindings: display: mediatek: dpi: Add MT8195 and MT8188 compat AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 02/34] drm/mediatek: mtk_dpi: Add support for Pattern Generator in debugfs AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 03/34] drm/mediatek: mtk_dpi: Use an array for pixclk factor calculation AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 04/34] drm/mediatek: mtk_dpi: Move pixel clock setting flow to function AngeloGioacchino Del Regno
2025-01-24  9:02   ` CK Hu (胡俊光)
2025-01-13 14:52 ` [PATCH v5 05/34] drm/mediatek: mtk_dpi: Add checks for reg_h_fre_con existence AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 06/34] drm/mediatek: Add support for MT8195 Digital Parallel Interface AngeloGioacchino Del Regno
2025-01-24  9:00   ` CK Hu (胡俊光)
2025-01-27  8:56     ` AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 07/34] dt-bindings: display: mediatek: Add binding for HDMIv2 DDC AngeloGioacchino Del Regno
2025-02-10  7:32   ` CK Hu (胡俊光)
2025-01-13 14:52 ` [PATCH v5 08/34] dt-bindings: display: mediatek: Add binding for MT8195 HDMI-TX v2 AngeloGioacchino Del Regno
2025-02-10  7:29   ` CK Hu (胡俊光)
2025-01-13 14:52 ` [PATCH v5 09/34] drm/mediatek: mtk_cec: Switch to register as module_platform_driver AngeloGioacchino Del Regno
2025-02-07 14:20   ` Alexandre Mergnat
2025-02-10  6:58   ` CK Hu (胡俊光)
2025-02-10 16:40     ` AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 10/34] drm/mediatek: mtk_hdmi_ddc: " AngeloGioacchino Del Regno
2025-02-07 14:20   ` Alexandre Mergnat
2025-02-10  7:01   ` CK Hu (胡俊光)
2025-02-10 11:50     ` AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 11/34] drm/mediatek: mtk_hdmi: Convert to module_platform_driver macro AngeloGioacchino Del Regno
2025-02-07 14:21   ` Alexandre Mergnat
2025-01-13 14:52 ` [PATCH v5 12/34] drm/mediatek: mtk_hdmi: Unregister audio platform device on failure AngeloGioacchino Del Regno
2025-01-22  1:23   ` CK Hu (胡俊光)
2025-01-13 14:52 ` [PATCH v5 13/34] drm/mediatek: hdmi: Use regmap instead of iomem for main registers AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 14/34] drm/mediatek: mtk_hdmi: Fix typo for aud_sampe_size member AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 15/34] drm/mediatek: mtk_hdmi: Disgregate function mtk_hdmi_audio_set_param() AngeloGioacchino Del Regno
2025-01-24  7:59   ` CK Hu (胡俊光)
2025-01-13 14:52 ` [PATCH v5 16/34] drm/mediatek: mtk_hdmi: Move audio params selection to new function AngeloGioacchino Del Regno
2025-01-24  8:09   ` CK Hu (胡俊光)
2025-01-13 14:52 ` [PATCH v5 17/34] drm/mediatek: mtk_hdmi: Move plugged_cb/codec_dev setting " AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 18/34] drm/mediatek: mtk_hdmi: Move N/CTS " AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 19/34] drm/mediatek: mtk_hdmi: Move vendor/product strings to drm_bridge AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 20/34] drm/mediatek: mtk_hdmi: Use dev_err_probe() in mtk_hdmi_dt_parse_pdata() AngeloGioacchino Del Regno
2025-01-24  8:24   ` CK Hu (胡俊光)
2025-01-27 11:42     ` AngeloGioacchino Del Regno
2025-02-07  5:24       ` CK Hu (胡俊光)
2025-01-13 14:52 ` [PATCH v5 21/34] drm/mediatek: mtk_hdmi: Move CEC device parsing in new function AngeloGioacchino Del Regno
2025-02-07 14:45   ` Alexandre Mergnat
2025-02-10 11:44     ` AngeloGioacchino Del Regno
2025-02-10  6:22   ` CK Hu (胡俊光)
2025-01-13 14:52 ` [PATCH v5 22/34] drm/mediatek: mtk_hdmi: Remove unused members of struct mtk_hdmi AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 23/34] drm/mediatek: mtk_hdmi: Move output init to mtk_hdmi_register_audio_driver() AngeloGioacchino Del Regno
2025-02-07  5:46   ` CK Hu (胡俊光)
2025-02-10 11:15     ` AngeloGioacchino Del Regno
2025-02-11  2:25       ` CK Hu (胡俊光)
2025-01-13 14:52 ` [PATCH v5 24/34] drm/mediatek: mtk_hdmi: Use devm managed version of drm_bridge_add AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 25/34] drm/mediatek: mtk_hdmi: Remove ifdef for CONFIG_PM_SLEEP AngeloGioacchino Del Regno
2025-02-07  6:10   ` CK Hu (胡俊光)
2025-02-10 11:43     ` AngeloGioacchino Del Regno
2025-02-11  2:16       ` CK Hu (胡俊光)
2025-01-13 14:52 ` [PATCH v5 26/34] drm/mediatek: mtk_hdmi: Remove goto in mtk_hdmi_clk_enable_audio() AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 27/34] drm/mediatek: mtk_hdmi: Cleanup function mtk_hdmi_resume() AngeloGioacchino Del Regno
2025-02-07  6:04   ` CK Hu (胡俊光)
2025-02-10 11:23     ` AngeloGioacchino Del Regno
2025-02-11  2:13       ` CK Hu (胡俊光)
2025-01-13 14:52 ` [PATCH v5 28/34] drm/mediatek: mtk_hdmi: Improve mtk_hdmi_get_all_clk() flexibility AngeloGioacchino Del Regno
2025-02-07  6:26   ` CK Hu (胡俊光)
2025-01-13 14:52 ` [PATCH v5 29/34] drm/mediatek: mtk_hdmi: Split driver and add common probe function AngeloGioacchino Del Regno
2025-02-10  2:18   ` CK Hu (胡俊光)
2025-02-10 17:11     ` AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 30/34] drm/mediatek: mtk_hdmi_common: Assign DDC adapter pointer to bridge AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 31/34] drm/mediatek: mtk_hdmi_common: Add OP_HDMI if helper funcs assigned AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 32/34] drm/mediatek: Introduce HDMI/DDC v2 for MT8195/MT8188 AngeloGioacchino Del Regno
2025-01-17 16:54   ` kernel test robot
2025-01-17 18:41   ` kernel test robot
2025-01-17 22:04   ` kernel test robot
2025-01-20 12:48     ` AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 33/34] drm/mediatek: mtk_hdmi_common: Add var to enable interlaced modes AngeloGioacchino Del Regno
2025-01-13 14:52 ` [PATCH v5 34/34] drm/mediatek: mtk_hdmi_v2: Add debugfs ops and implement ABIST AngeloGioacchino Del Regno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).