From: Wlodzimierz Kozlowski Warsaw, Poland wlodekak@xxxxxxxxxx or wlodekak@xxxxxxxxxx To: xfree86@xxxxxxxxxxx Re: Problem with compiling modules drm with XFree86-4.1.0, linux-2.4.23 for ATI Radeon Mobility and related problem with DRI Warsaw January 12, 2004 Problem with compilation kernel modules, linux-drm-4.1.0-kernelsource.tar.gz ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ from, http://www.xfree86.org/~alanh/ ***************************** Setup: Laptop Clevo 4600 (vel Eurocom 4600) with Pentium III Mobility 1.2. GHz ATI Radeon Mobility (Integrated) AGP 4x M6-P (indicated also as R100/7000, or LY) 32 MB VideoRAM: 64bit DDR SDRAM (i830MP) 512 MB RAM kernel Linux-2.4.23 (from, www.kernel.org) XFree86-4.1.0-50 (from RedHat) Mesa-3.4.2-10 (from RedHat for RH-7.2 and use with XFree86-4.1.0) distribution Linux RedHat-7.2 (with erratic supplements) gcc2.96-112.7.2 (from RedHat errata for 7.2) (examination of using gcc-3.3.2 does not remove the trouble) I am including the compilation report (revealing also possible causes of the trouble) below the following message. Compilation of linux-drm-4.2.0-kernelsource.tar.gz passes without problem (I need however the modules for XFree86-4.1.0). I have been tempted to compile the module by message from the XFree86 DRI discussion list stating that the module version from, http://www.xfree86.org/~alanh/ can solve the following known problem of radeon.o module compiled from the kernel linux-2.4.23 source (generally later than 2.4.18): An effort of launching a graphic application using DRI results in total freezing of the keyboard, mouse, screen so that only switch off can be done (glxinfo shows that DRI , AGP and all the rest are enabled). Kernel and all modules have been compiled using the same version of the compiler, gcc2.96-112.7.2 (from RedHat-7.2 Errata) However , I have observed that launching the graphic application using DRI with XFree86-4.1.0 under kernel 2.4.18 (Linux kernel 2.4.18 from http://www.kernel.org) and subsequent warm restart to 2.4.23 removes this unrequired effect as long as the machine is switched on (subsequently, a number of WARM restarts can be done and this will not restore the freezing effect). I have found this has most probably nothing with APM or using the EXT3 and occurs with XFree86 subversions 4.1.0, 4.2.0 and apparently does not depend on the subversion number. Assignment of RAM intervals appears to be the only difference between logss of X starting under linux-2.4.23 booted directly after switching the machine on and the reports of starting X under the 2.4.23 warm restarted from 2.4.18 under which a graphic application using DRI has been launched. Note, starting X under 2.4.18 without launching such application will not remove the effect of freezing after the warm restart to 2.4.23. (examples of the application: gears, tunnel, tunnel2 ) I am sending this message in hope it will appear helpful in solving the known problem of using DRI with ATI RADEON for kernels later than 2.4.18 (others report the problem preserves also with Linux kernel 2.6.0, e.g. https://sourceforge.net/mailarchive/forum.php?thread_id=3713780&forum_id=6511 From: Rafal Gala <lista@xxxxx> Mobility Radeon + DRI 2004-01-08 05:39 ). ================RAPORT on linux-drm-4.1.0================================ Initial compilation for XFree86-4.1.0 under linux-2.4.23 with Red Hat-7.2 -------------------------------------------------------------------------- make -f Makefile.linux === KERNEL HEADERS IN /lib/modules/2.4.23/build/include === SMP=0 MODULES=1 MODVERSIONS=1 AGP=1 === kill_fasync has 3 parameters === Compiling for machine i686 === WARNING === WARNING 2.4.0 kernels before 2.4.0-test11 DO NOT WORK === WARNING cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -DEXPORT_SYMTAB -I/lib/modules/2.4.23/build/include -c gamma_drv.c -o gamma_drv.o In file included from gamma_drv.c:60: drm_bufs.h: In function `gamma_rmmap': drm_bufs.h:199: warning: `r_list' might be used uninitialized in this function In file included from gamma_drv.c:72: drm_vm.h: In function `gamma_vm_shm_nopage': drm_vm.h:110: structure has no member named `virtual' drm_vm.h:89: warning: `physical' might be used uninitialized in this function make: *** [gamma_drv.o] Error 1 .................................. Compilation has formally passed after a series of changes introduced following warning messages (this is however for information only to identify sources of the compilation problem without solving it; warnings do not encourage using the driver formally compiled in this way). The changes are: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ati_pcigart.h ---------------> assignment in line 92: u32 *pci_gart, page_base, bus_address = 0; ^^^^^ commenting 114: page_base = virt_to_bus( entry->pagelist[i]->virtual ); drm_bufs.h -----------> assignment in line 199: drm_map_list_t *r_list = NULL; ^^^^^^^^ drm_context.h -----------> assignment in line 172: drm_map_list_t *r_list = NULL; ^^^^^^^^ drm_vm.h --------> commenting 110: physical = (unsigned long)pte_page( *pte )->virtual; and interval from line 275: to 279: (with page->virtual); radeon_cp.c -----------> commenting interval from line 627: to 632: containing 628: virt_to_bus(entry->pagelist[page_ofs]->virtual)); 631: virt_to_bus(entry->pagelist[page_ofs]->virtual), r128_cce.c -----------> commenting interval from line 353 to 358 (with, 'virtual') i810_dma.c ------------> commenting line 302: wake_up(&virt_to_page(page)->wait); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The result of compilation after the changes is; ----------------------------------------------- make -f Makefile.linux === KERNEL HEADERS IN /lib/modules/2.4.23/build/include === SMP=0 MODULES=1 MODVERSIONS=1 AGP=1 === kill_fasync has 3 parameters === Compiling for machine i686 === WARNING === WARNING 2.4.0 kernels before 2.4.0-test11 DO NOT WORK === WARNING cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -DEXPORT_SYMTAB -I/lib/modules/2.4.23/build/include -c gamma_drv.c -o gamma_drv.o In file included from gamma_drv.c:72: drm_vm.h: In function `gamma_vm_shm_nopage': drm_vm.h:89: warning: `physical' might be used uninitialized in this function cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -I/lib/modules/2.4.23/build/include -c gamma_dma.c -o gamma_dma.o ld -r gamma_drv.o gamma_dma.o -o gamma.o cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -DEXPORT_SYMTAB -I/lib/modules/2.4.23/build/include -c tdfx_drv.c -o tdfx_drv.o In file included from tdfx_drv.c:60: drm_vm.h: In function `tdfx_vm_shm_nopage': drm_vm.h:89: warning: `physical' might be used uninitialized in this function ld -r tdfx_drv.o -o tdfx.o cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -DEXPORT_SYMTAB -I/lib/modules/2.4.23/build/include -c r128_drv.c -o r128_drv.o In file included from r128_drv.c:36: ati_pcigart.h: In function `r128_ati_pcigart_init': ati_pcigart.h:92: warning: unused variable `bus_address' ati_pcigart.h:92: warning: `page_base' might be used uninitialized in this function In file included from r128_drv.c:90: drm_vm.h: In function `r128_vm_shm_nopage': drm_vm.h:89: warning: `physical' might be used uninitialized in this function cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -I/lib/modules/2.4.23/build/include -c r128_cce.c -o r128_cce.o r128_cce.c: In function `r128_cce_init_ring_buffer': r128_cce.c:347: warning: unused variable `entry' cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -I/lib/modules/2.4.23/build/include -c r128_state.c -o r128_state.o ld -r r128_drv.o r128_cce.o r128_state.o -o r128.o cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -DEXPORT_SYMTAB -I/lib/modules/2.4.23/build/include -c radeon_drv.c -o radeon_drv.o In file included from radeon_drv.c:34: ati_pcigart.h: In function `radeon_ati_pcigart_init': ati_pcigart.h:92: warning: unused variable `bus_address' ati_pcigart.h:92: warning: `page_base' might be used uninitialized in this function In file included from radeon_drv.c:87: drm_vm.h: In function `radeon_vm_shm_nopage': drm_vm.h:89: warning: `physical' might be used uninitialized in this function cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -I/lib/modules/2.4.23/build/include -c radeon_cp.c -o radeon_cp.o radeon_cp.c: In function `radeon_cp_init_ring_buffer': radeon_cp.c:621: warning: unused variable `entry' cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -I/lib/modules/2.4.23/build/include -c radeon_state.c -o radeon_state.o ld -r radeon_drv.o radeon_cp.o radeon_state.o -o radeon.o cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -DEXPORT_SYMTAB -I/lib/modules/2.4.23/build/include -c mga_drv.c -o mga_drv.o In file included from mga_drv.c:79: drm_vm.h: In function `mga_vm_shm_nopage': drm_vm.h:89: warning: `physical' might be used uninitialized in this function cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -I/lib/modules/2.4.23/build/include -c mga_dma.c -o mga_dma.o cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -I/lib/modules/2.4.23/build/include -c mga_state.c -o mga_state.o cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -I/lib/modules/2.4.23/build/include -c mga_warp.c -o mga_warp.o ld -r mga_drv.o mga_dma.o mga_state.o mga_warp.o -o mga.o cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -DEXPORT_SYMTAB -I/lib/modules/2.4.23/build/include -c i810_drv.c -o i810_drv.o In file included from i810_drv.c:81: drm_vm.h: In function `i810_vm_shm_nopage': drm_vm.h:89: warning: `physical' might be used uninitialized in this function cc -O2 -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wpointer-arith -D__KERNEL__ -DMODULE -fomit-frame-pointer -DCONFIG_AGP -DCONFIG_AGP_MODULE -DMODVERSIONS -include /lib/modules/2.4.23/build/include/linux/modversions.h -DKILLFASYNCHASTHREEPARAMETERS -I/lib/modules/2.4.23/build/include -c i810_dma.c -o i810_dma.o ld -r i810_drv.o i810_dma.o -o i810.o ............................................................................ _______________________________________________ XFree86 mailing list XFree86@xxxxxxxxxxx http://XFree86.Org/mailman/listinfo/xfree86