• Mario Kleiner's avatar
    drm/nouveau/display: Enable vblank irqs after display engine is on again. · ff683df7
    Mario Kleiner authored
    In the display resume path, move the calls to drm_vblank_on()
    after the point when the display engine is running again.
    
    Since changes were made to drm_update_vblank_count() in Linux 4.4+
    to emulate hw vblank counters via vblank timestamping, the function
    drm_vblank_on() now needs working high precision vblank timestamping
    and therefore working scanout position queries at time of call.
    These don't work before the display engine gets restarted, causing
    miscalculation of vblank counter increments and thereby large forward
    jumps in vblank count at display resume. These jumps can cause client
    hangs on resume, or desktop hangs in the case of composited desktops.
    
    Fix this Linux 4.4 regression by reordering calls accordingly.
    Signed-off-by: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
    Cc: <stable@vger.kernel.org> # 4.4+
    Cc: Ben Skeggs <bskeggs@redhat.com>
    Cc: ville.syrjala@linux.intel.com
    Cc: daniel.vetter@ffwll.ch
    Cc: dri-devel@lists.freedesktop.org
    Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    ff683df7
nouveau_display.c 23.7 KB