Bug 78135 - [regression] vblank interrupts lost over suspend & resume
Summary: [regression] vblank interrupts lost over suspend & resume
Status: CLOSED WORKSFORME
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: highest normal
Assignee: Ville Syrjala
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-30 21:37 UTC by Chris Wilson
Modified: 2016-11-22 07:24 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
[PATCH] drm/i915: Re-enable vblank irqs for already active pipes (1.63 KB, patch)
2014-05-05 16:13 UTC, Ville Syrjala
no flags Details | Splinter Review

Description Chris Wilson 2014-04-30 21:37:16 UTC
42772ff8bd4d26c52b3a79ca02adcccd5d0668d4 is the first bad commit
commit 42772ff8bd4d26c52b3a79ca02adcccd5d0668d4
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Tue Apr 29 13:35:46 2014 +0300

    drm/i915: Make sprite updates atomic
    
    Add a mechanism by which we can evade the leading edge of vblank. This
    guarantees that no two sprite register writes will straddle on either
    side of the vblank start, and that means all the writes will be latched
    together in one atomic operation.
    
    We do the vblank evade by checking the scanline counter, and if it's too
    close to the start of vblank (too close has been hardcoded to 100usec
    for now), we will wait for the vblank start to pass. In order to
    eliminate random delayes from the rest of the system, we operate with
    interrupts disabled, except when waiting for the vblank obviously.
    
    Note that we now go digging through pipe_to_crtc_mapping[] in the
    vblank interrupt handler, which is a bit dangerous since we set up
    interrupts before the crtcs. However in this case since it's the vblank
    interrupt, we don't actually unmask it until some piece of code
    requests it.
    
    v2: preempt_check_resched() calls after local_irq_enable() (Jesse)
        Hook up the vblank irq stuff on BDW as well
    v3: Pass intel_crtc instead of drm_crtc (Daniel)
        Warn if crtc.mutex isn't locked (Daniel)
        Add an explicit compiler barrier and document the barriers (Daniel)
        Note the irq vs. modeset setup madness in the commit message (Daniel)
    v4: Use prepare_to_wait() & co. directly and eliminate vbl_received
    v5: Refactor intel_pipe_handle_vblank() vs. drm_handle_vblank() (Chris)
        Check for min/max scanline <= 0 (Chris)
        Don't call intel_pipe_update_end() if start failed totally (Chris)
        Check that the vblank counters match on both sides of the critical
        section (Chris)
    v6: Fix atomic update for interlaced modes
    v7: Reorder code for better readability (Chris)
    v8: Drop preempt_check_resched(). It's not available to modules
        anymore and isn't even needed unless we ourselves cause
        a wakeup needing reschedule while interrupts are off
    
    Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Reviewed-by: Sourab Gupta <sourabgupta@gmail.com>
    Reviewed-by: Akash Goel <akash.goels@gmail.com>
    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Comment 1 Daniel Vetter 2014-05-05 15:23:27 UTC
I've dropped this one an all follow-up patches since it seems to fix the issues I've seen running igt on my ilk here. I didn't look closer yet.
Comment 2 Ville Syrjala 2014-05-05 16:13:02 UTC
Created attachment 98500 [details] [review]
[PATCH] drm/i915: Re-enable vblank irqs for already active pipes

Try and see if this helps.
Comment 3 Chris Wilson 2014-05-05 19:05:17 UTC
No, re-enable vblanks in sanitize_crtc() does not do the trick.
Comment 4 Daniel Vetter 2014-05-15 22:13:24 UTC
Do we still suffer here? Is this restricted to just one platform or all across the board?
Comment 5 Chris Wilson 2014-05-16 11:18:01 UTC
Just tested again with

commit a294178cc8e4797104035ff9c696670248bb2827
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri May 16 12:08:58 2014 +0200

    drm-intel-nightly: 2014y-05m-16d-12h-08m-42s integration manifest

the bug is still occurring.
Comment 6 Daniel Vetter 2014-05-16 22:10:10 UTC
Which platforms are definitely broken/working?
Comment 7 Jani Nikula 2014-09-05 13:13:18 UTC
Chris, still an issue?
Comment 8 Chris Wilson 2014-09-05 14:27:35 UTC
I am not able to reproduce the issue anymore (I guess I should check with vanilla, but meh).
Comment 9 Jari Tahvanainen 2016-11-22 07:24:13 UTC
Closing resolved+worksforme. Reporter could not reproduce failure anymore, two years ago.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.