Skip to content

Commit

Permalink
drm/vc4: hvs: Ignore atomic_flush if we're disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maxime Ripard committed Jan 9, 2023
1 parent f92534e commit 92c17d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/vc4/vc4_hvs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 92c17d1

Please sign in to comment.