]> 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)
commit2b1edb2bfc697c73c732efb3cb7f93bfede9a1a3
treecbab1bb3b847a6c4c39dd0f16ea5347f53309d41
parentdad3ce5110006b140751bf7096428e6741836947
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