<div dir="ltr"><div>Reviewed the patch & it looks good.<br></div><div>Just to confirm, this patch tries to address the case of a tiny window of transition, i.e. from the 1st field (last half line) to 2nd field (first half line).<br>
</div><font size="3"><font color="#000000"><font face="Calibri"><p style="margin:0in 0in 0pt">Reviewed-by: "Akash Goel <<a href="mailto:akash.goels@gmail.com" target="_blank"><font color="#0066cc">akash.goels@gmail.com</font></a>>" </p>
</font></font></font></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 29, 2014 at 4:05 PM, <span dir="ltr"><<a href="mailto:ville.syrjala@linux.intel.com" target="_blank">ville.syrjala@linux.intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Ville Syrjälä <<a href="mailto:ville.syrjala@linux.intel.com">ville.syrjala@linux.intel.com</a>><br>
<br>
In interlaced modes, the pixel counter counts all pixels,<br>
so one field will have htotal more pixels. In order to avoid<br>
the reported position from jumping backwards when the pixel<br>
counter is beyond the length of the shorter field, just<br>
clamp the position the length of the shorter field. This<br>
matches how the scanline counter based position works since<br>
the scanline counter doesn't count the two half lines.<br>
<br>
Signed-off-by: Ville Syrjälä <<a href="mailto:ville.syrjala@linux.intel.com">ville.syrjala@linux.intel.com</a>><br>
---<br>
drivers/gpu/drm/i915/i915_irq.c | 12 ++++++++++++<br>
1 file changed, 12 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c<br>
index 7e0d577..64cd888 100644<br>
--- a/drivers/gpu/drm/i915/i915_irq.c<br>
+++ b/drivers/gpu/drm/i915/i915_irq.c<br>
@@ -844,6 +844,18 @@ static int i915_get_crtc_scanoutpos(struct drm_device *dev, int pipe,<br>
vtotal *= htotal;<br>
<br>
/*<br>
+ * In interlaced modes, the pixel counter counts all pixels,<br>
+ * so one field will have htotal more pixels. In order to avoid<br>
+ * the reported position from jumping backwards when the pixel<br>
+ * counter is beyond the length of the shorter field, just<br>
+ * clamp the position the length of the shorter field. This<br>
+ * matches how the scanline counter based position works since<br>
+ * the scanline counter doesn't count the two half lines.<br>
+ */<br>
+ if (position >= vtotal)<br>
+ position = vtotal - 1;<br>
+<br>
+ /*<br>
* Start of vblank interrupt is triggered at start of hsync,<br>
* just prior to the first active line of vblank. However we<br>
* consider lines to start at the leading edge of horizontal<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.2<br>
<br>
_______________________________________________<br>
Intel-gfx mailing list<br>
<a href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" target="_blank">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br>
</font></span></blockquote></div><br></div>