From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 119A910E76F for ; Fri, 18 Mar 2022 13:58:06 +0000 (UTC) Date: Fri, 18 Mar 2022 15:58:02 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Karthik B S Message-ID: References: <20220318081741.14772-1-karthik.b.s@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220318081741.14772-1-karthik.b.s@intel.com> Subject: Re: [igt-dev] [PATCH i-g-t] Revert "tests/kms_async_flips: Make the crc test faster" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Fri, Mar 18, 2022 at 01:47:41PM +0530, Karthik B S wrote: > This reverts commit 9cb64a757d2ff1e180b1648e611439d94afd697d. > > This patch was added to speed up the test and get better results with > shard-skls. But even with this we're still seeing failure on shard-skl. Please mention the dg2 woes in the commit message so we understand why the revert was necessary. With that Reviewed-by: Ville Syrjälä > > Signed-off-by: Karthik B S > --- > tests/kms_async_flips.c | 22 ++++++---------------- > 1 file changed, 6 insertions(+), 16 deletions(-) > > diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c > index c658630c..5e11cd43 100644 > --- a/tests/kms_async_flips.c > +++ b/tests/kms_async_flips.c > @@ -472,28 +472,19 @@ static unsigned int clock_ms(void) > return ts.tv_sec * 1000 + ts.tv_nsec / 1000000; > } > > -static void paint_fb(int fd, struct igt_fb *fb, uint32_t color, int height) > +static void paint_fb(int fd, struct igt_fb *fb, uint32_t color) > { > igt_draw_rect_fb(fd, NULL, 0, fb, > gem_has_mappable_ggtt(fd) ? > IGT_DRAW_MMAP_GTT : IGT_DRAW_MMAP_WC, > - 0, 0, 1, height, color); > + 0, 0, 1, fb->height, color); > } > > static void test_crc(data_t *data) > { > unsigned int frame = 0; > unsigned int start; > - int ret, height; > - drmModeModeInfoPtr mode; > - > - /* make things faster by using a smallish mode */ > - mode = &data->connector->modes[0]; > - if (mode->hdisplay > 1024 && mode->vdisplay > 786) > - mode = igt_std_1024_mode_get(data->refresh_rate); > - else > - mode = igt_memdup(mode, sizeof(*mode)); > - height = mode->vdisplay; > + int ret; > > data->flip_count = 0; > data->frame_count = 0; > @@ -503,8 +494,7 @@ static void test_crc(data_t *data) > igt_draw_fill_fb(data->drm_fd, &data->bufs[!frame], 0xff0000ff); > > ret = drmModeSetCrtc(data->drm_fd, data->crtc_id, data->bufs[frame].fb_id, 0, 0, > - &data->connector->connector_id, 1, mode); > - free(mode); > + &data->connector->connector_id, 1, &data->connector->modes[0]); > igt_assert_eq(ret, 0); > > data->pipe_crc = igt_pipe_crc_new(data->drm_fd, > @@ -520,7 +510,7 @@ static void test_crc(data_t *data) > > while (clock_ms() - start < 2000) { > /* fill the next fb with the expected color */ > - paint_fb(data->drm_fd, &data->bufs[frame], 0xff0000ff, height); > + paint_fb(data->drm_fd, &data->bufs[frame], 0xff0000ff); > > data->flip_pending = true; > ret = drmModePageFlip(data->drm_fd, data->crtc_id, data->bufs[frame].fb_id, > @@ -531,7 +521,7 @@ static void test_crc(data_t *data) > > /* clobber the previous fb which should no longer be scanned out */ > frame = !frame; > - paint_fb(data->drm_fd, &data->bufs[frame], rand(), height); > + paint_fb(data->drm_fd, &data->bufs[frame], rand()); > } > > igt_pipe_crc_stop(data->pipe_crc); > -- > 2.22.0 -- Ville Syrjälä Intel