From: Peter Blum <Peter.Blum@lxco.com>
To: dri-devel@lists.freedesktop.org
Subject: Wrong vsync offset calculation in drm_edid.c
Date: Thu, 07 Mar 2013 16:41:20 +0100 [thread overview]
Message-ID: <5138B520.40903@lxco.com> (raw)
This patch is a bug fix for the file drm_edid.c of the kernel 3.8.
The vsync offset is calculated wrong from the EDID set because of the
wrong shift direction.
We could measure the bad old setting and also the good new setting after
the bug fix.
Signed-off-by: Peter Blum <Peter.Blum@lxco.com>
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 +0100
+++ b/drivers/gpu/drm/drm_edid.c 2013-03-07 12:04:24.527609783 +0100
@@ -893,7 +893,7 @@
unsigned vblank = (pt->vactive_vblank_hi & 0xf) << 8 |
pt->vblank_lo;
unsigned hsync_offset = (pt->hsync_vsync_offset_pulse_width_hi
& 0xc0) << 2 | pt->hsync_offset_lo;
unsigned hsync_pulse_width =
(pt->hsync_vsync_offset_pulse_width_hi & 0x30) << 4 |
pt->hsync_pulse_width_lo;
- unsigned vsync_offset = (pt->hsync_vsync_offset_pulse_width_hi &
0xc) >> 2 | pt->vsync_offset_pulse_width_lo >> 4;
+ unsigned vsync_offset = (pt->hsync_vsync_offset_pulse_width_hi &
0xc) << 2 | pt->vsync_offset_pulse_width_lo >> 4;
unsigned vsync_pulse_width =
(pt->hsync_vsync_offset_pulse_width_hi & 0x3) << 4 |
(pt->vsync_offset_pulse_width_lo & 0xf);
/* ignore tiny modes */
next reply other threads:[~2013-03-07 15:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 15:41 Peter Blum [this message]
2013-03-08 9:05 ` Wrong vsync offset calculation in drm_edid.c Paul Menzel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5138B520.40903@lxco.com \
--to=peter.blum@lxco.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.