]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/vc4: crtc: Lookup the encoder from the register at boot
authorMaxime Ripard <maxime@cerno.tech>
Fri, 7 May 2021 15:05:08 +0000 (17:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:59:47 +0000 (16:59 +0200)
commit167486450dbef622e05b639565a4bc9726275b8d
tree9f4040e6514f52824e669d57200c5456fc229ed0
parente3c61c41bff4a6e1d86c6cb795c3e9908639011d
drm/vc4: crtc: Lookup the encoder from the register at boot

[ Upstream commit b601c16b7ba8f3bb7a7e773b238da6b63657fa1d ]

At boot, we can't rely on the vc4_get_crtc_encoder since we don't have a
state yet and thus will not be able to figure out which connector is
attached to our CRTC.

However, we have a muxing bit in the CRTC register we can use to get the
encoder currently connected to the pixelvalve. We can thus read that
register, lookup the associated register through the vc4_pv_data
structure, and then pass it to vc4_crtc_disable so that we can perform
the proper operations.

Fixes: 875a4d536842 ("drm/vc4: drv: Disable the CRTC at boot time")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-6-maxime@cerno.tech
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/vc4/vc4_crtc.c