/[linux-patches]/genpatches-2.6/historical/2.6.10/1100_drm-dos-fix.patch
Gentoo

Contents of /genpatches-2.6/historical/2.6.10/1100_drm-dos-fix.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download) (as text)
Sat Jun 11 23:16:54 2005 UTC (15 years ago) by dsd
File MIME type: text/x-diff
File size: 8458 byte(s)
Import historical releases
1 diff -ur linux-2.6.9/drivers/char/drm/i810_dma.c linux-2.6.9.drm.plasmaroo/drivers/char/drm/i810_dma.c
2 --- linux-2.6.9/drivers/char/drm/i810_dma.c 2004-10-18 22:53:46.000000000 +0100
3 +++ linux-2.6.9.drm.plasmaroo/drivers/char/drm/i810_dma.c 2004-12-19 22:46:33.317446112 +0000
4 @@ -1030,10 +1030,7 @@
5 drm_file_t *priv = filp->private_data;
6 drm_device_t *dev = priv->dev;
7
8 - if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
9 - DRM_ERROR("i810_flush_ioctl called without lock held\n");
10 - return -EINVAL;
11 - }
12 + LOCK_TEST_WITH_RETURN( dev, filp );
13
14 i810_flush_queue(dev);
15 return 0;
16 @@ -1055,10 +1052,7 @@
17 if (copy_from_user(&vertex, (drm_i810_vertex_t __user *)arg, sizeof(vertex)))
18 return -EFAULT;
19
20 - if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
21 - DRM_ERROR("i810_dma_vertex called without lock held\n");
22 - return -EINVAL;
23 - }
24 + LOCK_TEST_WITH_RETURN( dev, filp );
25
26 DRM_DEBUG("i810 dma vertex, idx %d used %d discard %d\n",
27 vertex.idx, vertex.used, vertex.discard);
28 @@ -1090,10 +1084,7 @@
29 if (copy_from_user(&clear, (drm_i810_clear_t __user *)arg, sizeof(clear)))
30 return -EFAULT;
31
32 - if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
33 - DRM_ERROR("i810_clear_bufs called without lock held\n");
34 - return -EINVAL;
35 - }
36 + LOCK_TEST_WITH_RETURN( dev, filp );
37
38 /* GH: Someone's doing nasty things... */
39 if (!dev->dev_private) {
40 @@ -1114,10 +1105,8 @@
41
42 DRM_DEBUG("i810_swap_bufs\n");
43
44 - if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
45 - DRM_ERROR("i810_swap_buf called without lock held\n");
46 - return -EINVAL;
47 - }
48 +
49 + LOCK_TEST_WITH_RETURN( dev, filp );
50
51 i810_dma_dispatch_swap( dev );
52 return 0;
53 @@ -1152,10 +1141,7 @@
54 if (copy_from_user(&d, (drm_i810_dma_t __user *)arg, sizeof(d)))
55 return -EFAULT;
56
57 - if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
58 - DRM_ERROR("i810_dma called without lock held\n");
59 - return -EINVAL;
60 - }
61 + LOCK_TEST_WITH_RETURN( dev, filp );
62
63 d.granted = 0;
64
65 @@ -1266,10 +1252,7 @@
66 return -EFAULT;
67
68
69 - if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
70 - DRM_ERROR("i810_dma_mc called without lock held\n");
71 - return -EINVAL;
72 - }
73 + LOCK_TEST_WITH_RETURN( dev, filp );
74
75 if (mc.idx >= dma->buf_count || mc.idx < 0)
76 return -EINVAL;
77 @@ -1317,10 +1300,7 @@
78 drm_device_t *dev = priv->dev;
79 drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private;
80
81 - if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
82 - DRM_ERROR("i810_fstatus called without lock held\n");
83 - return -EINVAL;
84 - }
85 + LOCK_TEST_WITH_RETURN( dev, filp );
86 return I810_READ(0x30008);
87 }
88
89 @@ -1331,10 +1311,7 @@
90 drm_device_t *dev = priv->dev;
91 drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private;
92
93 - if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
94 - DRM_ERROR("i810_ov0_flip called without lock held\n");
95 - return -EINVAL;
96 - }
97 + LOCK_TEST_WITH_RETURN( dev, filp );
98
99 //Tell the overlay to update
100 I810_WRITE(0x30000,dev_priv->overlay_physical | 0x80000000);
101 @@ -1376,10 +1353,7 @@
102
103 DRM_DEBUG("%s\n", __FUNCTION__);
104
105 - if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
106 - DRM_ERROR("i810_flip_buf called without lock held\n");
107 - return -EINVAL;
108 - }
109 + LOCK_TEST_WITH_RETURN( dev, filp );
110
111 if (!dev_priv->page_flipping)
112 i810_do_init_pageflip( dev );
113 diff -ur linux-2.6.9/drivers/char/drm/i830_dma.c linux-2.6.9.drm.plasmaroo/drivers/char/drm/i830_dma.c
114 --- linux-2.6.9/drivers/char/drm/i830_dma.c 2004-10-18 22:53:12.000000000 +0100
115 +++ linux-2.6.9.drm.plasmaroo/drivers/char/drm/i830_dma.c 2004-12-19 22:46:33.319445808 +0000
116 @@ -1319,10 +1319,7 @@
117 drm_file_t *priv = filp->private_data;
118 drm_device_t *dev = priv->dev;
119
120 - if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
121 - DRM_ERROR("i830_flush_ioctl called without lock held\n");
122 - return -EINVAL;
123 - }
124 + LOCK_TEST_WITH_RETURN( dev, filp );
125
126 i830_flush_queue(dev);
127 return 0;
128 @@ -1343,10 +1340,7 @@
129 if (copy_from_user(&vertex, (drm_i830_vertex_t __user *)arg, sizeof(vertex)))
130 return -EFAULT;
131
132 - if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
133 - DRM_ERROR("i830_dma_vertex called without lock held\n");
134 - return -EINVAL;
135 - }
136 + LOCK_TEST_WITH_RETURN( dev, filp );
137
138 DRM_DEBUG("i830 dma vertex, idx %d used %d discard %d\n",
139 vertex.idx, vertex.used, vertex.discard);
140 @@ -1373,10 +1367,7 @@
141 if (copy_from_user(&clear, (drm_i830_clear_t __user *)arg, sizeof(clear)))
142 return -EFAULT;
143
144 - if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
145 - DRM_ERROR("i830_clear_bufs called without lock held\n");
146 - return -EINVAL;
147 - }
148 + LOCK_TEST_WITH_RETURN( dev, filp );
149
150 /* GH: Someone's doing nasty things... */
151 if (!dev->dev_private) {
152 @@ -1398,10 +1389,7 @@
153
154 DRM_DEBUG("i830_swap_bufs\n");
155
156 - if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
157 - DRM_ERROR("i830_swap_buf called without lock held\n");
158 - return -EINVAL;
159 - }
160 + LOCK_TEST_WITH_RETURN( dev, filp );
161
162 i830_dma_dispatch_swap( dev );
163 return 0;
164 @@ -1442,10 +1430,7 @@
165
166 DRM_DEBUG("%s\n", __FUNCTION__);
167
168 - if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
169 - DRM_ERROR("i830_flip_buf called without lock held\n");
170 - return -EINVAL;
171 - }
172 + LOCK_TEST_WITH_RETURN( dev, filp );
173
174 if (!dev_priv->page_flipping)
175 i830_do_init_pageflip( dev );
176 @@ -1484,10 +1469,7 @@
177 if (copy_from_user(&d, (drm_i830_dma_t __user *)arg, sizeof(d)))
178 return -EFAULT;
179
180 - if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
181 - DRM_ERROR("i830_dma called without lock held\n");
182 - return -EINVAL;
183 - }
184 + LOCK_TEST_WITH_RETURN( dev, filp );
185
186 d.granted = 0;
187
188 diff -ur linux-2.6.9/drivers/char/drm/i830_irq.c linux-2.6.9.drm.plasmaroo/drivers/char/drm/i830_irq.c
189 --- linux-2.6.9/drivers/char/drm/i830_irq.c 2004-10-18 22:54:54.000000000 +0100
190 +++ linux-2.6.9.drm.plasmaroo/drivers/char/drm/i830_irq.c 2004-12-19 22:46:33.320445656 +0000
191 @@ -129,10 +129,7 @@
192 drm_i830_irq_emit_t emit;
193 int result;
194
195 - if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
196 - DRM_ERROR("i830_irq_emit called without lock held\n");
197 - return -EINVAL;
198 - }
199 + LOCK_TEST_WITH_RETURN( dev, filp );
200
201 if ( !dev_priv ) {
202 DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
203 diff -ur linux-2.6.9/drivers/char/drm/i915_dma.c linux-2.6.9.drm.plasmaroo/drivers/char/drm/i915_dma.c
204 --- linux-2.6.9/drivers/char/drm/i915_dma.c 2004-10-18 22:53:51.000000000 +0100
205 +++ linux-2.6.9.drm.plasmaroo/drivers/char/drm/i915_dma.c 2004-12-19 22:46:33.321445504 +0000
206 @@ -545,10 +545,7 @@
207 {
208 DRM_DEVICE;
209
210 - if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
211 - DRM_ERROR("i915_flush_ioctl called without lock held\n");
212 - return DRM_ERR(EINVAL);
213 - }
214 + LOCK_TEST_WITH_RETURN( dev, filp );
215
216 return i915_quiescent(dev);
217 }
218 @@ -574,10 +571,7 @@
219 DRM_DEBUG("i915 batchbuffer, start %x used %d cliprects %d\n",
220 batch.start, batch.used, batch.num_cliprects);
221
222 - if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
223 - DRM_ERROR("i915_batchbuffer called without lock held\n");
224 - return DRM_ERR(EINVAL);
225 - }
226 + LOCK_TEST_WITH_RETURN( dev, filp );
227
228 if (batch.num_cliprects && DRM_VERIFYAREA_READ(batch.cliprects,
229 batch.num_cliprects *
230 @@ -606,10 +600,7 @@
231 DRM_DEBUG("i915 cmdbuffer, buf %p sz %d cliprects %d\n",
232 cmdbuf.buf, cmdbuf.sz, cmdbuf.num_cliprects);
233
234 - if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
235 - DRM_ERROR("i915_cmdbuffer called without lock held\n");
236 - return DRM_ERR(EINVAL);
237 - }
238 + LOCK_TEST_WITH_RETURN( dev, filp );
239
240 if (cmdbuf.num_cliprects &&
241 DRM_VERIFYAREA_READ(cmdbuf.cliprects,
242 @@ -645,10 +636,7 @@
243 DRM_DEVICE;
244
245 DRM_DEBUG("%s\n", __FUNCTION__);
246 - if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
247 - DRM_ERROR("i915_flip_buf called without lock held\n");
248 - return DRM_ERR(EINVAL);
249 - }
250 + LOCK_TEST_WITH_RETURN( dev, filp );
251
252 return i915_dispatch_flip(dev);
253 }
254 diff -ur linux-2.6.9/drivers/char/drm/i915_irq.c linux-2.6.9.drm.plasmaroo/drivers/char/drm/i915_irq.c
255 --- linux-2.6.9/drivers/char/drm/i915_irq.c 2004-10-18 22:53:51.000000000 +0100
256 +++ linux-2.6.9.drm.plasmaroo/drivers/char/drm/i915_irq.c 2004-12-19 22:46:33.321445504 +0000
257 @@ -92,10 +92,7 @@
258 drm_i915_irq_emit_t emit;
259 int result;
260
261 - if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
262 - DRM_ERROR("i915_irq_emit called without lock held\n");
263 - return DRM_ERR(EINVAL);
264 - }
265 + LOCK_TEST_WITH_RETURN( dev, filp );
266
267 if (!dev_priv) {
268 DRM_ERROR("%s called with no initialization\n", __FUNCTION__);

  ViewVC Help
Powered by ViewVC 1.1.20