diff --git a/linux/Makefile.linux b/linux/Makefile.linux index 51cc843f..ecbe5aca 100644 --- a/linux/Makefile.linux +++ b/linux/Makefile.linux @@ -140,6 +140,7 @@ MGAHEADERS= mga_drv.h $(DRMHEADERS) I810OBJS= i810_drv.o i810_dma.o i810_bufs.o i810_context.o I810HEADERS= i810_drv.h $(DRMHEADERS) +endif R128OBJS= r128_drv.o r128_cce.o r128_bufs.o r128_context.o r128_state.o \ r128_pcigart.o @@ -148,7 +149,6 @@ R128HEADERS= r128_drv.h r128_drm.h $(DRMHEADERS) RADEONOBJS= radeon_drv.o radeon_cp.o radeon_bufs.o radeon_context.o \ radeon_state.o RADEONHEADERS= radeon_drv.h radeon_drm.h $(DRMHEADERS) -endif ifeq ($(SIS),1) # It appears that the SiS driver makes calls to sis_malloc and sis_free, and @@ -224,6 +224,7 @@ i810_drv.o: i810_drv.c $(CC) $(MODCFLAGS) -DEXPORT_SYMTAB -I$(TREE) -c $< -o $@ i810.o: $(I810OBJS) $(LIBS) $(LD) -r $^ -o $@ +endif r128_drv.o: r128_drv.c $(CC) $(MODCFLAGS) -DEXPORT_SYMTAB -I$(TREE) -c $< -o $@ @@ -234,7 +235,6 @@ radeon_drv.o: radeon_drv.c $(CC) $(MODCFLAGS) -DEXPORT_SYMTAB -I$(TREE) -c $< -o $@ radeon.o: $(RADEONOBJS) $(LIBS) $(LD) -r $^ -o $@ -endif .PHONY: ChangeLog ChangeLog: @@ -255,9 +255,9 @@ $(TDFXOBJS): $(TDFXHEADERS) ifeq ($(AGP),1) $(MGAOBJS): $(MGAHEADERS) $(I810OBJS): $(I810HEADERS) +endif $(R128OBJS): $(R128HEADERS) $(RADEONOBJS): $(RADEONHEADERS) -endif clean: rm -f *.o *.a *~ core diff --git a/linux/r128_bufs.c b/linux/r128_bufs.c index 39b09ed0..2730e07b 100644 --- a/linux/r128_bufs.c +++ b/linux/r128_bufs.c @@ -347,17 +347,19 @@ int r128_addbufs(struct inode *inode, struct file *filp, unsigned int cmd, sizeof(request))) return -EFAULT; -#if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE) if (dev_priv->is_pci && (request.flags & _DRM_AGP_BUFFER)) return -EINVAL; if (!dev_priv->is_pci && (request.flags & _DRM_SG_BUFFER)) return -EINVAL; if (request.flags & _DRM_AGP_BUFFER) +#if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE) return r128_addbufs_agp(inode, filp, cmd, arg); +#else + printk("WARNING: trying to use AGP without kernel support!\n"); +#endif if (request.flags & _DRM_SG_BUFFER) return r128_addbufs_sg(inode, filp, cmd, arg); else -#endif return -EINVAL; } diff --git a/linux/r128_cce.c b/linux/r128_cce.c index 4cd36bc6..144f2ab9 100644 --- a/linux/r128_cce.c +++ b/linux/r128_cce.c @@ -343,7 +343,11 @@ static void r128_cce_init_ring_buffer( drm_device_t *dev ) * means it's an offset from the start of AGP space. */ if ( !dev_priv->is_pci ) { +#if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE) ring_start = dev_priv->cce_ring->offset - dev->agp->base; +#else + printk("WARNING: Trying to use AGP without kernel support!\n"); +#endif } else { ring_start = dev_priv->cce_ring->offset - dev->sg->handle; } diff --git a/linux/r128_state.c b/linux/r128_state.c index b463a619..29750456 100644 --- a/linux/r128_state.c +++ b/linux/r128_state.c @@ -767,7 +767,12 @@ static void r128_cce_dispatch_indices( drm_device_t *dev, if(dma->flags == _DRM_DMA_USE_SG) offset = dev_priv->buffers->offset - dev->sg->handle; - else offset = dev_priv->buffers->offset - dev->agp->base; + else +#if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE) + offset = dev_priv->buffers->offset - dev->agp->base; +#else + printk("WARNING: trying to use AGP without kernel support!\n"); +#endif r128_update_ring_snapshot( dev_priv );