]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/vc4: hvs: Make sure our channel is reset
authorMaxime Ripard <maxime@cerno.tech>
Thu, 3 Sep 2020 08:00:56 +0000 (10:00 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Mon, 7 Sep 2020 16:03:44 +0000 (18:03 +0200)
In order to clear our intermediate FIFOs that might end up with a stale
pixel, let's make sure our FIFO channel is reset every time our channel is
setup.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Tested-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b34c562b36177c758dd2e9d84bceb07689bfbe05.1599120059.git-series.maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_hvs.c

index efaae60bb32318320a4f1c4f6bdc1af4e82924bf..0f56a7b579168fd05def84f8dea423f5577827f4 100644 (file)
@@ -205,6 +205,10 @@ static int vc4_hvs_init_channel(struct vc4_dev *vc4, struct drm_crtc *crtc,
        u32 dispbkgndx;
        u32 dispctrl;
 
+       HVS_WRITE(SCALER_DISPCTRLX(chan), 0);
+       HVS_WRITE(SCALER_DISPCTRLX(chan), SCALER_DISPCTRLX_RESET);
+       HVS_WRITE(SCALER_DISPCTRLX(chan), 0);
+
        /* Turn on the scaler, which will wait for vstart to start
         * compositing.
         * When feeding the transposer, we should operate in oneshot