From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak Subject: Re: [Intel-gfx] [PATCH] drm/i915: make user mode sync polarity setting explicit Date: Tue, 30 Jul 2013 15:47:06 +0300 Message-ID: <1375188426.2599.19.camel@intelbox> References: <1375180592-16514-1-git-send-email-imre.deak@intel.com> <20130730105706.GA2616@cantiga.alporthouse.com> <1375188237.2599.18.camel@intelbox> Reply-To: imre.deak@intel.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0278824449==" Return-path: In-Reply-To: <1375188237.2599.18.camel@intelbox> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0278824449== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-1h1ZeKOwviLxaAKJZ2KD" --=-1h1ZeKOwviLxaAKJZ2KD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2013-07-30 at 15:43 +0300, Imre Deak wrote: > On Tue, 2013-07-30 at 11:57 +0100, Chris Wilson wrote: > > On Tue, Jul 30, 2013 at 01:36:32PM +0300, Imre Deak wrote: > > > Userspace can pass a mode with an unspecified vsync/hsync polarity > > > setting. All encoders in the Intel driver take this to mean a negativ= e > > > polarity setting. The HW readout/state checker code on the other hand > > > needs these flags to be explicitly set, otherwise the state checker w= ill > > > WARN about the mismatch. > > >=20 > > > Get rid of the WARN by making the polarity setting explicit in the > > > adjusted mode flags based on the requested mode flags. This will keep > > > the existing behavior otherwise. > > >=20 > > > Note that we could guess from the other timing parameters whether the > > > user wanted a VESA or other standard mode and set the polarity > > > accordingly. This is what the NV driver does > > > (drivers/gpu/drm/nouveau/dispnv04/crtc.c), but I think that's not ver= y > > > exact and would change the existing behavior of the Intel driver. > >=20 > > Right, don't guess. If the user wanted the standard mode, then the flag= s > > would have been taken from the standard modeline. > > =20 > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=3D65442 > >=20 > > You can add a tested-by here for qa. >=20 > Tested-by: Cancan Feng > =20 > > > Signed-off-by: Imre Deak > > Reviewed-by: Chris Wilson >=20 > CC'ing people who might be interested. >=20 > After some discussion with Ville, we could refine this further at the > drm core level by enforcing the Intel behavior - defaulting to negative > polarity and also checking/sanitizing the PHSYNC/PVSYNC flags. > PHSYNC/PVSYNC isn't used by the Intel driver so we could still go with Sorry, I meant PCSYNC/NCSYNC above. --Imre > the above patch for now and follow-up with a drm core fix. >=20 > We should probably also reject modes at drm core level where both > positive and negative flags are set, again in a separate follow-up > patch. >=20 > --Imre --=-1h1ZeKOwviLxaAKJZ2KD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAABAgAGBQJR97XKAAoJEORIIAnNuWDF7G8H/1WTXlf9Nuo/OArh9Lpy0HKW /ES92fHu+oC2/23X6kWoZm0SH5mgcNRhcdZdwYs9rRo+Agz6/DpbU1eQqJ/tG6h3 yAqNHdlkoTRkDav5RRXVti+PRW/s6heLBFUI1kqKG4ZxqekoMno1SVv2Cm9lETpl ufhmZ7bFYm6GWuaJI8OEK5Qc6RHUKlc4VG8RnYze1uwwrElfSgNh2FCfQWJcLd5A tT2yLF7LBF98YLaW4oS9O+ZGnCVfYCrTwYylh6sAY6n1EcaZFxT302d3fX0x5Zo5 EvXWh+e0gXvalqj50Bq51rbjmVahx68aubCoBf3A058CuUuLGNTlUl+TSak/vxs= =iEvy -----END PGP SIGNATURE----- --=-1h1ZeKOwviLxaAKJZ2KD-- --===============0278824449== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0278824449==--