From: Marius Vlad Subject: Re: [PATCH i-g-t v5 7/7] kms_flip: Change __wait_for_vblank to use helper function. Date: Tue, 17 May 2016 13:32:48 +0300 Message-ID: <20160517103227.GA8717@mcvlad-wk.rb.intel.com> References: <1463405912-1592-1-git-send-email-robert.foss@collabora.com> <1463405912-1592-8-git-send-email-robert.foss@collabora.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1038895590==" Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id A2B156E692 for ; Tue, 17 May 2016 10:29:51 +0000 (UTC) In-Reply-To: <1463405912-1592-8-git-send-email-robert.foss@collabora.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: robert.foss@collabora.com Cc: daniel.stone@collabora.com, jani.nikula@intel.com, daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1038895590== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="s2ZSL+KKDSLx8OML" Content-Disposition: inline --s2ZSL+KKDSLx8OML Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 16, 2016 at 09:38:32AM -0400, robert.foss@collabora.com wrote: > From: Robert Foss >=20 > Change __wait_for_vblank() to use kmstest_get_vbl_flag() helper function. >=20 > Signed-off-by: Robert Foss > --- > tests/kms_flip.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/tests/kms_flip.c b/tests/kms_flip.c > index eda2fcc..0ecca07 100644 > --- a/tests/kms_flip.c > +++ b/tests/kms_flip.c > @@ -481,15 +481,15 @@ static int __wait_for_vblank(unsigned int flags, in= t crtc_idx, > { > drmVBlank wait_vbl; > int ret; > - unsigned crtc_idx_mask; > + uint32_t pipe_id_flag; > bool event =3D !(flags & TEST_VBLANK_BLOCK); > =20 > memset(&wait_vbl, 0, sizeof(wait_vbl)); > =20 > - crtc_idx_mask =3D crtc_idx << DRM_VBLANK_HIGH_CRTC_SHIFT; > - igt_assert(!(crtc_idx_mask & ~DRM_VBLANK_HIGH_CRTC_MASK)); If crtc_idx is 1 (pipe B), crtc_idx_mask =3D (1 << DRM_VBLANK_HIGH_CRTC_SHI= FT) =3D 2. > + pipe_id_flag =3D kmstest_get_vbl_flag(crtc_idx); > + igt_assert(!(pipe_id_flag & ~DRM_VBLANK_HIGH_CRTC_MASK)); If crtc_idx is 1 (pipe B), kmstest_get_vbl_flag(crtc_idx) =3D DRM_VBLANK_SE= CONDARY =3D 0x20000000 And the assertion fails as !(0x20000000 & ~0x0000003e) =3D 0. Should kmstest_get_vbl_flag() always return pipe_id << 1? > =20 > - wait_vbl.request.type =3D crtc_idx_mask; > + wait_vbl.request.type =3D pipe_id_flag; > if (flags & TEST_VBLANK_ABSOLUTE) > wait_vbl.request.type |=3D DRM_VBLANK_ABSOLUTE; > else > --=20 > 2.7.4 >=20 --s2ZSL+KKDSLx8OML Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXOvNOAAoJELmLWIAQzyE+MXUH/R+L7ZeVYYa60WZKq8TJvIGs fjhEhfw1DzcW0mS7UCheG2LF4++hwUzLiVogTJ2E/+4FnJ5az2sQRMrdhTVYZOkj sEvjKLEpwqy66Mh2nOvv5ReV1FXo6cyfZyHCXOuqcZC4uSirSerjhvSeflJylIVN rQ95Ql91bkMjnP7JrR9TvznNn9ayBwzgnn/QLiE/TBSjGF6pLIeRdQfhqlAIjq7P DBqwR4c/y5q7BTX++rvH+5b3RY9DD1kvB26oF5sW7TK56+AYknLUH3fIqCCuirMY 4jLcn/M3X8KpXLsYXilZX5ktMXxgsoGUVO8/6fp06nOWVJ8nc2QKbhkxL9nfNMc= =HcmS -----END PGP SIGNATURE----- --s2ZSL+KKDSLx8OML-- --===============1038895590== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============1038895590==--