Bug 43405 - Only horizontal lines (snow) display in google earth/glxgears using current r600g on RS780M
Summary: Only horizontal lines (snow) display in google earth/glxgears using current r...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium blocker
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-30 23:50 UTC by idunham
Modified: 2014-04-13 12:22 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Revert texture hack (1.04 KB, patch)
2011-12-01 22:54 UTC, idunham
Details | Splinter Review

Description idunham 2011-11-30 23:50:05 UTC
All that shows up when I run certain OpenGL programs (glxgears and google earth, so far) is monochrome blocks with horizontal lines. Not all GL programs are affected (the other standard tests work fine).
On stderr, I get this message repeated ad nauseum:
radeon: The kernel rejected CS, see dmesg for more information.

dmesg repeats this ad nauseum:

[18811.705536] radeon 0000:01:05.0: z/stencil buffer (2) too small (0x00BF3C8F 12240 1 4 -> 3133440 have 3104768)
[18811.705543] radeon 0000:01:05.0: r600_packet3_check:1501 invalid cmd stream 569
[18811.705547] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

My source tree is updated to the last commit prior to failover removal; that broke compilation (bug # 43404).  First saw this issue last weekend; I hadn't seen any issues during August, when I last built mesa; the binaries from then still work.

Hardware: Radeon HD 3200M - RS780M/RS780MN

Debian squeeze with following packages updated:
Linux 3.0.10
libdrm 2.4.25
libxmu 1.1.0
x11proto-dri2 2.6-2
x11proto-gl 1.4.14
Comment 1 Alex Deucher 2011-12-01 05:29:35 UTC
Can you bisect?
Comment 2 idunham 2011-12-01 15:14:21 UTC
git bisect in progress--it goes back to August.
I am gettting different appearances with the different revisions
(snow, blank windows, etc.).
Comment 3 Alex Deucher 2011-12-01 15:26:58 UTC
Did you update any other things around the same time?  kernel?  ddx?
Comment 4 idunham 2011-12-01 15:36:03 UTC
I've updated the kernel since, but I know the old version is good because I still have the binaries. I'd switched to fglrx due to thermal reasons (a mix of dust, weather, and bad power management in the driver).
I did not update any other relevant components.

I've gotten a few good results.  It looks like it was one of the Evergreen support fixes that broke it; the first one works, and I've got about 2 revisions left to go.
Comment 5 idunham 2011-12-01 15:57:35 UTC
Git bisect completed.
Here's what I find:

751a6ed893d393eaea266d892402d132f7d15a7d is the first bad commit
commit 751a6ed893d393eaea266d892402d132f7d15a7d
Author: Marek Olšák <maraeo@gmail.com>
Date:   Fri Aug 19 21:48:12 2011 +0200

    r600g: hack around a problem with texture alignment

:040000 040000 a52c6bc437438025f708ff5240db254a0b451f03 4978b1157ec6d23ec96dafe10245fd044d9fac2e M	src
Comment 6 idunham 2011-12-01 16:28:46 UTC
Reverting the commit results in perfect display.
Comment 7 idunham 2011-12-01 22:54:50 UTC
Created attachment 54051 [details] [review]
Revert texture hack

Revert the relevant commit.
This results in good graphics with both glxgears & Google Earth.
Comment 8 Marek Olšák 2011-12-02 03:18:31 UTC
I've got a hunch that the texture hack is GPU-dependent. The comment next to the hack suggests it fixes a problem on Evergreen. The problem might have been fixed already by some other commit, not sure.

I am okay with reverting the commit.

Ideally piglit should be tested on Evergreen and if there are regressions, the hack should be applied to Evergreen only, or another solution should be found, but I guess that can be sorted out after the revert.
Comment 9 Jos van Wolput 2012-04-13 18:53:46 UTC
(In reply to comment #8)

I still get the same issue when using r600g driver from git mesa, no such issue
using mesa-8.0.2.
All 3D demos are affected as well as google earth and GLC_player 3D apps.

Hardware: ATI Radeon HD3200 RS780M/RS780MN

Debian Sid with the following packages updated:
Linux Kernel~3.3.0-1.dmz.1-liquorix-amd64
Latest git version of libdrm, libX11, libxcb, libXi, mesa and xserver.
Comment 10 Jos van Wolput 2012-04-15 19:08:04 UTC
After doing git bisect, I found this to be another issue.
I filed a new bug: #48747.
Comment 11 Andreas Boll 2012-09-03 12:22:38 UTC
I think this issue has been fixed with the new libdrm surface allocator,
since the commit below removes the code in question.

commit 581f7e3101980a4e1068bb75c2eca60bb2071229
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Jul 29 18:53:19 2012 +0200

    r600g: drop the old texture allocation code
    
    Made obsolete by the libdrm surface allocator.


Could you confirm that this issue is resolved on mesa git master or mesa git 9.0 branch?
Comment 12 idunham 2012-10-01 02:11:20 UTC
On Mon, 03 Sep 2012 12:22:38 +0000
bugzilla-daemon@freedesktop.org wrote:

> https://bugs.freedesktop.org/show_bug.cgi?id=43405

> Could you confirm that this issue is resolved on mesa git master 
> or mesa git 9.0 branch?
Sorry to take so long replying; school's been keeping me busy.

At present, I'm not getting mesa to build:
#on master
make distclean
git pull
/autogen.sh --prefix=/opt/mesa9 --enable-driglx=direct \
--enable-gallium --enable-texture-float \
--with-dri-driverdir=/opt/mesa9/lib --with-state-trackers=glx,dri \
--without-dri-drivers --with-gallium-drivers=r600 --disable-egl
#succeeds
make -j1
..
make[4]: *** No rule to make target `../../../src/glsl/glsl_lexer.cc', needed by `glsl_lexer.lo'.  Stop.

This is still Debian Squeeze plus several backports; I've updated the kernel to 3.4.11, xcb to 1.8.1, and libdrm/libkms to 2.4.39.

Thanks,
Isaac Dunham <idunham@lavabit.com>
Comment 13 Andreas Boll 2012-10-01 07:20:49 UTC
(In reply to comment #12)

Can you try git clean -fdx before autogen?
Comment 14 idunham 2012-10-01 09:26:57 UTC
On Mon, 01 Oct 2012 07:20:49 +0000
bugzilla-daemon@freedesktop.org wrote:

> https://bugs.freedesktop.org/show_bug.cgi?id=43405
> 
> --- Comment #13 from Andreas Boll <andreas.boll.dev@gmail.com> ---
> (In reply to comment #12)
> 
> Can you try git clean -fdx before autogen?
> 
Before I got your message, I ran 
make -C src/glsl glsl_lexer.cc
which generated the file
After that, it built properly.
I'm still getting the same snow display.  I suspect it's an interaction with the Squeeze X stack, since I didn't get this with Precise (which has its own problems...)
I hope to try later when I've updated to the backports.org X server.
Comment 15 Paul Menzel 2012-10-01 09:58:49 UTC
I do not see this with Debian Sid/unstable (Mesa 8.0.4) and HD 3200 (RS780).

    01:05.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RS780 [Radeon HD 3200]

At least `glxgears` works fine. Any special prerequisites to run this with?

With debug message the following is written to `dmesg`.

[ 9350.289921] [drm:drm_mode_addfb], [FB:39]
[ 9350.289975] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = f6d77c00, cur_bbo = f72df800
[ 9350.334609] [drm:drm_mode_addfb], [FB:36]
[ 9350.334646] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = f72df800, cur_bbo = f6d77c00
[ 9350.349981] [drm:drm_mode_addfb], [FB:39]
[ 9350.350015] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = f6d77c00, cur_bbo = f72df800
[ 9350.366670] [drm:drm_mode_addfb], [FB:36]
[ 9350.366701] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = f72df800, cur_bbo = f6d77c00
[ 9350.383145] [drm:drm_mode_addfb], [FB:39]
[ 9350.383174] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = f6d77c00, cur_bbo = f72df800
[ 9350.400070] [drm:drm_mode_addfb], [FB:36]
[ 9350.400104] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = f72df800, cur_bbo = f6d77c00
[ 9350.416752] [drm:drm_mode_addfb], [FB:39]
[ 9350.416779] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = f6d77c00, cur_bbo = f72df800
[ 9350.433387] [drm:drm_mode_addfb], [FB:36]
[ 9350.433418] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = f72df800, cur_bbo = f6d77c00
[ 9350.449614] [drm:drm_mode_addfb], [FB:39]
[ 9350.449627] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = f6d77c00, cur_bbo = f72df800
[ 9350.466732] [drm:drm_mode_addfb], [FB:36]
[ 9350.466766] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = f72df800, cur_bbo = f6d77c00
[ 9350.483430] [drm:drm_mode_addfb], [FB:39]
[ 9350.483462] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = f6d77c00, cur_bbo = f72df800
[ 9350.500105] [drm:drm_mode_addfb], [FB:36]
[ 9350.500134] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = f72df800, cur_bbo = f6d77c00
[ 9350.516427] [drm:drm_mode_addfb], [FB:39]
[ 9350.516445] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = f6d77c00, cur_bbo = f72df800
[ 9350.533403] [drm:drm_mode_addfb], [FB:36]
[ 9350.533433] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = f72df800, cur_bbo = f6d77c00
[…]
Comment 16 idunham 2012-10-01 16:36:40 UTC
On Mon, 01 Oct 2012 09:58:49 +0000
bugzilla-daemon@freedesktop.org wrote:

> --- Comment #15 from Paul Menzel <paulepanter@users.sourceforge.net> ---
> I do not see this with Debian Sid/unstable (Mesa 8.0.4) and HD 3200 (RS780).
> 
>     01:05.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI
> RS780 [Radeon HD 3200]
> 
> At least `glxgears` works fine. Any special prerequisites to run this with?

At present, I'm suspecting that it's something to do with the Squeeze X stack (I'm using Squeeze with the stock Xorg, and I've updated only the minimum to satisfy configure).
Comment 17 Marek Olšák 2014-04-13 12:22:46 UTC
I think this has been fixed since the new surface allocator was added to libdrm. I haven't seen any issues with texture allocation for some time.


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.