Bug 50892 - Invalid command stream with TURKS running Cinnamon
Summary: Invalid command stream with TURKS running Cinnamon
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: XOrg git
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-08 11:13 UTC by Zoltán Böszörményi
Modified: 2014-01-23 15:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg with 3.4.0 (103.59 KB, text/plain)
2012-06-08 11:18 UTC, Zoltán Böszörményi
no flags Details
Xorg.0.log on the notebook with kernel 3.4.0 (46.29 KB, text/plain)
2012-06-08 11:18 UTC, Zoltán Böszörményi
no flags Details
dmesg from my desktop machine with 3.4.1 + tiling fix v3 + the one liner patch (250.53 KB, text/plain)
2012-06-09 03:46 UTC, Zoltán Böszörményi
no flags Details
Xorg.0.log on my deskop with kernel 3.4.1 + radeon tiling fix v3 + one liner patch (66.69 KB, text/plain)
2012-06-09 03:46 UTC, Zoltán Böszörményi
no flags Details
dmesg from my notebook with 3.4.1 + tiling fix v3 + the one liner patch (163.79 KB, text/plain)
2012-06-09 04:05 UTC, Zoltán Böszörményi
no flags Details
Xorg.0.log on my notebook with kernel 3.4.1 + radeon tiling fix v3 + one liner patch (46.50 KB, text/plain)
2012-06-09 04:06 UTC, Zoltán Böszörményi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zoltán Böszörményi 2012-06-08 11:13:57 UTC
I got these errors on my AMD A4-3300 notebook (ASUS K53TA) after I upgraded to kernel 3.4.0 and xorg-x11-drv-ati-6.14.4-6.20120602git930760942 yesterday evening (CET):

Jun  7 19:26:41 localhost kernel: [  889.757979] radeon 0000:00:01.0: evergreen_cs_track_validate_cb:439 cb[0] bo too small (layer size 18874368, offset 0, max layer 1, bo size 4718592, slice 18431)
Jun  7 19:26:41 localhost kernel: [  889.757986] radeon 0000:00:01.0: evergreen_cs_track_validate_cb:443 problematic surf: (1536 768) (4 4 1 1 1 64 1)
Jun  7 19:26:41 localhost kernel: [  889.757989] radeon 0000:00:01.0: evergreen_packet3_check:2055 invalid cmd stream 2587
Jun  7 19:26:41 localhost kernel: [  889.757993] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
Jun  7 19:26:50 localhost systemd-tmpfiles[1176]: Successfully loaded SELinux database in 20ms 513us, size on heap is 532K.
Jun  7 19:26:50 localhost systemd-tmpfiles[1176]: stat(/run/user/zozo/gvfs) failed: Permission denied
Jun  7 19:27:04 localhost kernel: [  913.093258] radeon 0000:00:01.0: evergreen_cs_track_validate_cb:439 cb[0] bo too small (layer size 10223616, offset 0, max layer 1, bo size 2555904, slice 9983)
Jun  7 19:27:04 localhost kernel: [  913.093272] radeon 0000:00:01.0: evergreen_cs_track_validate_cb:443 problematic surf: (1024 624) (4 4 1 1 1 64 1)
Jun  7 19:27:04 localhost kernel: [  913.093280] radeon 0000:00:01.0: evergreen_packet3_check:2055 invalid cmd stream 5344
Jun  7 19:27:04 localhost kernel: [  913.093286] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
Jun  7 19:27:05 localhost kernel: [  914.074877] radeon 0000:00:01.0: evergreen_cs_track_validate_texture:796 texture bo too small (layer size 10223616, offset 0, max layer 1, depth 1, bo size 2555904) (1024 624)
Jun  7 19:27:05 localhost kernel: [  914.074883] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
Jun  7 19:27:06 localhost kernel: [  915.073121] radeon 0000:00:01.0: evergreen_cs_track_validate_texture:796 texture bo too small (layer size 10223616, offset 0, max layer 1, depth 1, bo size 2555904) (1024 624)
Jun  7 19:27:06 localhost kernel: [  915.073127] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
Jun  7 19:27:06 localhost kernel: [  915.166232] radeon 0000:00:01.0: evergreen_cs_track_validate_texture:796 texture bo too small (layer size 10223616, offset 0, max layer 1, depth 1, bo size 2555904) (1024 624)
Jun  7 19:27:06 localhost kernel: [  915.166237] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
Jun  7 19:27:07 localhost kernel: [  915.193506] radeon 0000:00:01.0: evergreen_cs_track_validate_texture:796 texture bo too small (layer size 10223616, offset 0, max layer 1, depth 1, bo size 2555904) (1024 624)
Jun  7 19:27:07 localhost kernel: [  915.193511] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
Jun  7 19:27:07 localhost kernel: [  915.291245] radeon 0000:00:01.0: evergreen_cs_track_validate_texture:796 texture bo too small (layer size 10223616, offset 0, max layer 1, depth 1, bo size 2555904) (1024 624)
Jun  7 19:27:07 localhost kernel: [  915.291251] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
Jun  7 19:27:07 localhost kernel: [  915.317023] radeon 0000:00:01.0: evergreen_cs_track_validate_texture:796 texture bo too small (layer size 10223616, offset 0, max layer 1, depth 1, bo size 2555904) (1024 624)
Jun  7 19:27:07 localhost kernel: [  915.317028] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
Jun  7 19:27:07 localhost kernel: [  915.327642] radeon 0000:00:01.0: evergreen_cs_track_validate_texture:796 texture bo too small (layer size 10223616, offset 0, max layer 1, depth 1, bo size 2555904) (1024 624)
Jun  7 19:27:07 localhost kernel: [  915.327649] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
Jun  7 19:27:07 localhost kernel: [  915.343749] radeon 0000:00:01.0: evergreen_cs_track_validate_texture:796 texture bo too small (layer size 10223616, offset 0, max layer 1, depth 1, bo size 2555904) (1024 624)
Jun  7 19:27:07 localhost kernel: [  915.343761] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
Jun  7 19:27:07 localhost kernel: [  915.360748] radeon 0000:00:01.0: evergreen_cs_track_validate_texture:796 texture bo too small (layer size 10223616, offset 0, max layer 1, depth 1, bo size 2555904) (1024 624)
Jun  7 19:27:07 localhost kernel: [  915.360760] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !

At first I thought I had to RMA the notebook because the display only showed a single horizontal line in the middle of the screen. Rebooting the machine showed various problems: missing icons (like the "faces" icon for users on the GDM screen) and after logging in various bluish - magentaish rectangles on the screen. Rebooting back to 3.3.7 at the time didn't fix the problem but after yum reinstall "*" at least 3.3.7-1.fc17 is usable. 3.4.0-1.fc17 reliably shows this problem.

Today I accidentally reproduced this on my desktop machine with AMD Radeon HD6570 and kernel 3.4.0-1.fc17. I use Cinnamon on both machines. It turns out that the bad behaviour only shows up (but reliably) if I move the mouse pointer to the "magic spot" on the screen, i.e. the top-left corner so the workspace switcher kicks in. Killing X with Ctrl-Alt-BkSp cures it. The difference between my desktop machine and the notebook is that for some reason, when X starts, the cursor shows up in the top-left corner on my notebook but in the middle of the screen on my desktop machine. So, the error occurred on the notebook as soon login was attempted without moving the mouse.

Currently installed relevant software versions:

kernel-3.3.7-1.fc17.x86_64
kernel-3.4.0-1.fc17.x86_64
mesa-libGL-8.0.3-1.fc17.i686
mesa-libGL-8.0.3-1.fc17.x86_64
mesa-dri-drivers-8.0.3-1.fc17.x86_64
mesa-dri-drivers-8.0.3-1.fc17.i686
xorg-x11-server-Xorg-1.12.0-5.fc17.x86_64
xorg-x11-drv-ati-6.14.4-6.20120602git930760942.fc17.x86_64
cinnamon-1.4.0-5.UP1.fc17.x86_64
muffin-1.0.3-3.fc17.x86_64

Since I heard about the current state of ColorTiling2D is not yet usable, I thought it might somehow kick in and created this file on my notebook:

# cat /etc/X11/xorg.conf.d/01-radeon.conf 
###########################
Section "Device"
	Identifier	"Radeon"
	Driver		"radeon"
	Option "ColorTiling2D" "off"
EndSection
###########################

Xorg.0.conf confirms setting ColorTiling2D to off explicitly but it didn't solve the problem on the notebook.

The order of events on the notebook:

yum upgrade installed these:

Jun  7 15:56:23 localhost yum[876]: Updated: avahi-0.6.31-3.fc17.x86_64
Jun  7 15:56:23 localhost yum[876]: Updated: avahi-glib-0.6.31-3.fc17.x86_64
Jun  7 15:56:27 localhost yum[876]: Updated: xulrunner-13.0-1.fc17.x86_64
Jun  7 15:56:28 localhost yum[876]: Updated: xsane-common-0.998-10.fc17.x86_64
Jun  7 15:56:28 localhost yum[876]: Updated: xsane-gimp-0.998-10.fc17.x86_64
Jun  7 15:56:33 localhost yum[876]: Updated: firefox-13.0-1.fc17.x86_64
Jun  7 15:56:34 localhost yum[876]: Updated: avahi-ui-gtk3-0.6.31-3.fc17.x86_64
Jun  7 15:56:34 localhost yum[876]: Updated: avahi-gobject-0.6.31-3.fc17.x86_64
Jun  7 15:56:36 localhost yum[876]: Updated: fontconfig-devel-2.8.0-7.fc17.x86_64
Jun  7 15:56:39 localhost yum[876]: Updated: kernel-headers-3.4.0-1.fc17.x86_64
Jun  7 15:56:39 localhost yum[876]: Updated: xorg-x11-drv-synaptics-1.6.1-1.fc17.x86_64
Jun  7 15:56:40 localhost yum[876]: Updated: avahi-autoipd-0.6.31-3.fc17.x86_64
Jun  7 15:56:41 localhost yum[876]: Updated: kpartx-0.4.9-26.fc17.x86_64
Jun  7 15:56:45 localhost yum[876]: Updated: fontconfig-2.8.0-7.fc17.i686
Jun  7 15:56:55 localhost yum[876]: Installed: kernel-3.4.0-1.fc17.x86_64

yum --enablerepo=updates-testing upgrade libX11* xorg-x11-drv-ati installed these:

Jun  7 15:59:23 localhost yum[10612]: Updated: libX11-common-1.5.0-1.fc17.noarch
Jun  7 15:59:26 localhost yum[10612]: Updated: libX11-1.5.0-1.fc17.x86_64
Jun  7 15:59:31 localhost yum[10612]: Updated: libX11-devel-1.5.0-1.fc17.x86_64
Jun  7 15:59:33 localhost yum[10612]: Updated: xorg-x11-drv-ati-6.14.4-6.20120602git930760942.fc17.x86_64
Jun  7 15:59:34 localhost yum[10612]: Updated: libX11-1.5.0-1.fc17.i686

Then the error kicked in after a reboot.

I flashed the BIOS from version 207 to 214 after that, didn't solve anything.

Then yum distro-sync downgraded these:

Jun  7 19:28:28 localhost yum[1392]: Installed: libX11-common-1.4.99.901-2.fc17.noarch
Jun  7 19:28:29 localhost yum[1392]: Installed: libX11-1.4.99.901-2.fc17.x86_64
Jun  7 19:28:32 localhost yum[1392]: Installed: libX11-devel-1.4.99.901-2.fc17.x86_64
Jun  7 19:28:33 localhost yum[1392]: Installed: xorg-x11-drv-ati-6.14.4-5.20120417git0bda305f7.fc17.x86_64
Jun  7 19:28:34 localhost yum[1392]: Installed: libX11-1.4.99.901-2.fc17.i686
Jun  7 19:28:57 localhost yum[1403]: Updated: libX11-common-1.5.0-1.fc17.noarch
Jun  7 19:28:57 localhost yum[1403]: Updated: libX11-1.5.0-1.fc17.x86_64
Jun  7 19:29:01 localhost yum[1403]: Updated: libX11-devel-1.5.0-1.fc17.x86_64
Jun  7 19:29:02 localhost yum[1403]: Updated: libX11-1.5.0-1.fc17.i686

Since yesterday the above libX11* and xorg-x11-drv-ati versions were moved to updated from updates-testing.

Today I performed a yum reinstall "*" to ensure that every packages are ok. memtest86+ was ran on the machine after I bought it in January, it happily ran Fedora 16. Then it was upgraded to F17 during its RC series and only yum upgrade was performed since then, possibly missing some rebuilds which yum reinstall "*" finally included. Or it was simply a gremlin in the machine.

After this yum reinstall "*", I rebooted several times switching between 3.4.0 and 3.3.7. 3.3.7 is usable, 3.4.0 triggers the "invalid command stream" messages in the syslog.
Comment 1 Zoltán Böszörményi 2012-06-08 11:18:18 UTC
Created attachment 62810 [details]
dmesg with 3.4.0
Comment 2 Zoltán Böszörményi 2012-06-08 11:18:55 UTC
Created attachment 62811 [details]
Xorg.0.log on the notebook with kernel 3.4.0
Comment 3 Alex Deucher 2012-06-08 12:31:40 UTC
Does setting:
Option "ColorTiling" "False"
in the device section of your xorg.conf help?
Comment 4 Jerome Glisse 2012-06-08 12:52:07 UTC
Patch that should fix the issue :

http://people.freedesktop.org/~glisse/0001-drm-radeon-fix-tiling-and-command-stream-checking-on.patch
Comment 5 Jerome Glisse 2012-06-08 13:42:12 UTC
Updated v3 same url, please test v3 version thx
Comment 6 Zoltán Böszörményi 2012-06-09 01:44:38 UTC
Tried to compile v3 on vanilla 3.4.1 but it failed:

  CC [M]  drivers/gpu/drm/radeon/evergreen_cs.o
drivers/gpu/drm/radeon/evergreen_cs.c: In function ‘evergreen_cs_track_validate_cb’:
drivers/gpu/drm/radeon/evergreen_cs.c:447:28: error: request for member ‘ptr’ in something not a structure or union
make[4]: *** [drivers/gpu/drm/radeon/evergreen_cs.o] Error 1
make[3]: *** [drivers/gpu/drm/radeon] Error 2
make[2]: *** [drivers/gpu/drm] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2

This one-liner over your patch fixes the compilation:

--- drivers/gpu/drm/radeon/evergreen_cs.c~	2012-06-09 08:51:34.000000000 +0200
+++ drivers/gpu/drm/radeon/evergreen_cs.c	2012-06-09 10:42:29.054351410 +0200
@@ -444,7 +444,7 @@
 		 * command stream.
 		 */
 		if (!surf.mode) {
-			volatile u32 *ib = p->ib.ptr;
+			volatile u32 *ib = p->ib->ptr;
 			unsigned long tmp, nby, bsize, size, min = 0;
 
 			/* find the height the ddx wants */
Comment 7 Zoltán Böszörményi 2012-06-09 03:43:39 UTC
It seems this patch fixed the "invalid command stream error". Thanks very much.
Comment 8 Zoltán Böszörményi 2012-06-09 03:46:04 UTC
Created attachment 62842 [details]
dmesg from my desktop machine with 3.4.1 + tiling fix v3 + the one liner patch
Comment 9 Zoltán Böszörményi 2012-06-09 03:46:57 UTC
Created attachment 62843 [details]
Xorg.0.log on my deskop with kernel 3.4.1 + radeon tiling fix v3 + one liner patch
Comment 10 Zoltán Böszörményi 2012-06-09 04:02:11 UTC
Fixed on the notebook with A4-3300 CPU too. Thanks very very much.
Comment 11 Zoltán Böszörményi 2012-06-09 04:05:34 UTC
Created attachment 62844 [details]
dmesg from my notebook with 3.4.1 + tiling fix v3 + the one liner patch
Comment 12 Zoltán Böszörményi 2012-06-09 04:06:07 UTC
Created attachment 62845 [details]
Xorg.0.log on my notebook with kernel 3.4.1 + radeon tiling fix v3 + one liner patch
Comment 13 Florian Mickler 2012-07-01 03:47:50 UTC
A patch referencing this bug report has been merged in Linux v3.5-rc3:

commit d26098759cf6d32148649c165f87a7590bc25b89
Author: Jerome Glisse <jglisse@redhat.com>
Date:   Sat Jun 9 10:57:41 2012 -0400

    drm/radeon: fix tiling and command stream checking on evergreen v3
Comment 14 Marek Olšák 2014-01-23 15:31:36 UTC
(In reply to comment #13)
> A patch referencing this bug report has been merged in Linux v3.5-rc3:
> 
> commit d26098759cf6d32148649c165f87a7590bc25b89
> Author: Jerome Glisse <jglisse@redhat.com>
> Date:   Sat Jun 9 10:57:41 2012 -0400
> 
>     drm/radeon: fix tiling and command stream checking on evergreen v3

Closing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.