Bug 60236

Summary: corruption of text and bottom of screen in xonotic menus since 325422c49449acdd8df1eb2ca8ed81f7696c38cc
Product: Mesa Reporter: Bug <freedesktop>
Component: Drivers/Gallium/r600Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: alexandre.f.demers
Version: git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: screen shot Xonotic
screen shot Xonotic
Fix
Fix v2
corruption after patches
Kernel fix
Kernel fix
xonotic with kernel without v2 patch 3.8-rc6

Description Bug 2013-02-03 14:39:17 UTC
bisected to this commit

325422c49449acdd8df1eb2ca8ed81f7696c38cc is the first bad commit
commit 325422c49449acdd8df1eb2ca8ed81f7696c38cc
Author: Jerome Glisse <jglisse@redhat.com>
Date:   Mon Jan 7 17:45:59 2013 -0500

    r600g: add async for staging buffer upload v2
    
    v2: Add virtual address to dma src/dst offset for cayman
    
    Signed-off-by: Jerome Glisse <jglisse@redhat.com>

:040000 040000 4ef6e784f3acb7f21da0c5e1923810c78917d16d 55f0ce7d9793ce04d392fc7943059545053a9d79 M	src
Comment 1 Bug 2013-02-03 14:39:50 UTC
linux 3.8-rc6    3.7.4 had it also
Comment 2 Bug 2013-02-03 14:41:13 UTC
also corruption in 2D apps (seamonkey)
Comment 3 Bug 2013-02-05 11:33:46 UTC
Created attachment 74238 [details]
screen shot Xonotic
Comment 4 Bug 2013-02-05 11:35:43 UTC
Created attachment 74239 [details]
screen shot Xonotic
Comment 5 Alex Deucher 2013-02-05 13:36:35 UTC
(In reply to comment #1)
> linux 3.8-rc6    3.7.4 had it also

325422c49449acdd8df1eb2ca8ed81f7696c38cc (r600g: add async for staging buffer upload v2) only takes affect on 3.8 kernels.  Previous kernels didn't support the DMA rings.  So if you are seeing the same issue on multiple kernels, it's either something else or you are seeing two issues.  It may be the same issue as bug 58042.
Comment 6 Bug 2013-02-05 15:54:51 UTC
Tested it again to be sure 

Linux borgir 3.7.6 does NOT have the problem, pardon the mistake.
Comment 7 Jerome Glisse 2013-02-05 16:19:28 UTC
And what GPU is this ? Because here it works ...
Comment 8 Bug 2013-02-05 16:26:34 UTC
OpenGL renderer string: Gallium 0.4 on AMD RV730
Comment 9 Andy Furniss 2013-02-05 16:56:50 UTC
(In reply to comment #0)
> bisected to this commit
> 
> 325422c49449acdd8df1eb2ca8ed81f7696c38cc is the first bad commit
> commit 325422c49449acdd8df1eb2ca8ed81f7696c38cc
> Author: Jerome Glisse <jglisse@redhat.com>
> Date:   Mon Jan 7 17:45:59 2013 -0500
> 
>     r600g: add async for staging buffer upload v2
>     
>     v2: Add virtual address to dma src/dst offset for cayman
>     
>     Signed-off-by: Jerome Glisse <jglisse@redhat.com>
> 
> :040000 040000 4ef6e784f3acb7f21da0c5e1923810c78917d16d
> 55f0ce7d9793ce04d392fc7943059545053a9d79 M	src

Looks correct to me on rv790.

I get nothing like the corruption in the screens, for me it's just the band at the bottom of the screen and it's not always there (but seems to be reliable first test after boot from power off).

I tested a couple of cycles with mesa reset just before this commit and couldn't see the problem. With mesa on this commit I can see it.

Kernel is drm-fixes.
Comment 10 Bug 2013-02-05 17:01:13 UTC
Yes for me this effect varies also

if I open , say a browser with a complex webpage, and then start xonotic again the text may be garbled the 2nd start

its as if video memory or some caches get corrupted
Comment 11 Jerome Glisse 2013-02-06 20:03:50 UTC
Created attachment 74300 [details] [review]
Fix

Can you check if that patch fix it for you ?
Comment 12 Bug 2013-02-06 20:34:12 UTC
still has the problem with that patch

noticed this in dmesg:


radeon 0000:01:00.0: DMA copy src buffer too small (4295180288 18382848)
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
radeon 0000:01:00.0: DMA copy src buffer too small (1032192 1024000)
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
Comment 13 Jerome Glisse 2013-02-06 20:44:34 UTC
Created attachment 74303 [details] [review]
Fix v2

This v2 avoid the kernel message. Weird you still have issue i don't here with this patch.
Comment 14 Jerome Glisse 2013-02-06 20:45:04 UTC
Try also applying the patch of https://bugs.freedesktop.org/show_bug.cgi?id=60034
Comment 15 Bug 2013-02-06 21:24:04 UTC
fix v2 ( 3.8.0-rc6 x86_64)

radeon 0000:01:00.0: DMA copy src buffer too small (7516413696 18382848)
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !



still the xonotic garbage, though it does not happen with every try, best test 3x
Comment 16 Bug 2013-02-06 21:31:36 UTC
just applied 
> Try also applying the patch of https://bugs.freedesktop.org/show_bug.cgi?id=60034


same problem still

though it started 3x well, then when I open my browser with some pages, and retry, the corruption in xonotic is back again..

radeon 0000:01:00.0: DMA copy src buffer too small (3221445120 18382848)
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
Comment 17 Bug 2013-02-06 21:35:44 UTC
Created attachment 74306 [details]
corruption after patches

looks a bit different, also xonotic seems to start more often right (without corruption) than wrong with the patches applied
Comment 19 Andy Furniss 2013-02-06 23:41:58 UTC
(In reply to comment #18)
> https://bugs.freedesktop.org/attachment.cgi?id=74306

I've tried quite hard on both 64 bit and 32 bit setups and with both patches applied can no longer get any corruption.

One thing I did notice is that there is a slight difference between running the sdl and glx versions, in that the sdl has a few strange chars in console - but it's the same with llvmpipe.

Are you running glx or sdl?

Can you get any corruption if you run it with the env

LIBGL_ALWAYS_SOFTWARE=1
Comment 20 Bug 2013-02-07 07:14:04 UTC
xonotic-linux64-glx

LIBGL_ALWAYS_SOFTWARE=1  starts correctly 5x in a row
Comment 21 Jerome Glisse 2013-02-07 15:21:29 UTC
Paul do you have an up to date kernel, there are have been change to dma portion of kernel in 3.8 serie. Without my patch i got the corruption but with it i can't get any here.
Comment 22 Jerome Glisse 2013-02-07 15:44:44 UTC
Especially you should not have kernel message with my patch
Comment 23 Bug 2013-02-07 18:00:25 UTC
just retested

linux
3.8.0-rc6

fresh mesa tree (74a17a764dc2ad20d9d6f56afee963b23b597132  today) , with  Fix v2 (1.59 KB, patch) 2013-02-06 20:44 UTC, Jerome Glisse 


xonotic-linux64-glx  (0.6):
Corruption at first start


dmesg error:
radeon 0000:01:00.0: DMA copy src buffer too small (343597592584 18382848)
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !




Everything works OK with linux 3.7.6
Comment 24 Jerome Glisse 2013-02-07 19:25:38 UTC
Do you have multiscreen ? What is your screen resolution ?
Comment 25 Bug 2013-02-07 20:02:10 UTC
1920 * 1200  LOW detail
Comment 26 Bug 2013-02-07 21:54:30 UTC
~ > xrandr
Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 8192 x 8192
HDMI-0 disconnected (normal left inverted right x axis y axis)
VGA-0 disconnected (normal left inverted right x axis y axis)
DVI-0 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200      60.0*+
   1920x1080      60.0  
   1600x1200      60.0  
   1680x1050      59.9  
   1680x945       60.0  
   1400x1050      59.9  
   1600x900       60.0  
   1280x1024      60.0  
   1440x900       59.9  
   1280x960       60.0  
   1366x768       60.0  
   1360x768       60.0  
   1280x800       59.9  
   1280x768       60.0  
   1024x768       60.0  
   1024x576       60.0  
   800x600        60.3  
   848x480        60.0  
   640x480        60.0  
   720x400        70.1
Comment 27 Jerome Glisse 2013-02-07 22:00:59 UTC
Created attachment 74381 [details] [review]
Kernel fix

Ok try this kernel patch without and with the mesa patch. This one should definitely fix the issue.
Comment 28 Andy Furniss 2013-02-08 09:58:23 UTC
(In reply to comment #27)
> Created attachment 74381 [details] [review] [review]
> Kernel fix
> 
> Ok try this kernel patch without and with the mesa patch. This one should
> definitely fix the issue.

Won't apply against 3.8-rc6 or drm fixes for me.
Comment 29 Bug 2013-02-08 13:09:47 UTC
3.8-rc6 Here neither, only chunk 1 with 25x lines fuz
Comment 30 Jerome Glisse 2013-02-08 14:57:13 UTC
Created attachment 74433 [details] [review]
Kernel fix

This one apply against Linus master
Comment 31 Bug 2013-02-08 20:25:20 UTC
3.8-rc6

your latest kernel patch applied well.



with fix v2 all corruption seems gone.  on ~10 startups




without fix v2 I still see dynamic corruption at the bottom of screen
Comment 32 Bug 2013-02-08 20:28:28 UTC
Created attachment 74451 [details]
xonotic with kernel without v2 patch 3.8-rc6
Comment 33 Bug 2013-02-08 20:29:17 UTC
i've seen no more dmesg errors
Comment 34 Andy Furniss 2013-02-08 23:40:01 UTC
(In reply to comment #30)
> Created attachment 74433 [details] [review] [review]
> Kernel fix
> 
> This one apply against Linus master

Like Paul, I need the mesa patch as well to get rid of the junk at the bottom of the screen.

I guess my screen was too small to show the issue this patch fixes, but I've tried it and can't find anything that regresses.
Comment 35 Jerome Glisse 2013-02-12 18:57:53 UTC
Mesa fix pushed, kernel fix queued for Linus inclusion
Comment 36 Alexandre Demers 2013-02-19 02:18:35 UTC
It doesn't apply correctly on kernel 3.8.0
Comment 37 Alex Deucher 2013-02-19 13:34:33 UTC
(In reply to comment #36)
> It doesn't apply correctly on kernel 3.8.0

The kernel patch is already upstream in 3.8.0.

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.