diff options
author | Dave Airlie <airlied@linux.ie> | 2004-08-29 12:04:35 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2004-08-29 12:04:35 +0000 |
commit | 1430163b4bbf7b00367ea1066c1c5fe85dbeefed (patch) | |
tree | 478348e12b86280253f91beb4b23ed90ea349b04 /linux-core | |
parent | 6916572c1c32cd030258ab917f0a568517d5006b (diff) |
Drop GAMMA DRM from a great height ...
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/Kconfig | 7 | ||||
-rw-r--r-- | linux-core/Makefile | 6 | ||||
-rw-r--r-- | linux-core/Makefile.kernel | 7 | ||||
-rw-r--r-- | linux-core/drmP.h | 7 | ||||
-rw-r--r-- | linux-core/drm_bufs.c | 27 | ||||
-rw-r--r-- | linux-core/drm_dma.c | 9 | ||||
-rw-r--r-- | linux-core/drm_drv.c | 66 |
7 files changed, 28 insertions, 101 deletions
diff --git a/linux-core/Kconfig b/linux-core/Kconfig index 5fd8ee67..440e414b 100644 --- a/linux-core/Kconfig +++ b/linux-core/Kconfig @@ -22,13 +22,6 @@ config DRM_TDFX Choose this option if you have a 3dfx Banshee or Voodoo3 (or later), graphics card. If M is selected, the module will be called tdfx. -config DRM_GAMMA - tristate "3dlabs GMX 2000" - depends on DRM - help - This is the old gamma driver, please tell me if it might actually - work. - config DRM_R128 tristate "ATI Rage 128" depends on DRM && PCI diff --git a/linux-core/Makefile b/linux-core/Makefile index f677f63d..7065f81c 100644 --- a/linux-core/Makefile +++ b/linux-core/Makefile @@ -74,8 +74,6 @@ DRMTEMPLATES = drm_auth.h drm_bufs.h drm_context.h drm_dma.h drm_drawable.h \ DRMSHARED = drm.h drm_sarea.h DRMHEADERS = drmP.h $(DRMSHARED) -GAMMAHEADERS = gamma.h gamma_context.h gamma_drm.h gamma_drv.h gamma_lists.h \ - gamma_old_dma.h gamma_lock.h $(DRMHEADERS) $(DRMTEMPLATES) TDFXHEADERS = tdfx.h $(DRMHEADERS) $(DRMTEMPLATES) TDFXSHARED = tdfx.h R128HEADERS = r128.h r128_drv.h r128_drm.h $(DRMHEADERS) $(DRMTEMPLATES) @@ -341,9 +339,6 @@ CONFIG_DRM_MACH64 := n # Enable module builds for the modules requested/supported. -ifneq (,$(findstring gamma,$(DRM_MODULES))) -CONFIG_DRM_GAMMA := m -endif ifneq (,$(findstring tdfx,$(DRM_MODULES))) CONFIG_DRM_TDFX := m endif @@ -389,7 +384,6 @@ endif include $(DRMSRCDIR)/Makefile.kernel # Depencencies -$(gamma-objs): $(GAMMAHEADERS) $(tdfx-objs): $(TDFXHEADERS) $(r128-objs): $(R128HEADERS) $(mga-objs): $(MGAHEADERS) diff --git a/linux-core/Makefile.kernel b/linux-core/Makefile.kernel index 857c236a..92e3f73e 100644 --- a/linux-core/Makefile.kernel +++ b/linux-core/Makefile.kernel @@ -7,7 +7,6 @@ # $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.18 2003/08/16 17:59:17 dawes Exp $ # -gamma-objs := gamma_drv.o gamma_dma.o tdfx-objs := tdfx_drv.o r128-objs := r128_drv.o r128_cce.o r128_state.o r128_irq.o mga-objs := mga_drv.o mga_dma.o mga_state.o mga_warp.o mga_irq.o @@ -34,7 +33,7 @@ endif ifeq ($(BELOW25),y) O_TARGET := drm.o -list-multi := gamma.o tdfx.o r128.o mga.o i810.o i830.o ffb.o radeon.o \ +list-multi := tdfx.o r128.o mga.o i810.o i830.o ffb.o radeon.o \ savage.o via.o mach64.o i915.o obj-m := obj-n := @@ -42,7 +41,6 @@ obj- := export-objs := via_mm.o endif -obj-$(CONFIG_DRM_GAMMA) += gamma.o obj-$(CONFIG_DRM_TDFX) += tdfx.o obj-$(CONFIG_DRM_R128) += r128.o obj-$(CONFIG_DRM_RADEON)+= radeon.o @@ -61,9 +59,6 @@ include $(TOPDIR)/Rules.make endif ifeq ($(BELOW25),y) -gamma.o: $(gamma-objs) $(lib) - $(LD) -r -o $@ $(gamma-objs) $(lib) - tdfx.o: $(tdfx-objs) $(lib) $(LD) -r -o $@ $(tdfx-objs) $(lib) diff --git a/linux-core/drmP.h b/linux-core/drmP.h index e84685de..f3dc57be 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -525,17 +525,10 @@ struct drm_driver_fn { void (*release)(struct drm_device *, struct file *filp); void (*dma_ready)(struct drm_device *); int (*dma_quiescent)(struct drm_device *); - int (*dma_flush_block_and_flush)(struct drm_device *, int context, drm_lock_flags_t flags); - int (*dma_flush_unblock)(struct drm_device *, int context, drm_lock_flags_t flags); int (*context_ctor)(struct drm_device *dev, int context); int (*context_dtor)(struct drm_device *dev, int context); int (*kernel_context_switch)(struct drm_device *dev, int old, int new); int (*kernel_context_switch_unlock)(struct drm_device *dev); - int (*dma_schedule)(struct drm_device *dev, int locked); - int (*waitlist_destroy)(drm_waitlist_t *bl); - int (*freelist_create)(drm_freelist_t *bl, int count); - int (*freelist_put)(struct drm_device *dev, drm_freelist_t *bl, drm_buf_t *buf); - int (*freelist_destroy)(drm_freelist_t *bl); int (*vblank_wait)(struct drm_device *dev, unsigned int *sequence); /* these have to be filled in */ irqreturn_t (*irq_handler)( DRM_IRQ_ARGS ); diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c index c21ff748..fbde072c 100644 --- a/linux-core/drm_bufs.c +++ b/linux-core/drm_bufs.c @@ -404,9 +404,6 @@ static void DRM(cleanup_buf_error)(drm_device_t *dev, drm_buf_entry_t *entry) sizeof(*entry->buflist), DRM_MEM_BUFS); - if (dev->fn_tbl.freelist_destroy) - dev->fn_tbl.freelist_destroy(&entry->freelist); - entry->buf_count = 0; } } @@ -575,14 +572,6 @@ int DRM(addbufs_agp)( struct inode *inode, struct file *filp, DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count ); DRM_DEBUG( "entry->buf_count : %d\n", entry->buf_count ); - if (dev->fn_tbl.freelist_create) - { - dev->fn_tbl.freelist_create( &entry->freelist, entry->buf_count); - for ( i = 0 ; i < entry->buf_count ; i++ ) { - dev->fn_tbl.freelist_put( dev, &entry->freelist, &entry->buflist[i] ); - } - } - up( &dev->struct_sem ); request.count = entry->buf_count; @@ -817,14 +806,6 @@ int DRM(addbufs_pci)( struct inode *inode, struct file *filp, dma->page_count += entry->seg_count << page_order; dma->byte_count += PAGE_SIZE * (entry->seg_count << page_order); - if (dev->fn_tbl.freelist_create) - { - dev->fn_tbl.freelist_create( &entry->freelist, entry->buf_count); - for ( i = 0 ; i < entry->buf_count ; i++ ) { - dev->fn_tbl.freelist_put( dev, &entry->freelist, &entry->buflist[i] ); - } - } - up( &dev->struct_sem ); request.count = entry->buf_count; @@ -990,14 +971,6 @@ int DRM(addbufs_sg)( struct inode *inode, struct file *filp, DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count ); DRM_DEBUG( "entry->buf_count : %d\n", entry->buf_count ); - if (dev->fn_tbl.freelist_create) - { - dev->fn_tbl.freelist_create( &entry->freelist, entry->buf_count); - for ( i = 0 ; i < entry->buf_count ; i++ ) { - dev->fn_tbl.freelist_put( dev, &entry->freelist, &entry->buflist[i] ); - } - } - up( &dev->struct_sem ); request.count = entry->buf_count; diff --git a/linux-core/drm_dma.c b/linux-core/drm_dma.c index 096a5e9e..da9a90b6 100644 --- a/linux-core/drm_dma.c +++ b/linux-core/drm_dma.c @@ -108,8 +108,6 @@ void DRM(dma_takedown)(drm_device_t *dev) sizeof(*dma->bufs[0].buflist), DRM_MEM_BUFS); - if (dev->fn_tbl.freelist_destroy) - dev->fn_tbl.freelist_destroy(&dma->bufs[i].freelist); } } @@ -149,13 +147,6 @@ void DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf) if ( (dev->driver_features & DRIVER_DMA_QUEUE) && waitqueue_active(&buf->dma_wait)) { wake_up_interruptible(&buf->dma_wait); } - /* If processes are waiting, the last one - to wake will put the buffer on the free - list. If no processes are waiting, we - put the buffer on the freelist here. */ - else if (dev->fn_tbl.freelist_put) - dev->fn_tbl.freelist_put(dev, &dev->dma->bufs[buf->order].freelist, buf); - } /** diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index 1a5a4696..2c687111 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -413,8 +413,6 @@ static int DRM(takedown)( drm_device_t *dev ) if ( (dev->driver_features & DRIVER_DMA_QUEUE) && dev->queuelist ) { for ( i = 0 ; i < dev->queue_count ; i++ ) { - if (dev->fn_tbl.waitlist_destroy) - dev->fn_tbl.waitlist_destroy( &dev->queuelist[i]->waitlist); if ( dev->queuelist[i] ) { DRM(free)( dev->queuelist[i], @@ -1106,40 +1104,33 @@ int DRM(lock)( struct inode *inode, struct file *filp, if ( lock.context < 0 ) return -EINVAL; - if (dev->fn_tbl.dma_flush_block_and_flush) - ret = dev->fn_tbl.dma_flush_block_and_flush(dev, lock.context, lock.flags); - if ( !ret ) { - add_wait_queue( &dev->lock.lock_queue, &entry ); - for (;;) { - current->state = TASK_INTERRUPTIBLE; - if ( !dev->lock.hw_lock ) { - /* Device has been unregistered */ - ret = -EINTR; - break; - } - if ( DRM(lock_take)( &dev->lock.hw_lock->lock, - lock.context ) ) { - dev->lock.filp = filp; - dev->lock.lock_time = jiffies; - atomic_inc( &dev->counts[_DRM_STAT_LOCKS] ); - break; /* Got lock */ - } - - /* Contention */ - schedule(); - if ( signal_pending( current ) ) { - ret = -ERESTARTSYS; - break; - } - } - current->state = TASK_RUNNING; - remove_wait_queue( &dev->lock.lock_queue, &entry ); - } - - if (dev->fn_tbl.dma_flush_unblock) - dev->fn_tbl.dma_flush_unblock(dev, lock.context, lock.flags); - - if ( !ret ) { + add_wait_queue( &dev->lock.lock_queue, &entry ); + for (;;) { + current->state = TASK_INTERRUPTIBLE; + if ( !dev->lock.hw_lock ) { + /* Device has been unregistered */ + ret = -EINTR; + break; + } + if ( DRM(lock_take)( &dev->lock.hw_lock->lock, + lock.context ) ) { + dev->lock.filp = filp; + dev->lock.lock_time = jiffies; + atomic_inc( &dev->counts[_DRM_STAT_LOCKS] ); + break; /* Got lock */ + } + + /* Contention */ + schedule(); + if ( signal_pending( current ) ) { + ret = -ERESTARTSYS; + break; + } + } + current->state = TASK_RUNNING; + remove_wait_queue( &dev->lock.lock_queue, &entry ); + + if ( !ret ) { sigemptyset( &dev->sigmask ); sigaddset( &dev->sigmask, SIGSTOP ); sigaddset( &dev->sigmask, SIGTSTP ); @@ -1204,9 +1195,6 @@ int DRM(unlock)( struct inode *inode, struct file *filp, DRM(lock_transfer)( dev, &dev->lock.hw_lock->lock, DRM_KERNEL_CONTEXT ); - if (dev->fn_tbl.dma_schedule) - dev->fn_tbl.dma_schedule(dev, 1); - if ( DRM(lock_free)( dev, &dev->lock.hw_lock->lock, DRM_KERNEL_CONTEXT ) ) { DRM_ERROR( "\n" ); |