17baa42376abdc99e3575a84ba27b1a68c353215
[openwrt/staging/linusw.git] /
1 From f605781b135e2ebe98aba1d569167bb0d0886930 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Fri, 4 Mar 2022 16:00:16 +0100
4 Subject: [PATCH] drm/vc4: txp: Force alpha to be 0xff if it's disabled
5
6 If we use a format that has padding instead of the alpha component (such
7 as XRGB8888), it appears that the Transposer will fill the padding to 0,
8 disregarding what was stored in the input buffer padding.
9
10 This leads to issues with IGT, since it will set the padding to 0xff,
11 but will then compare the CRC of the two frames which will thus fail.
12
13 Fixes: 008095e065a8 ("drm/vc4: Add support for the transposer block")
14 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
15 ---
16 drivers/gpu/drm/vc4/vc4_txp.c | 2 ++
17 1 file changed, 2 insertions(+)
18
19 --- a/drivers/gpu/drm/vc4/vc4_txp.c
20 +++ b/drivers/gpu/drm/vc4/vc4_txp.c
21 @@ -304,6 +304,8 @@ static void vc4_txp_connector_atomic_com
22
23 if (fb->format->has_alpha)
24 ctrl |= TXP_ALPHA_ENABLE;
25 + else
26 + ctrl |= TXP_ALPHA_INVERT;
27
28 gem = drm_fb_cma_get_gem_obj(fb, 0);
29 TXP_WRITE(TXP_DST_PTR, gem->paddr + fb->offsets[0]);