From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Vlad Subject: Re: [PATCH i-g-t] demos/intel_sprite_on: Fix connector iteration bug Date: Wed, 15 Jun 2016 15:17:28 +0300 Message-ID: <20160615121727.GA14815@mcvlad-wk.rb.intel.com> References: <1465829466-13735-1-git-send-email-jim.bride@linux.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1316868669==" Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 5FE9E6E905 for ; Wed, 15 Jun 2016 12:14:21 +0000 (UTC) In-Reply-To: <1465829466-13735-1-git-send-email-jim.bride@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Jim Bride Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1316868669== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 13, 2016 at 07:51:06AM -0700, Jim Bride wrote: > Instead of looping until the first disconnected port is found, > now go through all possible connectors, drawing the sprite on > any connected display. >=20 > Signed-off-by: Jim Bride > --- > demos/intel_sprite_on.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) >=20 > diff --git a/demos/intel_sprite_on.c b/demos/intel_sprite_on.c > index 6dddded..ff40e3c 100644 > --- a/demos/intel_sprite_on.c > +++ b/demos/intel_sprite_on.c > @@ -563,10 +563,8 @@ static void ricochet(int tiled, int sprite_w, int sp= rite_h, > =20 > // Find the native (preferred) display mode > connector_find_preferred_mode(gfx_fd, gfx_resources, &curr_connector); > - if (curr_connector.mode_valid =3D=3D 0) { > - printf("No valid preferred mode detected\n"); > - goto out; > - } > + if (curr_connector.mode_valid =3D=3D 0) > + continue; Could you also add that info message when all connectors are disconnected? Like checking the index is equal w/ the number of connectors available? > =20 > // Determine if sprite hardware is available on pipe > // associated with this connector. > --=20 > 2.7.4 >=20 > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx --uAKRQypu60I7Lcqm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXYUdXAAoJELmLWIAQzyE+4lYH/0wQ6GUvn/z92kEp81O6NmPj rr72y20Wi+guP91HpfXqgogPjZcaoX99CoC4csy2i9FivOgjB0Nsc48XLCvA+hcF UGJTS0BNc4nFoZaKaYozsZBW8Bc3fELaVRpJLrBJ8fpNhVE4WYpp6EMuNspE5AlB Xlv50lgxkjfcgkI2IMYYihYclH88S4QZ/A2kjBJAA+CyACXHVFpmQdOmgIt4qQ0L 6pDn9g3oIkZohgxtUjFWQL2Yr+CqDSz9r+bY0BzNu5czimSRlmCrXZNxeEB6bNiP ASq2qV3YsIk+Mni00rN8wte+Q33RFnEBiT5/k5I2aONrqvJjqCMMMqnw+l7ejZI= =EtMd -----END PGP SIGNATURE----- --uAKRQypu60I7Lcqm-- --===============1316868669== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============1316868669==--