Bug 94928 - [xf86-video-intel] Graphical corruption (regression between gc186d4d and gff0ab2c)
Summary: [xf86-video-intel] Graphical corruption (regression between gc186d4d and gff0...
Status: NEW
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-14 05:08 UTC by John Lindgren
Modified: 2016-04-16 17:27 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Log (34.48 KB, text/plain)
2016-04-14 05:08 UTC, John Lindgren
no flags Details
Screenshot #1 - corrupted tooltip text (11.29 KB, image/png)
2016-04-14 05:09 UTC, John Lindgren
no flags Details
Screenshot #2 - artifacts in Thunar (10.95 KB, image/png)
2016-04-14 05:09 UTC, John Lindgren
no flags Details
Latest Xorg log (27.57 KB, text/plain)
2016-04-14 12:59 UTC, John Lindgren
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Lindgren 2016-04-14 05:08:08 UTC
Created attachment 122912 [details]
Log

Recent versions of xf86-video-intel driver in Arch Linux started showing graphical corruption/artifacts (running XFCE plus compton compositor).  The artifacts are sometimes bits of other screen contents, sometimes random memory patterns.  They are showing up most frequently in tooltips (especially from the date/time applet) and when using rubber-band selection in Thunar.

Last good version:
1:2.99.917+587+gc186d4d-1

Tested bad versions:
1:2.99.917+604+gff0ab2c-1
1:2.99.917+622+gde44aaa-1
1:2.99.917+626+ga7526ea-1

Related software versions:
xorg-server 1.18.3-1
mesa 11.2.0-1

Hardware:
Dell Latitude E5530
Intel Core i5-3210M (Ivy Bridge)

Xorg.0.log is attached, and screenshots will be uploaded shortly.
Comment 1 John Lindgren 2016-04-14 05:09:01 UTC
Created attachment 122913 [details]
Screenshot #1 - corrupted tooltip text
Comment 2 John Lindgren 2016-04-14 05:09:41 UTC
Created attachment 122914 [details]
Screenshot #2 - artifacts in Thunar
Comment 3 Chris Wilson 2016-04-14 06:42:52 UTC
commit bb5194eebd72e828a46f504d91f1ecd5b5804f57
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Apr 5 06:51:46 2016 +0100

    sna: Add alignment hints to tiled memcpy

was buggy, but

commit d08221edabc58bf7aab27931235d1746407bacb0
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Apr 9 18:57:29 2016 +0100

    sna: Replace lost offset when copying from tiled memory

was supposed to fix that. Can I ask you attach the latest Xorg.0.log just to double check?
Comment 4 John Lindgren 2016-04-14 12:59:01 UTC
Created attachment 122931 [details]
Latest Xorg log

Latest Xorg.0.log attached.  Problem still exists with this version (commit a7526ea2e038).
Comment 5 John Lindgren 2016-04-14 21:23:57 UTC
I suspect that d08221edabc5 did fix the "lost offset" problem introduced by bb5194eebd72, at least in the non-SSE2 copy functions, but there is still a problem in the SSE2 variants.

I am testing a patched version, which forces the use of

  memcpy_to_tiled_x__swizzle_0
  memcpy_from_tiled_x__swizzle_0

instead of

  memcpy_to_tiled_x__swizzle_0__sse2
  memcpy_from_tiled_x__swizzle_0__sse2

and I have not seen any artifacts so far.
Comment 6 Chris Wilson 2016-04-15 20:28:20 UTC
I've tried several configs (making sure they were hitting the swizzle0 sse2 paths) to no avail. I expected this to be fairly trivial to reproduce! Time to mess around and see if I can actually hit all the special cases in the tiled0 copy.

Could you please try disabling the sse2 paths individually to see if it is one or both that are broken?
Comment 7 startas 2016-04-16 14:28:44 UTC
Can corfirm, one of the last 10 commits brings graphical corruptions, one of them is broken cursor in libre office - instead of blinking line, cursor is huge blinking square with black triangle when it supposed to be invisible.
Comment 8 startas 2016-04-16 14:31:24 UTC
(In reply to startas from comment #7)
> Can corfirm, one of the last 10 commits brings graphical corruptions, one of
> them is broken cursor in libre office - instead of blinking line, cursor is
> huge blinking square with black triangle when it supposed to be invisible.

Sorry, not one of the last 10, but one of the last 70 commits.
Comment 9 Chris Wilson 2016-04-16 16:42:17 UTC
Hmm, xf86-video-intel/test/basic-putimage should be covering the swizzle0 sse2 paths. Can you please try those (you need to install Xvfb to provide a reference) and see if that reproduces the error?
Comment 10 Chris Wilson 2016-04-16 16:54:56 UTC
It does, just my full-debugging runs were disabling SSE2. D'oh.
Comment 11 Chris Wilson 2016-04-16 17:18:42 UTC
Please try:

commit f2a46458a257777438361f74d7e6abee92c7f294
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Apr 16 18:12:04 2016 +0100

    sna: Fix alignment vs length check when adjusting dst pointer
    
    When doing the misaligned copy from the start of the dst pointer, the
    important check is whether there is enough bytes remaining to the next
    alignment position, next from the last.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=94928
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 12 John Lindgren 2016-04-16 17:27:57 UTC
Seems to be fixed.  Thank you!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.