drm: kill dma queue support
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 25 Oct 2011 22:54:41 +0000 (00:54 +0200)
committerDave Airlie <airlied@redhat.com>
Fri, 20 Jul 2012 02:50:55 +0000 (22:50 -0400)
Absolutely unused. All the values are only ever initialized and
then used at most in some debug printout functions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_bufs.c
drivers/gpu/drm/drm_debugfs.c
drivers/gpu/drm/drm_dma.c
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/drm_fops.c
drivers/gpu/drm/drm_info.c
drivers/gpu/drm/drm_proc.c
drivers/gpu/drm/i810/i810_drv.c
include/drm/drmP.h

index 348b367debebdcf1823ac4f781915097e3fb027a..b356c719f2f1a8b35abb2ad06ae11e4dc3126cc7 100644 (file)
@@ -641,8 +641,6 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request)
 
        if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER)
                return -EINVAL;
-       if (dev->queue_count)
-               return -EBUSY;  /* Not while in use */
 
        /* Make sure buffers are located in AGP memory that we own */
        valid = 0;
@@ -704,7 +702,6 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request)
                buf->next = NULL;
                buf->waiting = 0;
                buf->pending = 0;
-               init_waitqueue_head(&buf->dma_wait);
                buf->file_priv = NULL;
 
                buf->dev_priv_size = dev->driver->dev_priv_size;
@@ -796,13 +793,11 @@ int drm_addbufs_pci(struct drm_device * dev, struct drm_buf_desc * request)
        order = drm_order(request->size);
        size = 1 << order;
 
-       DRM_DEBUG("count=%d, size=%d (%d), order=%d, queue_count=%d\n",
-                 request->count, request->size, size, order, dev->queue_count);
+       DRM_DEBUG("count=%d, size=%d (%d), order=%d\n",
+                 request->count, request->size, size, order);
 
        if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER)
                return -EINVAL;
-       if (dev->queue_count)
-               return -EBUSY;  /* Not while in use */
 
        alignment = (request->flags & _DRM_PAGE_ALIGN)
            ? PAGE_ALIGN(size) : size;
@@ -904,7 +899,6 @@ int drm_addbufs_pci(struct drm_device * dev, struct drm_buf_desc * request)
                        buf->next = NULL;
                        buf->waiting = 0;
                        buf->pending = 0;
-                       init_waitqueue_head(&buf->dma_wait);
                        buf->file_priv = NULL;
 
                        buf->dev_priv_size = dev->driver->dev_priv_size;
@@ -1019,8 +1013,6 @@ static int drm_addbufs_sg(struct drm_device * dev, struct drm_buf_desc * request
 
        if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER)
                return -EINVAL;
-       if (dev->queue_count)
-               return -EBUSY;  /* Not while in use */
 
        spin_lock(&dev->count_lock);
        if (dev->buf_use) {
@@ -1071,7 +1063,6 @@ static int drm_addbufs_sg(struct drm_device * dev, struct drm_buf_desc * request
                buf->next = NULL;
                buf->waiting = 0;
                buf->pending = 0;
-               init_waitqueue_head(&buf->dma_wait);
                buf->file_priv = NULL;
 
                buf->dev_priv_size = dev->driver->dev_priv_size;
@@ -1177,8 +1168,6 @@ static int drm_addbufs_fb(struct drm_device * dev, struct drm_buf_desc * request
 
        if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER)
                return -EINVAL;
-       if (dev->queue_count)
-               return -EBUSY;  /* Not while in use */
 
        spin_lock(&dev->count_lock);
        if (dev->buf_use) {
@@ -1228,7 +1217,6 @@ static int drm_addbufs_fb(struct drm_device * dev, struct drm_buf_desc * request
                buf->next = NULL;
                buf->waiting = 0;
                buf->pending = 0;
-               init_waitqueue_head(&buf->dma_wait);
                buf->file_priv = NULL;
 
                buf->dev_priv_size = dev->driver->dev_priv_size;
index 1c7a1c0d3edd9aa34d7530e04fa5b482a9d07973..70b13fc1939698c2ae3041017d3556cde6368805 100644 (file)
@@ -46,7 +46,6 @@ static struct drm_info_list drm_debugfs_list[] = {
        {"name", drm_name_info, 0},
        {"vm", drm_vm_info, 0},
        {"clients", drm_clients_info, 0},
-       {"queues", drm_queues_info, 0},
        {"bufs", drm_bufs_info, 0},
        {"gem_names", drm_gem_name_info, DRIVER_GEM},
 #if DRM_DEBUG_CODE
index cfb4e333ec0fd1ee5e8b598b2d14fc6f48ad8554..08f5e5309b22e63d975b2e8357a659ba53e11af0 100644 (file)
@@ -120,11 +120,6 @@ void drm_free_buffer(struct drm_device *dev, struct drm_buf * buf)
        buf->pending = 0;
        buf->file_priv = NULL;
        buf->used = 0;
-
-       if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE)
-           && waitqueue_active(&buf->dma_wait)) {
-               wake_up_interruptible(&buf->dma_wait);
-       }
 }
 
 /**
index 946bd91c57ec162a1fab8b3d122c17bb2ca2dd8c..9238de4009fa15a31613d6f86185e0624810f69e 100644 (file)
@@ -182,7 +182,6 @@ static struct drm_ioctl_desc drm_ioctls[] = {
 int drm_lastclose(struct drm_device * dev)
 {
        struct drm_vma_entry *vma, *vma_temp;
-       int i;
 
        DRM_DEBUG("\n");
 
@@ -228,16 +227,6 @@ int drm_lastclose(struct drm_device * dev)
                kfree(vma);
        }
 
-       if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE) && dev->queuelist) {
-               for (i = 0; i < dev->queue_count; i++) {
-                       kfree(dev->queuelist[i]);
-                       dev->queuelist[i] = NULL;
-               }
-               kfree(dev->queuelist);
-               dev->queuelist = NULL;
-       }
-       dev->queue_count = 0;
-
        if (drm_core_check_feature(dev, DRIVER_HAVE_DMA) &&
            !drm_core_check_feature(dev, DRIVER_MODESET))
                drm_dma_takedown(dev);
index 96b8c8f9c0285374e4b4d0035fde7c167f6de67c..c6f5f8951482f0af13a309991ef21446c5497545 100644 (file)
@@ -75,10 +75,6 @@ static int drm_setup(struct drm_device * dev)
 
        dev->sigdata.lock = NULL;
 
-       dev->queue_count = 0;
-       dev->queue_reserved = 0;
-       dev->queue_slots = 0;
-       dev->queuelist = NULL;
        dev->context_flag = 0;
        dev->interrupt_flag = 0;
        dev->dma_flag = 0;
index 4076a33e5cad979f3bcf62a3ac75ad384edf886a..8928edbb94c7f359592c1b66badb8a93888a48bd 100644 (file)
@@ -109,42 +109,6 @@ int drm_vm_info(struct seq_file *m, void *data)
        return 0;
 }
 
-/**
- * Called when "/proc/dri/.../queues" is read.
- */
-int drm_queues_info(struct seq_file *m, void *data)
-{
-       struct drm_info_node *node = (struct drm_info_node *) m->private;
-       struct drm_device *dev = node->minor->dev;
-       int i;
-       struct drm_queue *q;
-
-       mutex_lock(&dev->struct_mutex);
-       seq_printf(m, "  ctx/flags   use   fin"
-                  "   blk/rw/rwf  wait    flushed         queued"
-                  "      locks\n\n");
-       for (i = 0; i < dev->queue_count; i++) {
-               q = dev->queuelist[i];
-               atomic_inc(&q->use_count);
-               seq_printf(m,   "%5d/0x%03x %5d %5d"
-                          " %5d/%c%c/%c%c%c %5Zd\n",
-                          i,
-                          q->flags,
-                          atomic_read(&q->use_count),
-                          atomic_read(&q->finalization),
-                          atomic_read(&q->block_count),
-                          atomic_read(&q->block_read) ? 'r' : '-',
-                          atomic_read(&q->block_write) ? 'w' : '-',
-                          waitqueue_active(&q->read_queue) ? 'r' : '-',
-                          waitqueue_active(&q->write_queue) ? 'w' : '-',
-                          waitqueue_active(&q->flush_queue) ? 'f' : '-',
-                          DRM_BUFCOUNT(&q->waitlist));
-               atomic_dec(&q->use_count);
-       }
-       mutex_unlock(&dev->struct_mutex);
-       return 0;
-}
-
 /**
  * Called when "/proc/dri/.../bufs" is read.
  */
index fff87221f9e973aef715391366293a4b784a0a13..371c695322d9f8f1736510eeaeeab7ea153cbe9e 100644 (file)
@@ -53,7 +53,6 @@ static struct drm_info_list drm_proc_list[] = {
        {"name", drm_name_info, 0},
        {"vm", drm_vm_info, 0},
        {"clients", drm_clients_info, 0},
-       {"queues", drm_queues_info, 0},
        {"bufs", drm_bufs_info, 0},
        {"gem_names", drm_gem_name_info, DRIVER_GEM},
 #if DRM_DEBUG_CODE
index 053f1ee58393a885e6aff3d1b8e9c5de8f7c5cf5..f9924ad04d0993d5d6157918082b9d4d5d3ed604 100644 (file)
@@ -57,7 +57,7 @@ static const struct file_operations i810_driver_fops = {
 static struct drm_driver driver = {
        .driver_features =
            DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR |
-           DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE,
+           DRIVER_HAVE_DMA,
        .dev_priv_size = sizeof(drm_i810_buf_priv_t),
        .load = i810_driver_load,
        .lastclose = i810_driver_lastclose,
index 022db5a768aa31acace2b4689a6757632988e97c..d6b67bb9075f21b5782013b500ed6de52cdf4f68 100644 (file)
@@ -348,7 +348,6 @@ struct drm_buf {
        struct drm_buf *next;          /**< Kernel-only: used for free list */
        __volatile__ int waiting;      /**< On kernel DMA queue */
        __volatile__ int pending;      /**< On hardware DMA queue */
-       wait_queue_head_t dma_wait;    /**< Processes waiting */
        struct drm_file *file_priv;    /**< Private of holding file descr */
        int context;                   /**< Kernel queue for this buffer */
        int while_locked;              /**< Dispatch this buffer while locked */
@@ -1102,12 +1101,8 @@ struct drm_device {
 
        /*@} */
 
-       /** \name DMA queues (contexts) */
+       /** \name DMA support */
        /*@{ */
-       int queue_count;                /**< Number of active DMA queues */
-       int queue_reserved;               /**< Number of reserved DMA queues */
-       int queue_slots;                /**< Actual length of queuelist */
-       struct drm_queue **queuelist;   /**< Vector of pointers to DMA queues */
        struct drm_device_dma *dma;             /**< Optional pointer for DMA support */
        /*@} */
 
@@ -1534,7 +1529,6 @@ extern int drm_debugfs_cleanup(struct drm_minor *minor);
                                /* Info file support */
 extern int drm_name_info(struct seq_file *m, void *data);
 extern int drm_vm_info(struct seq_file *m, void *data);
-extern int drm_queues_info(struct seq_file *m, void *data);
 extern int drm_bufs_info(struct seq_file *m, void *data);
 extern int drm_vblank_info(struct seq_file *m, void *data);
 extern int drm_clients_info(struct seq_file *m, void* data);