On Wed, 2004-10-06 at 15:19, Robert Clark wrote:
> Oct 5 22:02:21 miller kernel: Oops: 0002 [#1]
The attached (trivial) patch fixes this oops for me but I think this
is only half the problem.
What seems to have been happening is that, without the DRIVER_HAVE_DMA
flag, dev->dma was not being initialised. This caused a problem with the
following code in DRM(irq_install) from drm_irq.h:
dev->dma->next_buffer = NULL;
dev->dma->next_queue = NULL;
dev->dma->this_buffer = NULL;
leading to the null dereference.
I assume these lines need to be wrapped in an
if(drm_core_check_feature(dev, DRIVER_HAVE_DMA)) { } or something, but
I'll leave that to someone who actually understands this code.
Robert
diff -Naur kernel-2.6.8/linux-2.6.8/drivers/char/drm/via_mm.c kernel-2.6.8.new/linux-2.6.8/drivers/char/drm/via_mm.c
--- kernel-2.6.8/linux-2.6.8/drivers/char/drm/via_mm.c 2004-10-08 19:03:09.302216408 +0100
+++ kernel-2.6.8.new/linux-2.6.8/drivers/char/drm/via_mm.c 2004-10-08 19:11:44.277928200 +0100
@@ -357,7 +357,7 @@
void DRM(driver_register_fns)(drm_device_t *dev)
{
- dev->driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL;
+ dev->driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL | DRIVER_HAVE_DMA;
dev->fn_tbl.context_ctor = via_init_context;
dev->fn_tbl.context_dtor = via_final_context;
dev->fn_tbl.vblank_wait = via_driver_vblank_wait;