Bug 98351

Summary: LibreOffice' OpenGL backend hangs GPU (ring 0&3 stalled)
Product: Mesa Reporter: Clemens Eisserer <linuxhippy>
Component: Drivers/Gallium/radeonsiAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact: Default DRI bug account <dri-devel>
Severity: normal    
Priority: medium CC: julien.isorce, quikee
Version: 12.0   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Clemens Eisserer 2016-10-20 09:11:53 UTC
Starting LibreOffice Draw with their opengl rendering backend enabled hangs the GPU: https://youtu.be/6C_qZdA6WdY

This happend on an AMD MULLINS based laptop running Fedora 24 (kernel 4.7.?, mesa 12.0.3).

Steps to reproduce:
- Download LibreOffice 5.2.3
- Install it
- Start libreoffice writer
- Enable OpenGL backend (menu -> tools -> options -> view -> opengl for all rendering, disable blacklist)
- start libreoffice draw -> hang
Comment 1 Nicolai Hähnle 2016-11-04 11:00:51 UTC
Thank you for the report. I cannot reproduce this on Tonga. Does this still happen for you with a later kernel and/or Mesa git? There have been some hang fixes relatively recently.

Are there any messages in dmesg before the "ring stalled" messages?
Comment 2 Clemens Eisserer 2016-11-04 21:00:53 UTC
I've just tried to reproduce - and the issue seems to be gone with kernel 4.8.4 :)

Thanks :)
Comment 3 Dieter Nützel 2016-11-05 22:03:22 UTC
Sorry that I step in, here.

r600g - NI/Turks XT
But how have you got enabled OpenGL by all means in LO?

I have openSUSE 13.2 + all devel stuff...
LO 5.2.2.2.0+
Latest stable kernel: 4.8.6-5.g1d89b44-default
Mesa git, etc. pp.

OpenGL is enabled
OpenGL force is enabled

But any time (since ever?) I get: OpenGL is currently _disabled_...???
Update to LO 5.2.3.x.x?

Thanks,
Dieter
Comment 4 Clemens Eisserer 2016-11-06 17:44:26 UTC
Worked out of the box - maybe radeonsi supports some extensions LO requires and r600 is missing?

After all, at least with mesa LO's OpenGL backend is not worth the trouble - it is slow and rendering isn't pixel-perfect.
Comment 5 Tomaz Vajngerl 2016-11-28 11:14:34 UTC
Hi,

I'm the guy that works on the OpenGL code in LibreOffice and I have the same problem on my machine with radeonsi. The problem is with area scale shader [1] (which is used for scaling images in the document) - more specifically with the arrays at line 51, 52, 54, 55. I changed the scale algorithm to not use any arrays but this still seems to be nouveau to the OpenGL driver as the shader works as expected with intel or nouveau driver as well as nvidia and amd drivers on windows, but OTOH not intel driver on windows. I also managed to get it working if I reduce the array to 16 or less.

[1] https://cgit.freedesktop.org/libreoffice/core/tree/vcl/opengl/areaScaleFragmentShader.glsl?h=libreoffice-5-2-3#n51
Comment 6 Tomaz Vajngerl 2016-11-28 11:23:23 UTC
I'm using "Radeon R7 370" on Fedora 25
Comment 7 Marek Olšák 2017-01-14 14:26:39 UTC
Does this happen with latest mesa and llvm?
Comment 8 Timothy Arceri 2018-04-03 05:23:47 UTC
(In reply to Marek Olšák from comment #7)
> Does this happen with latest mesa and llvm?

Assuming it was fixed as per comment 2 and closing.

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.