• Ville Syrjälä's avatar
    drm/i915: Add a kludge for DSL incrementing too late and ISR not working · 095163ba
    Ville Syrjälä authored
    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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    095163ba
i915_irq.c 112 KB