aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/agp/amd64-agp.c4
-rw-r--r--drivers/char/agp/backend.c2
-rw-r--r--drivers/char/agp/via-agp.c6
-rw-r--r--drivers/char/drm/drm_lock.c16
-rw-r--r--drivers/char/drm/drm_memory.c2
-rw-r--r--drivers/char/drm/drm_memory_debug.h2
-rw-r--r--drivers/char/drm/mga_drv.c2
-rw-r--r--drivers/char/drm/radeon_drv.h3
8 files changed, 24 insertions, 13 deletions
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 76589782adcb..810679dcbbb0 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -416,7 +416,7 @@ static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data
416} 416}
417 417
418 418
419static struct aper_size_info_32 uli_sizes[7] = 419static const struct aper_size_info_32 uli_sizes[7] =
420{ 420{
421 {256, 65536, 6, 10}, 421 {256, 65536, 6, 10},
422 {128, 32768, 5, 9}, 422 {128, 32768, 5, 9},
@@ -470,7 +470,7 @@ static int __devinit uli_agp_init(struct pci_dev *pdev)
470} 470}
471 471
472 472
473static struct aper_size_info_32 nforce3_sizes[5] = 473static const struct aper_size_info_32 nforce3_sizes[5] =
474{ 474{
475 {512, 131072, 7, 0x00000000 }, 475 {512, 131072, 7, 0x00000000 },
476 {256, 65536, 6, 0x00000008 }, 476 {256, 65536, 6, 0x00000008 },
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c
index 27bca34b4a65..80ee17a8fc23 100644
--- a/drivers/char/agp/backend.c
+++ b/drivers/char/agp/backend.c
@@ -97,7 +97,7 @@ void agp_backend_release(struct agp_bridge_data *bridge)
97EXPORT_SYMBOL(agp_backend_release); 97EXPORT_SYMBOL(agp_backend_release);
98 98
99 99
100static struct { int mem, agp; } maxes_table[] = { 100static const struct { int mem, agp; } maxes_table[] = {
101 {0, 0}, 101 {0, 0},
102 {32, 4}, 102 {32, 4},
103 {64, 28}, 103 {64, 28},
diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c
index c847df575cf5..97b0a890ba7f 100644
--- a/drivers/char/agp/via-agp.c
+++ b/drivers/char/agp/via-agp.c
@@ -371,6 +371,11 @@ static struct agp_device_ids via_agp_device_ids[] __devinitdata =
371 .device_id = PCI_DEVICE_ID_VIA_3296_0, 371 .device_id = PCI_DEVICE_ID_VIA_3296_0,
372 .chipset_name = "P4M800", 372 .chipset_name = "P4M800",
373 }, 373 },
374 /* P4M800CE */
375 {
376 .device_id = PCI_DEVICE_ID_VIA_P4M800CE,
377 .chipset_name = "P4M800CE",
378 },
374 379
375 { }, /* dummy final entry, always present */ 380 { }, /* dummy final entry, always present */
376}; 381};
@@ -511,6 +516,7 @@ static struct pci_device_id agp_via_pci_table[] = {
511 ID(PCI_DEVICE_ID_VIA_3269_0), 516 ID(PCI_DEVICE_ID_VIA_3269_0),
512 ID(PCI_DEVICE_ID_VIA_83_87XX_1), 517 ID(PCI_DEVICE_ID_VIA_83_87XX_1),
513 ID(PCI_DEVICE_ID_VIA_3296_0), 518 ID(PCI_DEVICE_ID_VIA_3296_0),
519 ID(PCI_DEVICE_ID_VIA_P4M800CE),
514 { } 520 { }
515}; 521};
516 522
diff --git a/drivers/char/drm/drm_lock.c b/drivers/char/drm/drm_lock.c
index b276ae8a6633..b48a595d54ec 100644
--- a/drivers/char/drm/drm_lock.c
+++ b/drivers/char/drm/drm_lock.c
@@ -104,6 +104,10 @@ int drm_lock(struct inode *inode, struct file *filp,
104 __set_current_state(TASK_RUNNING); 104 __set_current_state(TASK_RUNNING);
105 remove_wait_queue(&dev->lock.lock_queue, &entry); 105 remove_wait_queue(&dev->lock.lock_queue, &entry);
106 106
107 DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
108 if (ret)
109 return ret;
110
107 sigemptyset(&dev->sigmask); 111 sigemptyset(&dev->sigmask);
108 sigaddset(&dev->sigmask, SIGSTOP); 112 sigaddset(&dev->sigmask, SIGSTOP);
109 sigaddset(&dev->sigmask, SIGTSTP); 113 sigaddset(&dev->sigmask, SIGTSTP);
@@ -116,8 +120,12 @@ int drm_lock(struct inode *inode, struct file *filp,
116 if (dev->driver->dma_ready && (lock.flags & _DRM_LOCK_READY)) 120 if (dev->driver->dma_ready && (lock.flags & _DRM_LOCK_READY))
117 dev->driver->dma_ready(dev); 121 dev->driver->dma_ready(dev);
118 122
119 if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) 123 if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) {
120 return dev->driver->dma_quiescent(dev); 124 if (dev->driver->dma_quiescent(dev)) {
125 DRM_DEBUG("%d waiting for DMA quiescent\n", lock.context);
126 return DRM_ERR(EBUSY);
127 }
128 }
121 129
122 /* dev->driver->kernel_context_switch isn't used by any of the x86 130 /* dev->driver->kernel_context_switch isn't used by any of the x86
123 * drivers but is used by the Sparc driver. 131 * drivers but is used by the Sparc driver.
@@ -128,9 +136,7 @@ int drm_lock(struct inode *inode, struct file *filp,
128 dev->driver->kernel_context_switch(dev, dev->last_context, 136 dev->driver->kernel_context_switch(dev, dev->last_context,
129 lock.context); 137 lock.context);
130 } 138 }
131 DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock"); 139 return 0;
132
133 return ret;
134} 140}
135 141
136/** 142/**
diff --git a/drivers/char/drm/drm_memory.c b/drivers/char/drm/drm_memory.c
index 2c74155aa84f..abef2acf99f5 100644
--- a/drivers/char/drm/drm_memory.c
+++ b/drivers/char/drm/drm_memory.c
@@ -95,7 +95,7 @@ unsigned long drm_alloc_pages(int order, int area)
95 unsigned long addr; 95 unsigned long addr;
96 unsigned int sz; 96 unsigned int sz;
97 97
98 address = __get_free_pages(GFP_KERNEL, order); 98 address = __get_free_pages(GFP_KERNEL|__GFP_COMP, order);
99 if (!address) 99 if (!address)
100 return 0; 100 return 0;
101 101
diff --git a/drivers/char/drm/drm_memory_debug.h b/drivers/char/drm/drm_memory_debug.h
index 4542353195bd..b370aca718d2 100644
--- a/drivers/char/drm/drm_memory_debug.h
+++ b/drivers/char/drm/drm_memory_debug.h
@@ -221,7 +221,7 @@ unsigned long DRM(alloc_pages) (int order, int area) {
221 } 221 }
222 spin_unlock(&DRM(mem_lock)); 222 spin_unlock(&DRM(mem_lock));
223 223
224 address = __get_free_pages(GFP_KERNEL, order); 224 address = __get_free_pages(GFP_KERNEL|__GFP_COMP, order);
225 if (!address) { 225 if (!address) {
226 spin_lock(&DRM(mem_lock)); 226 spin_lock(&DRM(mem_lock));
227 ++DRM(mem_stats)[area].fail_count; 227 ++DRM(mem_stats)[area].fail_count;
diff --git a/drivers/char/drm/mga_drv.c b/drivers/char/drm/mga_drv.c
index 0cc7c305a7f6..1713451a5cc6 100644
--- a/drivers/char/drm/mga_drv.c
+++ b/drivers/char/drm/mga_drv.c
@@ -161,7 +161,7 @@ static int mga_driver_device_is_agp(drm_device_t * dev)
161 * device. 161 * device.
162 */ 162 */
163 163
164 if ((pdev->device == 0x0525) 164 if ((pdev->device == 0x0525) && pdev->bus->self
165 && (pdev->bus->self->vendor == 0x3388) 165 && (pdev->bus->self->vendor == 0x3388)
166 && (pdev->bus->self->device == 0x0021)) { 166 && (pdev->bus->self->device == 0x0021)) {
167 return 0; 167 return 0;
diff --git a/drivers/char/drm/radeon_drv.h b/drivers/char/drm/radeon_drv.h
index 120ee5a8ebcc..7bda7e33d2bd 100644
--- a/drivers/char/drm/radeon_drv.h
+++ b/drivers/char/drm/radeon_drv.h
@@ -214,8 +214,6 @@ typedef struct drm_radeon_private {
214 214
215 int microcode_version; 215 int microcode_version;
216 216
217 int is_pci;
218
219 struct { 217 struct {
220 u32 boxes; 218 u32 boxes;
221 int freelist_timeouts; 219 int freelist_timeouts;
@@ -275,6 +273,7 @@ typedef struct drm_radeon_private {
275 273
276 /* starting from here on, data is preserved accross an open */ 274 /* starting from here on, data is preserved accross an open */
277 uint32_t flags; /* see radeon_chip_flags */ 275 uint32_t flags; /* see radeon_chip_flags */
276 int is_pci;
278} drm_radeon_private_t; 277} drm_radeon_private_t;
279 278
280typedef struct drm_radeon_buf_priv { 279typedef struct drm_radeon_buf_priv {