drm/vc4: kms: Don't disable the muxing of an active CRTC
authorMaxime Ripard <maxime@cerno.tech>
Fri, 20 Nov 2020 14:42:45 +0000 (15:42 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Mon, 23 Nov 2020 16:59:30 +0000 (17:59 +0100)
commit2820526dd5c27326d9c0d2c831a34b8f14e7c404
treebd36b48283844f85a49e7c261807ebc1c11d7160
parentf2df84e096a8254ddb18c531b185fc2a45879077
drm/vc4: kms: Don't disable the muxing of an active CRTC

The current HVS muxing code will consider the CRTCs in a given state to
setup their muxing in the HVS, and disable the other CRTCs muxes.

However, it's valid to only update a single CRTC with a state, and in this
situation we would mux out a CRTC that was enabled but left untouched by
the new state.

Fix this by setting a flag on the CRTC state when the muxing has been
changed, and only change the muxing configuration when that flag is there.

Fixes: 87ebcd42fb7b ("drm/vc4: crtc: Assign output to channel automatically")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Tested-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Reviewed-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20201120144245.398711-3-maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_kms.c