OSDN Git Service

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)
commitb601c16b7ba8f3bb7a7e773b238da6b63657fa1d
tree1180395318dec4df4a3425c1e2f8bd6cc88492e1
parent5a184d959d5a5a66b377cb5cd4c95a80388e0c88
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: 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
drivers/gpu/drm/vc4/vc4_crtc.c