summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-01-25 20:50:08 +0400
committerAlejandro Mery <amery@geeks.cl>2013-01-28 16:49:28 +0400
commit938edc8ddccfee26c179ffddf1e40e0353d7f4f9 (patch)
treeae5f20b02049ecaf7cf9f43e5ebf53a50ece4744
parent1785ac14a76450ee9be17ae7fae56597d1d21936 (diff)
downloadlinux-sunxi-938edc8ddccfee26c179ffddf1e40e0353d7f4f9.tar.xz
sunxi-hdmi: Adjust vertical total in interlaced mode with +1 if needed
The VT we get from EDID is the real VT / 2 *rounded down*, so we need to have either VT * 2 or VT * 2 + 1, add some magic to figure out which one we need. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--drivers/video/sunxi/hdmi/hdmi_edid.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/video/sunxi/hdmi/hdmi_edid.c b/drivers/video/sunxi/hdmi/hdmi_edid.c
index 1b12833d7bfd..8b5f26b7f882 100644
--- a/drivers/video/sunxi/hdmi/hdmi_edid.c
+++ b/drivers/video/sunxi/hdmi/hdmi_edid.c
@@ -310,6 +310,14 @@ Parse_DTD_Block(__u8 *pbuf)
if (video_timing[video_timing_edid].I) {
video_timing[video_timing_edid].INPUTY *= 2;
video_timing[video_timing_edid].VT *= 2;
+
+ /* Should VT be VT * 2 + 1, or VT * 2 ? */
+ frame_rate = (frame_rate + 1) / 2;
+ if ((HT * (VT * 2 + 1) * frame_rate) == pclk)
+ video_timing[video_timing_edid].VT++;
+
+ pr_info("Interlaced VT %d\n",
+ video_timing[video_timing_edid].VT);
}
video_timing[video_timing_edid].HSYNC = Hsync;
video_timing[video_timing_edid].VSYNC = Vsync;