diff options
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/Makefile.kernel | 106 | ||||
-rw-r--r-- | linux-core/i810_dma.c | 2 | ||||
-rw-r--r-- | linux-core/mga_drv.c | 5 |
3 files changed, 63 insertions, 50 deletions
diff --git a/linux-core/Makefile.kernel b/linux-core/Makefile.kernel index 1e61ae97..9fe0038f 100644 --- a/linux-core/Makefile.kernel +++ b/linux-core/Makefile.kernel @@ -6,6 +6,7 @@ # drm.o is a fake target -- it is never built # The real targets are in the module-list O_TARGET := drm.o + module-list := gamma.o tdfx.o r128.o radeon.o ffb.o mga.o i810.o export-objs := $(patsubst %.o,%_drv.o,$(module-list)) @@ -25,6 +26,11 @@ export-objs := $(patsubst %.o,%_drv.o,$(module-list)) # memory waste (in the dual-head case) for greatly improved long-term # maintainability. # +# NOTE: lib-objs will be eliminated in future versions, thereby +# eliminating the need to compile the .o files into every module, but +# for now we still need them. +# + lib-objs := init.o memory.o proc.o auth.o context.o drawable.o bufs.o lib-objs += lists.o lock.o ioctl.o fops.o vm.o dma.o ctxbitmap.o @@ -32,65 +38,71 @@ ifeq ($(CONFIG_AGP),y) lib-objs += agpsupport.o else ifeq ($(CONFIG_AGP),m) - lib-objs += agpsupport.o + lib-objs += agpsupport.o endif endif -gamma-objs := $(lib-objs) gamma_drv.o gamma_dma.o -tdfx-objs := $(lib-objs) tdfx_drv.o tdfx_context.o -r128-objs := $(lib-objs) r128_drv.o r128_cce.o r128_context.o \ - r128_bufs.o r128_state.o -radeon-objs := $(lib-objs) radeon_drv.o radeon_cp.o radeon_context.o \ - radeon_bufs.o radeon_state.o -ffb-objs := $(lib-objs) ffb_drv.o ffb_context.o -mga-objs := $(lib-objs) mga_drv.o mga_dma.o mga_context.o \ - mga_bufs.o mga_state.o -i810-objs := $(lib-objs) i810_drv.o i810_dma.o i810_context.o \ - i810_bufs.o - -obj-$(CONFIG_DRM_GAMMA) += gamma.o $(gamma-objs) -obj-$(CONFIG_DRM_TDFX) += tdfx.o $(tdfx-objs) -obj-$(CONFIG_DRM_R128) += r128.o $(r128-objs) -obj-$(CONFIG_DRM_RADEON) += radeon.o $(radeon-objs) -obj-$(CONFIG_DRM_FFB) += ffb.o $(ffb-objs) - -ifneq ($CONFIG_AGP),) -obj-$(CONFIG_DRM_MGA) += mga.o $(mga-objs) -obj-$(CONFIG_DRM_I810) += i810.o $(i810-objs) +gamma-objs := gamma_drv.o gamma_dma.o +tdfx-objs := tdfx_drv.o tdfx_context.o +r128-objs := r128_drv.o r128_cce.o r128_context.o r128_bufs.o \ + r128_state.o +radeon-objs := radeon_drv.o radeon_cp.o radeon_context.o radeon_bufs.o \ + radeon_state.o +ffb-objs := ffb_drv.o ffb_context.o +mga-objs := mga_drv.o mga_dma.o mga_context.o mga_bufs.o \ + mga_state.o +i810-objs := i810_drv.o i810_dma.o i810_context.o i810_bufs.o + +obj-$(CONFIG_DRM_GAMMA) += gamma.o +obj-$(CONFIG_DRM_TDFX) += tdfx.o +obj-$(CONFIG_DRM_R128) += r128.o +obj-$(CONFIG_DRM_RADEON) += radeon.o +obj-$(CONFIG_DRM_FFB) += ffb.o +obj-$(CONFIG_DRM_MGA) += mga.o +obj-$(CONFIG_DRM_I810) += i810.o + + +# When linking into the kernel, link the library just once. +# If making modules, we include the library into each module + +lib-objs-mod := $(patsubst %.o,%-mod.o,$(lib-objs)) + +ifdef MAKING_MODULES + lib = drmlib-mod.a +else + obj-y += drmlib.a endif -# Take module names out of obj-y and int-m - -obj-y := $(filter-out $(module-list), $(obj-y)) -int-m := $(filter-out $(module-list), $(obj-m)) +include $(TOPDIR)/Rules.make -# Translate to Rules.make lists. +$(patsubst %.o,%.c,$(lib-objs-mod)): + @ln -sf $(subst -mod,,$@) $@ -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter $(module-list), $(obj-m))) -MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m))) -MIX_OBJS := $(sort $(filter $(export-objs), $(int-m))) +drmlib-mod.a: $(lib-objs-mod) + rm -f $@ + $(AR) $(EXTRA_ARFLAGS) rcs $@ $(lib-objs-mod) -include $(TOPDIR)/Rules.make +drmlib.a: $(lib-objs) + rm -f $@ + $(AR) $(EXTRA_ARFLAGS) rcs $@ $(lib-objs) -gamma.o: $(gamma-objs) - $(LD) -r -o $@ $(gamma-objs) +gamma.o: $(gamma-objs) $(lib) + $(LD) -r -o $@ $(gamma-objs) $(lib) -tdfx.o: $(tdfx-objs) - $(LD) -r -o $@ $(tdfx-objs) +tdfx.o: $(tdfx-objs) $(lib) + $(LD) -r -o $@ $(tdfx-objs) $(lib) -mga.o: $(mga-objs) - $(LD) -r -o $@ $(mga-objs) +mga.o: $(mga-objs) $(lib) + $(LD) -r -o $@ $(mga-objs) $(lib) -i810.o: $(i810-objs) - $(LD) -r -o $@ $(i810-objs) +i810.o: $(i810-objs) $(lib) + $(LD) -r -o $@ $(i810-objs) $(lib) -r128.o: $(r128-objs) - $(LD) -r -o $@ $(r128-objs) +r128.o: $(r128-objs) $(lib) + $(LD) -r -o $@ $(r128-objs) $(lib) -radeon.o: $(radeon-objs) - $(LD) -r -o $@ $(radeon-objs) +radeon.o: $(radeon-objs) $(lib) + $(LD) -r -o $@ $(radeon-objs) $(lib) -ffb.o: $(ffb-objs) - $(LD) -r -o $@ $(ffb-objs) +ffb.o: $(ffb-objs) $(lib) + $(LD) -r -o $@ $(ffb-objs) $(lib) diff --git a/linux-core/i810_dma.c b/linux-core/i810_dma.c index 26fe0c1c..aa824a79 100644 --- a/linux-core/i810_dma.c +++ b/linux-core/i810_dma.c @@ -924,7 +924,7 @@ int i810_irq_install(drm_device_t *dev, int irq) dev->dma->next_queue = NULL; dev->dma->this_buffer = NULL; - dev->tq.next = NULL; + INIT_LIST_HEAD(&dev->tq.list); dev->tq.sync = 0; dev->tq.routine = i810_dma_task_queue; dev->tq.data = dev; diff --git a/linux-core/mga_drv.c b/linux-core/mga_drv.c index 883eb75c..d1c39e99 100644 --- a/linux-core/mga_drv.c +++ b/linux-core/mga_drv.c @@ -38,7 +38,7 @@ #define MGA_DESC "Matrox G200/G400" #define MGA_DATE "20000928" #define MGA_MAJOR 2 -#define MGA_MINOR 0 +#define MGA_MINOR 1 #define MGA_PATCHLEVEL 1 static drm_device_t mga_device; @@ -114,6 +114,7 @@ static drm_ioctl_desc_t mga_ioctls[] = { [DRM_IOCTL_NR(DRM_IOCTL_MGA_VERTEX)] = { mga_vertex, 1, 0 }, [DRM_IOCTL_NR(DRM_IOCTL_MGA_FLUSH)] = { mga_flush_ioctl, 1, 0 }, [DRM_IOCTL_NR(DRM_IOCTL_MGA_INDICES)] = { mga_indices, 1, 0 }, + [DRM_IOCTL_NR(DRM_IOCTL_MGA_BLIT)] = { mga_blit, 1, 0 }, }; #define MGA_IOCTL_COUNT DRM_ARRAY_SIZE(mga_ioctls) @@ -502,7 +503,7 @@ int mga_release(struct inode *inode, struct file *filp) if (dev->lock.hw_lock && _DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock) && dev->lock.pid == current->pid) { mga_reclaim_buffers(dev, priv->pid); - DRM_INFO("Process %d dead (ctx %d, d_s = 0x%02x)\n", + DRM_INFO("Process %d dead (ctx %d, d_s = 0x%02lx)\n", current->pid, _DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock), dev->dev_private ? |