From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by gabe.freedesktop.org (Postfix) with ESMTPS id 961D06E250 for ; Sun, 3 Feb 2019 20:26:21 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id b15so1615934qto.8 for ; Sun, 03 Feb 2019 12:26:21 -0800 (PST) Date: Sun, 3 Feb 2019 18:26:17 -0200 From: Rodrigo Siqueira Message-ID: <20190203202617.ahkfkobxkarhqgu7@smtp.gmail.com> References: <7fe5b67752b0d53137360a0a4539572df0287e7d.1549204343.git.mamtashukla555@gmail.com> MIME-Version: 1.0 In-Reply-To: <7fe5b67752b0d53137360a0a4539572df0287e7d.1549204343.git.mamtashukla555@gmail.com> Subject: Re: [igt-dev] [PATCH i-g-t, v3, 1/2] tests/kms_cursor_crc.c: Improve test_cursor_alpha() List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1602456586==" Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Mamta Shukla Cc: igt-dev@lists.freedesktop.org, hamohammed.sa@gmail.com, daniel@ffwll.ch List-ID: --===============1602456586== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="do3bp3fdnz2auwti" Content-Disposition: inline --do3bp3fdnz2auwti Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 02/03, Mamta Shukla wrote: > In the kms_cursor_crc, the subtest to check exterme alpha values failed d= ue > to different CRCs observed in hardware and software rendering. This patch= fixes > CRC mismatch error in cursor-alpha-opaque and cursor-alpha-transparent su= btests > by improving the order in which cursor was rendered in hardware test. Cha= nges > made in test_cursor_alpha() to ensure cursor rendering in hardware test a= nd > acquire CRC value: > - Add drmModeSetCursor() to set cursor image. > - Remove igt_display_commit() to reduce the chance of getting crc values = cleared > before it is acquired. > - Add igt_remove_fb() to remove locally created framebuffer after disabli= ng the > cursor plane in HW test >=20 > Also, aligned this function with test_cursor_size and after these chang= es > got passing results for alpha blending support added in VKMS CRC API. >=20 > Signed-off-by: Mamta Shukla > Reviewed-by: Harry Wentland > --- > changes in v2: > -Modify commit message > -Add spaces around '=3D' >=20 > No changes in v3. >=20 > tests/kms_cursor_crc.c | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) >=20 > diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c > index 3c9856d9..144b44b0 100644 > --- a/tests/kms_cursor_crc.c > +++ b/tests/kms_cursor_crc.c > @@ -411,26 +411,28 @@ static void test_cursor_alpha(data_t *data, double = a) > igt_crc_t crc, ref_crc; > cairo_t *cr; > uint32_t fb_id; > - int curw=3Ddata->curw; > - int curh=3Ddata->curh; > + int curw =3D data->curw; > + int curh =3D data->curh; > + int ret; > =20 > /*alpha cursor fb*/ > - fb_id =3D igt_create_color_fb(data->drm_fd, curw, curh, > + fb_id =3D igt_create_fb(data->drm_fd, curw, curh, > DRM_FORMAT_ARGB8888, > LOCAL_DRM_FORMAT_MOD_NONE, > - 1.0, 1.0, 1.0, > &data->fb); > igt_assert(fb_id); > cr =3D igt_get_cairo_ctx(data->drm_fd, &data->fb); > - draw_cursor(cr, 0, 0, curw, curh, a); > + igt_paint_color_alpha(cr, 0, 0, curw, curh, 1.0, 1.0, 1.0, a); > igt_put_cairo_ctx(data->drm_fd, &data->fb, cr); > =20 > /*Hardware Test*/ > cursor_enable(data); > - igt_display_commit(display); > + ret =3D drmModeSetCursor(data->drm_fd, data->output->config.crtc->crtc_= id, data->fb.gem_handle, curw, curh); > + igt_assert_eq(ret, 0); > igt_wait_for_vblank(data->drm_fd, data->pipe); > igt_pipe_crc_collect_crc(pipe_crc, &crc); > cursor_disable(data); > + igt_remove_fb(data->drm_fd, &data->fb); > =20 > /*Software Test*/ > cr =3D igt_get_cairo_ctx(data->drm_fd, &data->primary_fb); > @@ -447,7 +449,6 @@ static void test_cursor_alpha(data_t *data, double a) > igt_paint_color(cr, 0, 0, data->screenw, data->screenh, > 0.0, 0.0, 0.0); > igt_put_cairo_ctx(data->drm_fd, &data->primary_fb, cr); > - igt_remove_fb(data->drm_fd, &data->fb); > } > =20 > static void test_cursor_transparent(data_t *data) > --=20 > 2.17.1 >=20 Reviewed-by: Rodrigo Siqueira --=20 Rodrigo Siqueira https://siqueira.tech Graduate Student Department of Computer Science University of S=E3o Paulo --do3bp3fdnz2auwti Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE4tZ+ii1mjMCMQbfkWJzP/comvP8FAlxXTmgACgkQWJzP/com vP8TVRAAwnCKg/eEp9au/t3GkwtGdBaGRiPFKTJ+aBluuJSN+ddLKloVMToMkAs6 3wcUSNhoYk+uVgdTeSPs53QQ0hKX30S5kiYe76Rl8L3sMMpoyRcoA7JwJc4CEZZc bUhr9V5z/HfIv1KM1oVJDNEMnzNL58fbiqitzDwXVXlKWK9dIglIDiDTsghq16+Z PdiHJCO3Lm4P5CYVPefqpQUlm395FXv1RbGiqjPUlZ6mjfykSMVn5j6BDnKs8Oxl VcmM4mULupkrJ4c5Q0uUIheEY+1IIZWhafQVfrX1dBeJVHsJZD+BvSp3mJ58bZQu cYvMgJos0bubgtcpw+OfJSsBtWRmJx3rYWBTXNrvu6sTJ8+e/GuMXu20IlFceYdE l6+SRKBM+4r8h4ubHKRyzcF8/cxM54j9q1VUtKOKwanLWQ6ejmgkFMsovaekiEE0 L8oCRxmjSisZPE76hA/TSvyQ2QRY4VQMgo0+x4jbICx2OJIQRuf5Z6wIhOMzHG+A wdZE+FLCKRUxzBJQlqorWvlH0SLPMB7McoWQovCp7Ys0bLFRiStkvngS0mRJ8FCq ApvSKbI1aV55h03BEjpVQi2a4p22BGCi39hBmwMXzBPZzD70o94hp6bMssden2BD sIpqRWjn2sPBOYwH+fynR7L6aNAew4XixlArbeBy8fQCROd+dtk= =PhGD -----END PGP SIGNATURE----- --do3bp3fdnz2auwti-- --===============1602456586== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KaWd0LWRldiBt YWlsaW5nIGxpc3QKaWd0LWRldkBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9pZ3QtZGV2Cg== --===============1602456586==--