Bug 9120 - i915tex doesn't work on i8x5 cards
Summary: i915tex doesn't work on i8x5 cards
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Thomas Hellström
QA Contact:
URL:
Whiteboard:
Keywords:
: 9289 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-22 00:42 UTC by Dave Airlie
Modified: 2009-08-24 12:25 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Dave Airlie 2006-11-22 00:42:23 UTC
Okay I upgraded an i845 machine today with latest stuff and glxinfo blows up
with a segfault in the i830_set_draw_region, I copied over code from i915_vtbl.c
to fix that then I got a DRM oops in the kernel....

I think this isn't the sort of bug that should be in 6.5.2 if we wish for
distros to use it...
Comment 1 Thomas Hellström 2006-11-22 00:49:14 UTC
Dave,

Do you have a printout of the oops?

/Thomas
Comment 2 Dave Airlie 2006-11-22 00:54:30 UTC
I was working on a PC in the office, but I've managed to dig it out..

Nov 22 17:31:51 asimov kernel: BUG: unable to handle kernel NULL pointer
dereference at virtual address 00000029
Nov 22 17:31:51 asimov kernel:  printing eip:
Nov 22 17:31:51 asimov kernel: f8ba3a72
Nov 22 17:31:51 asimov kernel: *pde = 3888f067
Nov 22 17:31:51 asimov kernel: Oops: 0002 [#1]
Nov 22 17:31:51 asimov kernel: last sysfs file:
/devices/pci0000:00/0000:00:00.0/resource
Nov 22 17:31:51 asimov kernel: Modules linked in: i915(U) drm(U) i2c_i810
i2c_algo_bit nfsd exportfs lockd nfs_acl ipv6 parport_pc lp parport autofs4
pc87360 hwmon_vid hwmon eeprom i2c_isa sunrpc acpi_cpufreq dm_mod video button
battery ac uhci_hcd ehci_hcd i2c_i801 i2c_core snd_intel8x0 snd_ac97_codec
snd_ac97_bus snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device
snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd soundcore snd_page_alloc natsemi
e100 mii flopp
y windrvr6(U) ext3 jbd
Nov 22 17:31:51 asimov kernel: CPU:    0
Nov 22 17:31:51 asimov kernel: EIP:    0060:[<f8ba3a72>]    Tainted: PF     VLI
Nov 22 17:31:51 asimov kernel: EFLAGS: 00210246   (2.6.17-1.2142_FC4 #1)
Nov 22 17:31:51 asimov kernel: EIP is at drm_agp_bind_ttm+0x42/0x7c [drm]
Nov 22 17:31:51 asimov kernel: eax: 00000000   ebx: f4d06380   ecx: 00000000  
edx: 00000001
Nov 22 17:31:51 asimov kernel: esi: f29224a0   edi: 00000000   ebp: 00000000  
esp: f66b9de0
Nov 22 17:31:51 asimov kernel: ds: 007b   es: 007b   ss: 0068
Nov 22 17:31:51 asimov kernel: Process glxgears (pid: 4797, threadinfo=f66b9000
task=f7fa7aa0)
Nov 22 17:31:51 asimov kernel: Stack: 00006000 f4d06280 00000000 f4d06380
00000100 f8ba6ee9 00006000 00000000
Nov 22 17:31:51 asimov kernel:        f7316524 00000000 f2bb9dc0 f7316024
f7316000 f8ba8dcf f2bb9dc0 00000000
Nov 22 17:31:51 asimov kernel:        f7316000 03000000 f8ba8fc5 00000001
22222222 00000001 02000004 f7316524
Nov 22 17:31:51 asimov kernel: Call Trace:
Nov 22 17:31:51 asimov kernel:  <f8ba6ee9> drm_bind_ttm+0x110/0x176 [drm] 
<f8ba8dcf> drm_bo_move_buffer+0xc1/0x154 [drm]
Nov 22 17:31:51 asimov kernel:  <f8ba8fc5>
drm_buffer_object_validate+0x163/0x2ae [drm]  <f8ba98f2>
drm_bo_ioctl+0x577/0x785 [drm]
Nov 22 17:31:51 asimov kernel:  <c0441097> get_page_from_freelist+0x359/0x3c6 
<c0448542> __handle_mm_fault+0x417/0x7cf
Nov 22 17:31:51 asimov kernel:  <f8ba937b> drm_bo_ioctl+0x0/0x785 [drm] 
<f8b9f15d> drm_ioctl+0x134/0x175 [drm]
Nov 22 17:31:51 asimov kernel:  <c058643d> do_md_run+0x24b/0x5a1  <f8b9f029>
drm_ioctl+0x0/0x175 [drm]
Nov 22 17:31:51 asimov kernel:  <c046786d> do_ioctl+0x39/0x48  <c0467a6e>
vfs_ioctl+0x1f2/0x209
Nov 22 17:31:51 asimov kernel:  <c0467acb> sys_ioctl+0x46/0x5f  <c0402bb3>
syscall_call+0x7/0xb
Nov 22 17:31:51 asimov kernel:  <c058643d> do_md_run+0x24b/0x5a1
Nov 22 17:31:51 asimov kernel: Code: 3e 74 11 68 40 a0 ba f8 68 46 bf ba f8 e8
15 7a 87 c7 58 5a 8b 53 08 83 e2 fd 83 fd 01 19 c0 f7 d0 83 e0 02 09 c2 85 ed 89
53 08 <c6> 47 29 01 74 05 8b 46 0c eb 03 8b 46 10 89 47 20 89 f8 8b 14
Nov 22 17:31:51 asimov kernel: EIP: [<f8ba3a72>] drm_agp_bind_ttm+0x42/0x7c
[drm] SS:ESP 0068:f66b9de0
Comment 3 Eugene Rogoza 2006-11-22 11:30:33 UTC
(In reply to comment #0)
> Okay I upgraded an i845 machine today with latest stuff and glxinfo blows up

Confirming the bug on a 855GM card.

glxgears and any GL app hangs the system.

Running kernel 2.6.18, xorg-git, linux-agp-compat-git, dri-git, Mesa-cvs,
xorg-xf86-video-intel-git
Comment 4 Keith Whitwell 2006-11-22 11:40:17 UTC
I had this working at one point, obviously no longer. 

We can work around if necessary in the meantime by falling back to the old
'i915_dri.so' for the i8xx chipsets.
Comment 5 Dave Airlie 2006-11-22 17:13:08 UTC
Okay I didn't upgrade my agp driver (doh!!)... am retesting with that but now
having problems with ubuntu kernel not giving me different symbols for my drm
modules and the AGP ones..

It should really fail more gracefully if the AGP GART isn't supported properly...

I've realigned some code in the i830_* with its i915 equivalent just in case any
bug was hiding there...

I'll see if I can actually get working kernel on this box before I have to
disappear for a few days...
Comment 6 Dave Airlie 2006-11-22 19:15:17 UTC
okay it works once I use the latest Mesa with the fixes I checked in and the new
AGP driver...

Thomas it might be nice to have a nicer fail case if someone loads the new drm
on a kernel with the old AGP ..

Have you pushed AGP to DaveJ yet?
Comment 7 Thomas Hellström 2006-11-23 00:22:14 UTC
(In reply to comment #6)
> okay it works once I use the latest Mesa with the fixes I checked in and the new
> AGP driver...
> 
> Thomas it might be nice to have a nicer fail case if someone loads the new drm
> on a kernel with the old AGP ..
> 

I agree fully. I thought I had that, but obviously not tested enough, so I got
very confused about the oops and started looking around for some old hardware...

> Have you pushed AGP to DaveJ yet?

Nope, I was aiming to do that but a couple of weeks ago but we got busy.
I've got a patched against daves AGP tree which I want to walk through one last
time since it also involves code that I cannot test. 
It would not be good to screw up the AGP drivers of other cards...


/Thomas
Comment 8 Thomas Hellström 2006-12-10 09:28:22 UTC
*** Bug 9289 has been marked as a duplicate of this bug. ***
Comment 9 Michel Dänzer 2006-12-11 07:16:41 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Thomas it might be nice to have a nicer fail case if someone loads the new drm
> > on a kernel with the old AGP ..
> 
> I agree fully. I thought I had that, but obviously not tested enough, so I got
> very confused about the oops and started looking around for some old hardware...

I think the 2D driver should detect the inappropriate AGP support and not enable
the i915tex 3D driver in the first place. Any suggestions how to check this in
the 2D driver?
Comment 10 Conn 2006-12-12 18:40:11 UTC
Hi,

I installed the latest xf86-driver-i810, drm, mesa & linux-agp-compat from git
on my system (Ubuntu Edgy, 855GM chipset). Before installing linux-agp-compat I
had the same segfault as Dave Arlie in comment #2. Now, I'm getting this (from
dmesg):

[17179603.960000] drm: disagrees about version of symbol agp_bind_memory
[17179603.960000] drm: Unknown symbol agp_bind_memory
[17179603.960000] drm: disagrees about version of symbol agp_enable
[17179603.960000] drm: Unknown symbol agp_enable
[17179603.960000] drm: disagrees about version of symbol agp_find_bridge
[17179603.960000] drm: Unknown symbol agp_find_bridge
[17179603.960000] drm: disagrees about version of symbol agp_backend_acquire
[17179603.960000] drm: Unknown symbol agp_backend_acquire
[17179603.964000] drm: disagrees about version of symbol agp_free_memory
[17179603.964000] drm: Unknown symbol agp_free_memory
[17179603.964000] drm: disagrees about version of symbol agp_allocate_memory
[17179603.964000] drm: Unknown symbol agp_allocate_memory
[17179603.964000] drm: disagrees about version of symbol agp_unbind_memory
[17179603.964000] drm: Unknown symbol agp_unbind_memory
[17179603.964000] drm: disagrees about version of symbol agp_copy_info
[17179603.964000] drm: Unknown symbol agp_copy_info
[17179603.964000] drm: disagrees about version of symbol agp_backend_release
[17179603.964000] drm: Unknown symbol agp_backend_release
[17179603.968000] i915: Unknown symbol drm_open
[17179603.968000] i915: Unknown symbol drm_fasync
[17179603.968000] i915: Unknown symbol drm_fence_handler
[17179603.968000] i915: Unknown symbol drm_poll
[17179603.968000] i915: Unknown symbol drm_core_get_reg_ofs
[17179603.968000] i915: Unknown symbol drm_calloc
[17179603.968000] i915: Unknown symbol drm_agp_init_ttm
[17179603.968000] i915: Unknown symbol drm_pci_alloc
[17179603.968000] i915: Unknown symbol drm_irq_uninstall
[17179603.968000] i915: Unknown symbol drm_get_dev
[17179603.968000] i915: Unknown symbol drm_ioctl
[17179603.968000] i915: Unknown symbol drm_bo_driver_init
[17179603.968000] i915: Unknown symbol drm_exit
[17179603.968000] i915: Unknown symbol drm_debug
[17179603.968000] i915: Unknown symbol drm_core_get_map_ofs
[17179603.968000] i915: Unknown symbol drm_get_drawable_info
[17179603.968000] i915: Unknown symbol drm_init
[17179603.968000] i915: Unknown symbol drm_fence_flush_old
[17179603.968000] i915: Unknown symbol drm_locked_tasklet
[17179603.968000] i915: Unknown symbol drm_vbl_send_signals
[17179603.968000] i915: Unknown symbol drm_cleanup_pci
[17179603.968000] i915: Unknown symbol drm_pci_free
[17179603.968000] i915: Unknown symbol drm_mmap
[17179603.968000] i915: Unknown symbol drm_core_reclaim_buffers
[17179603.968000] i915: Unknown symbol drm_release

glxinfo reports direct rendering disabled, and LIBGL_DEBUG=verbose reveals
"libGL error: XF86DRIQueryDirectRenderingCapable returned false"

Any ideas?
Comment 11 Thomas Hellström 2006-12-13 02:23:18 UTC
There have been a number of people reporting this. Here's what Michel Dänzer had
to do to fix it:

"Looks like it's related to Module.symvers,  I can load the DRM modules
after moving away this file from the distro kernel installation and
rebuilding."

/Thomas
Comment 12 Michel Dänzer 2006-12-13 07:16:44 UTC
(In reply to comment #11)
> Here's what Michel Dänzer had to do to fix it: [...]

It's not a fix though but a nasty workaround; at the very least, it taints the
kernel. It must be an issue with the drm or linux-agp-compat build system; maybe
the drm build would need the Module.symvers file generated by the
linux-agp-compat build or something like that.
Comment 13 Thomas Hellström 2006-12-13 07:30:36 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > Here's what Michel Dänzer had to do to fix it: [...]
> 
> It's not a fix though but a nasty workaround; at the very least, it taints the
> kernel. It must be an issue with the drm or linux-agp-compat build system; maybe
> the drm build would need the Module.symvers file generated by the
> linux-agp-compat build or something like that.

Yes, I figure it could be related to something like that.

Strangely enough, I don't have any problems on Mandriva with this. Nor have I
seen any problems on the gentoo versions I've tried.

/Thomas

Comment 14 Conn 2006-12-13 19:54:27 UTC
Hi,

Moving away Module.symvers indeed fixed the problem, DRI now works correctly...
some of the time. I tried running ppracer; with the default packages from Edgy I
was getting around 15-20fps at best, and now I'm getting ~40fps. However, other
apps tend to fail (tremulous quits unexpectedly with no error to the desktop &
without restoring the proper resolution, beryl/compiz causes the server to
restart). I don't know if it's due to the fact that I haven't upgraded the
xserver along with drm, xf86-driver-intel, mesa and linux-agp-compat, or these
are "expected" bugs from the git/dev version.

I'd like to have functional (and stable) DRI on my system (Inspiron 510m, Intel
855GM), but an upgrade since the transiton from Ubuntu Dapper - Edgy killed
performance, and building from git has been the only partial solution so far.

Anyway, thanks again for the tip.
Comment 15 Michel Dänzer 2006-12-14 03:53:02 UTC
(In reply to comment #14)
> (tremulous quits unexpectedly with no error to the desktop & without restoring
> the proper resolution, [...]

Tremulous seems to work fine here with Mesa git, but that's on a 945.

> beryl/compiz causes the server to restart). I don't know if it's due to the
> fact that I haven't upgraded the xserver along with drm, xf86-driver-intel,
> mesa and linux-agp-compat, [...]

The latter could indeed be related to this, as current Mesa uses a new symbol
drmCloseOnce, which the old X server doesn't provide.
Comment 16 Thomas Hellström 2006-12-21 03:09:10 UTC
The segfault should be fixed in current git HEAD.

Running it will require an update from linux-agp-compat.

/Thomas
Comment 17 Adam Jackson 2009-08-24 12:25:09 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.