Description of problem: i830 requires agpgart to be loaded which would normally mean that modprobe would then load agpgart all at once. but evidently module dependancies are not being done correctly. Here is some examples: [root@dhcp64-243 root]# modprobe i830 /lib/modules/2.4.21-1.1931.2.323.ent/kernel/drivers/char/drm/i830.o: init_module: Cannot allocate memory Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters. You may find more information in syslog or the output from dmesg /lib/modules/2.4.21-1.1931.2.323.ent/kernel/drivers/char/drm/i830.o: insmod /lib/modules/2.4.21-1.1931.2.323.ent/kernel/drivers/char/drm/i830.o failed /lib/modules/2.4.21-1.1931.2.323.ent/kernel/drivers/char/drm/i830.o: insmod i830 failed [drm:drm_init] *ERROR* Cannot initialize the agpgart module. now I'll load agpgart [root@dhcp64-243 root]# modprobe agpgart [root@dhcp64-243 root]# lsmod Module Size Used by Not tainted agpgart 55672 0 (unused) [root@dhcp64-243 root]# modprobe i830 [root@dhcp64-243 root]# lsmod Module Size Used by Not tainted i830 71704 0 (unused) agpgart 55672 1 but agpgart doesn't show i830 in the used by field. even though its used count has gone to 1. Version-Release number of selected component (if applicable): 2.4.21-1.1931.2.323.ent How reproducible: everytime Steps to Reproduce: 1. steps above 2. 3. Actual results: Expected results: Additional info:
Bill, chances are this got fixed recently with a utilities upgrade. Could you please verify whether this problem still exists ?
can we close?
It still acts the same. I don't think its a showstopper but it should be fixed eventually. modules.dep confirms that there is no relationship between the two.
Reassigning to davej, our agpgart dude.
if this hasnt been fixed yet, it should be trivial to add a dependancy of AGPGART to drivers/char/drm/Config.in
DaveJ, drivers/char/drm/Config.in has not been changed since taroon-gold (initial release of RHEL3). But there is this line: dep_tristate ' Intel 830M' CONFIG_DRM_I830 $CONFIG_AGP Is this what you were suggesting? If not, could you please take back this bug and post an appropriate patch to rhkernel-list? Thanks. -ernie
I've reproduced this problem on the latest RHEL3 (2.4.21-37.7.EL), but I've also determined that there are no unresolved global symbols in the i830.o module that are satisfied by those exported from the agpgart.o module. Thus, the modules.dep file is in fact correct in not showing any dependencies. However, I'm still at a loss to explain why the "modprobe i830" works iff preceded by an "insmod agpgart". Anyone on the cc: list have any ideas?
Don, adding you to cc: list, too (since you've been in the DRM code before). Any ideas? (Please read last comment.)
I think I've figured this out. (The DRM code is absolutely abominable! Tags and cscope are useless, function names are created from macro arg concatentation, huge sections of code are generated from header files, it's impossible to see function calling trees, and there are obscure run-time dependencies on other modules. This stuff is utterly amazing ... make that, downright aggravating!) Anyway, here's the insmod failure chain (sources are in drivers/char/drm): [DRM(x) is defined as i830_##x in i830.h] drm_init() [drm_drv.h] DRM(agp_init) [drm_agpsupport.h] DRM_AGP_GET [drm_agpsupport.h] inter_module_get("drm_agp") The last call returns NULL causing the insmod failure unless some other module has previously called inter_module_register("drm_agp", ...), and that is only done from agp_init() in drivers/char/agp/agpgart_be.c. Thus, there is a run-time dependency but no global symbol dependency. I concede this is a DRM bug due to a design flaw, but I don't think that depmod-style module dependencies are an appropriate mechanism to fix this. I recommend working around this problem with /etc/modules.conf, but I'm closing this as WONTFIX. If someone can suggest an easy way to solve this, I'll reconsider. But DRM is the only current user of this goofy interface.