Bug 106478 - Vertical line corruptions seen on the left side of Gen 9+ display
Summary: Vertical line corruptions seen on the left side of Gen 9+ display
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: DRI git
Hardware: All All
: medium normal
Assignee: Maarten Lankhorst
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: Triaged, ReadyForDev
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-11 18:32 UTC by Azhar
Modified: 2019-02-13 07:13 UTC (History)
7 users (show)

See Also:
i915 platform: BXT, CFL, CNL, GLK, KBL, SKL
i915 features: display/atomic, display/watermark


Attachments
vertical corruption after disabling cursor (2.83 MB, image/jpeg)
2018-05-11 18:32 UTC, Azhar
no flags Details
Wait a vblank after disabling planes, before disabling crtc (630 bytes, patch)
2018-08-13 09:44 UTC, Maarten Lankhorst
no flags Details | Splinter Review
vertical corruption logs (463.34 KB, text/plain)
2018-08-13 23:33 UTC, Chintan Patel
no flags Details
attachment-2906-0.html (2.50 KB, text/html)
2018-11-09 15:07 UTC, Chintan Patel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Azhar 2018-05-11 18:32:36 UTC
Created attachment 139502 [details]
vertical corruption after disabling cursor

Vertical display corruption is seen on GEN9 and above displays. This issue is more prominent when using an external display. Attaching the image which shows the corruption. 

There is a patch (https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/877396/ ) submitted on chromeos kernel which fixes the issue on chromeos kernels and even on upstream kernel. 

The upstream change which introduced the check is:

commit a5509abda48ecfc133fac6268e83fc1a93dba039
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Fri Feb 17 17:01:59 2017 +0200

    drm/i915: Fix legacy cursor vs. watermarks for ILK-BDW

There are many updates seen to this part of code which skip the vblank waits for cursor updates. But looks like we still need the vblank wait(slowpath) on Gen9+ displays too.

So having the same fix on upstream kernel as the chromeos fix, is a correct solution here? Will it cause underruns on ILK-BDW? or some other effects?
Comment 1 Jani Saarinen 2018-05-14 06:24:11 UTC
Ville, Jani, can you comment here? 
It seems patch to fix issues is from KrH.
Comment 2 Jani Saarinen 2018-05-28 06:25:54 UTC
Ville, Jani, what could course of actions here?
Comment 3 Simon Lee 2018-05-31 16:56:04 UTC
Hi Ville, Jani,

Please suggest a course of action.
Comment 4 Jani Saarinen 2018-06-25 09:59:50 UTC
ping,
Comment 5 Jani Saarinen 2018-08-13 09:35:27 UTC
Azhar,
Could you try using latest drm-tip: https://cgit.freedesktop.org/drm-tip and send dmesg with drm.debug=0x1e log_buf_len=4M from start to problem and attach logs as plain text here?
Comment 6 Maarten Lankhorst 2018-08-13 09:44:26 UTC
Created attachment 141059 [details] [review]
Wait a vblank after disabling planes, before disabling crtc

Does this fix the bug?
Comment 7 Chintan Patel 2018-08-13 23:33:04 UTC
Created attachment 141073 [details]
vertical corruption logs
Comment 8 Chintan Patel 2018-08-13 23:36:42 UTC
(In reply to Chintan Patel from comment #7)
> Created attachment 141073 [details]
> vertical corruption logs

Hi Maarten,

I cherry-picked your patch (with small change, as patch gave compilation error on pipe definition; intel_crtc->pipe instead of pipe) on drm-tip 4.18.0-01978-g273ade7fd922

                        intel_crtc_disable_pipe_crc(intel_crtc);

+                       /* Wait a vblank for planes to actually be turned off */
+                       intel_wait_for_vblank(dev_priv, intel_crtc->pipe);
+
                        dev_priv->display.crtc_disable(to_intel_crtc_state(old_crtc_state), state);
                        intel_crtc->active = false;
                        intel_fbc_disable(intel_crtc);

Issue is still reproducible. Attaching the logs..
Comment 9 Ville Syrjala 2018-08-21 13:46:23 UTC
I suspect the cursor getting stuck is caused by the DDB/WM update cancelling the already armed cursor disable. And later we don't rearm the cursor disable before the pipe gets shut down.

I was trying to come up with a better way to do the plane/ddb/wm updates (for bug #104975). It might be worth a shot here as well:
git://github.com/vsyrjala/linux.git skl_plane_update_ddb_sequence
Comment 10 Chintan Patel 2018-08-21 23:32:18 UTC
With git://github.com/vsyrjala/linux.git skl_plane_update_ddb_sequence I am not able to reproduce this issue.
Comment 11 Lakshmi 2018-09-11 09:43:07 UTC
Azhar, have you tried tried Ville's proposal?
Comment 12 Chintan Patel 2018-09-11 16:01:41 UTC
@Lakshmi, please see comment 10.

I already tried ville's branch(git://github.com/vsyrjala/linux.git skl_plane_update_ddb_sequence) and it fixes the issue.
Comment 13 Lakshmi 2018-11-09 15:07:10 UTC
Update: Patches are under-review.
Comment 14 Chintan Patel 2018-11-09 15:07:14 UTC
Created attachment 142421 [details]
attachment-2906-0.html

I will be OOO on Oct 05 and Oct 08. Please expect dealy in email responses.


Thanks,
Chintan
Comment 15 nathan.d.ciobanu 2018-11-09 16:53:32 UTC
(In reply to Lakshmi from comment #13)
> Update: Patches are under-review.

Can you provide the patchwork link to the series that exactly addresses this issue? My team would be happy to test while patches are still in review and provide Tested-by
Comment 16 Ville Syrjala 2018-11-09 18:31:18 UTC
(In reply to nathan.d.ciobanu from comment #15)
> (In reply to Lakshmi from comment #13)
> > Update: Patches are under-review.
> 
> Can you provide the patchwork link to the series that exactly addresses this
> issue? My team would be happy to test while patches are still in review and
> provide Tested-by

https://patchwork.freedesktop.org/series/51878/

Note that some of the patches were already pushed so it won't apply cleanly as a whole anymore.
Comment 17 Denis 2018-12-12 10:57:18 UTC
hey. As I found out, https://bugs.freedesktop.org/show_bug.cgi?id=108257 this ticket was closed as fixed. I think that current one is the same and also should be closed. Reporter, did you try to check drm-tip, how it works for you?
Comment 18 Jani Saarinen 2018-12-17 14:03:49 UTC
Any updates from reporter?
Comment 19 Denis 2018-12-18 16:15:10 UTC
Jani, I think this one also can be closed. 
https://bugs.freedesktop.org/show_bug.cgi?id=107951 In this ticket reporter confirmed fix, and I am 99% sure that current issue is simply duplicate of that (and one more, already closed)
Comment 20 Lakshmi 2018-12-18 19:56:22 UTC
I assume this issue has been fixed. Closing this bug. 
Feel free to reopen if you still have the issue. 

When you reopen ensure that issue is with latest drmtip. (https://cgit.freedesktop.org/drm-tip)

Attach the full dmesg from boot with kernel parameters drm.debug=0x1e log_buf_len=4M.
Comment 21 CarolineWebb 2019-02-13 07:13:41 UTC
Thanks a lot for giving here summery of Vertical line corruptions seen on the left side of Gen 9+ display of the product DRI. Glad to find it here. 

Caroline,
Economics personal statement writer - http://www.personalstatementfolks.co.uk/economics-personal-statement/ at Personal Statement Folks in UK.


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.