From: Paul Menzel Subject: Re: [PATCH] Test the first mode if there is no preferred mode. Date: Tue, 31 May 2011 11:04:31 +0200 Message-ID: <1306832671.4991.68.camel@mattotaupa> References: <1306877087-6952-1-git-send-email-hai.lan@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0662165041==" Return-path: Received: from mail.gw90.de (mail.gw90.de [188.40.100.199]) by gabe.freedesktop.org (Postfix) with ESMTP id A08599E988 for ; Tue, 31 May 2011 02:04:34 -0700 (PDT) Received: from f053045255.adsl.alicedsl.de ([78.53.45.255] helo=[192.168.178.21]) by mail.gw90.de with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1QRKsr-0005uX-H1 for intel-gfx@lists.freedesktop.org; Tue, 31 May 2011 09:05:05 +0000 In-Reply-To: <1306877087-6952-1-git-send-email-hai.lan@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0662165041== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-cYoOK7GVLSBlC+qPOxkX" --=-cYoOK7GVLSBlC+qPOxkX Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Hai, Am Dienstag, den 31.05.2011, 17:24 -0400 schrieb Hai Lan: > For a TV device, there might be no preferred mode. is that an error of the device or is this a driver =E2=80=9Cfeature=E2=80= =9D? > In this case, we can test the first mode. Is a Signed-off-by line needed to get your patch accepted? You can add it automatically passing `-s` to `git commit` or `git format-patch`. > --- > tests/testdisplay.c | 13 ++++++++++--- > 1 files changed, 10 insertions(+), 3 deletions(-) >=20 > diff --git a/tests/testdisplay.c b/tests/testdisplay.c > index 41a5753..ef194fe 100644 > --- a/tests/testdisplay.c > +++ b/tests/testdisplay.c > @@ -280,9 +280,16 @@ static void connector_find_preferred_mode(struct con= nector *c) > } > =20 > if (!c->mode_valid) { > - fprintf(stderr, "failed to find any modes on connector %d\n", > - c->id); > - return; > + if (connector->count_modes > 0) { > + /* use the first mode as test mode */ > + c->mode =3D connector->modes[0]; > + c->mode_valid =3D 1; > + } > + else { > + fprintf(stderr, "failed to find any modes on connector %d\n", > + c->id); > + return; > + } > } > =20 > /* Now get the encoder */ Reviewed-by: Paul Menzel Thanks, Paul --=-cYoOK7GVLSBlC+qPOxkX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk3krx8ACgkQPX1aK2wOHVjSkQCfZEACOQDVHWjzTV8OyYk0k+xA Sr4An37EFUPJRMSEW92k7N8JC5IlKOU7 =dn3x -----END PGP SIGNATURE----- --=-cYoOK7GVLSBlC+qPOxkX-- --===============0662165041== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0662165041==--