drm/vc4: hdmi: Set a default HSM rate
authorMaxime Ripard <maxime@cerno.tech>
Wed, 22 Sep 2021 12:54:17 +0000 (14:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:03:04 +0000 (11:03 +0100)
commit2d717d82267550260e4a31e6980d42585dc2f745
tree13a5645525ec301cfe9cde74b0e2877ae61935d2
parent49b570f5d2e4c8ec6f83d2d92fa0a523a367db86
drm/vc4: hdmi: Set a default HSM rate

[ Upstream commit 3e85b81591609bb794bb00cd619b20965b5b38cd ]

When the firmware doesn't setup the HSM rate (such as when booting
without an HDMI cable plugged in), its rate is 0 and thus any register
access results in a CPU stall, even though HSM is enabled.

Let's enforce a minimum rate at boot to avoid this issue.

Fixes: 4f6e3d66ac52 ("drm/vc4: Add runtime PM support to the HDMI encoder driver")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Tested-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Tested-by: Michael Stapelberg <michael@stapelberg.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210922125419.4125779-4-maxime@cerno.tech
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/vc4/vc4_hdmi.c