drm/vc4: hdmi: Check the HSM rate at runtime_resume
authorMaxime Ripard <maxime@cerno.tech>
Thu, 29 Sep 2022 09:21:18 +0000 (11:21 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 13 Oct 2022 11:57:04 +0000 (13:57 +0200)
commit4190e8bbcbc77a9c36724681801cedc5229e7fc2
tree306415aeec6bc0a93af0efd612f31fdacfd97407
parentae71ab585c819f83aec84f91eb01157a90552ef2
drm/vc4: hdmi: Check the HSM rate at runtime_resume

If our HSM clock has not been properly initialized, any register access
will silently lock up the system.

Let's check that this can't happen by adding a check for the rate before
any register access, and error out otherwise.

Link: https://lore.kernel.org/dri-devel/20220922145448.w3xfywkn5ecak2et@pengutronix.de/
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220929-rpi-pi3-unplugged-fixes-v1-2-cd22e962296c@cerno.tech
drivers/gpu/drm/vc4/vc4_hdmi.c