drm/vc4: hvs: Ignore atomic_flush if we're disabled

atomic_flush will be called for each CRTC even if they aren't enabled.

The whole code we have there will thus run without a properly affected
channel, which can then result in all sorts of weird behaviour.

Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-8-1f8e0770798b@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
This commit is contained in:
Maxime Ripard 2022-12-07 12:53:19 +01:00
parent f92534ea5c
commit 92c17d1647
No known key found for this signature in database
GPG Key ID: E3EF0D6F671851C5
1 changed files with 3 additions and 0 deletions

View File

@ -579,6 +579,9 @@ void vc4_hvs_atomic_flush(struct drm_crtc *crtc,
return;
}
if (vc4_state->assigned_channel == VC4_HVS_CHANNEL_DISABLED)
return;
if (debug_dump_regs) {
DRM_INFO("CRTC %d HVS before:\n", drm_crtc_index(crtc));
vc4_hvs_dump_state(hvs);