drm/vc4: hdmi: Take our lock to reset the link
authormaxime@cerno.tech <maxime@cerno.tech>
Mon, 24 Oct 2022 09:36:33 +0000 (11:36 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 3 Nov 2022 08:26:41 +0000 (09:26 +0100)
commit682f99b8ae886c22ba9f16df454aecc8c6d803ba
tree786cfa9a415e6e9792240b4719a5c85e9583b629
parentfc007fb815ab5395c3962c09b79a1630b0fbed9c
drm/vc4: hdmi: Take our lock to reset the link

We access some fields protected by our internal mutex in
vc4_hdmi_reset_link() (saved_adjusted_mode, output_bpc, output_format)
and are calling functions that need to have that lock taken
(vc4_hdmi_supports_scrambling()).

However, the current code doesn't lock that mutex. Let's make sure it
does.

Fixes: 6bed2ea3cb38 ("drm/vc4: hdmi: Reset link on hotplug")
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20221024093634.118190-1-maxime@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_hdmi.c