]> git.baikalelectronics.ru Git - kernel.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)
committerMaxime Ripard <maxime@cerno.tech>
Mon, 24 May 2021 12:42:07 +0000 (14:42 +0200)
commitaf72f40e25266e36d3f6f2fad2ad64b8bcecaa1e
tree1180395318dec4df4a3425c1e2f8bd6cc88492e1
parentfe686016a4bf0cb03ebf1804ea36b33cb66609e8
drm/vc4: crtc: Lookup the encoder from the register at boot

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: 43ac5bbd50c7 ("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
drivers/gpu/drm/vc4/vc4_crtc.c