From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by gabe.freedesktop.org (Postfix) with ESMTPS id D042289FF6 for ; Tue, 31 Aug 2021 18:51:20 +0000 (UTC) Received: by mail-ej1-x635.google.com with SMTP id a25so930297ejv.6 for ; Tue, 31 Aug 2021 11:51:20 -0700 (PDT) From: Juha-Pekka Heikkila References: <20210827145756.3342904-1-imre.deak@intel.com> <20210827145756.3342904-3-imre.deak@intel.com> <368fc246-9373-4c9f-8c74-f652843b4af9@gmail.com> Message-ID: <168039dd-422f-7afd-ffb8-861217ab02f7@gmail.com> Date: Tue, 31 Aug 2021 21:51:11 +0300 MIME-Version: 1.0 In-Reply-To: <368fc246-9373-4c9f-8c74-f652843b4af9@gmail.com> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [igt-dev] [PATCH i-g-t 2/6] tests/kms_ccs: Use test pattern when possible List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: juhapekka.heikkila@gmail.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Imre Deak , igt-dev@lists.freedesktop.org List-ID: On 31.8.2021 20.48, Juha-Pekka Heikkila wrote: > On 27.8.2021 17.57, Imre Deak wrote: >> A CRC match against a test pattern reference image gives a better >> guarantee than against a solid filled image, so use a test pattern >> instead. >> >> The sprite tests compare a single solid filled reference plane against >> two overlapped solid filled planes for some reason, so for these subtests >> and the fast clear subtest still keep the solid filled pattern. >> >> Signed-off-by: Imre Deak >> --- >>   tests/kms_ccs.c | 14 ++++++++++---- >>   1 file changed, 10 insertions(+), 4 deletions(-) >> >> diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c >> index f376f1c80..5bc50b4bb 100644 >> --- a/tests/kms_ccs.c >> +++ b/tests/kms_ccs.c >> @@ -329,15 +329,21 @@ static void generate_fb(data_t *data, struct >> igt_fb *fb, >>           srand(data->seed); >>           fill_fb_random(data->drm_fd, fb); >>       } else if (!(data->flags & TEST_BAD_PIXEL_FORMAT)) { >> +        bool do_fast_clear = is_ccs_cc_modifier(data->ccs_modifier); >> +        bool do_solid_fill = do_fast_clear || data->plane; > > data->plane will be set when doing crc tests, why crc tests needed solid > color? After offline discussion we agree this is ok because of two plane case. Reviewed-by: Juha-Pekka Heikkila > >>           int c = !!data->plane; >> -        if (is_ccs_cc_modifier(modifier)) { >> +        if (do_fast_clear && (fb_flags & FB_COMPRESSED)) { >>               fast_clear_fb(data->drm_fd, fb, cc_color); >>           } else { >>               cr = igt_get_cairo_ctx(data->drm_fd, fb); >> -            igt_paint_color(cr, 0, 0, width, height, >> -                    colors[c].r, colors[c].g, colors[c].b); >> -                    igt_put_cairo_ctx(cr); >> + >> +            if (do_solid_fill) >> +                igt_paint_color(cr, 0, 0, width, height, >> +                        colors[c].r, colors[c].g, colors[c].b); >> +            else >> +                igt_paint_test_pattern(cr, width, height); >> +            igt_put_cairo_ctx(cr); >>           } >>       } >> >