]> git.baikalelectronics.ru Git - kernel.git/commit
drm: sun4i: hdmi: Remove extra HPD polling
authorChen-Yu Tsai <wens@csie.org>
Mon, 29 Jun 2020 06:00:32 +0000 (14:00 +0800)
committerMaxime Ripard <maxime@cerno.tech>
Tue, 30 Jun 2020 08:01:48 +0000 (10:01 +0200)
commite8af66f578acd28523a7594a8b55e6ca296c2a53
treee7bb291d1405e515156a31ed70bd0093f19e4b7c
parent137b47fba77b9bfdd9e772dad96931d3df7e8f0e
drm: sun4i: hdmi: Remove extra HPD polling

The HPD sense mechanism in Allwinner's old HDMI encoder hardware is more
or less an input-only GPIO. Other GPIO-based HPD implementations
directly return the current state, instead of polling for a specific
state and returning the other if that times out.

Remove the I/O polling from sun4i_hdmi_connector_detect() and directly
return a known state based on the current reading. This also gets rid
of excessive CPU usage by kworker as reported on Stack Exchange [1] and
Armbian forums [2].

 [1] https://superuser.com/questions/1515001/debian-10-buster-on-cubietruck-with-bug-in-sun4i-drm-hdmi
 [2] https://forum.armbian.com/topic/14282-headless-systems-and-sun4i_drm_hdmi-a10a20/

Fixes: 6c088b7a3095 ("drm/sun4i: Add HDMI support")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20200629060032.24134-1-wens@kernel.org
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c