Bug 108282 - Mesa 18.2.x makes glxinfo show problems, 18.1.9 is OK [bisected]
Summary: Mesa 18.2.x makes glxinfo show problems, 18.1.9 is OK [bisected]
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: 18.2
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Kenneth Graunke
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-09 05:04 UTC by brodo
Modified: 2018-10-31 13:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
both glxinfo outputs (8.28 KB, application/zip)
2018-10-09 05:04 UTC, brodo
Details
apitrace trace result (12.16 KB, application/zip)
2018-10-10 08:29 UTC, brodo
Details
0001-ppgtt-i915-memory-address-masks.patch (2.06 KB, patch)
2018-10-24 10:29 UTC, Sergii Romantsov
Details | Splinter Review
Example VariCAD file (35.87 KB, application/zip)
2018-10-31 08:55 UTC, brodo
Details
pics of the problem (323.07 KB, application/zip)
2018-10-31 08:56 UTC, brodo
Details

Description brodo 2018-10-09 05:04:46 UTC
Created attachment 141948 [details]
both glxinfo outputs

In my Slackware-current installation I noticed wrong glxinfo output when I changed Mesa 18.1.6 to 18.2.0 and later.
That resulted in problems with starting VariCAD 3D cad software.
I had to downgrade to 18.1.6.
Comment 1 Marina Chernish 2018-10-09 14:04:03 UTC
Hi,
Could you please provide version of Slackware-current you have and version of kernel?
It is 32-bit OS version, right?

I've tried to reproduce this bug on 64- and 32-bit mesa and mesa-utils versions having mesa-18.2.0, 18.2.1 and the latest 18.3.0 and have no such issue.

Also use Skylake GT2: Intel® HD Graphics 520; CPU Intel Core i3-6006U.
OS: Ubuntu 18.04 x86_64 kernel 4.17.18-generic.
Comment 2 brodo 2018-10-09 16:21:19 UTC
Slackware-current means that this is 14.2 version upgraded to the latest packages (latest means up to several days ago - so it is still hot!).
Kernel is 4.14.74-smp and the processor is i5-6300U CPU @ 2.40GHz.
I use 32-bit version of Linux.
I have 2 driver packages installed as a normal system component:
intel-vaapi-driver-2.2.0-i586-1
xf86-video-intel-20180906_25c9a2fc-i686-1
Comment 3 Sergii Romantsov 2018-10-10 07:57:46 UTC
Hello, brodo@o2.pl.
Could you, please, provide (just for case) a result of command (files glxinfo.trace and glxinfo.loggg):
apitrace trace -o ./glxinfo.trace strace glxinfo > ./glxinfo.loggg 2>&1
Comment 4 brodo 2018-10-10 08:29:44 UTC
Created attachment 141972 [details]
apitrace trace result
Comment 5 Sergii Romantsov 2018-10-10 12:56:17 UTC
Brodo, are you able to check with newer kernel? 4.17 or 4.18?
Comment 6 brodo 2018-10-11 09:06:40 UTC
I changed kernel to 4.18.13-smp.
No difference :-(
Comment 7 brodo 2018-10-13 16:19:38 UTC
I discovered that mesa up to 18.1.9 works well along with llvm-6.0.1.

Mesa 18.2.0 and higher was compiled with llvm-7.0.0.
That combination results in errors in glxinfo and my problems with VariCAD.

I use Slackware-current 32-bit.
Comment 8 brodo 2018-10-14 08:41:17 UTC
How can I perform regression test between 18.2.0 and 18.1.9 ?
A comprehensive guide/doc would be useful now !
Comment 9 Mark Janes 2018-10-14 18:03:01 UTC
LLVM mismatches would be a distro bug, right?  Mesa has to update LLVM when the radeon driver requires it.  The resulting dependency conflicts are one of the drawbacks of using LLVM in the first place...

How do other distros handle this issue?
Comment 10 brodo 2018-10-16 11:10:49 UTC
Here is my bisecting result:


66c61797ada12e0e2b396affcc2dc495b6cc04ed is the first bad commit
commit 66c61797ada12e0e2b396affcc2dc495b6cc04ed
Author: Eric Engestrom <eric.engestrom@intel.com>
Date:   Mon Jun 4 18:06:30 2018 +0100

    autotools: add missing android file to package
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106779
    Fixes: ff904978a1d299a36b587 "gallium/util: Android backtrace support"
    Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
    Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>

:040000 040000 9419f28cdee4ad4586beac1d2cbc4ddf8f22d1d4 d76ec8f1a9698f1a62a34ceccf05d8ab6b0de499 M	src
Comment 11 brodo 2018-10-18 06:44:36 UTC
I bisected 18.2.0 and 18.1.9.
Here is the result:

66c61797ada12e0e2b396affcc2dc495b6cc04ed is the first bad commit
commit 66c61797ada12e0e2b396affcc2dc495b6cc04ed
Author: Eric Engestrom <eric.engestrom@intel.com>
Date:   Mon Jun 4 18:06:30 2018 +0100

    autotools: add missing android file to package
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106779
    Fixes: ff904978a1d299a36b587 "gallium/util: Android backtrace
    support" Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
    Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>

:040000 040000 9419f28cdee4ad4586beac1d2cbc4ddf8f22d1d4
d76ec8f1a9698f1a62a34ceccf05d8ab6b0de499 M	src
Comment 12 Marina Chernish 2018-10-19 07:51:11 UTC
Hi Brodo,

Finally I managed to reproduce this issue on 32x Ubuntu 16.04 (unfortunately had bad luck with Slackware). Also checked mentioned commit 66c61797ada12e0e2b396affcc2dc495b6cc04ed and from my side glxinfo has no issues on it.

Here is my result of bisecting:
a363bb2cd0e2a141f2c60be005009703bffcbe4e is the first bad commit
commit a363bb2cd0e2a141f2c60be005009703bffcbe4e
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Tue Apr 10 01:18:25 2018 -0700

	i965: Allocate VMA in userspace for full-PPGTT systems.
    
	This patch enables soft-pinning of all buffers, allowing us to skip
	relocation processing entirely.  All systems with full PPGTT and > 4GB
	of VMA should gain these benefits.  This should be most Gen8+.
    
	Unfortunately, this excludes a few systems:
	- Cherryview (only has 32-bit addressing, despite 48-bit pointers)
	- Broadwell with a 32-bit kernel
	- Anybody running pre-4.5 kernel.
    
	We may enable it for Cherryview in the future, but it would require
	some tweaks to the memory zone.

Used environment: 
Intel® HD Graphics 520; Intel Core i3-6006U; kernel 4.18.13-041813-generic;
Comment 13 Mark Janes 2018-10-19 17:39:07 UTC
Marina's bisect points to a commit that requires a recent kernel, IIRC.

Brodo's bisect seems implausible.  Not sure how that commit could affect anything.
Comment 14 brodo 2018-10-19 18:13:49 UTC
I'll try to repeat my bisect ; maybe some wrong declaration drove to bad results.
Comment 15 brodo 2018-10-20 05:03:46 UTC
Finally I got the same result as Marina.

My previuos attempt suffered possibly from one mistake.

So I confirm Marina's result.
Comment 16 brodo 2018-10-22 19:38:24 UTC
bash-4.4$ git bisect bad
a363bb2cd0e2a141f2c60be005009703bffcbe4e is the first bad commit
commit a363bb2cd0e2a141f2c60be005009703bffcbe4e
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Tue Apr 10 01:18:25 2018 -0700

    i965: Allocate VMA in userspace for full-PPGTT systems.
    
    This patch enables soft-pinning of all buffers, allowing us to skip
    relocation processing entirely.  All systems with full PPGTT and > 4GB
    of VMA should gain these benefits.  This should be most Gen8+.
    
    Unfortunately, this excludes a few systems:
    - Cherryview (only has 32-bit addressing, despite 48-bit pointers)
    - Broadwell with a 32-bit kernel
    - Anybody running pre-4.5 kernel.
    
    We may enable it for Cherryview in the future, but it would require
    some tweaks to the memory zone.
    
    Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Comment 17 Sergii Romantsov 2018-10-24 10:29:17 UTC
Trying to send patch for the kernel: 0001-ppgtt-i915-memory-address-masks.patch
but don't see it on https://patchwork.freedesktop.org/project/intel-gfx/patches

So attaching it here.

Brodo, are you able to try that patch with kernel drm-tip (https://01.org/linuxgraphics/documentation/build-guide-0) and check if VariCAD 3D works?
Comment 18 Sergii Romantsov 2018-10-24 10:29:44 UTC
Created attachment 142168 [details] [review]
0001-ppgtt-i915-memory-address-masks.patch
Comment 19 brodo 2018-10-24 18:47:55 UTC
The compiling of 2018Q1 Intel Graphics Stack Recipe seems not to be trivial.

How this relates to x section of Slackware 32-bit (my distro) x-window source tree ? :

http://ftp.slackware.com/pub/slackware/slackware-current/source/x/
Comment 20 Mark Janes 2018-10-24 19:39:48 UTC
I wouldn't recommend that site for tips on how to build your graphics stack.  Usually, distros are ahead of what they put there, and have concerns that are not met by the documentation.
Comment 21 Sergii Romantsov 2018-10-25 08:54:09 UTC
You don't need to build whole stack.
As i wrote: need to build only kernel with applied patch. Also ensure that
mesa is 18.2.x or over.
Building kernel is in paragraph 'BUILDING KERNEL' of https://01.org/linuxgraphics/documentation/build-guide-0
Comment 22 Sergii Romantsov 2018-10-25 10:14:17 UTC
Patch to the kernel: https://patchwork.freedesktop.org/patch/258425/
Comment 23 brodo 2018-10-25 15:08:32 UTC
Sergii - what would be the output of this kernel compiling ?

How can I insert it into my distro's structure ? :


X section of Slackware 32-bit (my distro) x-window source tree:

http://ftp.slackware.com/pub/slackware/slackware-current/source/x/
Comment 24 Sergii Romantsov 2018-10-26 13:01:36 UTC
Hi, i don't use slackware, but...

< http://ftp.slackware.com/pub/slackware/slackware-current/source/x/

Seems that is the user-space drivers.
But issue is in system-space: in the kernel-drivers.
As i can see your kernel is 4.19.0 (http://ftp.slackware.com/pub/slackware/slackware-current/kernels/VERSIONS.TXT).

< Sergii - what would be the output of this kernel compiling ?
Output is vmlinuz.
So ATM patches that should fix issue are already in queue for the next kernel. And you need to wait for update of it if you don't want build it yourself.

< How can I insert it into my distro's structure ?
Fix is under that structure.

So the simplest way for you (workaround till kernel updated) seems is to just revert commit a363bb2cd0e2a141f2c60be005009703bffcbe4e of http://ftp.slackware.com/pub/slackware/slackware-current/source/x/mesa/ and most likely it will work.
Comment 25 brodo 2018-10-26 19:14:09 UTC
Sergii - what commands should I use for reverting this specific commit ?

I mean on a local copy of mesa git on my HDD.

I'm not used to use git.
Comment 26 brodo 2018-10-27 13:29:14 UTC
Yes, the problem is gone.

I've compiled kernel 4.19.0 with Sergii's patch.

glxinfo's output seems then to be normal, VariCAD works well.

Thanks Sergii !
Comment 27 Mark Janes 2018-10-29 00:29:33 UTC
Ken, do you agree that this bug should be assigned to the kernel?
Comment 28 Sergii Romantsov 2018-10-29 09:58:06 UTC
Chris's version: https://patchwork.freedesktop.org/series/51505/
Comment 29 Jani Nikula 2018-10-29 10:45:06 UTC
commit 9125963a9494253fa5a29cc1b4169885d2be7042
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Oct 25 10:18:22 2018 +0100

    drm/i915: Mark up GTT sizes as u64

commit 6fc4e48f9ed46e9adff236a0c350074aafa3b7fa
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Oct 25 10:18:23 2018 +0100

    drm/i915: Compare user's 64b GTT offset even on 32b
Comment 30 brodo 2018-10-30 16:16:47 UTC
Although I confirmed proper behaviour of VariCAD 2.09, but there are some graphical weird phantoms during rotating or moving 3D view position.

Downgrading back to mesa 18.1.9 eleminates this problem.

So not all is resolved, unfortunately.
How can I track/debug these phantoms to get some useful info ?
Comment 31 Denis 2018-10-31 07:49:41 UTC
Hi. I would suggest to create a new issue, because it sounds really like a new, not related to current.

Then, would be helpful to provide video of issue.
I checked glance this app - it looks free for trial, so also would be helpful to provide a 3d model, which we can load and reproduce the problem. If issue is really disappears for lower mesa versions, I will bisect it quite fast
Comment 32 brodo 2018-10-31 08:55:28 UTC
Created attachment 142299 [details]
Example VariCAD file
Comment 33 brodo 2018-10-31 08:56:22 UTC
Created attachment 142300 [details]
pics of the problem
Comment 34 brodo 2018-10-31 13:50:54 UTC
In order to show the artifacts you should rotate the point of view or zoom the objects several times.


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.