aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2006-01-03 02:18:01 -0500
committerDave Airlie <airlied@linux.ie>2006-01-03 02:18:01 -0500
commit97f2aab6698f3ab2552c41c1024a65ffd0763a6d (patch)
treebb6e3b2949459f54f884c710fc74d40eef00d834 /drivers/char/drm
parentd985c1088146607532093d9eaaaf99758f6a4d21 (diff)
parent88026842b0a760145aa71d69e74fbc9ec118ca44 (diff)
drm: merge in Linus mainline
Diffstat (limited to 'drivers/char/drm')
-rw-r--r--drivers/char/drm/drm_lock.c11
-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.h1
5 files changed, 11 insertions, 7 deletions
diff --git a/drivers/char/drm/drm_lock.c b/drivers/char/drm/drm_lock.c
index f970dc36c18f..f9e45303498d 100644
--- a/drivers/char/drm/drm_lock.c
+++ b/drivers/char/drm/drm_lock.c
@@ -104,8 +104,9 @@ 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" ); 107 DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
108 if (ret) return ret; 108 if (ret)
109 return ret;
109 110
110 sigemptyset(&dev->sigmask); 111 sigemptyset(&dev->sigmask);
111 sigaddset(&dev->sigmask, SIGSTOP); 112 sigaddset(&dev->sigmask, SIGSTOP);
@@ -121,17 +122,19 @@ int drm_lock(struct inode *inode, struct file *filp,
121 122
122 if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) { 123 if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) {
123 if (dev->driver->dma_quiescent(dev)) { 124 if (dev->driver->dma_quiescent(dev)) {
124 DRM_DEBUG( "%d waiting for DMA quiescent\n", lock.context); 125 DRM_DEBUG("%d waiting for DMA quiescent\n", lock.context);
125 return DRM_ERR(EBUSY); 126 return DRM_ERR(EBUSY);
126 } 127 }
127 } 128 }
128 129
130 /* dev->driver->kernel_context_switch isn't used by any of the x86
131 * drivers but is used by the Sparc driver.
132 */
129 if (dev->driver->kernel_context_switch && 133 if (dev->driver->kernel_context_switch &&
130 dev->last_context != lock.context) { 134 dev->last_context != lock.context) {
131 dev->driver->kernel_context_switch(dev, dev->last_context, 135 dev->driver->kernel_context_switch(dev, dev->last_context,
132 lock.context); 136 lock.context);
133 } 137 }
134
135 return 0; 138 return 0;
136} 139}
137 140
diff --git a/drivers/char/drm/drm_memory.c b/drivers/char/drm/drm_memory.c
index 7438741c29e9..8074771e348f 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 706b75251ea1..e84605fc54af 100644
--- a/drivers/char/drm/drm_memory_debug.h
+++ b/drivers/char/drm/drm_memory_debug.h
@@ -220,7 +220,7 @@ unsigned long drm_alloc_pages (int order, int area) {
220 } 220 }
221 spin_unlock(&drm_mem_lock); 221 spin_unlock(&drm_mem_lock);
222 222
223 address = __get_free_pages(GFP_KERNEL, order); 223 address = __get_free_pages(GFP_KERNEL|__GFP_COMP, order);
224 if (!address) { 224 if (!address) {
225 spin_lock(&drm_mem_lock); 225 spin_lock(&drm_mem_lock);
226 ++drm_mem_stats[area].fail_count; 226 ++drm_mem_stats[area].fail_count;
diff --git a/drivers/char/drm/mga_drv.c b/drivers/char/drm/mga_drv.c
index 93f171e634c0..9f7ed0e0351b 100644
--- a/drivers/char/drm/mga_drv.c
+++ b/drivers/char/drm/mga_drv.c
@@ -131,7 +131,7 @@ static int mga_driver_device_is_agp(drm_device_t * dev)
131 * device. 131 * device.
132 */ 132 */
133 133
134 if ((pdev->device == 0x0525) 134 if ((pdev->device == 0x0525) && pdev->bus->self
135 && (pdev->bus->self->vendor == 0x3388) 135 && (pdev->bus->self->vendor == 0x3388)
136 && (pdev->bus->self->device == 0x0021)) { 136 && (pdev->bus->self->device == 0x0021)) {
137 return 0; 137 return 0;
diff --git a/drivers/char/drm/radeon_drv.h b/drivers/char/drm/radeon_drv.h
index 498b19b1d641..fac0d5196ce3 100644
--- a/drivers/char/drm/radeon_drv.h
+++ b/drivers/char/drm/radeon_drv.h
@@ -273,6 +273,7 @@ typedef struct drm_radeon_private {
273 273
274 /* starting from here on, data is preserved accross an open */ 274 /* starting from here on, data is preserved accross an open */
275 uint32_t flags; /* see radeon_chip_flags */ 275 uint32_t flags; /* see radeon_chip_flags */
276 int is_pci;
276} drm_radeon_private_t; 277} drm_radeon_private_t;
277 278
278typedef struct drm_radeon_buf_priv { 279typedef struct drm_radeon_buf_priv {