<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 13, 2014 at 9:12 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>
OK, so Daniel convinced me that the check+wait thing I used earlier<br>
wasn't really safe. I then decided that the only to make it safe it<br>
open coding the wait_for_event() mysefl, and after doing that I<br>
realized that we don't even need the silly vbl_received thingy, and<br>
just a wait queue + DSL check is enough. Let's see if Daniel can<br>
tear this one to shreds too :)<br>
<br>
Oh and I also did some more digging to the scanline counter + vblank<br>
interrupt mess, and decided that all my earlier hacks were crap. The<br>
solution was so simple once I started to look at the pixel counter<br>
values on gen4. I got inspired to have another look at this mess<br>
after Imre did some clock based vblank interrupt timing measurements<br>
on his VLV. Art confirmed my findings, so it should all be good now,<br>
no ugly hacks included.<br>
<br>
There is one tiny race window on gen2. That's caused by the fact that<br>
we only have the frame start interrupt there, and scanline counter<br>
increments slightly after the interrupt is triggered. So if we would<br>
extremely unlucky we might wake up, check the DSL, and determine we<br>
need to sleep more. But at this time we don't use the atomic update<br>
mechanism on gen2, and I think the windows is so small that we should<br>
be able to ignore it. Also the 1ms timeout would anyway prevent us from<br>
sleeping another full frame. So if it ever becomes a problem, we can<br>
try to think of something to overcome it, but at this point it doesn't<br>
seem worth the effort.<br>
<br>
Ville Syrjälä (5):<br>
  drm/i915: Fix scanout position for real<br>
  drm/i915: Add intel_get_crtc_scanline()<br>
  drm/i915: Make sprite updates atomic<br>
  drm/i915: Perform primary enable/disable atomically with sprite<br>
    updates<br>
  drm/i915: Add pipe update trace points<br>
<br>
 drivers/gpu/drm/i915/i915_irq.c      | 137 ++++++++++++------------<br>
 drivers/gpu/drm/i915/i915_trace.h    |  77 ++++++++++++++<br>
 drivers/gpu/drm/i915/intel_display.c |   2 +<br>
 drivers/gpu/drm/i915/intel_drv.h     |   3 +<br>
 drivers/gpu/drm/i915/intel_sprite.c  | 195 ++++++++++++++++++++++++++++-------<br>
 5 files changed, 306 insertions(+), 108 deletions(-)<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div>Went through the patches and they seem fine.</div><div>Reviewed by: "Sourab Gupta <<a href="mailto:sourabgupta@gmail.com">sourabgupta@gmail.com</a>>"</div>
<div>for all 5 patches in the series. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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></div>