/[pkgs]/rpms/kernel/F-9/drm-modesetting-radeon.patch
ViewVC logotype

Contents of /rpms/kernel/F-9/drm-modesetting-radeon.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Mon Jan 12 19:54:17 2009 UTC (10 months, 1 week ago) by kyle
Branch: MAIN
CVS Tags: kernel-2_6_28-1_fc9, kernel-2_6_28-2_fc9, HEAD
File MIME type: text/x-patch
* Mon Jan 12 2009 Kyle McMartin <kyle@redhat.com>
- Rebase for Fedora 9.
- Turn off CONFIG_MAXSMP on x86_64.
1 commit 3ef2b914f9667c70a9711fa31ff95d639ccc8e2e
2 Author: Dave Airlie <airlied@redhat.com>
3 Date: Thu Dec 18 23:01:12 2008 +1000
4
5 drm: don't set cached bits on pages from uncached allocator.
6
7 This should make AGP no corrupt itself to all buggery
8 (cherry picked from commit 55c0a3f1d3693cb5c3b65f37d4bb6e8a3c025460)
9
10 commit be5f7447cc492545e225170be38e5e65d7de37d9
11 Author: Dave Airlie <airlied@redhat.com>
12 Date: Tue Dec 2 16:38:04 2008 +1000
13
14 drop old CS
15
16 commit 91bfed87127c1bd17098803184e43783d55f35e5
17 Author: Dave Airlie <airlied@redhat.com>
18 Date: Mon Dec 1 15:09:27 2008 +1000
19
20 radeon: update with latest CS bits
21
22 commit a7f6175e3610651b1f84a1b8aa1f61a9a4f3bdb6
23 Author: Dave Airlie <airlied@redhat.com>
24 Date: Wed Dec 17 06:56:36 2008 +1000
25
26 fixups post rebase
27
28 commit cd29f247278a5949956adbfb75229dc9bad19f8e
29 Author: Dave Airlie <airlied@redhat.com>
30 Date: Thu Dec 11 01:35:09 2008 +1000
31
32 radeon: fix agp mode when kms isn't enabled
33
34 commit 0d0f9c970263750a68131b5f88735c59f605c69f
35 Author: Dave Airlie <airlied@ppcg5.localdomain>
36 Date: Wed Dec 3 17:22:07 2008 +1100
37
38 radeon: add support for accessing disabled ROMs.
39
40 commit 840d823d6f33c1852b92791093b23b1ce7af25ac
41 Author: Dave Airlie <airlied@ppcg5.localdomain>
42 Date: Wed Dec 3 17:19:02 2008 +1100
43
44 radeon: make cail do pll read/write via actual PLL functions
45
46 commit 049d865d47cf229234cd7dd0ef8927a41a142b0e
47 Author: Dave Airlie <airlied@ppcg5.localdomain>
48 Date: Wed Dec 3 16:36:00 2008 +1100
49
50 radeon: atom fixes for endianness
51
52 commit df08dc63cbbd19a8ea0659bdc379147a59201b4c
53 Author: Dave Airlie <airlied@redhat.com>
54 Date: Wed Dec 3 20:28:05 2008 +1000
55
56 radeon: AGP fixes round 2.
57
58 More I can't believe its not AGP fixes.
59 Limit the AGP aperture to the GART size, and init the registers
60 in the right place
61
62 commit 79d6ac96108c29dbce90ce605b01dd6b71673092
63 Author: Dave Airlie <airlied@redhat.com>
64 Date: Tue Dec 2 12:49:17 2008 +1000
65
66 radeon: AGP fixes
67
68 1. Proper PCIE fallback on PCIE cards.
69 2. Setup agp base + location regs properly
70
71 commit e6a1353d11f485c99371e0b89c669da0c23e8af4
72 Author: Michal Schmidt <mschmidt@redhat.com>
73 Date: Tue Dec 2 08:06:59 2008 +1000
74
75 radeon: fix IGP GART calcs
76
77 fedora bz 473895
78
79 commit d879f36aca29ece7c3bfada452266e82df3f2392
80 Author: Dave Airlie <airlied@redhat.com>
81 Date: Thu Nov 27 17:14:40 2008 +1000
82
83 radeon: post any GPUs that aren't posted
84
85 commit d04c4750aba2b0bd306ab36a0002f2609ed6cc9a
86 Author: Dave Airlie <airlied@redhat.com>
87 Date: Mon Nov 24 15:18:31 2008 +1000
88
89 radeon: enable larger GART size on PCIE/IGP
90
91 Allocate a larger GART on PCIE and IGP chipsets controlled by the gart_size
92 command line option.
93
94 Default to 512MB gart.
95
96 commit ae7c33fa98bf4921292f6dffb6e60dd2b85cddfa
97 Author: Dave Airlie <airlied@redhat.com>
98 Date: Mon Nov 24 15:17:49 2008 +1000
99
100 radeon: add some missing feature checks for modesetting
101
102 commit 54fd140cc8c63d5c65fbcdf21259025fd8a431e8
103 Author: Dave Airlie <airlied@redhat.com>
104 Date: Mon Nov 24 11:41:06 2008 +1100
105
106 radeon: make rs480/rs690 gart invalidate work properly.
107
108 we really need to read back to make sure the invalidate has happened
109 before continuing along happily in life.
110
111 commit 5e418cef1bfca7e8e0821d6e44a1e1a78e015b17
112 Author: Dave Airlie <airlied@redhat.com>
113 Date: Sun Nov 23 19:19:02 2008 +1000
114
115 drm: we have discardable now so don't do special cases
116
117 commit 87e2de7aef77b96a8be3532358b6ceb9540d622a
118 Author: Dave Airlie <airlied@redhat.com>
119 Date: Fri Nov 21 14:52:25 2008 +1000
120
121 atom: fix bug in parser for MC reads
122
123 commit 52eccc11083a1c0636337520187a4e2cf9bfe989
124 Author: Dave Airlie <airlied@redhat.com>
125 Date: Mon Nov 17 18:14:28 2008 +1000
126
127 radeon: turn of VRAM zeroing by default for now - needs work
128
129 commit 7a32efbc88ed749c0cd44a95bb4888cd2bc806c0
130 Author: Dave Airlie <airlied@redhat.com>
131 Date: Mon Nov 17 09:03:36 2008 +1000
132
133 radeon: fix return value for no relocs
134
135 commit 5a47b4d8a97949288ebe8f2f3437637e405d1db8
136 Author: Dave Airlie <airlied@redhat.com>
137 Date: Mon Nov 17 09:03:01 2008 +1000
138
139 ttm: add discard for VRAM buffers
140
141 commit 160794bbbb90088a86acc96ca5268bc46255582d
142 Author: Dave Airlie <airlied@dhcp-1-203.bne.redhat.com>
143 Date: Fri Nov 14 15:52:32 2008 +1000
144
145 drm: fix the exit path of the bo unlocking
146
147 commit 1ea46b5e3dc7e75afe1936594e0e085c9dc8665d
148 Author: Dave Airlie <airlied@dhcp-1-203.bne.redhat.com>
149 Date: Fri Nov 14 15:51:44 2008 +1000
150
151 radeon: fixup relocate to work on locate write buffers in VRAM first.
152
153 Fixup failure paths and make EAGAIN work
154
155 commit e16a76e302eba9b53858457054059985ec0ef9df
156 Author: Dave Airlie <airlied@redhat.com>
157 Date: Thu Nov 13 17:22:26 2008 +1100
158
159 radeon: fix some issues since last rebase
160
161 commit e9ab870ce368dab7ed9e859c157074913353b589
162 Author: Dave Airlie <airlied@redhat.com>
163 Date: Wed Nov 12 09:01:14 2008 +1000
164
165 radeon: fix more build
166
167 commit 3b7c8b9cb7db0749540f9b042c7bf9e8e65f320d
168 Author: Dave Airlie <airlied@redhat.com>
169 Date: Wed Nov 12 08:59:04 2008 +1000
170
171 radeon: fix compile
172
173 commit 8455e44f0909b58b60465e7e8f84b77ec12710cc
174 Author: Dave Airlie <airlied@redhat.com>
175 Date: Mon Nov 10 15:39:25 2008 +1000
176
177 radeon: fix dumbness in cp ring check
178
179 commit f6654d03d800ea8e75bffdfad679cf8450c60361
180 Author: Dave Airlie <airlied@redhat.com>
181 Date: Mon Nov 10 14:26:11 2008 +1000
182
183 radeon: add gart useable size to report to userspace
184
185 commit 0fb851b61a586a96a39d7f8725b12152c1fa1c27
186 Author: Dave Airlie <airlied@redhat.com>
187 Date: Sun Nov 9 20:34:49 2008 +1000
188
189 radeon: fix powerpc oops on rv280
190
191 commit b264e9bd0230865da5406eb991f9afdbedd49385
192 Author: Dave Airlie <airlied@redhat.com>
193 Date: Sun Nov 9 10:23:43 2008 +1000
194
195 radeon: upgrade atom headers
196
197 commit b272406d53a36536d0344f3cf1b78322db97a137
198 Author: Dave Airlie <airlied@redhat.com>
199 Date: Sat Nov 8 14:39:41 2008 +1000
200
201 radeon: fix fence race condition hopefully
202
203 For some reason reading the SCRATCH reg from RAM causes some race to occur.
204 Hopefully fix this.
205
206 commit 48ebb844296d2b5ee892e679c482542f84add76d
207 Author: Dave Airlie <airlied@redhat.com>
208 Date: Sat Nov 8 11:31:03 2008 +1000
209
210 drm/radeon: add dpms connector functions
211
212 commit da66c52dd9140f17862e9d4cd55fbe03eb6793de
213 Author: Dave Airlie <airlied@redhat.com>
214 Date: Fri Nov 7 16:22:22 2008 +1000
215
216 radeon: avivo cursors are across the full surface.
217
218 fixes cursor on second head
219
220 commit 051c62dde66c86d90ccf186636a431820ef72b2e
221 Author: Dave Airlie <airlied@redhat.com>
222 Date: Fri Nov 7 16:21:03 2008 +1000
223
224 modesetting: set the crtc x,y after the mode base change
225
226 commit ffd84bdad116d3388aca75993b7994d8a2ba5b19
227 Author: Dave Airlie <airlied@redhat.com>
228 Date: Wed Nov 5 10:23:35 2008 +1000
229
230 drm/radeon: add uncached allocator to drm ttm code.
231
232 This allows re-use of uc/wc marked pages
233
234 commit ac5d2213565ad5176184a3637e16e9fd5dd817d3
235 Author: Dave Airlie <airlied@redhat.com>
236 Date: Wed Nov 5 10:22:27 2008 +1000
237
238 radeon: fix ring tail overflow issue since alignment
239
240 commit f95041c9888a7e10529ffc5adea3c8847306e39f
241 Author: Dave Airlie <airlied@redhat.com>
242 Date: Tue Nov 4 13:18:02 2008 +1000
243
244 radeon: disable HDP read cache for now
245
246 commit f6ef4e052ed31c84c8ee11285a17dfa35c6c54e4
247 Author: Dave Airlie <airlied@redhat.com>
248 Date: Tue Nov 4 12:02:55 2008 +1000
249
250 radeon: force all ring writes to 16-dword alignment.
251
252 Also set the fetch size to what tcore/fglrx uses.
253
254 commit 5b928dc4e38f838d5d0c8e3ceb5dac821343df20
255 Author: Dave Airlie <airlied@redhat.com>
256 Date: Mon Nov 3 15:43:08 2008 +1000
257
258 radeon: fixup vram visible calculation to take a/c pinned objects for now
259
260 commit 6b795f96d71a23a6c7107dc60ffadb485f4fb6b2
261 Author: Dave Airlie <airlied@redhat.com>
262 Date: Mon Nov 3 09:56:02 2008 +1100
263
264 radeon: if modesetting state is unknown make it known so pm-utils can use it
265
266 commit 5370cda9cc412d326f8a91d813fbcdb57aa79bbb
267 Author: Dave Airlie <airlied@redhat.com>
268 Date: Fri Oct 31 14:40:12 2008 +1000
269
270 radeon: fix ROP values for the paint ROP
271
272 commit 2491b4f04209ffb64dfb4ef0a8a025aadf658a3f
273 Author: Dave Airlie <airlied@redhat.com>
274 Date: Thu Oct 30 14:00:39 2008 +1000
275
276 radeon: add mtrr support for VRAM aperture.
277
278 This speeds things up a bit
279
280 commit 890f6afd5f01bbdf283ca94c5c335b18fd219673
281 Author: Dave Airlie <airlied@redhat.com>
282 Date: Thu Oct 30 14:00:15 2008 +1000
283
284 radeon: disable AGP for certain chips if not specified until we figure it out
285
286 commit acc5f117fb05ba34e4f89618a3a93b80cc99866b
287 Author: Dave Airlie <airlied@redhat.com>
288 Date: Wed Oct 29 15:45:47 2008 +1000
289
290 radeon: disable debugging message
291
292 commit fa5a846413486577b49552afea9c162560725666
293 Author: Dave Airlie <airlied@redhat.com>
294 Date: Wed Oct 29 15:37:32 2008 +1000
295
296 radeon: commit ring after emitting the buffer discards
297
298 commit 82f3ab65ffece608653a51c3d54131aa77295853
299 Author: Dave Airlie <airlied@redhat.com>
300 Date: Wed Oct 29 17:39:27 2008 +1100
301
302 radeon: fix whitespace in encoders C file
303
304 commit be6de6c167a860c54b9d0b867d17e4eb823382d9
305 Author: Dave Airlie <airlied@redhat.com>
306 Date: Wed Oct 29 17:39:08 2008 +1100
307
308 radeon: add more HDMI bits
309
310 commit 09d8988dc61faec36416a3fb1ffe42051331e0e9
311 Author: Dave Airlie <airlied@redhat.com>
312 Date: Thu Oct 30 01:41:34 2008 +1000
313
314 radeon: set dma bufs bo type to a kernel type
315
316 commit b3ee8fbc2b9886252b42372c4194aa46e8185745
317 Author: Dave Airlie <airlied@redhat.com>
318 Date: Thu Oct 30 01:05:48 2008 +1000
319
320 drm: reorder AGP unloading wrt driver unloading
321
322 commit efb0c1a5e99cd047a8cbc414e42f669a387ddc97
323 Author: Dave Airlie <airlied@redhat.com>
324 Date: Wed Oct 29 15:46:16 2008 +1100
325
326 radeon: enable DVI-D + HDMI connectors.
327
328 This allows the rs690 to work on DVI
329
330 commit 2d49e176172879617745fc8cf7573f05ec6255a1
331 Author: Dave Airlie <airlied@redhat.com>
332 Date: Tue Oct 28 20:33:13 2008 +1000
333
334 radeon: setup isync cntl properly
335
336 commit a2afee6c7a16c779cab6228d18879049859f73cb
337 Author: Dave Airlie <airlied@redhat.com>
338 Date: Tue Oct 28 20:31:27 2008 +1000
339
340 radeon: add more debugging
341
342 commit c8f002393c164265f20e95e355a208d2fc547ea1
343 Author: Dave Airlie <airlied@redhat.com>
344 Date: Tue Oct 28 20:26:04 2008 +1000
345
346 radeon: overhaul ring interactions
347
348 emit in 16-dword blocks, emit irqs at same time as everything else
349
350 commit c2a07e846c21b52cce903ffa0110b6c1a131c033
351 Author: Dave Airlie <airlied@redhat.com>
352 Date: Tue Oct 28 16:49:09 2008 +1000
353
354 radeon: fix race in sysfs
355
356 commit e44379ca283ec1badbc828f1960b7b1b7fa91fdc
357 Author: Dave Airlie <airlied@redhat.com>
358 Date: Tue Oct 28 16:46:47 2008 +1000
359
360 radeon: add proc debugging for interrupts/ring
361
362 commit 944b8472ec2cc27568b43c10d9dd304903d203da
363 Author: Dave Airlie <airlied@redhat.com>
364 Date: Tue Oct 28 16:44:54 2008 +1000
365
366 radeon: only enable dynclks if asked for
367
368 commit 2510851ce9b1ba12cd33b7da829fb6aa8a8ef778
369 Author: Dave Airlie <airlied@redhat.com>
370 Date: Tue Oct 28 06:35:10 2008 +1000
371
372 radeon: add wait rendering API
373
374 commit a25906493affd49bd62063b662bc1df3de07e811
375 Author: Dave Airlie <airlied@redhat.com>
376 Date: Tue Oct 28 06:05:58 2008 +1000
377
378 radeon: rs480 fixes for bus mastering
379
380 commit 87a2b0e85115e6074a9294f632146dd75296b1f3
381 Author: Dave Airlie <airlied@redhat.com>
382 Date: Mon Oct 27 18:30:15 2008 +1000
383
384 radeon: remove unused gem indirect ioctl
385
386 commit a00b2dd57874c7b909a598a6121229d78fe4c178
387 Author: Dave Airlie <airlied@redhat.com>
388 Date: Mon Oct 27 16:41:09 2008 +1000
389
390 radeon: fix some warnings
391
392 commit 177833fa51ab72fcd730df1af008db3839466401
393 Author: Dave Airlie <airlied@redhat.com>
394 Date: Mon Oct 27 16:40:34 2008 +1000
395
396 radeon: fix free after refcount
397
398 commit cd5811b3bcc622ab250efdbd80f0319465db119f
399 Author: Dave Airlie <airlied@redhat.com>
400 Date: Mon Oct 27 16:40:15 2008 +1000
401
402 radeon: CS2 make it all work with new relocs style
403
404 commit 1b2982a1a7418b32f25ebfe11fb6390ed231aaa6
405 Author: Dave Airlie <airlied@redhat.com>
406 Date: Mon Oct 27 16:39:12 2008 +1000
407
408 radeon: don't copy to user the cs ids
409
410 commit 7185c835302f0c755874b0b257d9dadc475176a6
411 Author: Dave Airlie <airlied@redhat.com>
412 Date: Mon Oct 27 14:23:22 2008 +1000
413
414 radeon: make new CS2 command submission interface port older interface to this
415
416 commit 3d542cabb417a8e30dd29646ff1018af4c223012
417 Author: Dave Airlie <airlied@redhat.com>
418 Date: Thu Oct 23 19:13:50 2008 +1000
419
420 radeon: release agp on module unload
421
422 commit 34db80a441a96bf9ea7cbc90e5a14c73b49689c8
423 Author: Dave Airlie <airlied@redhat.com>
424 Date: Tue Oct 21 14:15:23 2008 +1000
425
426 radeon: add r423 bits to modesetting
427
428 commit 7f5cf386d166ae4d0605da2991b207beb85bd805
429 Author: Dave Airlie <airlied@redhat.com>
430 Date: Tue Oct 21 14:12:38 2008 +1000
431
432 radeon: pull bus master enable into its own function
433
434 commit 2b18550c4c09d8c2a619d19523115d20c2252446
435 Author: Dave Airlie <airlied@redhat.com>
436 Date: Mon Oct 20 14:44:23 2008 +1000
437
438 radeon: fix accessible VRAM sizing.
439
440 We actually were passing accessible to userspace, but I thought
441 the code sized it correctly, however it doesn't seem to.
442
443 commit 5a32cf2ab1059e1e94cc4297f5b9818ea8a2a7c3
444 Author: Dave Airlie <airlied@redhat.com>
445 Date: Mon Oct 20 13:41:05 2008 +1000
446
447 radeon: update proper chip family
448
449 commit a3151e2871daf26580a74f9cdabffc31a404227b
450 Author: Dave Airlie <airlied@redhat.com>
451 Date: Mon Oct 20 12:08:50 2008 +1000
452
453 radeon: fixup scratch register interactions properly
454
455 commit 32fa43d71a24917aafbf6060581e76fb00faced2
456 Author: Dave Airlie <airlied@redhat.com>
457 Date: Mon Oct 20 10:27:50 2008 +1000
458
459 radeon: make writeback work again
460
461 commit ddaf24277d4932b17a91f48eb87b60374dc16b44
462 Author: Dave Airlie <airlied@redhat.com>
463 Date: Mon Oct 20 09:20:23 2008 +1000
464
465 drm: cleanup some warnings
466
467 commit eaf752a24253ede8cbcbbd9735bfdb0c94b3dac5
468 Author: Dave Airlie <airlied@redhat.com>
469 Date: Thu Oct 16 16:29:08 2008 +1000
470
471 radeon: fix small typo in agp code
472
473 commit 5fad452a07cf297a32141283d7599333adcd7357
474 Author: Dave Airlie <airlied@panoply-rh.(none)>
475 Date: Thu Oct 16 16:17:01 2008 +1000
476
477 radeon: workaround failure to parse some rs48x edid
478
479 commit c83927675ff7ea640fba78135faa7a03f65e433a
480 Author: Dave Airlie <airlied@panoply-rh.(none)>
481 Date: Thu Oct 16 16:15:08 2008 +1000
482
483 radeon: don't enable dynclks on rs48x
484
485 commit 2c45c5d0114efdbd05c72d6b9bf82f9a31554148
486 Author: Dave Airlie <airlied@redhat.com>
487 Date: Wed Oct 15 15:12:20 2008 +1000
488
489 radeon: allow r100/r200 modesetting to be forced on by users
490
491 commit adbcbdbd2103fd544caf8e0c7a80a3a67dbe9323
492 Author: Dave Airlie <airlied@redhat.com>
493 Date: Thu Oct 16 22:06:00 2008 +1000
494
495 radeon: fix unused agp functionality
496
497 commit ad5a0132e4fddcfaa686238c5c262064a631272c
498 Author: Dave Airlie <airlied@redhat.com>
499 Date: Thu Oct 16 22:05:02 2008 +1000
500
501 radeon: add some more r100 support to test AGP
502
503 commit a686504306d6dd17dc2b2d6b870de57fa37ccd89
504 Author: airlied <airlied@redhat.com>
505 Date: Wed Oct 15 23:58:03 2008 +1000
506
507 radeon: add initial agp support.
508
509 This add agpmode command line option.
510
511 commit fd5ddcda762eb709a9f521eb1f609f978d975eb8
512 Author: airlied <airlied@redhat.com>
513 Date: Wed Oct 15 23:57:21 2008 +1000
514
515 radeon: add CS support for r100/r200 in 2D driver
516
517 commit 12919eae61647e151b9b21cab481a2bf2ca4579f
518 Author: Dave Airlie <airlied@redhat.com>
519 Date: Thu Oct 9 16:37:23 2008 +1100
520
521 radeon: fixup interrupt suspend/resume
522
523 commit 19436eeb911d0bd6b8a43f3d3dc35c10c3702af3
524 Author: Dave Airlie <airlied@redhat.com>
525 Date: Wed Oct 8 16:57:12 2008 +1000
526
527 radeon: fixup suspend/resume bus master enable
528
529 commit a094d0b696c90e7570e9088b5884c4ffd2a6ff3c
530 Author: Dave Airlie <airlied@redhat.com>
531 Date: Wed Oct 8 16:56:04 2008 +1000
532
533 radeon: re-enable hw blits for copying from VRAM
534
535 commit 3372777c97b12b2ae43330348c91910d935deeef
536 Author: Dave Airlie <airlied@redhat.com>
537 Date: Wed Oct 8 16:53:43 2008 +1000
538
539 radeon: fix buffer copying for VRAM->TT
540
541 commit 7a3cf0dc97dca5e9d2c5af48769a96ee56f25161
542 Author: Dave Airlie <airlied@redhat.com>
543 Date: Wed Oct 8 16:51:58 2008 +1000
544
545 radeon: move memcpy until after CP is stopped
546
547 commit 59badc3e2e707b5e6af78ddf35872d05e749cd80
548 Author: Dave Airlie <airlied@redhat.com>
549 Date: Tue Oct 7 16:34:12 2008 +1000
550
551 drm: remove stray debug code
552
553 commit fd4bae063aa88a7e1d270774c4ac9677cce9ea5d
554 Author: Dave Airlie <airlied@redhat.com>
555 Date: Tue Oct 7 16:31:22 2008 +1000
556
557 radeon: use discardable flags on no backing store objects
558
559 commit a8dc915a657a81ea555b8448d54dae56041980fc
560 Author: Dave Airlie <airlied@redhat.com>
561 Date: Tue Oct 7 16:30:09 2008 +1000
562
563 drm: add discardable flag.
564
565 This discards memory contents on suspend/resume with the
566 hope the upper layers know something we don't.
567
568 commit ab3dff65889deb568597a567055a01baa7d1a412
569 Author: Dave Airlie <airlied@redhat.com>
570 Date: Tue Oct 7 16:27:31 2008 +1000
571
572 drm/radeon: initial suspend/resume fix.
573
574 This enables the evict code and also sets radeon up
575 to allow evict from VRAM to LOCAL
576
577 commit b8179989154d5819f4a96b058a5c12be590af977
578 Author: Dave Airlie <airlied@redhat.com>
579 Date: Mon Oct 6 16:20:38 2008 +1000
580
581 radeon: fixup alignment between GEM and TTM
582
583 fixup the interface between gem and ttm for alignment. makes Xv work better
584
585 commit 7ada9a28eb20fa768330c17036cc5c9a2308a151
586 Author: Dave Airlie <airlied@redhat.com>
587 Date: Wed Oct 1 11:27:02 2008 +1000
588
589 radeon: fixup GEM pinned offset retrieval for mesa
590
591 commit 3cbda5ddc1aa78d586ff3447e97809b2449ff199
592 Author: Dave Airlie <airlied@redhat.com>
593 Date: Wed Oct 1 11:25:54 2008 +1000
594
595 drm: fixup clean flag handling properly
596
597 commit 05f32d7b440a62f801e9448e9ff4414fb18f4809
598 Author: Alex Deucher <alexdeucher@gmail.com>
599 Date: Mon Sep 29 14:57:11 2008 +1000
600
601 radeon: use atom for ext tmds on r4xx
602
603 commit ec07f7ea9580ecee93710d3eb5e6857eeedc20eb
604 Author: Alex Deucher <alexdeucher@gmail.com>
605 Date: Mon Sep 29 14:56:32 2008 +1000
606
607 radeon: make atom on r4xx a module option
608
609 default is legacy modesetting. pass module option r4xx_atom
610 to try using atom on r4xx.
611
612 commit c1eccaae46f23ed1f435160d1dacc9362cbe1a45
613 Author: Alex Deucher <alexdeucher@gmail.com>
614 Date: Mon Sep 29 14:55:16 2008 +1000
615
616 radeon: first pass at using atombios on r4xx hw
617
618 commit ad15496283c36867d9f6fbada40ad276324e3ccd
619 Author: Dave Airlie <airlied@redhat.com>
620 Date: Mon Sep 29 14:50:47 2008 +1000
621
622 radeon: add r600 modesetting registers writes
623
624 commit 7698bdda7f463cb96996fad98190f8c710809ff4
625 Author: Dave Airlie <airlied@redhat.com>
626 Date: Mon Sep 29 14:45:11 2008 +1000
627
628 radeon: parse object tables for connectors on r600
629
630 commit f29b90ef222fd8d24973593f1e90c8af649df4d7
631 Author: Dave Airlie <airlied@redhat.com>
632 Date: Tue Sep 23 16:34:55 2008 +1000
633
634 radeon: fix minor cursor disappearing issues
635
636 commit 87cdcf417c6edd7be1a260eccb39321a072a7021
637 Author: Kristian Høgsberg <krh@redhat.com>
638 Date: Mon Sep 22 18:40:36 2008 -0400
639
640 radeon: Fix type in check for tmds type.
641
642 commit e0cceb6c10a25d264c98711d88dc2e77568742f5
643 Author: Kristian Høgsberg <krh@redhat.com>
644 Date: Mon Sep 22 12:00:57 2008 -0400
645
646 Store the buffer object backing the fb as a void pointer, not a handle.
647
648 This lets us defer handle creation until userspace acutally asks for
649 one, at which point we also have a drm_file to associate it with.
650
651 commit 6ee8ff0dc2b71c1ffe5e86db74bad8ff919efc56
652 Author: Dave Airlie <airlied@linux.ie>
653 Date: Sun Sep 21 09:48:51 2008 +1000
654
655 drm: fixups on top of rebase
656
657 commit f1808c2414671023ebfbef59289cab7d22d7c15d
658 Author: Dave Airlie <airlied@linux.ie>
659 Date: Sat Sep 20 03:08:05 2008 +1000
660
661 radeon: rmx_fixup() fixes for legacy chips
662
663 commit 099cbd68de1e7fb821930f477c7dacad740d651b
664 Author: Dave Airlie <airlied@linux.ie>
665 Date: Sat Sep 20 01:55:27 2008 +1000
666
667 radeon: fix combios
668
669 commit 45e2f1c7c5d4c056bf8c664dab18accff332d4de
670 Author: Dave Airlie <airlied@linux.ie>
671 Date: Fri Sep 19 09:17:36 2008 +1000
672
673 radeon: port Alexs patches from modesetting-gem
674
675 commit 1e684c2536e3c901151fadb941b9d690b968ef36
676 Author: Kristian Høgsberg <krh@redhat.com>
677 Date: Thu Sep 18 16:10:29 2008 -0400
678
679 radeon: Add DRM_ERROR() messages to all EINVAL exits from DRM_RADEON_CS.
680
681 Shouldn't trigger under normal use and when something breaks, it will
682 be easier to debug.
683
684 commit b64ede60d8521e60f1cb76995dfb96bd979e45f9
685 Author: Kristian Høgsberg <krh@redhat.com>
686 Date: Thu Sep 18 16:07:50 2008 -0400
687
688 Allow R300_DST_PIPE_CONFIG for R420 and up.
689
690 The X server emits writes to R300_DST_PIPE_CONFIG for R420 chipsets during
691 accel init.
692
693 commit 0e10c1a8581e899d45bd11b94b08c789e998995f
694 Author: Kristian Høgsberg <krh@redhat.com>
695 Date: Thu Sep 18 14:53:46 2008 -0400
696
697 radeon kms: Get precedence right when computing PLL values.
698
699 commit 3317a09a8d25c5256b1650eb096ce3fa0c83b08b
700 Author: Alex Deucher <alexdeucher@gmail.com>
701 Date: Thu Sep 18 09:55:14 2008 +1000
702
703 radeon: further LVDS fixes
704
705 commit bc802cff5c3d0cae9c25b1ac874d2532f4ae6c78
706 Author: Alex Deucher <alexdeucher@gmail.com>
707 Date: Thu Sep 18 09:54:12 2008 +1000
708
709 radeon: legacy lvds updates
710
711 commit 606d03adcfa9da0293893d2147517c490c57a480
712 Author: Dave Airlie <airlied@redhat.com>
713 Date: Thu Sep 11 18:26:27 2008 +1000
714
715 radeon: fixup buffer and cs
716
717 just fallback around busted stuff for now
718
719 commit fadffa52fda2982d4e3925b670e38e820848eea8
720 Author: Dave Airlie <airlied@redhat.com>
721 Date: Thu Sep 11 18:25:18 2008 +1000
722
723 radeon: fixup GEM domain setting - allows more userspace paths
724
725 also dirty buffer on validate
726
727 commit 7e2106c5f5220733025b045a73deaf9a23522494
728 Author: Dave Airlie <airlied@redhat.com>
729 Date: Thu Sep 11 17:13:32 2008 +1000
730
731 radeon: disable blit moves
732
733 commit 6668bc9004c180c0207abbe81e3421b130846c69
734 Author: Dave Airlie <airlied@redhat.com>
735 Date: Thu Sep 11 16:18:27 2008 +1000
736
737 radeon: fail properly if we can't create the ring.
738
739 Normally this will be due to an AGP driver needing updating
740
741 commit 7bbdc2685161c8b4ea4813cc6c8f2eb71fb37f74
742 Author: Dave Airlie <airlied@redhat.com>
743 Date: Wed Sep 10 14:35:43 2008 +1000
744
745 radeon: do proper memory controller init and setup
746
747 commit 383e43f729777c6ec2975248b8592aef2f0f77fd
748 Author: Dave Airlie <airlied@redhat.com>
749 Date: Wed Sep 10 14:35:08 2008 +1000
750
751 radeon: fix return value
752
753 commit 967c273b26b3d0303971d57a79c9cd9a3783ed76
754 Author: Dave Airlie <airlied@redhat.com>
755 Date: Wed Sep 10 14:34:39 2008 +1000
756
757 radeon: fixup reference counting properly
758
759 commit 5c9948d861b87f25a6b9b11f03cdc7f690a7c61a
760 Author: Dave Airlie <airlied@redhat.com>
761 Date: Tue Sep 9 15:55:38 2008 +1000
762
763 radeon: sort out atom vs combios tables for r400 cards
764
765 commit d8d06c4b245582e7e63d6cb05df0519ee4ae4dfa
766 Author: Dave Airlie <airlied@redhat.com>
767 Date: Mon Sep 8 11:37:26 2008 +1000
768
769 radeon: remove unneeded debugging
770
771 commit e8d344ab4644f9b4126472e4cd411715cb51c922
772 Author: Dave Airlie <airlied@redhat.com>
773 Date: Mon Sep 8 11:25:12 2008 +1000
774
775 radeon: don't do full edid for detection purposes
776
777 commit b435e546014b0eb64a1a357c01fb6504e046818e
778 Author: Dave Airlie <airlied@redhat.com>
779 Date: Mon Sep 8 10:27:48 2008 +1000
780
781 radeon: disable debugging that sneaky itself on
782
783 commit 15e5a1302977f5e7e2bcf68e4315b4c0da3f8f6c
784 Author: Dave Airlie <airlied@redhat.com>
785 Date: Mon Sep 8 10:20:44 2008 +1000
786
787 radeon: make text reserve 256k
788
789 commit 4a732c876e68ba35c051a9b2b9b3f59af8aefb56
790 Author: Dave Airlie <airlied@redhat.com>
791 Date: Mon Sep 8 10:11:27 2008 +1000
792
793 radeon: don't disable VGA bits it breaks X later
794
795 commit 6ba4fe118c71d81688aed0f6f29b541a8ec2aed5
796 Author: Dave Airlie <airlied@redhat.com>
797 Date: Fri Sep 5 16:12:59 2008 +1000
798
799 radeon: further suspend/resume support
800
801 commit d3f08fa8d959ab86148522dd1d520765d0f70285
802 Author: Dave Airlie <airlied@redhat.com>
803 Date: Fri Aug 29 14:52:15 2008 +1000
804
805 radeon: add initial suspend/resume support
806
807 this gets us back to fbcon.. its dirty like zebra
808
809 commit 3095dc063ab426024bd79d661bb83d6001af3dfb
810 Author: Dave Airlie <airlied@redhat.com>
811 Date: Fri Sep 5 11:15:03 2008 +1000
812
813 radeon: only enable KMS for radeon on x86 for now
814
815 commit 07c2307f45955becc3085187951fd52cfa43a162
816 Author: Dave Airlie <airlied@redhat.com>
817 Date: Fri Sep 5 10:46:17 2008 +1000
818
819 radeon: rs690 GART tables need to be in uncached memory.
820
821 Allocate the rs480/690 tables from uncached memory.
822
823 commit 48b239ec875354114b1d1ab6052aaf995251af6a
824 Author: Dave Airlie <airlied@redhat.com>
825 Date: Thu Sep 4 11:58:08 2008 +1000
826
827 drm/radeon: fixup some avivo/rs690 checks
828
829 commit 886833770b27dc6c6c3c01264d8f06eb6490d4e8
830 Author: Dave Airlie <airlied@redhat.com>
831 Date: Fri Aug 29 09:59:02 2008 +1000
832
833 drm: move text mode check to driver.
834
835 also change name from text to nomodeset
836
837 commit 2ed5093e134819d82252c9acca3d30dea4358990
838 Author: Dave Airlie <airlied@redhat.com>
839 Date: Thu Aug 28 21:22:27 2008 +1000
840
841 radeon: fix up LVDS panel mode
842
843 also don't explode on lack of DDC
844
845 commit afc7519cbe2c4de0f5a0f5293f166302fe68c04d
846 Author: Dave Airlie <airlied@redhat.com>
847 Date: Thu Aug 28 18:31:50 2008 +1000
848
849 drm: fix dev->master convert
850
851 commit bfaf4eee5b30971c22ac713cdb27dd81ebd17cc8
852 Author: Kristian Høgsberg <krh@redhat.com>
853 Date: Wed Aug 20 11:24:13 2008 -0400
854
855 drm: Set up a kernel side hw_lock, so userspace isn't required to do so.
856
857 DRI2 doesn't use a user space lock, so don't require one to be set up.
858 Old DRI can still provide a lock containing map as before, which will
859 override the default kernel-side lock.
860
861 Signed-off-by: Kristian Høgsberg <krh@redhat.com>
862
863 commit 1abd1b2c2bae090cba345f575b5d308f635946d4
864 Author: Dave Airlie <airlied@redhat.com>
865 Date: Thu Aug 28 16:38:49 2008 +1000
866
867 radeon: fix LVDS on atombios - typos
868
869 commit 38ca2227d3ea2f1f94078f727a1382ac6c15f2dd
870 Author: Dave Airlie <airlied@redhat.com>
871 Date: Thu Aug 28 12:01:53 2008 +1000
872
873 radeon: limit LVDS to first CRTC for now
874
875 commit 0b57a130d6c0df930bba26613bbe7ecc168708f1
876 Author: Dave Airlie <airlied@redhat.com>
877 Date: Thu Aug 28 12:01:38 2008 +1000
878
879 radeon: fixup checks for crtc in dpms path
880
881 commit 4b84ec7890a67782503a81e7de3f43beffe383bb
882 Author: Dave Airlie <airlied@redhat.com>
883 Date: Wed Aug 27 15:39:17 2008 +1000
884
885 radeon: fix after rebase
886
887 commit a2bd95d420b509484d4453a3de57863b9f85fd2c
888 Author: Dave Airlie <airlied@redhat.com>
889 Date: Wed Aug 27 13:43:04 2008 +1000
890
891 radeon: avoid oops on encdoers with no crtc set
892
893 commit 9f76faef605ac6fe88f21780d33507cdbc740149
894 Author: Alex Deucher <alexdeucher@gmail.com>
895 Date: Tue Aug 26 17:23:21 2008 +1000
896
897 radeon: fix warning from radeon_legacy_state removal
898
899 commit 8a8bc2a197e5f516eb161c4dfdac9be45cffeb37
900 Author: Alex Deucher <alexdeucher@gmail.com>
901 Date: Tue Aug 26 17:22:37 2008 +1000
902
903 radeon: first pass at legacy dac detect
904
905 - done: primary dac, vga on tvdac
906 - todo: ext dac, tv on tvdac
907
908 commit 207d8690fe812bbd12aadc0344588d2b9ee4f50c
909 Author: Alex Deucher <alexdeucher@gmail.com>
910 Date: Tue Aug 26 17:22:11 2008 +1000
911
912 radeon: first pass at bios scratch regs
913
914 - todo: updated connected status
915
916 commit 86cd902421db3c9aefa618c6f42ebf759f35bd23
917 Author: Alex Deucher <alexdeucher@gmail.com>
918 Date: Tue Aug 26 17:20:54 2008 +1000
919
920 radeon: remove unused legacy state
921
922 commit 1012aa17d033f7461898b5f618095594415637d5
923 Author: Alex Deucher <alexdeucher@gmail.com>
924 Date: Tue Aug 26 17:20:15 2008 +1000
925
926 radeon: get primary dac adj info from bios tables
927
928 commit df67aa03dcb80f34a2e82f244ed319097f8ad5dd
929 Author: Dave Airlie <airlied@redhat.com>
930 Date: Tue Aug 26 17:03:13 2008 +1000
931
932 x86: export pat_enabled
933
934 commit 2671bf82bad64867cbcefaeadc3d873a5b58849c
935 Author: Dave Airlie <airlied@redhat.com>
936 Date: Tue Aug 26 17:02:43 2008 +1000
937
938 drm: enable PAT and writecombining support.
939
940 If PAT is enabled, enable write combining support for kernel/user mappings
941 when pat is enabled. Also set memory to WC instead of uncached in ttm
942
943 commit 1c6e9025d0a744fb2368c7e60e5959fbfd44a033
944 Author: Dave Airlie <airlied@redhat.com>
945 Date: Tue Aug 26 17:01:35 2008 +1000
946
947 radeon: add more domain support to GEM code.
948
949 move domain validate function to separate function
950 call it from correct places
951
952 commit 783c1755e1877bfb5d371d6aed9229e89193733a
953 Author: Dave Airlie <airlied@redhat.com>
954 Date: Tue Aug 26 17:00:49 2008 +1000
955
956 radeon: implement zero fill for VRAM migration
957
958 If a BO hasn't been dirtied, do a solid fill on VRAM instead of
959 migrating pages to VRAM
960
961 commit 94b5bad6740b1c1bc91a884602fcae7556ac6f23
962 Author: Dave Airlie <airlied@redhat.com>
963 Date: Tue Aug 26 16:59:45 2008 +1000
964
965 drm: set clean flags in new flags so it doesn't disappear
966
967 commit beeef46b78a3881d82010ccd2cf231f3b5558381
968 Author: Dave Airlie <airlied@redhat.com>
969 Date: Fri Aug 22 10:16:20 2008 +1000
970
971 radeon: wait for dma gui idle on 2D idle
972
973 commit 83cfe866e83a632029194f82d08e3aa99eb43fc1
974 Author: Dave Airlie <airlied@redhat.com>
975 Date: Fri Aug 22 10:16:01 2008 +1000
976
977 radeon_gem: fix some misplace ==
978
979 commit b23d287bcaeefcd41360eb4bbff213b63b94417e
980 Author: Dave Airlie <airlied@redhat.com>
981 Date: Fri Aug 22 10:13:25 2008 +1000
982
983 radeon: get buffer upload working
984
985 commit 16f042a029f0c124881b54e3cdbc904f0102e63d
986 Author: Dave Airlie <airlied@redhat.com>
987 Date: Fri Aug 22 10:12:57 2008 +1000
988
989 radeon: read back register between on gart flush
990
991 commit e5f380ce6813b560f88734e5bc267cf7e0817df0
992 Author: Dave Airlie <airlied@redhat.com>
993 Date: Fri Aug 22 10:11:55 2008 +1000
994
995 drm: export buffer zeroing function for sw fallback
996
997 We need a buffer zeroing function for before we have
998 accel running etc
999
1000 commit 1a329af605a7e97bf47d4d59c3fae48bd63bf48f
1001 Author: Dave Airlie <airlied@redhat.com>
1002 Date: Fri Aug 22 09:49:16 2008 +1000
1003
1004 ttm: add clean bo flags
1005
1006 This can be used to denote a bo hasn't been mapped or validated yet.
1007
1008 Primarily for the move code when we get a buffer in VRAM, we don't need
1009 to copy the contents just zero them.
1010
1011 commit c1f33b48e0ceeb1217bd85941699868fc7c1b0af
1012 Author: Dave Airlie <airlied@redhat.com>
1013 Date: Fri Aug 22 09:39:07 2008 +1000
1014
1015 ati_pcigart: add memory barrier and volatile for table access
1016
1017 commit 865842501d07b53fe7da767ec6867b37791e0bd5
1018 Author: Dave Airlie <airlied@redhat.com>
1019 Date: Fri Aug 22 09:35:26 2008 +1000
1020
1021 drm: remove tlb flush logic from ttm
1022
1023 commit a2509107e6f3102d31f23b1230ed5e4323f2e9ae
1024 Author: Dave Airlie <airlied@redhat.com>
1025 Date: Tue Aug 19 12:15:10 2008 +1000
1026
1027 radeon: fix bug in scratch retreival
1028
1029 commit 5c2e9d64b983df7d4a8fcfec6d97d8108fafe8dd
1030 Author: Dave Airlie <airlied@redhat.com>
1031 Date: Tue Aug 19 12:14:38 2008 +1000
1032
1033 radeon: add GTT domain
1034
1035 commit b896c635377305d250cdb3d1b70ec8f624d8f97f
1036 Author: Dave Airlie <airlied@redhat.com>
1037 Date: Wed Aug 27 14:58:05 2008 +1000
1038
1039 radeon: add missing regs from a previous rebase
1040
1041 commit 8b4b5376e7de4edbef6d9e74b401053124d69780
1042 Author: Dave Airlie <airlied@redhat.com>
1043 Date: Thu Aug 14 18:14:56 2008 +1000
1044
1045 disable modeset on < r300
1046
1047 commit 2b5b245b4da6245cc31dfbf62de08f630e985484
1048 Author: Dave Airlie <airlied@redhat.com>
1049 Date: Fri Aug 15 09:36:21 2008 +1000
1050
1051 radeon: set the base after mode is programmed
1052
1053 commit 598f58b76744598718f9866399a4864b4bacee94
1054 Author: Dave Airlie <airlied@redhat.com>
1055 Date: Fri Aug 15 09:35:55 2008 +1000
1056
1057 radeon: fix LVDS modes problem
1058
1059 commit 58a4fee7d55860eb660c8eb605c36d79cbefc0f5
1060 Author: Dave Airlie <airlied@redhat.com>
1061 Date: Thu Aug 14 18:06:31 2008 +1000
1062
1063 radeon: reserve 64k of VRAM for now for text mode so we don't trample it
1064
1065 commit 3da833e454e074f5d2205faeb794d032cd43a868
1066 Author: Dave Airlie <airlied@redhat.com>
1067 Date: Thu Aug 14 14:38:27 2008 +1000
1068
1069 radeon: add support for init memory map
1070
1071 This gets RN50 to initialise correctly
1072
1073 commit 8b5b7391d85945b77636b0cf892ac8600dc1c4d5
1074 Author: Dave Airlie <airlied@redhat.com>
1075 Date: Thu Aug 14 14:37:25 2008 +1000
1076
1077 radeon: add copy/solid regs for rn50
1078
1079 commit 7ae2d31976e715eaae3e2887905e32f5a3add66d
1080 Author: Alex Deucher <alexdeucher@gmail.com>
1081 Date: Thu Aug 14 09:59:47 2008 +1000
1082
1083 radeon: fill in and make use of more combios tables
1084
1085 commit 049d18c8d1a6c845f178d271f63606d621579f86
1086 Author: Dave Airlie <airlied@redhat.com>
1087 Date: Thu Aug 14 09:59:31 2008 +1000
1088
1089 radeon: add quirks from DDX
1090
1091 commit 4d68722e470b2583bf60a30e7c08b009cb170589
1092 Author: Alex Deucher <alexdeucher@gmail.com>
1093 Date: Thu Aug 14 09:59:12 2008 +1000
1094
1095 radeon: fix warnings
1096
1097 commit 9ee29ec1a5576b1f0773bd6be690bab3aef23784
1098 Author: Alex Deucher <alexdeucher@gmail.com>
1099 Date: Thu Aug 14 09:58:47 2008 +1000
1100
1101 radeon: get legacy working
1102
1103 - extra ~ in RADEON_WRITE_P()
1104 - re-arrange crtc setup a bit
1105 - add debugging for tracing calls
1106 - fix pitch calculation
1107
1108 commit b9671e487a21fa72743c1b7b89108664b1288441
1109 Author: Alex Deucher <alexdeucher@gmail.com>
1110 Date: Thu Aug 14 09:58:24 2008 +1000
1111
1112 radeon: set base in legacy crtc mode set
1113
1114 commit 648c78fb282cac9d91aff976fe1887b94e7a35d8
1115 Author: Alex Deucher <alexdeucher@gmail.com>
1116 Date: Thu Aug 14 09:55:06 2008 +1000
1117
1118 radeon: Convert COM BIOS to table offset lookup function
1119
1120 commit 5f8722541cd411058b9138e57fc3649cdafb2857
1121 Author: Alex Deucher <alexdeucher@gmail.com>
1122 Date: Thu Aug 14 09:54:03 2008 +1000
1123
1124 radeon/cursor: Restructure cursor handling and add support for legacy cursors
1125
1126 commit 3166da64d45c0f9b4cf1cafe263efabfc8684586
1127 Author: Alex Deucher <alexdeucher@gmail.com>
1128 Date: Thu Aug 14 09:53:08 2008 +1000
1129
1130 radeon/atom: implement crtc lock
1131
1132 commit 70a082a3b8c67fbe034c8d61fdaccce48ef4e4b8
1133 Author: Alex Deucher <alexdeucher@gmail.com>
1134 Date: Thu Aug 14 09:50:15 2008 +1000
1135
1136 LUT updates
1137
1138 - Add gamma set for legacy chips
1139 - Add 16 bpp gamma set
1140
1141 commit c8970aca145e810f0a53f71bc0faab9f17325468
1142 Author: Alex Deucher <alexdeucher@gmail.com>
1143 Date: Thu Aug 14 09:49:55 2008 +1000
1144
1145 radeon: various cleanups
1146
1147 - white space
1148 - move i2c_lock to radeon_i2c.c
1149 - enable tv dac on legacy
1150
1151 commit cd98bdf8447781537345fde1007fda454b7f9b5b
1152 Author: Alex Deucher <alexdeucher@gmail.com>
1153 Date: Thu Aug 14 09:49:30 2008 +1000
1154
1155 radeon: Add legacy dac detect stubs
1156
1157 commit 34620e4554a20a802239032180c95e61ac956995
1158 Author: Alex Deucher <alexdeucher@gmail.com>
1159 Date: Thu Aug 14 09:49:12 2008 +1000
1160
1161 unify connector, i2c handling for atom and legacy
1162
1163 commit 22d018d75a21c44bdeb195a0a7a4f0b03639b980
1164 Author: Alex Deucher <alexdeucher@gmail.com>
1165 Date: Thu Aug 14 09:48:50 2008 +1000
1166
1167 Brute force port of legacy crtc/encoder code
1168
1169 - removed save/init/restore chain with set functions
1170
1171 commit b2305e537574bd8174b4977db3061827dcf88fed
1172 Author: Dave Airlie <airlied@redhat.com>
1173 Date: Thu Aug 14 08:54:04 2008 +1000
1174
1175 FEDORA: radeon set gart buffers start
1176
1177 commit 8018f8d689c3dc6c64be92072b23865adf324792
1178 Author: Dave Airlie <airlied@redhat.com>
1179 Date: Thu Aug 14 08:52:41 2008 +1000
1180
1181 radeon: command submission remove debug
1182
1183 commit 81085b832c2a768c1f8b6fdd454af11805c18521
1184 Author: Dave Airlie <airlied@redhat.com>
1185 Date: Thu Aug 14 08:51:00 2008 +1000
1186
1187 radeon: use mm_enabled variable to denote memory manager running
1188
1189 commit 0582b606dc9f5dfb0718df3a8005edbd2264a16e
1190 Author: Dave Airlie <airlied@redhat.com>
1191 Date: Tue Aug 12 12:19:05 2008 +1000
1192
1193 radeon: hack it up so we get front/back offsets
1194
1195 in the correct place in the drm so buffer swaps work again
1196
1197 commit 40e9e98e33b07535a17200062221702e850329e1
1198 Author: Dave Airlie <airlied@redhat.com>
1199 Date: Tue Aug 12 12:18:08 2008 +1000
1200
1201 radeon: add mm supported call for userspace
1202
1203 commit 3910ad9e1c12b3466e191a0bbeb5c93f9322b5f2
1204 Author: Dave Airlie <airlied@redhat.com>
1205 Date: Tue Aug 12 09:40:18 2008 +1000
1206
1207 FEDORA: add old DMA buffers on top of GEM
1208
1209 commit 003e5ec47e7df307101110e4b2814d76ba47e390
1210 Author: Dave Airlie <airlied@redhat.com>
1211 Date: Fri Aug 8 15:57:10 2008 +1000
1212
1213 radeon: add initial code to support legacy crtc/encoders.
1214
1215 This adds the CRTC and PLL setting code, it doesn't work
1216 yet but its all heading in the right direction.
1217
1218 commit b1bc6db550ab7903d733601970887426d575ec03
1219 Author: Dave Airlie <airlied@redhat.com>
1220 Date: Fri Aug 8 10:11:23 2008 +1000
1221
1222 radeon: add initial tmds parsing for legacy cards
1223
1224 commit bb421d7a8349864f5b231550e79b387b2d11a31a
1225 Author: Dave Airlie <airlied@redhat.com>
1226 Date: Wed Aug 6 16:01:22 2008 +1000
1227
1228 radeon: set new memmap on gem enable
1229
1230 commit a0532d2b688d1c957a8516a4415f7ac881731034
1231 Author: Dave Airlie <airlied@redhat.com>
1232 Date: Wed Aug 6 15:51:02 2008 +1000
1233
1234 radeon/pci: fixup table when GEM allocates it
1235
1236 commit d97c4d21905d332cc293d1118c84e690cedd6805
1237 Author: Dave Airlie <airlied@redhat.com>
1238 Date: Wed Aug 6 15:44:38 2008 +1000
1239
1240 radeon: set gart table size
1241
1242 commit 37140845e116bfcb9b2af4722328c2f0598df386
1243 Author: Dave Airlie <airlied@redhat.com>
1244 Date: Wed Aug 6 15:44:18 2008 +1000
1245
1246 radeon: fix buffer evict slection
1247
1248 commit d7a07c9ea90b6392f6b89e46656e247e59d2fbf0
1249 Author: Dave Airlie <airlied@redhat.com>
1250 Date: Wed Aug 6 15:43:51 2008 +1000
1251
1252 pcigart: fix incorrect memset + no need for wbinvd
1253
1254 commit ff45826ff23d103843791064eb81060966a145b8
1255 Author: Dave Airlie <airlied@redhat.com>
1256 Date: Tue Aug 5 11:22:24 2008 +1000
1257
1258 radeon: fix defines so blit works again
1259
1260 commit d7d4177ae8d8a91d0b14b31ae736a69824e2d04a
1261 Author: Dave Airlie <airlied@redhat.com>
1262 Date: Mon Aug 4 17:10:35 2008 +1000
1263
1264 drm: leave bo driver finish to the driver
1265
1266 commit 8ee6b933237276b3971f91d57357d6b37da33dd6
1267 Author: Dave Airlie <airlied@redhat.com>
1268 Date: Mon Aug 4 14:21:22 2008 +1000
1269
1270 drm: fix unneeded debug
1271
1272 commit 703e09f7de1025467b991bf9083dd5aca64a6148
1273 Author: Dave Airlie <airlied@redhat.com>
1274 Date: Mon Aug 4 14:20:47 2008 +1000
1275
1276 radeon: add setparam for userspace to init the memory manager.
1277
1278 if kms enabled memory manager will be enabled by default
1279
1280 commit 66c0ef85801ce1ac9958d545e858f3ee188b3042
1281 Author: Dave Airlie <airlied@redhat.com>
1282 Date: Mon Aug 4 14:20:26 2008 +1000
1283
1284 drm: kill bo after driver lastclose
1285
1286 commit 7412d483e6a388d0bd0aa2581c73e5612e6a8c63
1287 Author: Dave Airlie <airlied@redhat.com>
1288 Date: Mon Aug 4 11:32:45 2008 +1000
1289
1290 radeon: don't invalidate cache if CP isn't running
1291
1292 commit cf6ad022e1c8f3a1c5b78164d08be2ad3245ecf0
1293 Author: Dave Airlie <airlied@redhat.com>
1294 Date: Sat Aug 2 08:06:26 2008 +1000
1295
1296 drm: fix release locking
1297
1298 commit 65e2c8ca6e4f7a803e186bb80ebe9c09f862164a
1299 Author: Dave Airlie <airlied@redhat.com>
1300 Date: Fri Aug 1 16:55:34 2008 +1000
1301
1302 drm: add radeon modesetting support
1303
1304 commit 03b60f68076f34ece092bcafa36b470bc804a246
1305 Author: Dave Airlie <airlied@redhat.com>
1306 Date: Fri Aug 1 14:06:12 2008 +1000
1307
1308 drm: add TTM VM changes
1309
1310 commit 4e4e1d96aa12ae2c0a88acc518f9d0e74f756a7e
1311 Author: Dave Airlie <airlied@redhat.com>
1312 Date: Thu Jul 31 15:27:27 2008 +1000
1313
1314 drm: import TTM basic objects
1315
1316 commit af0cea8a20b9b38595fa577a15c13572064330f0
1317 Author: Dave Airlie <airlied@redhat.com>
1318 Date: Fri Sep 5 11:26:55 2008 +1000
1319
1320 drm: export drm_i915_flip_t type to userspace to build Mesa
1321 diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
1322 index eb1bf00..046b89a 100644
1323 --- a/arch/x86/mm/pat.c
1324 +++ b/arch/x86/mm/pat.c
1325 @@ -11,6 +11,7 @@
1326 #include <linux/bootmem.h>
1327 #include <linux/debugfs.h>
1328 #include <linux/kernel.h>
1329 +#include <linux/module.h>
1330 #include <linux/gfp.h>
1331 #include <linux/mm.h>
1332 #include <linux/fs.h>
1333 @@ -29,6 +30,7 @@
1334
1335 #ifdef CONFIG_X86_PAT
1336 int __read_mostly pat_enabled = 1;
1337 +EXPORT_SYMBOL_GPL(pat_enabled);
1338
1339 void __cpuinit pat_disable(char *reason)
1340 {
1341 diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
1342 index 30022c4..9aba961 100644
1343 --- a/drivers/gpu/drm/Makefile
1344 +++ b/drivers/gpu/drm/Makefile
1345 @@ -10,8 +10,9 @@ drm-y := drm_auth.o drm_bufs.o drm_cache.o \
1346 drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
1347 drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
1348 drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o \
1349 - drm_crtc.o drm_crtc_helper.o drm_modes.o drm_edid.o
1350 -
1351 + drm_crtc.o drm_crtc_helper.o drm_modes.o drm_edid.o drm_uncached.o \
1352 + drm_bo.o drm_bo_move.o drm_fence.o drm_ttm.o
1353 +
1354 drm-$(CONFIG_COMPAT) += drm_ioc32.o
1355
1356 obj-$(CONFIG_DRM) += drm.o
1357 diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/ati_pcigart.c
1358 index c533d0c..adc57dd 100644
1359 --- a/drivers/gpu/drm/ati_pcigart.c
1360 +++ b/drivers/gpu/drm/ati_pcigart.c
1361 @@ -34,9 +34,55 @@
1362 #include "drmP.h"
1363
1364 # define ATI_PCIGART_PAGE_SIZE 4096 /**< PCI GART page size */
1365 +# define ATI_PCIGART_PAGE_MASK (~(ATI_PCIGART_PAGE_SIZE-1))
1366
1367 -static int drm_ati_alloc_pcigart_table(struct drm_device *dev,
1368 - struct drm_ati_pcigart_info *gart_info)
1369 +#define ATI_PCIE_WRITE 0x4
1370 +#define ATI_PCIE_READ 0x8
1371 +
1372 +static __inline__ void gart_insert_page_into_table(struct drm_ati_pcigart_info *gart_info, dma_addr_t addr, volatile u32 *pci_gart)
1373 +{
1374 + u32 page_base;
1375 +
1376 + page_base = (u32)addr & ATI_PCIGART_PAGE_MASK;
1377 + switch(gart_info->gart_reg_if) {
1378 + case DRM_ATI_GART_IGP:
1379 + page_base |= (upper_32_bits(addr) & 0xff) << 4;
1380 + page_base |= 0xc;
1381 + break;
1382 + case DRM_ATI_GART_PCIE:
1383 + page_base >>= 8;
1384 + page_base |= (upper_32_bits(addr) & 0xff) << 24;
1385 + page_base |= ATI_PCIE_READ | ATI_PCIE_WRITE;
1386 + break;
1387 + default:
1388 + case DRM_ATI_GART_PCI:
1389 + break;
1390 + }
1391 + *pci_gart = cpu_to_le32(page_base);
1392 +}
1393 +
1394 +static __inline__ dma_addr_t gart_get_page_from_table(struct drm_ati_pcigart_info *gart_info, volatile u32 *pci_gart)
1395 +{
1396 + dma_addr_t retval;
1397 + switch(gart_info->gart_reg_if) {
1398 + case DRM_ATI_GART_IGP:
1399 + retval = (*pci_gart & ATI_PCIGART_PAGE_MASK);
1400 + retval += (((*pci_gart & 0xf0) >> 4) << 16) << 16;
1401 + break;
1402 + case DRM_ATI_GART_PCIE:
1403 + retval = (*pci_gart & ~0xc);
1404 + retval <<= 8;
1405 + break;
1406 + case DRM_ATI_GART_PCI:
1407 + retval = *pci_gart;
1408 + break;
1409 + }
1410 +
1411 + return retval;
1412 +}
1413 +
1414 +int drm_ati_alloc_pcigart_table(struct drm_device *dev,
1415 + struct drm_ati_pcigart_info *gart_info)
1416 {
1417 gart_info->table_handle = drm_pci_alloc(dev, gart_info->table_size,
1418 PAGE_SIZE,
1419 @@ -44,12 +90,25 @@ static int drm_ati_alloc_pcigart_table(struct drm_device *dev,
1420 if (gart_info->table_handle == NULL)
1421 return -ENOMEM;
1422
1423 +#ifdef CONFIG_X86
1424 + /* IGPs only exist on x86 in any case */
1425 + if (gart_info->gart_reg_if == DRM_ATI_GART_IGP)
1426 + set_memory_uc((unsigned long)gart_info->table_handle->vaddr, gart_info->table_size >> PAGE_SHIFT);
1427 +#endif
1428 +
1429 + memset(gart_info->table_handle->vaddr, 0, gart_info->table_size);
1430 return 0;
1431 }
1432 +EXPORT_SYMBOL(drm_ati_alloc_pcigart_table);
1433
1434 static void drm_ati_free_pcigart_table(struct drm_device *dev,
1435 struct drm_ati_pcigart_info *gart_info)
1436 {
1437 +#ifdef CONFIG_X86
1438 + /* IGPs only exist on x86 in any case */
1439 + if (gart_info->gart_reg_if == DRM_ATI_GART_IGP)
1440 + set_memory_wb((unsigned long)gart_info->table_handle->vaddr, gart_info->table_size >> PAGE_SHIFT);
1441 +#endif
1442 drm_pci_free(dev, gart_info->table_handle);
1443 gart_info->table_handle = NULL;
1444 }
1445 @@ -63,7 +122,6 @@ int drm_ati_pcigart_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info
1446
1447 /* we need to support large memory configurations */
1448 if (!entry) {
1449 - DRM_ERROR("no scatter/gather memory!\n");
1450 return 0;
1451 }
1452
1453 @@ -98,17 +156,14 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
1454 struct drm_sg_mem *entry = dev->sg;
1455 void *address = NULL;
1456 unsigned long pages;
1457 - u32 *pci_gart, page_base;
1458 + u32 *pci_gart;
1459 dma_addr_t bus_address = 0;
1460 int i, j, ret = 0;
1461 int max_pages;
1462 + dma_addr_t entry_addr;
1463
1464 - if (!entry) {
1465 - DRM_ERROR("no scatter/gather memory!\n");
1466 - goto done;
1467 - }
1468
1469 - if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) {
1470 + if (gart_info->gart_table_location == DRM_ATI_GART_MAIN && gart_info->table_handle == NULL) {
1471 DRM_DEBUG("PCI: no table in VRAM: using normal RAM\n");
1472
1473 ret = drm_ati_alloc_pcigart_table(dev, gart_info);
1474 @@ -116,15 +171,19 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
1475 DRM_ERROR("cannot allocate PCI GART page!\n");
1476 goto done;
1477 }
1478 + }
1479
1480 + if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) {
1481 address = gart_info->table_handle->vaddr;
1482 bus_address = gart_info->table_handle->busaddr;
1483 } else {
1484 address = gart_info->addr;
1485 bus_address = gart_info->bus_addr;
1486 - DRM_DEBUG("PCI: Gart Table: VRAM %08LX mapped at %08lX\n",
1487 - (unsigned long long)bus_address,
1488 - (unsigned long)address);
1489 + }
1490 +
1491 + if (!entry) {
1492 + DRM_ERROR("no scatter/gather memory!\n");
1493 + goto done;
1494 }
1495
1496 pci_gart = (u32 *) address;
1497 @@ -133,8 +192,6 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
1498 pages = (entry->pages <= max_pages)
1499 ? entry->pages : max_pages;
1500
1501 - memset(pci_gart, 0, max_pages * sizeof(u32));
1502 -
1503 for (i = 0; i < pages; i++) {
1504 /* we need to support large memory configurations */
1505 entry->busaddr[i] = pci_map_page(dev->pdev, entry->pagelist[i],
1506 @@ -146,32 +203,18 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
1507 bus_address = 0;
1508 goto done;
1509 }
1510 - page_base = (u32) entry->busaddr[i];
1511
1512 + entry_addr = entry->busaddr[i];
1513 for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) {
1514 - switch(gart_info->gart_reg_if) {
1515 - case DRM_ATI_GART_IGP:
1516 - *pci_gart = cpu_to_le32((page_base) | 0xc);
1517 - break;
1518 - case DRM_ATI_GART_PCIE:
1519 - *pci_gart = cpu_to_le32((page_base >> 8) | 0xc);
1520 - break;
1521 - default:
1522 - case DRM_ATI_GART_PCI:
1523 - *pci_gart = cpu_to_le32(page_base);
1524 - break;
1525 - }
1526 + gart_insert_page_into_table(gart_info, entry_addr, pci_gart);
1527 pci_gart++;
1528 - page_base += ATI_PCIGART_PAGE_SIZE;
1529 + entry_addr += ATI_PCIGART_PAGE_SIZE;
1530 }
1531 }
1532 +
1533 ret = 1;
1534
1535 -#if defined(__i386__) || defined(__x86_64__)
1536 - wbinvd();
1537 -#else
1538 mb();
1539 -#endif
1540
1541 done:
1542 gart_info->addr = address;
1543 @@ -179,3 +222,142 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
1544 return ret;
1545 }
1546 EXPORT_SYMBOL(drm_ati_pcigart_init);
1547 +
1548 +static int ati_pcigart_needs_unbind_cache_adjust(struct drm_ttm_backend *backend)
1549 +{
1550 + return ((backend->flags & DRM_BE_FLAG_BOUND_CACHED) ? 0 : 1);
1551 +}
1552 +
1553 +static int ati_pcigart_populate(struct drm_ttm_backend *backend,
1554 + unsigned long num_pages,
1555 + struct page **pages,
1556 + struct page *dummy_read_page)
1557 +{
1558 + struct ati_pcigart_ttm_backend *atipci_be =
1559 + container_of(backend, struct ati_pcigart_ttm_backend, backend);
1560 +
1561 + atipci_be->pages = pages;
1562 + atipci_be->num_pages = num_pages;
1563 + atipci_be->populated = 1;
1564 + return 0;
1565 +}
1566 +
1567 +static int ati_pcigart_bind_ttm(struct drm_ttm_backend *backend,
1568 + struct drm_bo_mem_reg *bo_mem)
1569 +{
1570 + struct ati_pcigart_ttm_backend *atipci_be =
1571 + container_of(backend, struct ati_pcigart_ttm_backend, backend);
1572 + off_t j;
1573 + int i;
1574 + struct drm_ati_pcigart_info *info = atipci_be->gart_info;
1575 + volatile u32 *pci_gart;
1576 + dma_addr_t offset = bo_mem->mm_node->start;
1577 + dma_addr_t page_base;
1578 +
1579 + pci_gart = info->addr;
1580 +
1581 + j = offset;
1582 + while (j < (offset + atipci_be->num_pages)) {
1583 + if (gart_get_page_from_table(info, pci_gart + j))
1584 + return -EBUSY;
1585 + j++;
1586 + }
1587 +
1588 + for (i = 0, j = offset; i < atipci_be->num_pages; i++, j++) {
1589 + struct page *cur_page = atipci_be->pages[i];
1590 + /* write value */
1591 + page_base = page_to_phys(cur_page);
1592 + gart_insert_page_into_table(info, page_base, pci_gart + j);
1593 + }
1594 +
1595 + mb();
1596 + atipci_be->gart_flush_fn(atipci_be->dev);
1597 +
1598 + atipci_be->bound = 1;
1599 + atipci_be->offset = offset;
1600 + /* need to traverse table and add entries */
1601 + DRM_DEBUG("\n");
1602 + return 0;
1603 +}
1604 +
1605 +static int ati_pcigart_unbind_ttm(struct drm_ttm_backend *backend)
1606 +{
1607 + struct ati_pcigart_ttm_backend *atipci_be =
1608 + container_of(backend, struct ati_pcigart_ttm_backend, backend);
1609 + struct drm_ati_pcigart_info *info = atipci_be->gart_info;
1610 + unsigned long offset = atipci_be->offset;
1611 + int i;
1612 + off_t j;
1613 + volatile u32 *pci_gart = info->addr;
1614 +
1615 + if (atipci_be->bound != 1)
1616 + return -EINVAL;
1617 +
1618 + for (i = 0, j = offset; i < atipci_be->num_pages; i++, j++) {
1619 + *(pci_gart + j) = 0;
1620 + }
1621 +
1622 + mb();
1623 + atipci_be->gart_flush_fn(atipci_be->dev);
1624 + atipci_be->bound = 0;
1625 + atipci_be->offset = 0;
1626 + return 0;
1627 +}
1628 +
1629 +static void ati_pcigart_clear_ttm(struct drm_ttm_backend *backend)
1630 +{
1631 + struct ati_pcigart_ttm_backend *atipci_be =
1632 + container_of(backend, struct ati_pcigart_ttm_backend, backend);
1633 +
1634 + DRM_DEBUG("\n");
1635 + if (atipci_be->pages) {
1636 + backend->func->unbind(backend);
1637 + atipci_be->pages = NULL;
1638 +
1639 + }
1640 + atipci_be->num_pages = 0;
1641 +}
1642 +
1643 +static void ati_pcigart_destroy_ttm(struct drm_ttm_backend *backend)
1644 +{
1645 + struct ati_pcigart_ttm_backend *atipci_be;
1646 + if (backend) {
1647 + DRM_DEBUG("\n");
1648 + atipci_be = container_of(backend, struct ati_pcigart_ttm_backend, backend);
1649 + if (atipci_be) {
1650 + if (atipci_be->pages) {
1651 + backend->func->clear(backend);
1652 + }
1653 + drm_ctl_free(atipci_be, sizeof(*atipci_be), DRM_MEM_TTM);
1654 + }
1655 + }
1656 +}
1657 +
1658 +static struct drm_ttm_backend_func ati_pcigart_ttm_backend =
1659 +{
1660 + .needs_ub_cache_adjust = ati_pcigart_needs_unbind_cache_adjust,
1661 + .populate = ati_pcigart_populate,
1662 + .clear = ati_pcigart_clear_ttm,
1663 + .bind = ati_pcigart_bind_ttm,
1664 + .unbind = ati_pcigart_unbind_ttm,
1665 + .destroy = ati_pcigart_destroy_ttm,
1666 +};
1667 +
1668 +struct drm_ttm_backend *ati_pcigart_init_ttm(struct drm_device *dev, struct drm_ati_pcigart_info *info, void (*gart_flush_fn)(struct drm_device *dev))
1669 +{
1670 + struct ati_pcigart_ttm_backend *atipci_be;
1671 +
1672 + atipci_be = drm_ctl_calloc(1, sizeof (*atipci_be), DRM_MEM_TTM);
1673 + if (!atipci_be)
1674 + return NULL;
1675 +
1676 + atipci_be->populated = 0;
1677 + atipci_be->backend.func = &ati_pcigart_ttm_backend;
1678 +// atipci_be->backend.mem_type = DRM_BO_MEM_TT;
1679 + atipci_be->gart_info = info;
1680 + atipci_be->gart_flush_fn = gart_flush_fn;
1681 + atipci_be->dev = dev;
1682 +
1683 + return &atipci_be->backend;
1684 +}
1685 +EXPORT_SYMBOL(ati_pcigart_init_ttm);
1686 diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c
1687 index 3d33b82..e048aa2 100644
1688 --- a/drivers/gpu/drm/drm_agpsupport.c
1689 +++ b/drivers/gpu/drm/drm_agpsupport.c
1690 @@ -496,6 +496,177 @@ drm_agp_bind_pages(struct drm_device *dev,
1691 }
1692 EXPORT_SYMBOL(drm_agp_bind_pages);
1693
1694 +/*
1695 + * AGP ttm backend interface.
1696 + */
1697 +
1698 +#ifndef AGP_USER_TYPES
1699 +#define AGP_USER_TYPES (1 << 16)
1700 +#define AGP_USER_MEMORY (AGP_USER_TYPES)
1701 +#define AGP_USER_CACHED_MEMORY (AGP_USER_TYPES + 1)
1702 +#endif
1703 +#define AGP_REQUIRED_MAJOR 0
1704 +#define AGP_REQUIRED_MINOR 102
1705 +
1706 +static int drm_agp_needs_unbind_cache_adjust(struct drm_ttm_backend *backend)
1707 +{
1708 + return ((backend->flags & DRM_BE_FLAG_BOUND_CACHED) ? 0 : 1);
1709 +}
1710 +
1711 +
1712 +static int drm_agp_populate(struct drm_ttm_backend *backend,
1713 + unsigned long num_pages, struct page **pages,
1714 + struct page *dummy_read_page)
1715 +{
1716 + struct drm_agp_ttm_backend *agp_be =
1717 + container_of(backend, struct drm_agp_ttm_backend, backend);
1718 + struct page **cur_page, **last_page = pages + num_pages;
1719 + DRM_AGP_MEM *mem;
1720 + int dummy_page_count = 0;
1721 +
1722 + if (drm_alloc_memctl(num_pages * sizeof(void *)))
1723 + return -1;
1724 +
1725 + DRM_DEBUG("drm_agp_populate_ttm\n");
1726 + mem = drm_agp_allocate_memory(agp_be->bridge, num_pages, AGP_USER_MEMORY);
1727 + if (!mem) {
1728 + drm_free_memctl(num_pages * sizeof(void *));
1729 + return -1;
1730 + }
1731 +
1732 + DRM_DEBUG("Current page count is %ld\n", (long) mem->page_count);
1733 + mem->page_count = 0;
1734 + for (cur_page = pages; cur_page < last_page; ++cur_page) {
1735 + struct page *page = *cur_page;
1736 + if (!page) {
1737 + page = dummy_read_page;
1738 + ++dummy_page_count;
1739 + }
1740 + mem->memory[mem->page_count++] = phys_to_gart(page_to_phys(page));
1741 + }
1742 + if (dummy_page_count)
1743 + DRM_DEBUG("Mapped %d dummy pages\n", dummy_page_count);
1744 + agp_be->mem = mem;
1745 + return 0;
1746 +}
1747 +
1748 +static int drm_agp_bind_ttm(struct drm_ttm_backend *backend,
1749 + struct drm_bo_mem_reg *bo_mem)
1750 +{
1751 + struct drm_agp_ttm_backend *agp_be =
1752 + container_of(backend, struct drm_agp_ttm_backend, backend);
1753 + DRM_AGP_MEM *mem = agp_be->mem;
1754 + int ret;
1755 + int snooped = (bo_mem->flags & DRM_BO_FLAG_CACHED) && !(bo_mem->flags & DRM_BO_FLAG_CACHED_MAPPED);
1756 +
1757 + DRM_DEBUG("drm_agp_bind_ttm\n");
1758 + mem->is_flushed = true;
1759 + mem->type = AGP_USER_MEMORY;
1760 + /* CACHED MAPPED implies not snooped memory */
1761 + if (snooped)
1762 + mem->type = AGP_USER_CACHED_MEMORY;
1763 +
1764 + ret = drm_agp_bind_memory(mem, bo_mem->mm_node->start);
1765 + if (ret)
1766 + DRM_ERROR("AGP Bind memory failed\n");
1767 +
1768 + DRM_FLAG_MASKED(backend->flags, (bo_mem->flags & DRM_BO_FLAG_CACHED) ?
1769 + DRM_BE_FLAG_BOUND_CACHED : 0,
1770 + DRM_BE_FLAG_BOUND_CACHED);
1771 + return ret;
1772 +}
1773 +
1774 +static int drm_agp_unbind_ttm(struct drm_ttm_backend *backend)
1775 +{
1776 + struct drm_agp_ttm_backend *agp_be =
1777 + container_of(backend, struct drm_agp_ttm_backend, backend);
1778 +
1779 + DRM_DEBUG("drm_agp_unbind_ttm\n");
1780 + if (agp_be->mem->is_bound)
1781 + return drm_agp_unbind_memory(agp_be->mem);
1782 + else
1783 + return 0;
1784 +}
1785 +
1786 +static void drm_agp_clear_ttm(struct drm_ttm_backend *backend)
1787 +{
1788 + struct drm_agp_ttm_backend *agp_be =
1789 + container_of(backend, struct drm_agp_ttm_backend, backend);
1790 + DRM_AGP_MEM *mem = agp_be->mem;
1791 +
1792 + DRM_DEBUG("drm_agp_clear_ttm\n");
1793 + if (mem) {
1794 + unsigned long num_pages = mem->page_count;
1795 + backend->func->unbind(backend);
1796 + agp_free_memory(mem);
1797 + drm_free_memctl(num_pages * sizeof(void *));
1798 + }
1799 + agp_be->mem = NULL;
1800 +}
1801 +
1802 +static void drm_agp_destroy_ttm(struct drm_ttm_backend *backend)
1803 +{
1804 + struct drm_agp_ttm_backend *agp_be;
1805 +
1806 + if (backend) {
1807 + DRM_DEBUG("drm_agp_destroy_ttm\n");
1808 + agp_be = container_of(backend, struct drm_agp_ttm_backend, backend);
1809 + if (agp_be) {
1810 + if (agp_be->mem)
1811 + backend->func->clear(backend);
1812 + drm_ctl_free(agp_be, sizeof(*agp_be), DRM_MEM_TTM);
1813 + }
1814 + }
1815 +}
1816 +
1817 +static struct drm_ttm_backend_func agp_ttm_backend = {
1818 + .needs_ub_cache_adjust = drm_agp_needs_unbind_cache_adjust,
1819 + .populate = drm_agp_populate,
1820 + .clear = drm_agp_clear_ttm,
1821 + .bind = drm_agp_bind_ttm,
1822 + .unbind = drm_agp_unbind_ttm,
1823 + .destroy = drm_agp_destroy_ttm,
1824 +};
1825 +
1826 +struct drm_ttm_backend *drm_agp_init_ttm(struct drm_device *dev)
1827 +{
1828 +
1829 + struct drm_agp_ttm_backend *agp_be;
1830 + struct agp_kern_info *info;
1831 +
1832 + if (!dev->agp) {
1833 + DRM_ERROR("AGP is not initialized.\n");
1834 + return NULL;
1835 + }
1836 + info = &dev->agp->agp_info;
1837 +
1838 + if (info->version.major != AGP_REQUIRED_MAJOR ||
1839 + info->version.minor < AGP_REQUIRED_MINOR) {
1840 + DRM_ERROR("Wrong agpgart version %d.%d\n"
1841 + "\tYou need at least version %d.%d.\n",
1842 + info->version.major,
1843 + info->version.minor,
1844 + AGP_REQUIRED_MAJOR,
1845 + AGP_REQUIRED_MINOR);
1846 + return NULL;
1847 + }
1848 +
1849 +
1850 + agp_be = drm_ctl_calloc(1, sizeof(*agp_be), DRM_MEM_TTM);
1851 + if (!agp_be)
1852 + return NULL;
1853 +
1854 + agp_be->mem = NULL;
1855 +
1856 + agp_be->bridge = dev->agp->bridge;
1857 + agp_be->populated = false;
1858 + agp_be->backend.func = &agp_ttm_backend;
1859 + agp_be->backend.dev = dev;
1860 +
1861 + return &agp_be->backend;
1862 +}
1863 +EXPORT_SYMBOL(drm_agp_init_ttm);
1864 +
1865 void drm_agp_chipset_flush(struct drm_device *dev)
1866 {
1867 agp_flush_chipset(dev->agp->bridge);
1868 diff --git a/drivers/gpu/drm/drm_bo.c b/drivers/gpu/drm/drm_bo.c
1869 new file mode 100644
1870 index 0000000..8a38f4a
1871 --- /dev/null
1872 +++ b/drivers/gpu/drm/drm_bo.c
1873 @@ -0,0 +1,2162 @@
1874 +/**************************************************************************
1875 + *
1876 + * Copyright (c) 2006-2007 Tungsten Graphics, Inc., Cedar Park, TX., USA
1877 + * All Rights Reserved.
1878 + *
1879 + * Permission is hereby granted, free of charge, to any person obtaining a
1880 + * copy of this software and associated documentation files (the
1881 + * "Software"), to deal in the Software without restriction, including
1882 + * without limitation the rights to use, copy, modify, merge, publish,
1883 + * distribute, sub license, and/or sell copies of the Software, and to
1884 + * permit persons to whom the Software is furnished to do so, subject to
1885 + * the following conditions:
1886 + *
1887 + * The above copyright notice and this permission notice (including the
1888 + * next paragraph) shall be included in all copies or substantial portions
1889 + * of the Software.
1890 + *
1891 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1892 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1893 + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
1894 + * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
1895 + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
1896 + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
1897 + * USE OR OTHER DEALINGS IN THE SOFTWARE.
1898 + *
1899 + **************************************************************************/
1900 +/*
1901 + * Authors: Thomas Hellström <thomas-at-tungstengraphics-dot-com>
1902 + */
1903 +
1904 +#include "drmP.h"
1905 +
1906 +/*
1907 + * Locking may look a bit complicated but isn't really:
1908 + *
1909 + * The buffer usage atomic_t needs to be protected by dev->struct_mutex
1910 + * when there is a chance that it can be zero before or after the operation.
1911 + *
1912 + * dev->struct_mutex also protects all lists and list heads,
1913 + * Hash tables and hash heads.
1914 + *
1915 + * bo->mutex protects the buffer object itself excluding the usage field.
1916 + * bo->mutex does also protect the buffer list heads, so to manipulate those,
1917 + * we need both the bo->mutex and the dev->struct_mutex.
1918 + *
1919 + * Locking order is bo->mutex, dev->struct_mutex. Therefore list traversal
1920 + * is a bit complicated. When dev->struct_mutex is released to grab bo->mutex,
1921 + * the list traversal will, in general, need to be restarted.
1922 + *
1923 + */
1924 +
1925 +static void drm_bo_destroy_locked(struct drm_buffer_object *bo);
1926 +static int drm_bo_setup_vm_locked(struct drm_buffer_object *bo);
1927 +static void drm_bo_unmap_virtual(struct drm_buffer_object *bo);
1928 +
1929 +static inline uint64_t drm_bo_type_flags(unsigned type)
1930 +{
1931 + return (1ULL << (24 + type));
1932 +}
1933 +
1934 +/*
1935 + * bo locked. dev->struct_mutex locked.
1936 + */
1937 +
1938 +void drm_bo_add_to_pinned_lru(struct drm_buffer_object *bo)
1939 +{
1940 + struct drm_mem_type_manager *man;
1941 +
1942 + DRM_ASSERT_LOCKED(&bo->dev->struct_mutex);
1943 + DRM_ASSERT_LOCKED(&bo->mutex);
1944 +
1945 + man = &bo->dev->bm.man[bo->pinned_mem_type];
1946 + list_add_tail(&bo->pinned_lru, &man->pinned);
1947 +}
1948 +
1949 +void drm_bo_add_to_lru(struct drm_buffer_object *bo)
1950 +{
1951 + struct drm_mem_type_manager *man;
1952 +
1953 + DRM_ASSERT_LOCKED(&bo->dev->struct_mutex);
1954 +
1955 + if (!(bo->mem.proposed_flags & (DRM_BO_FLAG_NO_MOVE | DRM_BO_FLAG_NO_EVICT))
1956 + || bo->mem.mem_type != bo->pinned_mem_type) {
1957 + man = &bo->dev->bm.man[bo->mem.mem_type];
1958 + list_add_tail(&bo->lru, &man->lru);
1959 + } else {
1960 + INIT_LIST_HEAD(&bo->lru);
1961 + }
1962 +}
1963 +
1964 +static int drm_bo_vm_pre_move(struct drm_buffer_object *bo, int old_is_pci)
1965 +{
1966 +#ifdef DRM_ODD_MM_COMPAT
1967 + int ret;
1968 +
1969 + if (!bo->map_list.map)
1970 + return 0;
1971 +
1972 + ret = drm_bo_lock_kmm(bo);
1973 + if (ret)
1974 + return ret;
1975 + drm_bo_unmap_virtual(bo);
1976 + if (old_is_pci)
1977 + drm_bo_finish_unmap(bo);
1978 +#else
1979 + if (!bo->map_list.map)
1980 + return 0;
1981 +
1982 + drm_bo_unmap_virtual(bo);
1983 +#endif
1984 + return 0;
1985 +}
1986 +
1987 +static void drm_bo_vm_post_move(struct drm_buffer_object *bo)
1988 +{
1989 +#ifdef DRM_ODD_MM_COMPAT
1990 + int ret;
1991 +
1992 + if (!bo->map_list.map)
1993 + return;
1994 +
1995 + ret = drm_bo_remap_bound(bo);
1996 + if (ret) {
1997 + DRM_ERROR("Failed to remap a bound buffer object.\n"
1998 + "\tThis might cause a sigbus later.\n");
1999 + }
2000 + drm_bo_unlock_kmm(bo);
2001 +#endif
2002 +}
2003 +
2004 +/*
2005 + * Call bo->mutex locked.
2006 + */
2007 +
2008 +int drm_bo_add_ttm(struct drm_buffer_object *bo)
2009 +{
2010 + struct drm_device *dev = bo->dev;
2011 + int ret = 0;
2012 + uint32_t page_flags = 0;
2013 +
2014 + DRM_ASSERT_LOCKED(&bo->mutex);
2015 + bo->ttm = NULL;
2016 +
2017 + if (bo->mem.proposed_flags & DRM_BO_FLAG_WRITE)
2018 + page_flags |= DRM_TTM_PAGE_WRITE;
2019 +
2020 + switch (bo->type) {
2021 + case drm_bo_type_device:
2022 + case drm_bo_type_kernel:
2023 + bo->ttm = drm_ttm_create(dev, bo->num_pages << PAGE_SHIFT,
2024 + page_flags, dev->bm.dummy_read_page);
2025 + if (!bo->ttm)
2026 + ret = -ENOMEM;
2027 + break;
2028 + case drm_bo_type_user:
2029 + bo->ttm = drm_ttm_create(dev, bo->num_pages << PAGE_SHIFT,
2030 + page_flags | DRM_TTM_PAGE_USER,
2031 + dev->bm.dummy_read_page);
2032 + if (!bo->ttm)
2033 + ret = -ENOMEM;
2034 +
2035 + ret = drm_ttm_set_user(bo->ttm, current,
2036 + bo->buffer_start,
2037 + bo->num_pages);
2038 + if (ret)
2039 + return ret;
2040 +
2041 + break;
2042 + default:
2043 + DRM_ERROR("Illegal buffer object type\n");
2044 + ret = -EINVAL;
2045 + break;
2046 + }
2047 +
2048 + return ret;
2049 +}
2050 +EXPORT_SYMBOL(drm_bo_add_ttm);
2051 +
2052 +static int drm_bo_handle_move_mem(struct drm_buffer_object *bo,
2053 + struct drm_bo_mem_reg *mem,
2054 + int evict, int no_wait)
2055 +{
2056 + struct drm_device *dev = bo->dev;
2057 + struct drm_buffer_manager *bm = &dev->bm;
2058 + int old_is_pci = drm_mem_reg_is_pci(dev, &bo->mem);
2059 + int new_is_pci = drm_mem_reg_is_pci(dev, mem);
2060 + struct drm_mem_type_manager *old_man = &bm->man[bo->mem.mem_type];
2061 + struct drm_mem_type_manager *new_man = &bm->man[mem->mem_type];
2062 + int ret = 0;
2063 +
2064 + if (old_is_pci || new_is_pci ||
2065 + ((mem->flags ^ bo->mem.flags) & DRM_BO_FLAG_CACHED))
2066 + ret = drm_bo_vm_pre_move(bo, old_is_pci);
2067 + if (ret)
2068 + return ret;
2069 +
2070 + /*
2071 + * Create and bind a ttm if required.
2072 + */
2073 +
2074 + if (!(new_man->flags & _DRM_FLAG_MEMTYPE_FIXED) && (bo->ttm == NULL)) {
2075 + ret = drm_bo_add_ttm(bo);
2076 + if (ret)
2077 + goto out_err;
2078 +
2079 + if (mem->mem_type != DRM_BO_MEM_LOCAL) {
2080 + ret = drm_ttm_bind(bo->ttm, mem);
2081 + if (ret)
2082 + goto out_err;
2083 + }
2084 +
2085 + if (bo->mem.mem_type == DRM_BO_MEM_LOCAL) {
2086 +
2087 + struct drm_bo_mem_reg *old_mem = &bo->mem;
2088 + uint64_t save_flags = old_mem->flags;
2089 + uint64_t save_proposed_flags = old_mem->proposed_flags;
2090 +
2091 + *old_mem = *mem;
2092 + mem->mm_node = NULL;
2093 + old_mem->proposed_flags = save_proposed_flags;
2094 + DRM_FLAG_MASKED(save_flags, mem->flags,
2095 + DRM_BO_MASK_MEMTYPE);
2096 + goto moved;
2097 + }
2098 +
2099 + }
2100 +
2101 + if (!(old_man->flags & _DRM_FLAG_MEMTYPE_FIXED) &&
2102 + !(new_man->flags & _DRM_FLAG_MEMTYPE_FIXED))
2103 + ret = drm_bo_move_ttm(bo, evict, no_wait, mem);
2104 + else if (dev->driver->bo_driver->move)
2105 + ret = dev->driver->bo_driver->move(bo, evict, no_wait, mem);
2106 + else