]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Add a kludge for DSL incrementing too late and ISR not working
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 28 Oct 2013 22:04:43 +0000 (00:04 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 20 Jan 2014 10:21:36 +0000 (12:21 +0200)
commit26fae5c65a39eec7c7953b06d9223f12c31e5c18
treecbab1bb3b847a6c4c39dd0f16ea5347f53309d41
parent1a91ea92ce40301a9774e7a987fee8801ccd8727
drm/i915: Add a kludge for DSL incrementing too late and ISR not working

On pre-PCH platforms ISR doesn't seem to be an actual ISR, at least as
far as display interrupts are concerned. Instead it sort of looks like
some ISR bits just directly reflect the corresponding bit from PIPESTAT.
The bit appears in the ISR only if the PIPESTAT interrupt is enabled. So
in that sense it sort of looks a bit like the south interrupt scheme on
PCH platforms. So it goes something a bit like this:
PIPESTAT.status & PIPESTAT.enable -> ISR -> IMR -> IIR -> IER -> actual
interrupt

In any case that means the intel_pipe_in_vblank_locked() doesn't actually
work for pre-PCH platforms. As a last resort, add a similar kludge as radeon
has that fixes things up if we got called from the vblank interrupt,
but the scanline counter value indicates that we're not quite there yet.
We know that the scanline counter increments at hsync but is otherwise
accurate, so we can limit the kludge to the line just prior to vblank
start, instead of the relative distance that radeon uses.

Reviewed-by: mario.kleiner.de@gmail.com
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
drivers/gpu/drm/i915/i915_irq.c