• Ville Syrjälä's avatar
    drm/i915: Move vblank enable earlier and disable later · 4b3a9526
    Ville Syrjälä authored
    We changed to an interrupt based vblank wait (as opposed to polling)
    in:
     commit 44bd93a3d367913d883be6abba9a6e51a53c4e90
     Author: Daniel Vetter <daniel.vetter@ffwll.ch>
     Date:   Fri Jul 25 23:36:44 2014 +0200
    
        drm/i915: Use generic vblank wait
    
    However we already had vblank waits on the wrong side of
    drm_vblank_{on,off}() calls due to various workarounds, so now we get
    a warning more or less every time we do a modeset, and we fail to
    wait for the vblank like we should.
    
    Move the drm_vblank_{on,off}() calls back out from
    intel_crtc_{enable,disable}_planes() so that all of these vblank waits
    return to proper operation. Also move the cxsr wait a bit earlier so
    that we can keep the encoder disable after we've turned off vblanks.
    Moving stuff out from the plane enable/disable functions seems
    preferrable to moving the workaround stuff in since the workarounds are
    required only on specific platforms.
    
    While at it switch over to the drm_crtc_ variants of the vblank on/off
    functions.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82525
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82490
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    4b3a9526
intel_display.c 380 KB