]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sun4i: dw-hdmi: Fix HDMI PHY clock setup
authorJernej Skrabec <jernej.skrabec@gmail.com>
Wed, 15 Sep 2021 17:58:36 +0000 (19:58 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 6 Oct 2021 09:05:44 +0000 (11:05 +0200)
commitb833b1fe63e29b9feda43cde8a215de9c78ea99c
tree6d3eec1c4adcd4bfb44d61a05ed104591e904e6d
parent89e14b1c8a8b16676c0b9b46909dca15ac3f0f7e
drm/sun4i: dw-hdmi: Fix HDMI PHY clock setup

Recent rework, which made HDMI PHY driver a platform device, inadvertely
reversed clock setup order. HW is very touchy about it. Proper way is to
handle controllers resets and clocks first and HDMI PHYs second.

Currently, without this fix, first mode set completely fails (nothing on
HDMI monitor) on H3 era PHYs. On H6, it still somehow work.

Move HDMI PHY reset & clocks handling to sun8i_hdmi_phy_init() which
will assure that code is executed after controllers reset & clocks are
handled. Additionally, add sun8i_hdmi_phy_deinit() which will deinit
them at controllers driver unload.

Tested on A64, H3, H6 and R40.

Fixes: 1593dc555a50 ("drm/sun4i: dw-hdmi: Make HDMI PHY into a platform device")
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210915175836.3158839-1-jernej.skrabec@gmail.com
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h
drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c