Bug 787 - DMA with mach64 DRI driver crashes X
Summary: DMA with mach64 DRI driver crashes X
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/Mach64 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high major
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-21 13:37 UTC by Sven Clasen
Modified: 2009-08-24 12:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Sven Clasen 2004-06-21 13:37:12 UTC
I am using the 20040621 snapshots with a 2.4.26 kernel and Xfree86 4.3.0 with 
the replacing binary from http://dri.sourceforge.net/cgi-bin/moin.cgi/XFree86.
After compiling and installing DRI using install.sh i restarted X and everything 
worked fine, glxgears gave me 260-300 FPS instead of the software-rendered 60 
FPS. But then, after restarting, starting any opengl using application causes 
the system to freeze, although it is still accessible by ssh. After killing the 
application X is screwed, see http://sven.gotdns.org/~sven/hm.png, this can only 
be fixed by rebooting. The weird thing is that everything tells me DRI was 
initialized properly.

some output:

sven@amy:~$ export LIBGL_DEBUG=verbose
sven@amy:~$ glxinfo
name of display: :0.0
libGL: XF86DRIGetClientDriverName: 6.5.3 mach64 (screen 0)
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/mach64_dri.so
drmOpenByBusid: Searching for BusID pci:0000:01:00.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: drmOpenMinor returns 4
drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0
libGL error:
Can't open configuration file /home/sven/.drirc: No such file or directory.
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_EXT_import_context, GLX_OML_swap_method, GLX_SGI_make_current_read,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig
client glx vendor string: SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,
    GLX_MESA_swap_control, GLX_MESA_swap_frame_usage, GLX_OML_swap_method,
    GLX_OML_sync_control, GLX_SGI_make_current_read, GLX_SGI_swap_control,
    GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group
GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_swap_control,
    GLX_MESA_swap_frame_usage, GLX_SGI_video_sync, GLX_SGIS_multisample
OpenGL vendor string: Gareth Hughes, Leif Delgass, José Fonseca
OpenGL renderer string: Mesa DRI Mach64 [Rage Pro] 20030502 x86/MMX
OpenGL version string: 1.2 Mesa 6.1
OpenGL extensions:
    GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_transpose_matrix,
    GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_clip_volume_hint,
    GL_EXT_compiled_vertex_array, GL_EXT_convolution, GL_EXT_copy_texture,
    GL_EXT_draw_range_elements, GL_EXT_histogram, GL_EXT_packed_pixels,
    GL_EXT_polygon_offset, GL_EXT_rescale_normal,
    GL_EXT_separate_specular_color, GL_EXT_subtexture, GL_EXT_texture,
    GL_EXT_texture3D, GL_EXT_texture_edge_clamp, GL_EXT_texture_object,
    GL_EXT_vertex_array, GL_APPLE_packed_pixels, GL_IBM_rasterpos_clip,
    GL_MESA_ycbcr_texture, GL_MESA_window_pos, GL_NV_light_max_exponent,
    GL_NV_texgen_reflection, GL_SGI_color_matrix, GL_SGI_color_table,
    GL_SGIS_generate_mipmap, GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod
glu version: 1.3
glu extensions:
    GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------
0x23 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x24 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow
0x25 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow
0x26 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow
0x27 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x28 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow
0x29 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow
0x2a 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow
0x2b 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x2c 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow
0x2d 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow
0x2e 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow
0x2f 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x30 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow
0x31 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow
0x32 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow

sven@amy:~$ dmesg |grep drm
[drm] descriptor ring: cpu addr 0xc308c000, bus addr: 0x0308c000
[drm] DMA test succeeded, using asynchronous DMA mode
[drm] descriptor ring: cpu addr 0xc202c000, bus addr: 0x0202c000
[drm] DMA test succeeded, using asynchronous DMA mode
[drm] descriptor ring: cpu addr 0xc3c60000, bus addr: 0x03c60000
[drm] DMA test succeeded, using asynchronous DMA mode


from the XFree86.log:

Skipping "/usr/X11R6/lib/modules/extensions/libGLcore.a:m_debug_clip.o": No 
symbols found
Skipping "/usr/X11R6/lib/modules/extensions/libGLcore.a:m_debug_norm.o": No 
symbols found
Skipping "/usr/X11R6/lib/modules/extensions/libGLcore.a:m_debug_xform.o": No 
symbols found
Skipping "/usr/X11R6/lib/modules/fonts/libspeedo.a:spencode.o": No symbols found
Comment 1 Dave Airlie 2004-06-21 16:20:12 UTC
Can you try again with the next snapshot? 

A bug was fixed in the DRM that affected mach64 .. I want to rule it out ...
Comment 2 Sven Clasen 2004-06-22 06:03:18 UTC
i'll gladly try the new snapshot, because i want my rage mobility to work some 
day ;)
new snapshots are announced at the dri-announce mailing list, i guess? 
*subscribes*
Comment 3 Alex Deucher 2004-06-22 06:29:48 UTC
(In reply to comment #2)
> i'll gladly try the new snapshot, because i want my rage mobility to work some 
> day ;)
> new snapshots are announced at the dri-announce mailing list, i guess? 
> *subscribes*

nope, they are generated every night.  grab them here (scroll down to the
snapshots section):
http://dri.sourceforge.net/cgi-bin/moin.cgi/Download
Comment 4 Sven Clasen 2004-06-22 07:05:23 UTC
if i only knew when "night" is :)
it's 16:04 over here now..
Comment 5 Sven Clasen 2004-06-22 07:08:31 UTC
07:05. the last modified date of the snapshots is about 07:15.
so not long anymore.
(*sigh* still no time to learn for my maths exam which i'll write tomorrow)
Comment 6 Sven Clasen 2004-06-22 07:29:01 UTC
downloaded and ./install.sh'd it, works. Xfree86.0.log, output from dmesg and 
glxinfo -v can be found at http://sven.gotdns.org/~sven/dri/before-reboot/
Comment 7 Sven Clasen 2004-06-22 07:50:11 UTC
rebooted, now using opengl screws X in a way which can only be fixed by 
rebooting and causes the system to freeze until i log in by ssh and kill the 
opengl application

Xfree86.0.log and output from dmesg and glxinfo -v can be found at http://sven.
gotdns.org/~sven/dri/after-reboot/
additionally, i found a log of very cryptographic stuff (at least to me), which 
includes something that might be interesting:

Jun 22 16:30:30 amy kernel: [drm:mach64_ring_tick] *ERROR* bad ring head 
address: 0xfffffff0

and 

Jun 22 16:31:24 amy kernel: [drm:mach64_do_dma_idle] *ERROR* mach64_do_dma_idle 
failed BM_GUI_TABLE=0x02850000

a full cat /var/log/kern.log |grep "Jun 22 16:" can be found at http://sven.
gotdns.org/~sven/dri/after-reboot/kern.log
Comment 8 Adam Jackson 2004-06-22 13:26:37 UTC
(fixing product/component and summary.  also downgrading to major, since mach64
isn't built by default for security reasons.)

mach64 DMA is known to be broken with current CVS.  can you try changing the
dma_mode line in your XF86Config to 

Option "dma_mode" "mmio"

and see if that's more stable?  it will be slower of course, but slower is
better than crashing.
Comment 9 Sven Clasen 2004-06-22 13:40:55 UTC
( sorry for messing up the bugzilla stuff, i am not familiar with bugzilla :/ )

Option "dma_mode" "mmio" is even worse, it locks the machine up completely, 
meaning its not even accessible by ssh, and it looks really frightening, at 
first i thought it burned the display (luckily it didn't) :/

if it's broken with the current CVS - can i get an archived version that will 
work? (ofcourse i'll try new snapshots also to see if you managed to fix it and 
provide logfiles if neccessary)
Comment 10 Dave Airlie 2004-06-22 16:05:17 UTC
(II) ATI(0): [drm] Will request asynchronous DMA mode
(WW) ATI(0): [agp] AGP not available
(WW) ATI(0): [agp] AGP failed to initialize -- falling back to PCI mode.
(WW) ATI(0): [agp] Make sure you have the agpgart kernel module loaded.
(II) ATI(0): [drm] register handle = 0xfcfff000

ouch.. . it is a PCI card? you should never see this ...
Comment 11 Sven Clasen 2004-06-23 05:01:17 UTC
(In reply to comment #10)
> (II) ATI(0): [drm] Will request asynchronous DMA mode
> (WW) ATI(0): [agp] AGP not available
> (WW) ATI(0): [agp] AGP failed to initialize -- falling back to PCI mode.
> (WW) ATI(0): [agp] Make sure you have the agpgart kernel module loaded.
> (II) ATI(0): [drm] register handle = 0xfcfff000
> 
> ouch.. . it is a PCI card? you should never see this ...

It is the onboard ATI Rage Mobility that shipped with my Dell Inspiron 3700, so 
i guess it should be pci.
is it my fault/can i do anything to change that?
Comment 12 Dave Airlie 2004-06-23 06:02:47 UTC
Well I've the exact same machine (+ upgraded CPU and 3800 bios!!) that I use to
test mach64 stuff on...

In the dmesg you posted after-reboot, you never load any agpgart before or after
the DRM (it should be loaded before it ... ) 

I've no idea why XFree86 isn't loading the agpgart module the second time around
that is just wierd...

you might want to either compile agpgart into your kernel or modprobe it before
the mach64 DRM module is loaded...
Comment 13 Sven Clasen 2004-06-23 06:31:50 UTC
when i manually modprobe -r the mach64 module, then modprobe the agpgart module 
and then start x, it works!

but, it is (with Option "dma_mode" "async") even slower than no using DRI O_O
but since this has nothing to do with my crash/freeze and i already saw another 
bug reporting dri was very slow after upgrading, i guess i should change this to 
NOTABUG?

Thanks for your support, guys :)
Comment 14 Dave Airlie 2004-08-23 05:12:37 UTC
I think this is solved.. PCI mach64 DRI is probably broken but it isn't this bug..
Comment 15 Adam Jackson 2009-08-24 12:22:31 UTC
Mass version move, cvs -> git


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.