From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 812766E21C for ; Tue, 12 Jan 2021 13:27:18 +0000 (UTC) From: "Kahola, Mika" Date: Tue, 12 Jan 2021 13:26:56 +0000 Message-ID: References: <20210109191013.9858-1-juhapekka.heikkila@gmail.com> In-Reply-To: <20210109191013.9858-1-juhapekka.heikkila@gmail.com> Content-Language: en-US MIME-Version: 1.0 Subject: Re: [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: fix crc buffer overflow for slow platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Juha-Pekka Heikkila , "igt-dev@lists.freedesktop.org" List-ID: > -----Original Message----- > From: igt-dev On Behalf Of Juha- > Pekka Heikkila > Sent: Saturday, January 9, 2021 9:10 PM > To: igt-dev@lists.freedesktop.org > Subject: [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation_crc: fix crc buffer > overflow for slow platforms > > on bad tiling tests there was nothing reading running crcs which could fill up > crc ringbuffer. Fix this by draining crc buffer per round. Also unify all > platforms execution path by taking reference crcs per pipe. > Looks ok to me. Reviewed-by: Mika Kahola > Signed-off-by: Juha-Pekka Heikkila > --- > tests/kms_rotation_crc.c | 16 ++++++---------- > 1 file changed, 6 insertions(+), 10 deletions(-) > > diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index > be27103fa..33a97ccaa 100644 > --- a/tests/kms_rotation_crc.c > +++ b/tests/kms_rotation_crc.c > @@ -272,11 +272,7 @@ static void prepare_fbs(data_t *data, igt_output_t > *output, > */ > igt_require(igt_display_has_format_mod(display, pixel_format, > tiling)); > > - /* > - * HSW will need to have those CRCs calculated each time, it > - * seems to behave different from other platforms. > - */ > - if (!data->crc_rect[rect].valid || IS_HASWELL(data->devid)) { > + if (!data->crc_rect[rect].valid) { > /* > * Create a reference software rotated flip framebuffer. > */ > @@ -345,6 +341,7 @@ static void test_single_case(data_t *data, enum pipe > pipe, > > ret = igt_display_try_commit2(display, COMMIT_ATOMIC); > if (test_bad_format) { > + igt_pipe_crc_drain(data->pipe_crc); > igt_assert_eq(ret, -EINVAL); > return; > } > @@ -408,10 +405,6 @@ static void test_plane_rotation(data_t *data, int > plane_type, bool test_bad_form > igt_display_t *display = &data->display; > igt_output_t *output; > enum pipe pipe; > - int c; > - > - for (c = 0; c < num_rectangle_types; c++) > - data->crc_rect[c].valid = false; > > if (plane_type == DRM_PLANE_TYPE_CURSOR) > igt_require(display->has_cursor_plane); > @@ -420,7 +413,10 @@ static void test_plane_rotation(data_t *data, int > plane_type, bool test_bad_form > > for_each_pipe_with_valid_output(display, pipe, output) { > igt_plane_t *plane; > - int i, j; > + int i, j, c; > + > + for (c = 0; c < num_rectangle_types; c++) > + data->crc_rect[c].valid = false; > > if (IS_CHERRYVIEW(data->devid) && pipe != PIPE_B) > continue; > -- > 2.28.0 > > _______________________________________________ > igt-dev mailing list > igt-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/igt-dev _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev