diff options
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/drm_bufs.c | 16 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_debugfs.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_dma.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_fops.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_info.c | 36 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_proc.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i810/i810_drv.c | 2 |
8 files changed, 3 insertions, 73 deletions
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c index 348b367debeb..b356c719f2f1 100644 --- a/drivers/gpu/drm/drm_bufs.c +++ b/drivers/gpu/drm/drm_bufs.c | |||
@@ -641,8 +641,6 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request) | |||
641 | 641 | ||
642 | if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER) | 642 | if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER) |
643 | return -EINVAL; | 643 | return -EINVAL; |
644 | if (dev->queue_count) | ||
645 | return -EBUSY; /* Not while in use */ | ||
646 | 644 | ||
647 | /* Make sure buffers are located in AGP memory that we own */ | 645 | /* Make sure buffers are located in AGP memory that we own */ |
648 | valid = 0; | 646 | valid = 0; |
@@ -704,7 +702,6 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request) | |||
704 | buf->next = NULL; | 702 | buf->next = NULL; |
705 | buf->waiting = 0; | 703 | buf->waiting = 0; |
706 | buf->pending = 0; | 704 | buf->pending = 0; |
707 | init_waitqueue_head(&buf->dma_wait); | ||
708 | buf->file_priv = NULL; | 705 | buf->file_priv = NULL; |
709 | 706 | ||
710 | buf->dev_priv_size = dev->driver->dev_priv_size; | 707 | 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) | |||
796 | order = drm_order(request->size); | 793 | order = drm_order(request->size); |
797 | size = 1 << order; | 794 | size = 1 << order; |
798 | 795 | ||
799 | DRM_DEBUG("count=%d, size=%d (%d), order=%d, queue_count=%d\n", | 796 | DRM_DEBUG("count=%d, size=%d (%d), order=%d\n", |
800 | request->count, request->size, size, order, dev->queue_count); | 797 | request->count, request->size, size, order); |
801 | 798 | ||
802 | if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER) | 799 | if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER) |
803 | return -EINVAL; | 800 | return -EINVAL; |
804 | if (dev->queue_count) | ||
805 | return -EBUSY; /* Not while in use */ | ||
806 | 801 | ||
807 | alignment = (request->flags & _DRM_PAGE_ALIGN) | 802 | alignment = (request->flags & _DRM_PAGE_ALIGN) |
808 | ? PAGE_ALIGN(size) : size; | 803 | ? PAGE_ALIGN(size) : size; |
@@ -904,7 +899,6 @@ int drm_addbufs_pci(struct drm_device * dev, struct drm_buf_desc * request) | |||
904 | buf->next = NULL; | 899 | buf->next = NULL; |
905 | buf->waiting = 0; | 900 | buf->waiting = 0; |
906 | buf->pending = 0; | 901 | buf->pending = 0; |
907 | init_waitqueue_head(&buf->dma_wait); | ||
908 | buf->file_priv = NULL; | 902 | buf->file_priv = NULL; |
909 | 903 | ||
910 | buf->dev_priv_size = dev->driver->dev_priv_size; | 904 | 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 | |||
1019 | 1013 | ||
1020 | if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER) | 1014 | if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER) |
1021 | return -EINVAL; | 1015 | return -EINVAL; |
1022 | if (dev->queue_count) | ||
1023 | return -EBUSY; /* Not while in use */ | ||
1024 | 1016 | ||
1025 | spin_lock(&dev->count_lock); | 1017 | spin_lock(&dev->count_lock); |
1026 | if (dev->buf_use) { | 1018 | if (dev->buf_use) { |
@@ -1071,7 +1063,6 @@ static int drm_addbufs_sg(struct drm_device * dev, struct drm_buf_desc * request | |||
1071 | buf->next = NULL; | 1063 | buf->next = NULL; |
1072 | buf->waiting = 0; | 1064 | buf->waiting = 0; |
1073 | buf->pending = 0; | 1065 | buf->pending = 0; |
1074 | init_waitqueue_head(&buf->dma_wait); | ||
1075 | buf->file_priv = NULL; | 1066 | buf->file_priv = NULL; |
1076 | 1067 | ||
1077 | buf->dev_priv_size = dev->driver->dev_priv_size; | 1068 | 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 | |||
1177 | 1168 | ||
1178 | if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER) | 1169 | if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER) |
1179 | return -EINVAL; | 1170 | return -EINVAL; |
1180 | if (dev->queue_count) | ||
1181 | return -EBUSY; /* Not while in use */ | ||
1182 | 1171 | ||
1183 | spin_lock(&dev->count_lock); | 1172 | spin_lock(&dev->count_lock); |
1184 | if (dev->buf_use) { | 1173 | if (dev->buf_use) { |
@@ -1228,7 +1217,6 @@ static int drm_addbufs_fb(struct drm_device * dev, struct drm_buf_desc * request | |||
1228 | buf->next = NULL; | 1217 | buf->next = NULL; |
1229 | buf->waiting = 0; | 1218 | buf->waiting = 0; |
1230 | buf->pending = 0; | 1219 | buf->pending = 0; |
1231 | init_waitqueue_head(&buf->dma_wait); | ||
1232 | buf->file_priv = NULL; | 1220 | buf->file_priv = NULL; |
1233 | 1221 | ||
1234 | buf->dev_priv_size = dev->driver->dev_priv_size; | 1222 | buf->dev_priv_size = dev->driver->dev_priv_size; |
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c index 1c7a1c0d3edd..70b13fc19396 100644 --- a/drivers/gpu/drm/drm_debugfs.c +++ b/drivers/gpu/drm/drm_debugfs.c | |||
@@ -46,7 +46,6 @@ static struct drm_info_list drm_debugfs_list[] = { | |||
46 | {"name", drm_name_info, 0}, | 46 | {"name", drm_name_info, 0}, |
47 | {"vm", drm_vm_info, 0}, | 47 | {"vm", drm_vm_info, 0}, |
48 | {"clients", drm_clients_info, 0}, | 48 | {"clients", drm_clients_info, 0}, |
49 | {"queues", drm_queues_info, 0}, | ||
50 | {"bufs", drm_bufs_info, 0}, | 49 | {"bufs", drm_bufs_info, 0}, |
51 | {"gem_names", drm_gem_name_info, DRIVER_GEM}, | 50 | {"gem_names", drm_gem_name_info, DRIVER_GEM}, |
52 | #if DRM_DEBUG_CODE | 51 | #if DRM_DEBUG_CODE |
diff --git a/drivers/gpu/drm/drm_dma.c b/drivers/gpu/drm/drm_dma.c index cfb4e333ec0f..08f5e5309b22 100644 --- a/drivers/gpu/drm/drm_dma.c +++ b/drivers/gpu/drm/drm_dma.c | |||
@@ -120,11 +120,6 @@ void drm_free_buffer(struct drm_device *dev, struct drm_buf * buf) | |||
120 | buf->pending = 0; | 120 | buf->pending = 0; |
121 | buf->file_priv = NULL; | 121 | buf->file_priv = NULL; |
122 | buf->used = 0; | 122 | buf->used = 0; |
123 | |||
124 | if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE) | ||
125 | && waitqueue_active(&buf->dma_wait)) { | ||
126 | wake_up_interruptible(&buf->dma_wait); | ||
127 | } | ||
128 | } | 123 | } |
129 | 124 | ||
130 | /** | 125 | /** |
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 946bd91c57ec..9238de4009fa 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c | |||
@@ -182,7 +182,6 @@ static struct drm_ioctl_desc drm_ioctls[] = { | |||
182 | int drm_lastclose(struct drm_device * dev) | 182 | int drm_lastclose(struct drm_device * dev) |
183 | { | 183 | { |
184 | struct drm_vma_entry *vma, *vma_temp; | 184 | struct drm_vma_entry *vma, *vma_temp; |
185 | int i; | ||
186 | 185 | ||
187 | DRM_DEBUG("\n"); | 186 | DRM_DEBUG("\n"); |
188 | 187 | ||
@@ -228,16 +227,6 @@ int drm_lastclose(struct drm_device * dev) | |||
228 | kfree(vma); | 227 | kfree(vma); |
229 | } | 228 | } |
230 | 229 | ||
231 | if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE) && dev->queuelist) { | ||
232 | for (i = 0; i < dev->queue_count; i++) { | ||
233 | kfree(dev->queuelist[i]); | ||
234 | dev->queuelist[i] = NULL; | ||
235 | } | ||
236 | kfree(dev->queuelist); | ||
237 | dev->queuelist = NULL; | ||
238 | } | ||
239 | dev->queue_count = 0; | ||
240 | |||
241 | if (drm_core_check_feature(dev, DRIVER_HAVE_DMA) && | 230 | if (drm_core_check_feature(dev, DRIVER_HAVE_DMA) && |
242 | !drm_core_check_feature(dev, DRIVER_MODESET)) | 231 | !drm_core_check_feature(dev, DRIVER_MODESET)) |
243 | drm_dma_takedown(dev); | 232 | drm_dma_takedown(dev); |
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index 96b8c8f9c028..c6f5f8951482 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c | |||
@@ -75,10 +75,6 @@ static int drm_setup(struct drm_device * dev) | |||
75 | 75 | ||
76 | dev->sigdata.lock = NULL; | 76 | dev->sigdata.lock = NULL; |
77 | 77 | ||
78 | dev->queue_count = 0; | ||
79 | dev->queue_reserved = 0; | ||
80 | dev->queue_slots = 0; | ||
81 | dev->queuelist = NULL; | ||
82 | dev->context_flag = 0; | 78 | dev->context_flag = 0; |
83 | dev->interrupt_flag = 0; | 79 | dev->interrupt_flag = 0; |
84 | dev->dma_flag = 0; | 80 | dev->dma_flag = 0; |
diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c index 4076a33e5cad..8928edbb94c7 100644 --- a/drivers/gpu/drm/drm_info.c +++ b/drivers/gpu/drm/drm_info.c | |||
@@ -110,42 +110,6 @@ int drm_vm_info(struct seq_file *m, void *data) | |||
110 | } | 110 | } |
111 | 111 | ||
112 | /** | 112 | /** |
113 | * Called when "/proc/dri/.../queues" is read. | ||
114 | */ | ||
115 | int drm_queues_info(struct seq_file *m, void *data) | ||
116 | { | ||
117 | struct drm_info_node *node = (struct drm_info_node *) m->private; | ||
118 | struct drm_device *dev = node->minor->dev; | ||
119 | int i; | ||
120 | struct drm_queue *q; | ||
121 | |||
122 | mutex_lock(&dev->struct_mutex); | ||
123 | seq_printf(m, " ctx/flags use fin" | ||
124 | " blk/rw/rwf wait flushed queued" | ||
125 | " locks\n\n"); | ||
126 | for (i = 0; i < dev->queue_count; i++) { | ||
127 | q = dev->queuelist[i]; | ||
128 | atomic_inc(&q->use_count); | ||
129 | seq_printf(m, "%5d/0x%03x %5d %5d" | ||
130 | " %5d/%c%c/%c%c%c %5Zd\n", | ||
131 | i, | ||
132 | q->flags, | ||
133 | atomic_read(&q->use_count), | ||
134 | atomic_read(&q->finalization), | ||
135 | atomic_read(&q->block_count), | ||
136 | atomic_read(&q->block_read) ? 'r' : '-', | ||
137 | atomic_read(&q->block_write) ? 'w' : '-', | ||
138 | waitqueue_active(&q->read_queue) ? 'r' : '-', | ||
139 | waitqueue_active(&q->write_queue) ? 'w' : '-', | ||
140 | waitqueue_active(&q->flush_queue) ? 'f' : '-', | ||
141 | DRM_BUFCOUNT(&q->waitlist)); | ||
142 | atomic_dec(&q->use_count); | ||
143 | } | ||
144 | mutex_unlock(&dev->struct_mutex); | ||
145 | return 0; | ||
146 | } | ||
147 | |||
148 | /** | ||
149 | * Called when "/proc/dri/.../bufs" is read. | 113 | * Called when "/proc/dri/.../bufs" is read. |
150 | */ | 114 | */ |
151 | int drm_bufs_info(struct seq_file *m, void *data) | 115 | int drm_bufs_info(struct seq_file *m, void *data) |
diff --git a/drivers/gpu/drm/drm_proc.c b/drivers/gpu/drm/drm_proc.c index fff87221f9e9..371c695322d9 100644 --- a/drivers/gpu/drm/drm_proc.c +++ b/drivers/gpu/drm/drm_proc.c | |||
@@ -53,7 +53,6 @@ static struct drm_info_list drm_proc_list[] = { | |||
53 | {"name", drm_name_info, 0}, | 53 | {"name", drm_name_info, 0}, |
54 | {"vm", drm_vm_info, 0}, | 54 | {"vm", drm_vm_info, 0}, |
55 | {"clients", drm_clients_info, 0}, | 55 | {"clients", drm_clients_info, 0}, |
56 | {"queues", drm_queues_info, 0}, | ||
57 | {"bufs", drm_bufs_info, 0}, | 56 | {"bufs", drm_bufs_info, 0}, |
58 | {"gem_names", drm_gem_name_info, DRIVER_GEM}, | 57 | {"gem_names", drm_gem_name_info, DRIVER_GEM}, |
59 | #if DRM_DEBUG_CODE | 58 | #if DRM_DEBUG_CODE |
diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c index 053f1ee58393..f9924ad04d09 100644 --- a/drivers/gpu/drm/i810/i810_drv.c +++ b/drivers/gpu/drm/i810/i810_drv.c | |||
@@ -57,7 +57,7 @@ static const struct file_operations i810_driver_fops = { | |||
57 | static struct drm_driver driver = { | 57 | static struct drm_driver driver = { |
58 | .driver_features = | 58 | .driver_features = |
59 | DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | | 59 | DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | |
60 | DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE, | 60 | DRIVER_HAVE_DMA, |
61 | .dev_priv_size = sizeof(drm_i810_buf_priv_t), | 61 | .dev_priv_size = sizeof(drm_i810_buf_priv_t), |
62 | .load = i810_driver_load, | 62 | .load = i810_driver_load, |
63 | .lastclose = i810_driver_lastclose, | 63 | .lastclose = i810_driver_lastclose, |