Bug 31841 - [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !
Summary: [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/R100 (show other bugs)
Version: git
Hardware: All Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-22 11:23 UTC by diska
Modified: 2010-11-23 12:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description diska 2010-11-22 11:23:30 UTC
Hi when i try to use wayland compositor with opensource driver  i see the following error :

radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.

and dmesg show :

[  559.581198] Forbidden register 0x43E0 in cs at 1
[  559.581204] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !
[  559.589396] Forbidden register 0x43E0 in cs at 1
[  559.589401] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !


the problem with is with default ubuntu 10.10 kernel / driver / mesa  and with latest  xserver-xorg-video-ati_6.13.99+git20101120.7ad1f015  / kernel 2.6.37-git3 / libgl1-mesa-dri_7.10.0+git20101118.3dcc3153

my video card is a ATI Technologies Inc Redwood [Radeon HD 5600 Series]
Comment 1 Alex Deucher 2010-11-22 12:26:28 UTC
Looks like a problem with your setup.  It appears you are using the r300 3D driver rather than the r600 3D driver.
Comment 2 diska 2010-11-22 12:47:43 UTC
glxinfo | grep -i opengl

OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: Mesa DRI R600 (REDWOOD 68C1) 20090101  TCL DRI2
OpenGL version string: 2.1 Mesa 7.10-devel
OpenGL shading language version string: 1.20
OpenGL extensions:


grep driver /var/log/Xorg.0.log

RADEON(0): [DRI2]   DRI driver: r600
Comment 3 Alex Deucher 2010-11-22 12:49:50 UTC
egl is probably using the wrong driver.
Comment 4 diska 2010-11-22 12:51:40 UTC
how can i see this?
Comment 5 diska 2010-11-22 13:06:54 UTC
you think is my config problem or and mesa-egl implementation problem?
Comment 6 diska 2010-11-23 10:20:41 UTC
 export MESA_DEBUG=1
 export EGL_LOG_LEVEL=debug
/compositor 
libEGL debug: EGL search path is /usr/lib/egl
libEGL debug: added /usr/lib/egl/egl_gallium.so to module array
libEGL debug: added /usr/lib/egl/egl_dri2.so to module array
libEGL debug: added /usr/lib/egl/egl_glx.so to module array
libEGL debug: dlopen(/usr/lib/egl/egl_gallium.so)
libEGL info: use DRM for display 0x5
libEGL debug: searching for pipe module r300
libEGL debug: loaded /usr/lib/egl/pipe_r300.so
r300: Warning: Unknown chipset 0x68c1
libEGL debug: Failed to get KMS resources.  Disable modeset.
libEGL debug: the best driver is Gallium (score 100)
libEGL debug: searching for st module GLESv2
libEGL debug: loaded /usr/lib/egl/st_GLESv2.so
Comment 7 Benjamin Franzke 2010-11-23 11:36:58 UTC
diska is using egl_gallium which differentiates between r300 and r600 in drm-mode using the function "is_r3xx" provided by winsys/radeon/drm/radeon_drm.h

This function just checks a range of pci ids, the evergreen ids lay in the range:
static INLINE boolean is_r3xx(int pciid)
{
    return (pciid > 0x3150) && (pciid < 0x796f);
}

Thats why state_trackers/egl/drm/native_drm.c loads pipe_r300.
Comment 8 diska 2010-11-23 11:51:15 UTC
my pciid is 68c1
Comment 9 diska 2010-11-23 11:53:26 UTC
68c1  Redwood [Radeon HD 5600 Series]
Comment 10 diska 2010-11-23 12:01:39 UTC
the problem is in mesa drm code 

mesa/src/gallium/winsys/radeon/drm/radeon_drm.h
Comment 11 Alex Deucher 2010-11-23 12:21:01 UTC
Should be fixed in:
ed8b5fb24e098c97a7618a76aab783883f331625
Comment 12 diska 2010-11-23 12:34:42 UTC
it work for me


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.