Bug 103759 - plasma desktop corrupted rendering
Summary: plasma desktop corrupted rendering
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Jason Ekstrand
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-15 12:52 UTC by Tapani Pälli
Modified: 2017-11-20 07:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
menu shot (658.03 KB, image/jpeg)
2017-11-15 12:52 UTC, Tapani Pälli
Details
app close shot (644.30 KB, image/jpeg)
2017-11-15 12:53 UTC, Tapani Pälli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tapani Pälli 2017-11-15 12:52:15 UTC
bisected to
--- 8< ---
commit 4b1e70cc57d7ff5f465544644b2180dee1490cee
Author: Jason Ekstrand <jason.ekstrand@intel.com>
Date:   Mon Nov 13 20:13:09 2017 -0800

    i965: Switch over to fully external-or-not MOCS scheme
    
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Comment 1 Tapani Pälli 2017-11-15 12:52:57 UTC
Created attachment 135486 [details]
menu shot
Comment 2 Tapani Pälli 2017-11-15 12:53:23 UTC
Created attachment 135487 [details]
app close shot
Comment 3 Tapani Pälli 2017-11-15 12:55:39 UTC
system information:

Mesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2) (0x5912)

kernel 4.13.0-16-generic
mesa 17.4.0-devel git-059d25a06d
Comment 4 Tapani Pälli 2017-11-16 06:53:01 UTC
FWIW I cannot seem to reproduce these artifacts when DRI3 is used (instead of default DRI2).
Comment 5 Jason Ekstrand 2017-11-16 07:34:18 UTC
Something must not be getting flagged as external.  I took a quick look at the code today and I can't easily see how that would happen.  Also, it almost looks like the corrupting buffers are coming from X.
Comment 6 Jason Ekstrand 2017-11-18 06:27:35 UTC
This should be fixed by the following commit.  It fixes it for GNOME-shell on Wayland which was displaying similar corruption bisecting to the same commit.

commit 0a6a137eb27129e17298cfe9dd620205588ee4f6
Author: Jason Ekstrand <jason.ekstrand@intel.com>
Date:   Fri Nov 17 16:52:09 2017 -0800

    i965: Mark BOs as external when we export their handle
    
    Almost all of our BO export paths were already properly marked the BO as
    external and added it to the handle table.  Most export use-cases go
    through a prime fd or flink where we have a brw_bo export helper that
    does the right thing.  The one missing one happens when you call
    queryImage and ask for __DRI_IMAGE_ATTRIB_HANDLE.  We just grabbed the
    gem handle out of the BO (because it's really easy to do that) and
    handed it off to the client; what could go wrong?  As it turns out, this
    path is used by basically every compositor that wants to turn around and
    call drmModeAddFB2 on it so it can hand it off to display.  The result,
    as of 4b1e70cc57d7ff5f465544644b2180dee1490cee, is that we no longer set
    MOCS_PTE on those surfaces and the kernel's attempts to disable caching
    fail and we scanout gets corruption.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103759
    Fixes: 4b1e70cc57d7ff5f465544644b2180dee1490cee
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Cc: mesa-stable@lists.freedesktop.org
Comment 7 Tapani Pälli 2017-11-20 07:31:19 UTC
Yes verified the fix, thanks Jason!


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.