Bugzilla – Bug 103135
i915 DRI driver broken?
Last modified: 2005-08-16 11:02:19 UTC
Looks like the i915 DRI driver is currently broken. # glxinfo ERROR: line 125, Function intelInitDriver, File intel_screen.c libGL warning: 3D driver returned no fbconfigs libGL errror: INitDriver failed libGL error: reverting to (slow) indirect rendering Same problem on 915GM and 945G.
--> Mesa --> ./src/mesa/drivers/dri/i915/intel_screen.c [...] if (drmMap(sPriv->fd, intelScreen->back.handle, intelScreen->back.size, (drmAddress *)&intelScreen->back.map) != 0) { fprintf(stderr, "\nERROR: line %d, Function %s, File %s\n", __LINE__, __FUNCTION__, __FILE__); <-- line 125 FREE(intelScreen); sPriv->private = NULL; return GL_FALSE; } [...] I remembered a patch by Alan H.: * Bump the DDX version to 1.4.0 to indicate the removal of drmAddress. Thus allowing 32/64bit clients to cohabit. and reverted it, but this didn't help at all. I attach the patch (not reverted) for convenience.
Created attachment 45381 [details] Patch by alanh mentioned above * Bump the DDX version to 1.4.0 to indicate the removal of drmAddress. Thus allowing 32/64bit clients to cohabit.
For building the i915 DRI module I currently use Mesa 6.3 and DRM 1.0.0. Maybe I need to downgrade Mesa and/or DRM or we have a general DRM problem into our kernel. I'm not sure whether DRI currently works at all on any hardware with any driver ...
The size of the strucutre may have changed do to the removal of drmAddress. The drmAddress elements in those structures were not needed in most of the cases (or could be worked around). On the other hand there should be a version check for this. Not all drivers had drmAddress elements. The ATi drivers did not nor did the Matrox drivers. The Intel driver was the only one this has been applied to and I asked Alan to coordinate those changes (which are needed for 64/32bit compatibility) so that we commit the stuff to each component at the same time. Structures containing drmAddress are not used in the kernel so we don't see any compatibility problem there. The kernel ABI remains compatible no matter what. There will be a change in the kernel which will only affect user space at compile time: the type of drm_handle_t (which isn't used in the kernel) will change.
I tried with earlier Mesa/DRM versions I used for building and I surely know that at least with one of them DRI worked fine on my 945G machine, but this didn't help. :-( No matter if I use the i810 driver with drmAdress in the structure or not. BTW, here are the RPMs with earlier Mesa/DRM versions for testing: # ls x11-dri-i915* x11-dri-i915-20050705.i386.rpm x11-dri-i915-20050705.x86_64.rpm x11-dri-i915-20050715.i386.rpm x11-dri-i915-20050715.x86_64.rpm x11-dri-i915-20050725.i386.rpm x11-dri-i915-20050725.x86_64.rpm 20050705: - Mesa CVS 050629 - DRM CVS 050701 20050715: - Mesa CVS 050629 - DRM CVS 050701 - used RPM_OPT_FLAGS for building 20050725: - Mesa CVS 050713 - DRM 1.0 Beta1: - Mesa 6.3 - DRM 1.0
(In reply to comment #3) > For building the i915 DRI module I currently use Mesa 6.3 and DRM 1.0.0. Maybe I > need to downgrade Mesa and/or DRM or we have a general DRM problem into our > kernel. I'm not sure whether DRI currently works at all on any hardware with any > driver ... It works in SL10b1 with radeon. Verifyed yesterday.
Same problem with an Intel 855GM.
> Same problem with an Intel 855GM. Really? Please attach the output of strace -f -eopen glxinfo. You need to install package strace before. Thanks.
Created attachment 45484 [details] strace -f -eopen glxinfo > i855gm 2>&1
> open("/usr/X11R6/lib/modules/dri/i915_dri.so", O_RDONLY) = 4 Oops, 855 now also uses the i915 DRI module. I forgot this. Thanks.
I'll also try the i915 DRI driver from X.Org CVS. It should match the i810 video driver from X.Org CVS best.
Just that this informatin does not get lost. ro just told me, that the drivers from the Intel site don't work as well. http://support.intel.com/support/graphics/sb/CS-010512.htm - dri-I915-v1.1-20041217.i386.rpm - i915Graphics.tar.gz
> I'll also try the i915 DRI driver from X.Org CVS. It should match the i810 video > driver from X.Org CVS best. Unfortunately it's not that easy or even impossible to compile the i915 X.Org CVS DRI driver (Mesa 6.3 based) inside Mesa 6.1 of X.Org 6.8.2. I'll try to compile it inside of Mesa 6.3, but I didn't see any relevant changes between i915 X.Org CVS DRI driver and the i915 driver inside Mesa 6.3.
> I'll try to compile it inside of Mesa 6.3, but I didn't see any relevant changes > between i915 X.Org CVS DRI driver and the i915 driver inside Mesa 6.3. Similar problems. I'll try to find the required hunks for 915GM and 945G support in Mesa 6.3 (not that much AFAICS) and create a patch against Mesa 6.1.
TODO: --> Mesa --> ./src/mesa/drivers/dri/i915/intel_screen.c [...] if (drmMap(sPriv->fd, intelScreen->back.handle, intelScreen->back.size, (drmAddress *)&intelScreen->back.map) != 0) { fprintf(stderr, "\nERROR: line %d, Function %s, File %s\n", __LINE__, __FUNCTION__, __FILE__); <-- line 125 FREE(intelScreen); sPriv->private = NULL; return GL_FALSE; } [...] - compare values of intelScreen structure inside Xserver and DRI client. These should match. - print errno - have a look at kernel logfile For the 945G machine freezes after terminating Xserver: - debug Xserver and step into i830closescreen
Created attachment 45953 [details] i915 GM support Should be sufficient for Mesa 6.1.
Created attachment 45954 [details] 945G support Should be sufficient for Mesa 6.1.
Though I must admit that I didn't test the 915GM/945G patches right above yet.
Hmm ... at least the i945G patch didn't help. Still the same problem. Probably the Mesa 6.1 DRI driver of X.Org 6.8.2 doesn't work any longer together with newer Kernel DRM versions. Need to verifiy this with a Intel <= i915G machine.
I was wrong. It works. Probably the broken i915 DRI driver confused the system. But for whatever reason debug seems to be enabled by default now, so it seems that for each vertex information is now printed. :-( RPMs for testing: /suse/sndirsch/xorg-x11-Mesa-6.8.2-89.i586.rpm /suse/sndirsch/xorg-x11-Mesa-6.8.2-89.x86_64.rpm It overwrites i915_dri.so of x11-dri-i915 package!
> But for whatever reason debug seems to be enabled by default now, so it seems > that for each vertex information is now printed. :-( Looks like this when starting glxgears: -- v(0): 42f3b308/121.849670 -- v(1): 4342b12c/194.692078 -- v(2): 3f73c3be/0.952206 -- v(3): ffc11800/nan -- v(0): 42f3b308/121.849670 -- v(1): 4342b12c/194.692078 -- v(2): 3f73c3be/0.952206 -- v(3): ffc11800/nan [...]
I don't get any debug output, and 3D direct rendering seems to work again :))) Thanks, Stefan, good work! submit -> stable, please. BTW - the v(3) with nan looks weired. This is the w component of the homogenous coordinates, presumably after(!) perspective division, because you wouldn't see anything on the screen otherwise. After perspective division it isn't used any more, but it also shouldn't change...
(In reply to comment #20) > /suse/sndirsch/xorg-x11-Mesa-6.8.2-89.i586.rpm > /suse/sndirsch/xorg-x11-Mesa-6.8.2-89.x86_64.rpm Can I download it outside SuSE? I couldn't find it in /pub/people/sndirsch
No. There are still serious problems with it.
Created attachment 46072 [details] Patch required for Mesa 6.2 branch I went back to Mesa 6.2 branch (includes support for 915GM/945G, recommended by Alan H.), which requires this patch to reflect the changes in i810 DDX driver and the use of tnl_vertex_cull_stage in i915 DRI driver.
Still does not work. :-( I added some debug info ... INFO: sPriv->devPrivSize = 104 INFO: sizeof(I830DRIRec) = 136 ERROR! sizeof(I830DRIRec) does not match passed size from 2D driver libGL warning: 3D driver returned no fbconfigs. libGL error: InitDriver failed libGL error: reverting to (slow) indirect rendering [...] I made sure that drmAdress is not in I830DRIRec when compiling i915 DRI driver.
Compiling the Mesa 6.2 branch i915 DRI driver inside X.Org 6.8.2 (which includes Mesa 6.2.1) make the driver finally working. Probably I took the wrong DRM version for compiling Mesa (the sources which are specified with DRM_SOURCE_PATH for Mesa build). The problem with debug output remains (at least on 945G). Need to figure out how to disable it. Matthias, could you please help here? # glxgears -- v(0): 42f3b308/121.849670 -- v(1): 4342b12c/194.692078 -- v(2): 3f73c3be/0.952206 -- v(3): ffc11800/nan -- v(0): 42f3b308/121.849670 -- v(1): 4342b12c/194.692078 -- v(2): 3f73c3be/0.952206 -- v(3): ffc11800/nan Packages for testing: ~sndirsch/xorg-x11-Mesa-6.8.2-90.i586.rpm ~sndirsch/xorg-x11-Mesa-6.8.2-90.x86_64.rpm
--- extras/Mesa/src/mesa/drivers/dri/i915/intel_tris.c.orig +++ extras/Mesa/src/mesa/drivers/dri/i915/intel_tris.c @@ -63,9 +63,9 @@ #else #define COPY_DWORDS( j, vb, vertsize, v ) \ do { \ - if (1) fprintf(stderr, "\n"); \ + if (0) fprintf(stderr, "\n"); \ for ( j = 0 ; j < vertsize ; j++ ) { \ - if (1) fprintf(stderr, " -- v(%d): %x/%f\n",j, \ + if (0) fprintf(stderr, " -- v(%d): %x/%f\n",j, \ ((GLuint *)v)[j], \ ((GLfloat *)v)[j]); \ vb[j] = ((GLuint *)v)[j]; \
Alan H. approved my patch. The new driver was now tested successfully on 915GM/945G. Packages for testing are available (until Beta3 is released): --> ftp://ftp.suse.com/pub/people/sndirsch/RPMS/bug#103135 Feedback will be appreciated with info on the gfx chipset and platform (i386/x86_64). Especially for Intel chipsets <=915G (830/845/855/865/915G).
The new driver works also on 855 (i386), tested by ro.