]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/vc4: hvs: Don't write gamma luts on 2711
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Fri, 21 Jun 2024 15:20:38 +0000 (16:20 +0100)
committerDave Stevenson <dave.stevenson@raspberrypi.com>
Mon, 9 Sep 2024 12:02:53 +0000 (13:02 +0100)
The gamma block has changed in 2711, therefore writing the lut
in vc4_hvs_lut_load is incorrect.

Whilst the gamma property isn't created for 2711, it is called
from vc4_hvs_init_channel, so abort if attempted.

Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5")
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-15-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/vc4/vc4_hvs.c

index 3a5d9ba3a67ae46a9bc9d30ea8a87e8b96145aad..8dab59341a82036bdf593c99935790e79f630523 100644 (file)
@@ -222,6 +222,9 @@ static void vc4_hvs_lut_load(struct vc4_hvs *hvs,
        if (!drm_dev_enter(drm, &idx))
                return;
 
+       if (hvs->vc4->is_vc5)
+               return;
+
        /* The LUT memory is laid out with each HVS channel in order,
         * each of which takes 256 writes for R, 256 for G, then 256
         * for B.