Bug 1082298 - Mesa: get rid of n_Disable-AMDGPU-GFX9-Vega-on-LLVM-lessthan-6.0.0.patch?
Mesa: get rid of n_Disable-AMDGPU-GFX9-Vega-on-LLVM-lessthan-6.0.0.patch?
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: X.Org
Current
Other Other
: P3 - Medium : Normal (vote)
: ---
Assigned To: Michal Srb
E-mail List
:
Depends on:
Blocks: 1082292
  Show dependency treegraph
 
Reported: 2018-02-22 14:09 UTC by Stefan Dirsch
Modified: 2018-06-21 21:36 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Dirsch 2018-02-22 14:09:38 UTC
> - n_Disable-AMDGPU-GFX9-Vega-on-LLVM-lessthan-6.0.0.patch
>   * Disable AMDGPU GFX9/Vega with LLVM < 6.0.0.
>     While it is supported since LLVM 5.0.0, it was not working
>     correctly (bnc#1075901). Since we do not have the resources to
>     determine which fixes should be backported and LLVM 6 will be
>     released relatively soon, disable the support until then. Users
>     with the card will have working desktop using software
>     rendering just like they did with LLVM 4.
>
https://build.opensuse.org/package/view_file/X11:XOrg/Mesa/n_Disable-AMDGPU-GFX9
-Vega-on-LLVM-lessthan-6.0.0.patch?expand=1
>  https://bugzilla.suse.com/show_bug.cgi?id=1075901
>
>  Not sure, whether this change would be appreciated upstream in git. Michal?
>

Michal Srb:
"My guess is that it would not be. There is no bug in Mesa, the bug is in LLVM.
LLVM 5 is supposed to support Vega, but it has a bug that breaks it. LLVM 6
works. The correct thing to do would be to find and backport the fix into LLVM
5, but we can not do it since we do not have the (very new) hardware. So we
decided to disable Vega support in Mesa if built with LLVM 5.

If there was a configuration option to disable parts of AMDGPU, we would use
it. But there is not, hence this patch."

Mesa's upstream developer:
Simple steps:
 - fd.o report already mentions LLVM patches needed
 - update LLVM package adding ^^, check with user that things works as expected
Comment 1 Stefan Dirsch 2018-02-22 14:12:29 UTC
Let's assign this to Michal.
Comment 2 Sebastian Pfliegel 2018-02-22 18:37:36 UTC
I guess I'm running in this issue. OpenGL hardware acceleration isn't really working for me in the default installation of Tumbleweed. glxinfo claims that my OpenGL vendor is VMware, Inc. Do you need help testing it?
Comment 3 Stefan Dirsch 2018-02-23 08:55:51 UTC
Sebastian, your issue is completely unrelated. This bug is about fixing the AMD Vega support in LLVM5 instead of disabling the VEGA support in Mesa. This is unrelated to VMWARE.
Comment 4 Michal Srb 2018-02-23 09:10:07 UTC
Actually I don't think there is anything to backport.
This is a copy of email I just sent:

Mesa's upstream developer:
> Simple steps:
>  - fd.o report already mentions LLVM patches needed
>  - update LLVM package adding ^^, check with user that things works as expected

That would be ideal, but I am not aware of a fd.o bug for this issue.

The reporter of https://bugzilla.suse.com/show_bug.cgi?id=1075901 linked the https://bugs.freedesktop.org/show_bug.cgi?id=104192 bug because he thought it is the same one, but it turned out that it is not. The fd.o bug happens with LLVM 6.0.0 and was solved by reverting multiple patches, but the suse bug happens with LLVM 5.0.1 and those patches are not even there yet. So there is nothing to revert/backport.

Since it works in newest LLVM, I did not open upstream bug. But there were many fixes in amdgpu between LLVM 5 and 6, so without hardware to figure out which to backport, we decided to wait for LLVM 6.


(In reply to Sebastian Pfliegel from comment #2)
> I guess I'm running in this issue. OpenGL hardware acceleration isn't really
> working for me in the default installation of Tumbleweed. glxinfo claims
> that my OpenGL vendor is VMware, Inc. Do you need help testing it?

Seems so. The "VMware" vendor is what is shows when Mesa's software rendering is used. Not sure why, some historical reasons I bet. I am afraid we can not do much with LLVM 5, but if you don't want to wait for final LLVM 6 release, you can try LLVM6 RC2 together with Mesa from here:
https://build.opensuse.org/project/show/home:michalsrb:branches:Mesa-llvm6:X11:XOrg
Comment 5 Sebastian Pfliegel 2018-02-23 09:16:30 UTC
(In reply to Michal Srb from comment #4)
> (In reply to Sebastian Pfliegel from comment #2)
> > I guess I'm running in this issue. OpenGL hardware acceleration isn't really
> > working for me in the default installation of Tumbleweed. glxinfo claims
> > that my OpenGL vendor is VMware, Inc. Do you need help testing it?
> 
> Seems so. The "VMware" vendor is what is shows when Mesa's software
> rendering is used. Not sure why, some historical reasons I bet. I am afraid
> we can not do much with LLVM 5, but if you don't want to wait for final LLVM
> 6 release, you can try LLVM6 RC2 together with Mesa from here:
> https://build.opensuse.org/project/show/home:michalsrb:branches:Mesa-llvm6:
> X11:XOrg

Thanks, I'll give it a try! When do you think LLVM6 will be included in the official repos?
Comment 6 Stefan Dirsch 2018-02-23 11:18:00 UTC
Ah. VMWARE vendor string in glxinfo. I guess that's connected to many of DRI/Mesa developers ended up in VMWARE company.
Comment 7 Sebastian Pfliegel 2018-02-23 17:44:47 UTC
Your OBS project was working fine.
Comment 8 Michal Srb 2018-02-26 07:58:07 UTC
(In reply to Sebastian Pfliegel from comment #5)
> Thanks, I'll give it a try! When do you think LLVM6 will be included in the
> official repos?

The upstream is expecting final release sometime near the end of this week. I'll package it after that. It takes at least day to build, additional days for rebuilds if there are problems. Once there are no problems, I'll submit it to Factory. Then it should be picked for next Tumbleweed snapshot. So I would estimate 2-3 weeks from now.
Comment 9 Stefan Dirsch 2018-03-23 13:48:45 UTC
(In reply to Michal Srb from comment #8)
> (In reply to Sebastian Pfliegel from comment #5)
> > Thanks, I'll give it a try! When do you think LLVM6 will be included in the
> > official repos?
> 
> The upstream is expecting final release sometime near the end of this week.
> I'll package it after that. It takes at least day to build, additional days
> for rebuilds if there are problems. Once there are no problems, I'll submit
> it to Factory. Then it should be picked for next Tumbleweed snapshot. So I
> would estimate 2-3 weeks from now.

Michal, any news on this one?
Comment 10 Michal Srb 2018-03-23 14:15:25 UTC
(In reply to Stefan Dirsch from comment #9)
> Michal, any news on this one?

I had to make changes to llvm5 to prevent conflicts with llvm6. At the moment I am waiting for the llvm5 changes to be accepted into Factory, then I will submit llvm6.
Comment 11 Michal Srb 2018-04-05 09:16:37 UTC
We have LLVM 6 in Factory and build Mesa against it, the patch is no longer needed. Removed: https://build.opensuse.org/request/show/593731
Comment 12 Sebastian Pfliegel 2018-04-05 09:19:29 UTC
Awesome. Thanks!