From: Paul Menzel Subject: Re: Wrong vsync offset calculation in drm_edid.c Date: Fri, 08 Mar 2013 10:05:50 +0100 Message-ID: <1362733550.7193.28.camel@mattotaupa> References: <5138B520.40903@lxco.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1585761441==" Return-path: Received: from mail.gw90.de (mail.gw90.de [188.40.100.199]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F035E6C55 for ; Fri, 8 Mar 2013 01:06:07 -0800 (PST) In-Reply-To: <5138B520.40903@lxco.com> 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: Peter Blum Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1585761441== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-DOsAX/471WeUAsM5x81E" --=-DOsAX/471WeUAsM5x81E Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Peter, thank you for your patch. It has some formal issues though. Am Donnerstag, den 07.03.2013, 16:41 +0100 schrieb Peter Blum: 1. Your subject line does not contain the tag [PATCH]. 2. You should CC the maintainers. > This patch is a bug fix for the file drm_edid.c of the kernel 3.8. Is that bug also present in Linux 3.9 (Linus=E2=80=99 master branch), which= is the current development branch. Patches have to be submitted against that branch. > The vsync offset is calculated wrong from the EDID set because of the s,wrong,incorrectly, > wrong shift direction. > We could measure the bad old setting and also the good new setting after= =20 > the bug fix. >=20 >=20 > Signed-off-by: Peter Blum >=20 >=20 > diff -Naur a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > --- a/drivers/gpu/drm/drm_edid.c 2013-02-19 00:58:34.000000000 +01= 00 > +++ b/drivers/gpu/drm/drm_edid.c 2013-03-07 12:04:24.527609783 +01= 00 > @@ -893,7 +893,7 @@ > unsigned vblank =3D (pt->vactive_vblank_hi & 0xf) << 8 |=20 > pt->vblank_lo; 3. Your MUA Thunderbird mangled the patch by automatically breaking lines. You should disable that or use `git send-email`. > unsigned hsync_offset =3D (pt->hsync_vsync_offset_pulse_width_hi= =20 > & 0xc0) << 2 | pt->hsync_offset_lo; > unsigned hsync_pulse_width =3D=20 > (pt->hsync_vsync_offset_pulse_width_hi & 0x30) << 4 |=20 > pt->hsync_pulse_width_lo; > - unsigned vsync_offset =3D (pt->hsync_vsync_offset_pulse_width_hi = &=20 > 0xc) >> 2 | pt->vsync_offset_pulse_width_lo >> 4; > + unsigned vsync_offset =3D (pt->hsync_vsync_offset_pulse_width_hi = &=20 > 0xc) << 2 | pt->vsync_offset_pulse_width_lo >> 4; Not sure where it is determined how to shift that. But if it works for you, good. > unsigned vsync_pulse_width =3D=20 > (pt->hsync_vsync_offset_pulse_width_hi & 0x3) << 4 |=20 > (pt->vsync_offset_pulse_width_lo & 0xf); >=20 > /* ignore tiny modes */ Please send a [PATCH v2] with a comment, what changed in v2 after `---` right before the diff line. $ git commit --amend # to edit commit message $ git format-patch -1 --subject-prefix=3D"PATCH v2" Thanks, Paul --=-DOsAX/471WeUAsM5x81E 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) iEYEABECAAYFAlE5qe4ACgkQPX1aK2wOHVgZTACdFqPaSmNNPpEshOlTwPPplWOt GEUAnAivbHzJ3fKZGA7yXZmmxYvt7Dtu =brSm -----END PGP SIGNATURE----- --=-DOsAX/471WeUAsM5x81E-- --===============1585761441== 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 --===============1585761441==--