Bug 97888 - [regression] [i915] [SKL] Tearing / flickering on the drm-intel-nightly branch
Summary: [regression] [i915] [SKL] Tearing / flickering on the drm-intel-nightly branch
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: highest critical
Assignee: Paulo Zanoni
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-21 11:31 UTC by Mike Lothian
Modified: 2017-07-24 22:40 UTC (History)
4 users (show)

See Also:
i915 platform: SKL
i915 features: display/watermark


Attachments
i915_ddb_info.working (421 bytes, text/plain)
2016-09-21 16:19 UTC, Mike Lothian
no flags Details
i915_ddb_info.notworking (421 bytes, text/plain)
2016-09-21 16:19 UTC, Mike Lothian
no flags Details
Posisble fix (3.00 KB, patch)
2016-09-29 00:30 UTC, Paulo Zanoni
no flags Details | Splinter Review

Description Mike Lothian 2016-09-21 11:31:22 UTC
I've bisected back to this commit in the drm-intel-nightly branch

05a76d3d6ad1ee9f9814f88949cc9305fc165460 is the first bad commit 
commit 05a76d3d6ad1ee9f9814f88949cc9305fc165460 
Author: Lyude <cpaul@redhat.com> 
Date:   Wed Aug 17 15:55:57 2016 -0400 

   drm/i915/skl: Ensure pipes with changed wms get added to the state 
…
    
   If we're enabling a pipe, we'll need to modify the watermarks on all 
   active planes. Since those planes won't be added to the state on 
   their own, we need to add them ourselves. 
    
   Signed-off-by: Lyude <cpaul@redhat.com> 
   Reviewed-by: Matt Roper <matthew.d.roper@intel.com> 
   Cc: stable@vger.kernel.org 
   Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> 
   Cc: Daniel Vetter <daniel.vetter@intel.com> 
   Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com> 
   Cc: Hans de Goede <hdegoede@redhat.com> 
   Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> 
   Link: http://patchwork.freedesktop.org/patch/msgid/1471463761-26796-6-git-send-email-cpaul@redhat.com

The symptoms I'm seeing look like tearing at the top of the screen and it's especially noticeable in Chrome - reverting this commit makes the issue go away

I'll attach the contents of /sys/kernel/debug/dri/0/i915_ddb_info for working and not-working when I have access to my machine again
Comment 1 Mike Lothian 2016-09-21 16:19:17 UTC
Created attachment 126707 [details]
i915_ddb_info.working
Comment 2 Mike Lothian 2016-09-21 16:19:40 UTC
Created attachment 126708 [details]
i915_ddb_info.notworking
Comment 3 Mike Lothian 2016-09-21 16:20:49 UTC
They're exactly the same
Comment 4 Mike Lothian 2016-09-21 16:35:01 UTC
It's strange, when I move the cursor I see different windows flickering through, so if I move it quickly I can see the other Chrome windows and the terminal and my desktop
Comment 5 Paulo Zanoni 2016-09-22 19:37:58 UTC
I can reproduce this, and reverting the mentioned patch seems to fix the problem. For me, there's no easy recipe to reproduce it: you have to keep using the system, and it will happen at some point. Usually, when I'm browsing Firefox and the flicker happens, it kinda displays the desktop background instead of Firefox, which is really weird since Firefox is fullscreen.
Comment 6 Mike Lothian 2016-09-23 19:55:25 UTC
Is there anything else I can do to help with this bug? Would a video help?
Comment 7 Paulo Zanoni 2016-09-29 00:30:28 UTC
Created attachment 126839 [details] [review]
Posisble fix

Hi

Can you please confirm this fixes the problem?

Thanks,
Paulo
Comment 8 Mike Lothian 2016-09-29 06:03:27 UTC
Should that be applied after the revert, or without the problem patch being reverted?
Comment 9 Paulo Zanoni 2016-09-29 14:28:51 UTC
(In reply to Mike Lothian from comment #8)
> Should that be applied after the revert, or without the problem patch being
> reverted?

Without the revert.
Comment 10 yann 2016-09-30 08:09:14 UTC
Reference to Paulo's patch: https://patchwork.freedesktop.org/series/13095/
Comment 11 Mike Lothian 2016-09-30 08:17:01 UTC
It seems to fix things for me on other kernels affected by this, but I'm not able to boot highly at the moment. I'll try again later
Comment 12 Paulo Zanoni 2016-10-03 17:13:18 UTC
Hello

Since I'm highly confident that this patch will fix the problem because I could reproduce it, and since you already gave some confirmation that the patch fixes the problem for you, I'll close this bug. In case you think the problem persists, please feel free to reopen the bug report. This patch was marked for inclusion on the stable series, so it should reach your distro at some point.

Thanks for all the help. We really appreciate when bug reporters take the time to help with git bisect :).
Paulo
Comment 13 Maarten Lankhorst 2016-10-04 08:57:17 UTC
Could I have full steps to reproduce this issue? I want to make sure we have a testcase that could reproduce it, if it's feasible.
Comment 14 Maarten Lankhorst 2016-10-04 14:17:14 UTC
Likely test failure based on patch, still working on a test to reproduce:

1. busy bo flip
2. cursor update, primary plane is added to state
3. vblank happens
4. old contents of new fb shown because of cursor update
5. render completes, new fb contents shown

Testing can be done by adding some crc tests to ensure that this doesn't happen.
Comment 15 Maarten Lankhorst 2016-10-06 10:52:29 UTC
Test is upstream as flip-vs-cursor-busy-crc-legacy,
it currently fails until the call to add_all_affected_planes is completely removed. :(


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.