rpms/kernel/devel drm-modesetting-radeon.patch, 1.17, 1.18 kernel.spec, 1.910, 1.911

Dave Airlie airlied at fedoraproject.org
Thu Aug 28 23:44:25 UTC 2008


Author: airlied

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24529

Modified Files:
	drm-modesetting-radeon.patch kernel.spec 
Log Message:
* Fri Aug 29 2008 Dave Airlie <airlied at redhat.com>
- rebase i915 GEM support to avoid oopsing.


drm-modesetting-radeon.patch:

Index: drm-modesetting-radeon.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-modesetting-radeon.patch,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- drm-modesetting-radeon.patch	28 Aug 2008 11:43:00 -0000	1.17
+++ drm-modesetting-radeon.patch	28 Aug 2008 23:44:24 -0000	1.18
@@ -1,4 +1,4 @@
-commit a72fd0727c6aa05a9e5efe18bb678a5767b90dee
+commit 5aa38d1a3c8fbf239abeb6f73a9a76acc5124d5c
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 28 21:22:27 2008 +1000
 
@@ -6,13 +6,13 @@
     
     also don't explode on lack of DDC
 
-commit cc2073a2981b46aaf1265996e7680f064f0364ee
+commit 96941a75072d7d681c576921cc510c275891976d
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 28 18:31:50 2008 +1000
 
     drm: fix dev->master convert
 
-commit 031d3afcf12056f4e66e7ab57e84fea91f8e8ef9
+commit f3c81bea8d5160589fe21995a2e1077c0ad01afa
 Author: Kristian Høgsberg <krh at redhat.com>
 Date:   Wed Aug 20 11:26:11 2008 -0400
 
@@ -22,7 +22,7 @@
     
     Signed-off-by: Kristian Høgsberg <krh at redhat.com>
 
-commit 1af4c1e5e807493e3114143b12c980d4ba307075
+commit 6e88a37e7d7fa99b29e2c5022d1bee97afa2b28b
 Author: Kristian Høgsberg <krh at redhat.com>
 Date:   Wed Aug 20 11:24:13 2008 -0400
 
@@ -34,7 +34,7 @@
     
     Signed-off-by: Kristian Høgsberg <krh at redhat.com>
 
-commit 6a4538eb2aeb2df7d4f6bbf0e64da04578e378df
+commit fe4d7a07faea6fc365fed407d339980464590b71
 Author: Kristian Høgsberg <krh at redhat.com>
 Date:   Wed Aug 20 11:20:13 2008 -0400
 
@@ -44,7 +44,7 @@
     
     Signed-off-by: Kristian Høgsberg <krh at redhat.com>
 
-commit 340019e6976088cadd59a6acad98560f46cfe35c
+commit 3825c6b0af8a237fb3a6fe46dff499bddb50a0f2
 Author: Kristian Høgsberg <krh at redhat.com>
 Date:   Wed Aug 20 11:08:52 2008 -0400
 
@@ -52,7 +52,7 @@
     
     Signed-off-by: Kristian Høgsberg <krh at redhat.com>
 
-commit f28df7639437fdf2bfede57d415a2e6f1afb9542
+commit 9a59e8227c2eb23fbf2bcb2737033ef21bb87720
 Author: Kristian Høgsberg <krh at redhat.com>
 Date:   Wed Aug 20 11:04:27 2008 -0400
 
@@ -60,7 +60,7 @@
     
     Signed-off-by: Kristian Høgsberg <krh at redhat.com>
 
-commit 1036ef1a8412b0395fb7bd87127820f97cf7b2ed
+commit 0a209ebe78920cfdcd991c2b7b74217579156bb0
 Author: Kristian Høgsberg <krh at redhat.com>
 Date:   Tue Aug 12 22:39:54 2008 -0400
 
@@ -73,24 +73,13 @@
     
     Signed-off-by: Kristian Høgsberg <krh at redhat.com>
 
-commit b435698b611b839bc787866a91fa354e0f19d189
-Author: Kristian Høgsberg <krh at redhat.com>
-Date:   Tue Aug 12 22:34:43 2008 -0400
-
-    Fail leave_vt ioctl if there are still pinned buffers.
-    
-    If user space fails to unpin all buffers before calling the leave_vt
-    ioctl, we get a BUG_ON().  Fail the leave_vt ioctl instead.
-    
-    Signed-off-by: Kristian Høgsberg <krh at redhat.com>
-
-commit 233c72bf97f3efaaa0518883936f6a876d6f51ef
+commit 4a06f25afb8df52fa85897a3324b04df89f5a356
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 28 16:38:49 2008 +1000
 
     radeon: fix LVDS on atombios - typos
 
-commit 6d18d98162d75f653d3c0a199ea410b831a30a42
+commit 25ad7f2560a6a13441263af31e0de41cca305706
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 28 16:38:34 2008 +1000
 
@@ -98,43 +87,43 @@
     
     This should do a better job at picking the initial configuration crtcs
 
-commit 40aa1a22e9d5a0d3cd4036098a61b607e7e57e60
+commit 88c27423c813ab2482f8ece587e2c314508f3cc7
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 28 12:01:53 2008 +1000
 
     radeon: limit LVDS to first CRTC for now
 
-commit bdb98668670c9025c552eaf50e41eb1d5f4986a3
+commit e6e68d08bf4c273c948fec76106b2f7b509cbf30
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 28 12:01:38 2008 +1000
 
     radeon: fixup checks for crtc in dpms path
 
-commit 934903b922a3e14e4d645cd9b1a2c054dc41fc75
+commit f3a375d2c45dd865d736f9df03e157c698339f60
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Wed Aug 27 15:39:17 2008 +1000
 
     radeon: fix after rebase
 
-commit 892f2e3e5760eae2a7d14e073537d3e5507c2baa
+commit a0c7cb6c3198485fb770cd768c8f6d6e1f20b99d
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Wed Aug 27 13:43:23 2008 +1000
 
     drm: fix whitespace
 
-commit 48dd305fe06443ba66057a9a9c58c93775eed3fd
+commit 3caae63652c2e386342123daf34d13a8ad88359d
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Wed Aug 27 13:43:04 2008 +1000
 
     radeon: avoid oops on encdoers with no crtc set
 
-commit 724f6629e97f640e077456b2139e5d8324b8256b
+commit cb10610337859488b79cc20acebf01c737633a28
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Tue Aug 26 17:23:21 2008 +1000
 
     radeon: fix warning from radeon_legacy_state removal
 
-commit 3890caf32fa66d4c607cb3a89b2afcaaadb2ebc1
+commit 0bb060b65459a7392db7be8569fa5a0172dba2f6
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Tue Aug 26 17:22:37 2008 +1000
 
@@ -143,7 +132,7 @@
     - done: primary dac, vga on tvdac
     - todo: ext dac, tv on tvdac
 
-commit 200e5b0136079aa7c9979cd8a15b69aba19bf226
+commit 53dd6f04236584661fd87acf0086f52b00b08ea9
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Tue Aug 26 17:22:11 2008 +1000
 
@@ -151,25 +140,25 @@
     
     - todo: updated connected status
 
-commit 7ea958126880e743d5161fb2f62491fc63f2e1c3
+commit 5725cb7d0ec835f5d1f4399ae15d670523678559
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Tue Aug 26 17:20:54 2008 +1000
 
     radeon: remove unused legacy state
 
-commit ccf6979258a3f23f6b85510598d6d97b1dbe24aa
+commit 9ce901bbfb5d8fca863d33728928c12baaff0809
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Tue Aug 26 17:20:15 2008 +1000
 
     radeon: get primary dac adj info from bios tables
 
-commit b95536c48c88848605d6c7fefa6a600750b22e8c
+commit 16f177e98bcd5527e88781cee4000ff71943b509
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Tue Aug 26 17:03:13 2008 +1000
 
     x86: export pat_enabled
 
-commit 7f2471ae885084a53d24ea9d95eb2aaec3f427c5
+commit 5e04fb54aa301877d55c9253faf5c970c3728e48
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Tue Aug 26 17:02:43 2008 +1000
 
@@ -178,7 +167,7 @@
     If PAT is enabled, enable write combining support for kernel/user mappings
     when pat is enabled. Also set memory to WC instead of uncached in ttm
 
-commit 052f6c2b56ed030adb6db716c6afdcf55aca328d
+commit f20a018d16f31c1a0147ce55c5c1e722aedde084
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Tue Aug 26 17:01:35 2008 +1000
 
@@ -187,7 +176,7 @@
     move domain validate function to separate function
     call it from correct places
 
-commit 9b3eb7599abc96e9d515c4706f6049acc584f832
+commit f7d6c99e83512b204447d7e767050245cbb4dcfb
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Tue Aug 26 17:00:49 2008 +1000
 
@@ -196,37 +185,37 @@
     If a BO hasn't been dirtied, do a solid fill on VRAM instead of
     migrating pages to VRAM
 
-commit c0a8286392f93be652911574e8d09f681f68f225
+commit a91c4fbd5aee5f67343c75bac60c71e26f0e43e1
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Tue Aug 26 16:59:45 2008 +1000
 
     drm: set clean flags in new flags so it doesn't disappear
 
-commit 89004615aa4d5d2bad28d258887f1382a346f81e
+commit 0e526f63691981325dabcd573a12317a39955c1c
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 22 10:16:20 2008 +1000
 
     radeon: wait for dma gui idle on 2D idle
 
-commit a2cbc401373da1c539db7fdb485ef59efdca92e6
+commit 16093c27570d4600741db95795097cdbd982e86f
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 22 10:16:01 2008 +1000
 
     radeon_gem: fix some misplace ==
 
-commit f65976a6d50f938352937325e65a3cdc9ef06854
+commit f5d271bc48d25a71ebb28df259c149fac58d277f
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 22 10:13:25 2008 +1000
 
     radeon: get buffer upload working
 
-commit 03fc34745331d08b9e0cacfe6252a39e2adc5fb1
+commit d641df30b7bf37669c351cc3b9966730e448b6b9
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 22 10:12:57 2008 +1000
 
     radeon: read back register between on gart flush
 
-commit f9e9b1757794eabc9af07fa0c718bb61e0f0c670
+commit fa958febf783ecaf70d7f29485663a66a2383bce
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 22 10:11:55 2008 +1000
 
@@ -235,7 +224,7 @@
     We need a buffer zeroing function for before we have
     accel running etc
 
-commit 1a4f020274e74d7b3219ddded80472a66269a635
+commit 1937c307b69f414909ab5ed5edb102311fc40d64
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 22 09:49:16 2008 +1000
 
@@ -246,55 +235,55 @@
     Primarily for the move code when we get a buffer in VRAM, we don't need
     to copy the contents just zero them.
 
-commit 10a9ebf01f0cd1959b8b8ad9ec97d706f4902382
+commit 03d6393cd4f19d451a431ded998d00510b760c5a
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 22 09:39:07 2008 +1000
 
     ati_pcigart: add memory barrier and volatile for table access
 
-commit 5fdec9d3234a2728f63ae474e5bcbd7415da43cf
+commit e4d94938c158e1081089d3f7967a2ab309353112
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 22 09:35:26 2008 +1000
 
     drm: remove tlb flush logic from ttm
 
-commit d000ac562c9bca58f6b386cbefcc5c32ffab7a7b
+commit 3958d38e1e813b9336ae49cd564ded90df57d870
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 22 09:34:51 2008 +1000
 
     drm: wbinvd is cache coherent no need to ipi
 
-commit 483c35556e64f397f646d20da548a81fd52c6c28
+commit c3626f7b979aa3dd1f307677bc145a2938673737
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Wed Aug 20 09:56:33 2008 +1000
 
     drm: edid don't probe 3 times because don't
 
-commit 72ec85abf981e38fc1ab215c85a7932d6d223c0b
+commit cf6aa44c45ee21808f3e30ded9d4bd14ae1f6e61
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Tue Aug 19 12:16:13 2008 +1000
 
     FEDORA: add radeon copy root patch
 
-commit d615aed99eb744558329f1e6d9a65febb27a76ea
+commit 8ffd3f2d6ac84a68b0b1b537cdb26fb635dc58db
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Tue Aug 19 12:15:10 2008 +1000
 
     radeon: fix bug in scratch retreival
 
-commit da21061bcd284834d5a8cebcdecd7bd04758979f
+commit e4eb4be9fe14535c0b55f0c0815b510637ca4e19
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Tue Aug 19 12:14:38 2008 +1000
 
     radeon: add GTT domain
 
-commit 9b56b02b511d7f3fd17667241662ec8d674eb17c
+commit 949adbdd4db02f334d3c7cd62fa0625184ea5600
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Wed Aug 27 14:58:05 2008 +1000
 
     radeon: add missing regs from a previous rebase
 
-commit 77556bacaefda7f603952d06eecbbe5a641f2406
+commit f5e665b3a3cee48baaa5ad9785a8d2ebd9b383ee
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 15 14:28:43 2008 +1000
 
@@ -306,37 +295,37 @@
     
     Signed-off-by: Dave Airlie <airlied at redhat.com>
 
-commit 0ed8594159148b3b0e9719138165050bc7f980dd
+commit 95a92133270db49c86d8f1c14cff6f2061a9baa7
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 14 18:14:56 2008 +1000
 
     disable modeset on < r300
 
-commit 9d75d93cd9f83f128f0f80a8fb6fcbab54d62616
+commit aa7120ad9438127008bf5a23edbafbafe4267167
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 15 09:36:21 2008 +1000
 
     radeon: set the base after mode is programmed
 
-commit 5aa8528c11577d1367b3814d5ec530f488000307
+commit 21b278e5d2616629daecfc4c20247b0d5b4ebf2a
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 15 09:35:55 2008 +1000
 
     radeon: fix LVDS modes problem
 
-commit 1e55974aedd5ca8c17957f04533b69c7988cfcf2
+commit adcee8a0b33897b58406256178a4f7f6d5ebd325
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 14 19:29:03 2008 +1000
 
     i915: fix some missing gem defines for ddx build
 
-commit e4ec24e58e8d6f511b961f8c9aeba7987fbbab4f
+commit 6d897fc28180118504c3b37e951c838c4f28fcaa
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 14 18:06:31 2008 +1000
 
     radeon: reserve 64k of VRAM for now for text mode so we don't trample it
 
-commit 701575e6f33351d94fb3570c06ae64021f5cb447
+commit 574b6890103556b0630815aeaf8ab87510d08f18
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 14 15:23:51 2008 +1000
 
@@ -344,7 +333,7 @@
     
     Need to add to Intel when we get there
 
-commit 17319eec482bd75010c7c36b8da1a4b69db5cdb6
+commit 7a7260c2e30e136df2020c66eb941fe3566f4161
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 14 14:38:27 2008 +1000
 
@@ -352,31 +341,31 @@
     
     This gets RN50 to initialise correctly
 
-commit 1fba051708a51d3216b41ce5ab84d014f42567a2
+commit 6ef0ad1914d97bf94c75314c6da0dd489c80621f
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 14 14:37:25 2008 +1000
 
     radeon: add copy/solid regs for rn50
 
-commit 646d8ed657143c6dbd9fea4ca59ac24d6865f102
+commit 582693cab1971d5aaeb395efe1074fd38d9d7913
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Thu Aug 14 09:59:47 2008 +1000
 
     radeon: fill in and make use of more combios tables
 
-commit 01935507da484ac3b9fb0dfa6ec8fb7d9a2ca112
+commit 7e218bb4290054d9c3849f204baa94579789ded7
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 14 09:59:31 2008 +1000
 
     radeon: add quirks from DDX
 
-commit 58e5bea520319546f4ffbf41af96bdafe0d333cf
+commit 5c6038ed70d36dc2bf71cd86983629faaa909d76
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Thu Aug 14 09:59:12 2008 +1000
 
     radeon: fix warnings
 
-commit 4e2988002aadb29d38375b1a0c5d64070bb90e58
+commit 4c55b11e929ce6063f71eb9f933a558faa25cfc4
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Thu Aug 14 09:58:47 2008 +1000
 
@@ -387,31 +376,31 @@
     - add debugging for tracing calls
     - fix pitch calculation
 
-commit 680257172c59f0cd67270ef6604823820476d136
+commit 70fd2d82fdb01dc3b581253b1dfb9b9c1d3f8801
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Thu Aug 14 09:58:24 2008 +1000
 
     radeon: set base in legacy crtc mode set
 
-commit b9aa655ab3a248a6042314e115bfc8999cf826ec
+commit 0a1a8af5e1d2ffa81061de4e4ba2ee6caf7c9384
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Thu Aug 14 09:55:06 2008 +1000
 
     radeon: Convert COM BIOS to table offset lookup function
 
-commit 1670b797d57519d7550d1490ae101e6e5f5f1b0a
+commit a73209ef04e58ff55155218f5739a20b8bfff7db
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Thu Aug 14 09:54:03 2008 +1000
 
     radeon/cursor: Restructure cursor handling and add support for legacy cursors
 
-commit 6aa7cce8472e4b98380a2cf65597b521f68ff200
+commit 098545153ab5c62bb1da12ab1aa512811e96ccd3
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Thu Aug 14 09:53:08 2008 +1000
 
     radeon/atom: implement crtc lock
 
-commit 0999d66480855a3fed977378569095bb8d60710a
+commit abccc3f6e09cdc43beafb8016bbd24cda2ad8316
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Thu Aug 14 09:50:15 2008 +1000
 
@@ -420,7 +409,7 @@
     - Add gamma set for legacy chips
     - Add 16 bpp gamma set
 
-commit 53697daf66a85f9a51686f09793bcb2986e324a8
+commit 6459ec817757f3b096d7fa7216d9bb40795f07f3
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Thu Aug 14 09:49:55 2008 +1000
 
@@ -430,19 +419,19 @@
     - move i2c_lock to radeon_i2c.c
     - enable tv dac on legacy
 
-commit 9e8ff75aacd7b2125ffebcbde00f8186e1f11610
+commit 08668cf6bd2a474c9e55b6d2c714ebdc12e471eb
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Thu Aug 14 09:49:30 2008 +1000
 
     radeon: Add legacy dac detect stubs
 
-commit e509ac8b58acf840b52828ecdb85d541191f56da
+commit c0226a25d70563d4f72a90d88300c84605ed77bc
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Thu Aug 14 09:49:12 2008 +1000
 
     unify connector, i2c handling for atom and legacy
 
-commit 71301300146b5c379f62143c12e3385355d76f34
+commit 229038758dd6cd736e9d0d14ed8d2375ecb31397
 Author: Alex Deucher <alexdeucher at gmail.com>
 Date:   Thu Aug 14 09:48:50 2008 +1000
 
@@ -450,25 +439,25 @@
     
     - removed save/init/restore chain with set functions
 
-commit ee9f3d01358e0bcb28f9ff3be442487a4e14d98d
+commit 30ad651bf74b568d917c703f61c473d56a49c56c
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 14 08:54:04 2008 +1000
 
     FEDORA: radeon set gart buffers start
 
-commit edcd64cca61956763081baaf9dc5bb508d7e9142
+commit df19079258c70194d0a0f7ec23198af33e27bb11
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 14 08:52:41 2008 +1000
 
     radeon: command submission remove debug
 
-commit 1ca20a1bbc78416cf736e267d8378131dd923bfb
+commit 7f87b15a51002f3210d8ed11ce27c3d83983fa30
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Aug 14 08:51:00 2008 +1000
 
     radeon: use mm_enabled variable to denote memory manager running
 
-commit a4c624d3d5e53cfb63c1a9d32c34dc6feb519e78
+commit 747ae8fabbec82790e177b6401f46c74d9ef7923
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Tue Aug 12 12:19:05 2008 +1000
 
@@ -476,19 +465,19 @@
     
     in the correct place in the drm so buffer swaps work again
 
-commit 3b2c5beb00618d3ab64a62058bd066ad16f89ae1
+commit 9dd9199b81fa711871dfc89478a88a9c18338204
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Tue Aug 12 12:18:08 2008 +1000
 
     radeon: add mm supported call for userspace
 
-commit fff5380868936ae86d7733673c7403f1f95ddecd
+commit ce9edcd268687a9a20ece68d5dfc72ac9d23bf2d
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Tue Aug 12 09:40:18 2008 +1000
 
     FEDORA: add old DMA buffers on top of GEM
 
-commit 5457bc89dd6b3f6ef3c8ec071a78deae8328e6c9
+commit c5f3dc17201dd72d37629936e085a8dda8a590d1
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 8 15:57:10 2008 +1000
 
@@ -497,7 +486,7 @@
     This adds the CRTC and PLL setting code, it doesn't work
     yet but its all heading in the right direction.
 
-commit e81d15b6e8daa96746e016541b2ddeffb154afd9
+commit e655643143bedce651b928d074a7c4f79a305fb7
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 8 13:32:50 2008 +1000
 
@@ -506,67 +495,67 @@
     In theory we should be setting the mapping for the legacy node.
     the inode for the control node might be different.
 
-commit 05c6994aa37f32cf8afd6d2b8327b90995617eb5
+commit e56ec66c332816f56caf49713fa1aca25c134fa6
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 8 10:11:23 2008 +1000
 
     radeon: add initial tmds parsing for legacy cards
 
-commit d6d9fbbe50cf3c6861e969a17dc9331075586887
+commit 90df9746484939fcbdac66ca3c3b16f87acf104c
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Wed Aug 6 16:01:22 2008 +1000
 
     radeon: set new memmap on gem enable
 
-commit 5b47d38e964c9a2b0b23e9d77edb5756ee424d18
+commit ae99db100df21053ac5b6090068f464ebfe8b2e7
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Wed Aug 6 15:51:02 2008 +1000
 
     radeon/pci: fixup table when GEM allocates it
 
-commit 9267be1df55eda3e6fc68736524bcddb06457387
+commit dcf60a1d40139bfc69506a7929f64fc2c4d0d951
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Wed Aug 6 15:44:38 2008 +1000
 
     radeon: set gart table size
 
-commit 8d444c0a6c098b04e36b8413d48746248bec12df
+commit 2391bf668d7d426d1b86b156d6b915e8de090881
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Wed Aug 6 15:44:18 2008 +1000
 
     radeon: fix buffer evict slection
 
-commit 1dcad28ca0191d360ab60bb9177636d1a416544b
+commit 166865ddd6688686ac7d5688129bb0686c89acba
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Wed Aug 6 15:43:51 2008 +1000
 
     pcigart: fix incorrect memset + no need for wbinvd
 
-commit f776f17b650403f6b32f7e23d086f7fc2aeb90bb
+commit d3faa4f6a3220996ea02c2e8acd3cb25e51445de
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Tue Aug 5 15:01:02 2008 +1000
 
     drm: don't tear down certain things for modesetting drivers
 
-commit c88bd564aeaf4ab621ad48d0531812a9ca3daa68
+commit 0665b4d4cfadf49a8de4309233a1144eecbc5099
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Tue Aug 5 11:22:24 2008 +1000
 
     radeon: fix defines so blit works again
 
-commit 87d85fec183b07a6823104428982a67cf5c4b61d
+commit 6fcb49ca611e00ac998236bcef9e4ee1d1a67b23
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Mon Aug 4 17:10:35 2008 +1000
 
     drm: leave bo driver finish to the driver
 
-commit 596d60f5fc9ccf3129f65890beea313ff3a2fda7
+commit 1922ad6fef0e420b3ae2b972b08d23041aa00c13
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Mon Aug 4 14:21:22 2008 +1000
 
     drm: fix unneeded debug
 
-commit 4ee2b9b4f556b535eebc0912ccf900239a0079cf
+commit 1734f536d4b161b7dceea19ea43d3e204c7dce52
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Mon Aug 4 14:20:47 2008 +1000
 
@@ -574,49 +563,49 @@
     
     if kms enabled memory manager will be enabled by default
 
-commit f1d19a50d18a24486dc01155bc2b40c5ad84eb53
+commit dbffe9683d28b8d93a6950ab47a1e9a053e10605
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Mon Aug 4 14:20:26 2008 +1000
 
     drm: kill bo after driver lastclose
 
-commit 58e110962b1bdf5874d0637afee6de1930b3bf99
+commit e89731c87081070c8f9e4dce3809335b0a7276d1
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Mon Aug 4 11:32:45 2008 +1000
 
     radeon: don't invalidate cache if CP isn't running
 
-commit 91af46463210b73fda670667dea391ed39f3b944
+commit 52debd2ba8a189cc1aae7582185561b80ef90154
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Sat Aug 2 08:06:26 2008 +1000
 
     drm: fix release locking
 
-commit 62f800ecc5a54308ebe8aeb6cc774a77f82915fc
+commit 45435a275d840f86cd9d3568ac0460ea5ba7990d
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 1 23:39:24 2008 +1000
 
     fix build on powerpc
 
-commit 47e9ef27f7d171f5fd3538db5efc292d7b244219
+commit 58e1bfaeef22179ca917c8bfb0a3fa482e827ba4
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 1 16:55:34 2008 +1000
 
     drm: add radeon modesetting support
 
-commit 9d34b1c32d8d8e30e68247f659ba0ffada1d75fa
+commit db84d6124fe660ad490c3e7b3ee40e96c0dde0f0
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 1 14:07:35 2008 +1000
 
     drm: add modesetting support
 
-commit 1b555582cb807932ad22c84854cd32ae9b4e31c9
+commit eb9c1ca93d321cdfb32ff9273615ba6771e2debc
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 1 14:06:12 2008 +1000
 
     drm: add TTM VM changes
 
-commit a0e99e4019d93a5d771b9b1e2569f3215e552f3b
+commit 51e04da2f8306a10617a3b205e1732de5b6b8dfd
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 1 11:24:36 2008 +1000
 
@@ -624,13 +613,13 @@
     
     This adds the control device nodes also
 
-commit 4c58d35bff8072a6928bc7213e0b0a99be19c219
+commit c9823c49595126884425c74641d62824c7231eae
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 1 11:11:06 2008 +1000
 
     drm: add set/drop master ioctls
 
-commit b256d92693de97baccebd24f9d183dd646f60a9b
+commit f390842b72087c63f9c3c8e5a10bc6db6349b43a
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 1 10:23:57 2008 +1000
 
@@ -640,19 +629,86 @@
     
     Signed-off-by: Dave Airlie <airlied at redhat.com>
 
-commit fa5d8c128e3742cb5b4901a773e6b3d110851a85
+commit a8fabd28323a87d95c0c5858cc29089fb710564b
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Fri Aug 1 10:23:40 2008 +1000
 
     drm: make sarea_max unsigned long
 
-commit b2508f61f1f4eab3f479adfb878c53853a5867db
+commit f8b1f041b4cf58b5e06195f69bf58979ab5fd86b
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Thu Jul 31 15:27:27 2008 +1000
 
     drm: import TTM basic objects
 
-commit a206dcb2b40aee855e02c71016ee2ffc3cb15c90
+commit 7b11f7c24283df70e5f76631d3f8daa941955028
+Author: Keith Packard <keithp at keithp.com>
+Date:   Fri Jun 20 00:08:06 2008 -0700
+
+    Export shmem_file_setup and shmem_getpage for DRM-GEM
+    
+    GEM needs to create shmem files and get pages related to a shmem file, and
+    using this pair of functions is the easiest way to do that.
+    
+    Signed-off-by: Eric Anholt <eric at anholt.net>
+
+commit f540d73871f75826da9096ff5f76b9cbb674e410
+Author: Matthew Wilcox <matthew at wil.cx>
+Date:   Tue Jul 22 08:52:16 2008 -0400
+
+    PCI: Add pci_read_base() API
+    
+    Some devices have a BAR at a non-standard address.  The pci_read_base()
+    API allows us to probe these BARs and fill in a resource for it as if
+    they were standard BARs.
+    
+    Signed-off-by: Matthew Wilcox <willy at linux.intel.com>
+
+commit edc5293b7e74bd9ae93755dfdf73375a743f4079
+Author: David Howells <dhowells at redhat.com>
+Date:   Wed Jul 30 12:29:38 2008 -0700
+
+    SiS DRM: fix a pointer cast warning
+    
+    Fix a pointer cast warning in the SIS DRM code.
+    
+    This was introduced in patch ce65a44de07f73ceda1749812b75086b7add408d.
+    
+    Signed-off-by: David Howells <dhowells at redhat.com>
+    Cc: Dave Airlie <airlied at linux.ie>
+    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit d340e4814d081815e6fb47cb90c5a3c6bc6e34e2
+Author: David Howells <dhowells at redhat.com>
+Date:   Wed Jul 30 12:29:37 2008 -0700
+
+    SiS DRM: fix the memory allocator if the SIS FB is built as a module
+    
+    Fix the SIS DRM memory allocator if the SIS FB built as a module.  The SIS DRM
+    code initialises the mm allocation hooks, but _only_ if the SIS FB is not
+    built as a module because it depends on CONFIG_FB_SIS, and that's unset if the
+    SIS FB is not built in.  It must check CONFIG_FB_SIS_MODULE as well.
+    
+    Signed-off-by: David Howells <dhowells at redhat.com>
+    Cc: Dave Airlie <airlied at linux.ie>
+    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 9128c0d4fd881e1fe9780380307faa14d14d4c52
+Author: Carlos R. Mafra <crmafra2 at gmail.com>
+Date:   Wed Jul 30 12:29:37 2008 -0700
+
+    drm: remove #define's for non-linux systems
+    
+    There is no point in considering FreeBSD et al.  in the linux kernel
+    source code.
+    
+    Signed-off-by: Carlos R. Mafra <crmafra at gmail.com>
+    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit a60cee8d6c685530dea08e457664af2cf6bdd187
 Author: Eric Anholt <eric at anholt.net>
 Date:   Wed Jul 30 12:06:12 2008 -0700
 
@@ -671,30 +727,32 @@
     
     Signed-off-by: Eric Anholt <eric at anholt.net>
 
-commit 66c6e72791ff1dc0696938498ad674b241836dda
-Author: Keith Packard <keithp at keithp.com>
-Date:   Fri Jun 20 00:08:06 2008 -0700
+commit 764c89c3707c839dc177d939f846c4079592e00f
+Author: Eric Anholt <eric at anholt.net>
+Date:   Thu Aug 21 12:53:33 2008 -0700
 
-    Export shmem_file_setup and shmem_getpage for DRM-GEM
+    Export kmap_atomic_pfn for DRM-GEM.
     
-    GEM needs to create shmem files and get pages related to a shmem file, and
-    using this pair of functions is the easiest way to do that.
+    The driver would like to map IO space directly for copying data in when
+    appropriate, to avoid CPU cache flushing for streaming writes.
+    kmap_atomic_pfn lets us avoid IPIs associated with ioremap for this process.
     
     Signed-off-by: Eric Anholt <eric at anholt.net>
 
-commit bb7012157f14b6e026b4adf79b3b4d73c309333d
-Author: Matthew Wilcox <matthew at wil.cx>
-Date:   Tue Jul 22 08:52:16 2008 -0400
+commit 3a0980df34c533eb1d5533280f317e53277d354d
+Author: Keith Packard <keithp at keithp.com>
+Date:   Fri Jun 20 00:08:06 2008 -0700
 
-    PCI: Add pci_read_base() API
+    Export shmem_file_setup for DRM-GEM
     
-    Some devices have a BAR at a non-standard address.  The pci_read_base()
-    API allows us to probe these BARs and fill in a resource for it as if
-    they were standard BARs.
+    GEM needs to create shmem files to back buffer objects.  Though currently
+    creation of files for objects could have been driven from userland, the
+    modesetting work will require allocation of buffer objects before userland
+    is running, for boot-time message display.
     
-    Signed-off-by: Matthew Wilcox <willy at linux.intel.com>
+    Signed-off-by: Eric Anholt <eric at anholt.net>
 
-commit 79861d5a15fe125420353063b7c44b12bc2b2ed3
+commit 8088d4447f16e018884abc152b40f67c1f015a10
 Author: Matthew Garrett <mjg59 at srcf.ucam.org>
 Date:   Tue Aug 5 19:37:25 2008 +0100
 
@@ -707,7 +765,7 @@
     Signed-off-by: Matthew Garrett <mjg at redhat.com>
     Signed-off-by: Dave Airlie <airlied at linux.ie>
 
-commit 873a25f5b9a91982249ca20bde0678e2078818cb
+commit e06ef39b6e69bb5459705da0ef6ba66d06235375
 Author: Keith Packard <keithp at keithp.com>
 Date:   Wed Jul 30 13:03:43 2008 -0700
 
@@ -717,9 +775,8 @@
     page.
     
     Signed-off-by: Eric Anholt <eric at anholt.net>
-    Signed-off-by: Dave Airlie <airlied at redhat.com>
 
-commit a16ad81e9e381ba13fee2597174d9ad65ca2f9f8
+commit ace8f8454386744c676f748dc1ddbd0755e02dd7
 Author: Keith Packard <keithp at keithp.com>
 Date:   Wed Jul 30 12:21:20 2008 -0700
 
@@ -728,9 +785,8 @@
     This avoids early termination for long-running commands.
     
     Signed-off-by: Eric Anholt <eric at anholt.net>
-    Signed-off-by: Dave Airlie <airlied at redhat.com>
 
-commit c7b38b62ce559757ab1e99bb5c60c3300d8ef3fb
+commit 11ce22b4fa4e39d41af038945f54d0da3e05fcef
 Author: Eric Anholt <eric at anholt.net>
 Date:   Tue Jul 29 12:10:39 2008 -0700
 
@@ -743,18 +799,16 @@
     handlers for frequent graphics interrupts.
     
     Signed-off-by: Eric Anholt <eric at anholt.net>
-    Signed-off-by: Dave Airlie <airlied at redhat.com>
 
-commit 8fce383438498f36bf14a7752be9bae4f8d80325
+commit 1a1d9d9ceb6d9261bfa3ec1da4848a0e45e81d47
 Author: Jesse Barnes <jbarnes at virtuousgeek.org>
 Date:   Tue Jul 29 11:54:06 2008 -0700
 
     i915: Use more consistent names for regs, and store them in a separate file.
     
     Signed-off-by: Eric Anholt <eric at anholt.net>
-    Signed-off-by: Dave Airlie <airlied at redhat.com>
 
-commit 6a5c4f5ae72c2388040ac033cae8fcd174529639
+commit 069b3238e1cc4f98852c77836f1d5a856e7613b2
 Author: Keith Packard <keithp at keithp.com>
 Date:   Wed Jul 30 12:36:08 2008 -0700
 
@@ -763,9 +817,8 @@
     It is already correctly detected by the kernel for use in suspend/resume.
     
     Signed-off-by: Eric Anholt <eric at anholt.net>
-    Signed-off-by: Dave Airlie <airlied at redhat.com>
 
-commit 1da03a8e3ef09b321a381a629dc0c979a233fe52
+commit f231aeac9602b38afb7605f9a80a2f7e77547d02
 Author: Keith Packard <keithp at keithp.com>
 Date:   Wed Jul 30 12:28:47 2008 -0700
 
@@ -775,51 +828,18 @@
     MI_BATCH_BUFFER_START; there's no reason to let user mode configure this.
     
     Signed-off-by: Eric Anholt <eric at anholt.net>
-    Signed-off-by: Dave Airlie <airlied at redhat.com>
-
-commit 42eceedbf25dd8992807d51c930e552dc6593dc6
-Author: David Howells <dhowells at redhat.com>
-Date:   Wed Jul 30 12:29:38 2008 -0700
-
-    SiS DRM: fix a pointer cast warning
-    
-    Fix a pointer cast warning in the SIS DRM code.
-    
-    This was introduced in patch ce65a44de07f73ceda1749812b75086b7add408d.
-    
-    Signed-off-by: David Howells <dhowells at redhat.com>
-    Cc: Dave Airlie <airlied at linux.ie>
-    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
-    Signed-off-by: Dave Airlie <airlied at redhat.com>
-
-commit ab1772f48d76129906fff269911819a6ae315c28
-Author: David Howells <dhowells at redhat.com>
-Date:   Wed Jul 30 12:29:37 2008 -0700
-
-    SiS DRM: fix the memory allocator if the SIS FB is built as a module
-    
-    Fix the SIS DRM memory allocator if the SIS FB built as a module.  The SIS DRM
-    code initialises the mm allocation hooks, but _only_ if the SIS FB is not
-    built as a module because it depends on CONFIG_FB_SIS, and that's unset if the
-    SIS FB is not built in.  It must check CONFIG_FB_SIS_MODULE as well.
-    
-    Signed-off-by: David Howells <dhowells at redhat.com>
-    Cc: Dave Airlie <airlied at linux.ie>
-    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
-    Signed-off-by: Dave Airlie <airlied at redhat.com>
-
-commit 4e51d757c801953ebe61639ad713f4d37d266384
-Author: Carlos R. Mafra <crmafra2 at gmail.com>
-Date:   Wed Jul 30 12:29:37 2008 -0700
-
-    drm: remove #define's for non-linux systems
-    
-    There is no point in considering FreeBSD et al.  in the linux kernel
-    source code.
-    
-    Signed-off-by: Carlos R. Mafra <crmafra at gmail.com>
-    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
-    Signed-off-by: Dave Airlie <airlied at redhat.com>
+diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c
+index 165c871..d52e91d 100644
+--- a/arch/x86/mm/highmem_32.c
++++ b/arch/x86/mm/highmem_32.c
+@@ -137,6 +137,7 @@ void *kmap_atomic_pfn(unsigned long pfn, enum km_type type)
+ 
+ 	return (void*) vaddr;
+ }
++EXPORT_SYMBOL(kmap_atomic_pfn);
+ 
+ struct page *kmap_atomic_to_page(void *ptr)
+ {
 diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
 index 2a50e0f..6c9e6df 100644
 --- a/arch/x86/mm/pat.c
@@ -1196,7 +1216,7 @@
 +}
 +EXPORT_SYMBOL(ati_pcigart_init_ttm);
 diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c
-index aefa5ac..0bd9171 100644
+index aefa5ac..7ed9d31 100644
 --- a/drivers/gpu/drm/drm_agpsupport.c
 +++ b/drivers/gpu/drm/drm_agpsupport.c
 @@ -33,6 +33,7 @@
@@ -1221,9 +1241,9 @@
 + */
 +DRM_AGP_MEM *
 +drm_agp_bind_pages(struct drm_device *dev,
-+                  struct page **pages,
-+                  unsigned long num_pages,
-+                  uint32_t gtt_offset)
++		   struct page **pages,
++		   unsigned long num_pages,
++		   uint32_t gtt_offset)
 +{
 +	DRM_AGP_MEM *mem;
 +	int ret, i;
@@ -4435,7 +4455,7 @@
  			goto done;
 diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
 new file mode 100644
-index 0000000..ab7df63
+index 0000000..bb9a415
 --- /dev/null
 +++ b/drivers/gpu/drm/drm_cache.c
 @@ -0,0 +1,71 @@
@@ -4482,7 +4502,7 @@
 +		return;
 +
 +	page_virtual = kmap_atomic(page, KM_USER0);
-+	for (i=0; i < PAGE_SIZE; i += boot_cpu_data.x86_clflush_size)
++	for (i = 0; i < PAGE_SIZE; i += boot_cpu_data.x86_clflush_size)
 +		clflush(page_virtual + i);
 +	kunmap_atomic(page_virtual, KM_USER0);
 +}
@@ -4497,7 +4517,7 @@
 +		unsigned long i;
 +
 +		mb();
-+		for (i=0; i < num_pages; ++i)
++		for (i = 0; i < num_pages; ++i)
 +			drm_clflush_page(*pages++);
 +		mb();
 +
@@ -11129,7 +11149,7 @@
 +}
 +EXPORT_SYMBOL(drm_mode_connector_list_update);
 diff --git a/drivers/gpu/drm/drm_proc.c b/drivers/gpu/drm/drm_proc.c
-index 93b1e04..0d9c23e 100644
+index 93b1e04..9e5bf88 100644
 --- a/drivers/gpu/drm/drm_proc.c
 +++ b/drivers/gpu/drm/drm_proc.c
 @@ -49,6 +49,10 @@ static int drm_queues_info(char *buf, char **start, off_t offset,
@@ -11166,15 +11186,18 @@
  #if DRM_DEBUG_CODE
  	{"vma", drm_vma_info},
  #endif
-@@ -90,6 +97,7 @@ static struct drm_proc_list {
+@@ -90,8 +97,9 @@ static struct drm_proc_list {
  int drm_proc_init(struct drm_minor *minor, int minor_id,
  		  struct proc_dir_entry *root)
  {
 +	struct drm_device *dev = minor->dev;
  	struct proc_dir_entry *ent;
- 	int i, j;
+-	int i, j;
++	int i, j, ret;
  	char name[64];
-@@ -102,6 +110,12 @@ int drm_proc_init(struct drm_minor *minor, int minor_id,
+ 
+ 	sprintf(name, "%d", minor_id);
+@@ -102,23 +110,42 @@ int drm_proc_init(struct drm_minor *minor, int minor_id,
  	}
  
  	for (i = 0; i < DRM_PROC_ENTRIES; i++) {
@@ -11187,7 +11210,60 @@
  		ent = create_proc_entry(drm_proc_list[i].name,
  					S_IFREG | S_IRUGO, minor->dev_root);
  		if (!ent) {
-@@ -163,7 +177,8 @@ int drm_proc_cleanup(struct drm_minor *minor, struct proc_dir_entry *root)
+ 			DRM_ERROR("Cannot create /proc/dri/%s/%s\n",
+ 				  name, drm_proc_list[i].name);
+-			for (j = 0; j < i; j++)
+-				remove_proc_entry(drm_proc_list[i].name,
+-						  minor->dev_root);
+-			remove_proc_entry(name, root);
+-			minor->dev_root = NULL;
+-			return -1;
++			ret = -1;
++			goto fail;
+ 		}
+ 		ent->read_proc = drm_proc_list[i].f;
+ 		ent->data = minor;
+ 	}
+ 
++	if (dev->driver->proc_init) {
++		ret = dev->driver->proc_init(minor);
++		if (ret) {
++			DRM_ERROR("DRM: Driver failed to initialize "
++				  "/proc/dri.\n");
++			goto fail;
++		}
++	}
++
+ 	return 0;
++ fail:
++
++	for (j = 0; j < i; j++)
++		remove_proc_entry(drm_proc_list[i].name,
++				  minor->dev_root);
++	remove_proc_entry(name, root);
++	minor->dev_root = NULL;
++	return ret;
+ }
+ 
+ /**
+@@ -133,12 +160,16 @@ int drm_proc_init(struct drm_minor *minor, int minor_id,
+  */
+ int drm_proc_cleanup(struct drm_minor *minor, struct proc_dir_entry *root)
+ {
++	struct drm_device *dev = minor->dev;
+ 	int i;
+ 	char name[64];
+ 
+ 	if (!root || !minor->dev_root)
+ 		return 0;
+ 
++	if (dev->driver->proc_cleanup)
++		dev->driver->proc_cleanup(minor);
++
+ 	for (i = 0; i < DRM_PROC_ENTRIES; i++)
+ 		remove_proc_entry(drm_proc_list[i].name, minor->dev_root);
+ 	sprintf(name, "%d", minor->index);
+@@ -163,7 +194,8 @@ int drm_proc_cleanup(struct drm_minor *minor, struct proc_dir_entry *root)
  static int drm_name_info(char *buf, char **start, off_t offset, int request,
  			 int *eof, void *data)
  {
@@ -11197,7 +11273,7 @@
  	struct drm_device *dev = minor->dev;
  	int len = 0;
  
-@@ -172,13 +187,16 @@ static int drm_name_info(char *buf, char **start, off_t offset, int request,
+@@ -172,13 +204,16 @@ static int drm_name_info(char *buf, char **start, off_t offset, int request,
  		return 0;
  	}
  
@@ -11216,7 +11292,7 @@
  	} else {
  		DRM_PROC_PRINT("%s %s\n", dev->driver->pci_driver.name,
  			       pci_name(dev->pdev));
-@@ -480,6 +498,84 @@ static int drm_clients_info(char *buf, char **start, off_t offset,
+@@ -480,6 +515,84 @@ static int drm_clients_info(char *buf, char **start, off_t offset,
  	return ret;
  }
  
@@ -11248,7 +11324,7 @@
 +}
 +
 +static int drm_gem_name_info(char *buf, char **start, off_t offset,
-+                            int request, int *eof, void *data)
++			     int request, int *eof, void *data)
 +{
 +	struct drm_minor *minor = (struct drm_minor *) data;
 +	struct drm_device *dev = minor->dev;
@@ -11273,7 +11349,7 @@
 +}
 +
 +static int drm_gem_object_info(char *buf, char **start, off_t offset,
-+                              int request, int *eof, void *data)
++			       int request, int *eof, void *data)
 +{
 +	struct drm_minor *minor = (struct drm_minor *) data;
 +	struct drm_device *dev = minor->dev;
@@ -11302,7 +11378,7 @@
  
  static int drm__vma_info(char *buf, char **start, off_t offset, int request,
 diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
-index c2f584f..94bc8de 100644
+index c2f584f..1f842d8 100644
 --- a/drivers/gpu/drm/drm_stub.c
 +++ b/drivers/gpu/drm/drm_stub.c
 @@ -57,6 +57,14 @@ static int drm_minor_get_id(struct drm_device *dev, int type)
@@ -11467,7 +11543,7 @@
  	}
  
 +	if (driver->driver_features & DRIVER_GEM) {
-+		retcode = drm_gem_init (dev);
++		retcode = drm_gem_init(dev);
 +		if (retcode) {
 +			DRM_ERROR("Cannot initialize graphics execution "
 +				  "manager (GEM)\n");
@@ -11493,35 +11569,7 @@
  
  	idr_replace(&drm_minors_idr, new_minor, minor_id);
  
-@@ -202,6 +327,14 @@ static int drm_get_minor(struct drm_device *dev, struct drm_minor **minor, int t
- 			DRM_ERROR("DRM: Failed to initialize /proc/dri.\n");
- 			goto err_mem;
- 		}
-+		if (dev->driver->proc_init) {
-+			ret = dev->driver->proc_init(new_minor);
-+			if (ret) {
-+				DRM_ERROR("DRM: Driver failed to initialize "
-+					  "/proc/dri.\n");
-+				goto err_mem;
-+			}
-+		}
- 	} else
- 		new_minor->dev_root = NULL;
- 
-@@ -218,8 +351,11 @@ static int drm_get_minor(struct drm_device *dev, struct drm_minor **minor, int t
- 
- 
- err_g2:
--	if (new_minor->type == DRM_MINOR_LEGACY)
-+	if (new_minor->type == DRM_MINOR_LEGACY) {
-+		if (dev->driver->proc_cleanup)
-+			dev->driver->proc_cleanup(new_minor);
- 		drm_proc_cleanup(new_minor, drm_proc_root);
-+	}
- err_mem:
- 	kfree(new_minor);
- err_idr:
-@@ -260,15 +396,31 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
+@@ -260,15 +385,31 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
  		printk(KERN_ERR "DRM: Fill_in_dev failed.\n");
  		goto err_g2;
  	}
@@ -11555,7 +11603,7 @@
  err_g2:
  	pci_disable_device(pdev);
  err_g1:
-@@ -290,11 +442,6 @@ int drm_put_dev(struct drm_device * dev)
+@@ -290,11 +431,6 @@ int drm_put_dev(struct drm_device * dev)
  {
  	DRM_DEBUG("release primary %s\n", dev->driver->pci_driver.name);
  
@@ -11567,23 +11615,15 @@
  	if (dev->devname) {
  		drm_free(dev->devname, strlen(dev->devname) + 1,
  			 DRM_MEM_DRIVER);
-@@ -317,10 +464,14 @@ int drm_put_dev(struct drm_device * dev)
+@@ -317,6 +453,7 @@ int drm_put_dev(struct drm_device * dev)
  int drm_put_minor(struct drm_minor **minor_p)
  {
  	struct drm_minor *minor = *minor_p;
 +
  	DRM_DEBUG("release secondary minor %d\n", minor->index);
  
--	if (minor->type == DRM_MINOR_LEGACY)
-+	if (minor->type == DRM_MINOR_LEGACY) {
-+		if (minor->dev->driver->proc_cleanup)
-+			minor->dev->driver->proc_cleanup(minor);
- 		drm_proc_cleanup(minor, drm_proc_root);
-+	}
- 	drm_sysfs_device_remove(minor);
- 
- 	idr_remove(&drm_minors_idr, minor->index);
-@@ -329,3 +480,4 @@ int drm_put_minor(struct drm_minor **minor_p)
+ 	if (minor->type == DRM_MINOR_LEGACY)
+@@ -329,3 +466,4 @@ int drm_put_minor(struct drm_minor **minor_p)
  	*minor_p = NULL;
  	return 0;
  }
@@ -12713,7 +12753,7 @@
  i915-$(CONFIG_COMPAT)   += i915_ioc32.o
  
 diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
-index 8897434..40fae83 100644
+index 8897434..24b43cd 100644
 --- a/drivers/gpu/drm/i915/i915_dma.c
 +++ b/drivers/gpu/drm/i915/i915_dma.c
 @@ -39,42 +39,100 @@
@@ -12996,8 +13036,8 @@
 -			 struct drm_clip_rect __user * boxes,
 -			 int i, int DR1, int DR4)
 +int
-+i915_emit_box(struct drm_device * dev,
-+	      struct drm_clip_rect __user * boxes,
++i915_emit_box(struct drm_device *dev,
++	      struct drm_clip_rect __user *boxes,
 +	      int i, int DR1, int DR4)
  {
  	drm_i915_private_t *dev_priv = dev->dev_private;
@@ -13167,11 +13207,21 @@
  			dev_priv->status_gfx_addr);
  	DRM_DEBUG("load hws at %p\n", dev_priv->hw_status_page);
  	return 0;
-@@ -784,6 +806,28 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
+@@ -776,6 +798,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
+ 	memset(dev_priv, 0, sizeof(drm_i915_private_t));
+ 
+ 	dev->dev_private = (void *)dev_priv;
++	dev_priv->dev = dev;
+ 
+ 	/* Add register map (needed for suspend/resume) */
+ 	base = drm_get_resource_start(dev, mmio_bar);
+@@ -784,6 +807,30 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
  	ret = drm_addmap(dev, base, size, _DRM_REGISTERS,
  			 _DRM_KERNEL | _DRM_DRIVER,
  			 &dev_priv->mmio_map);
 +
++	i915_gem_load(dev);
++
 +	/* Init HWS */
 +	if (!I915_NEED_GFX_HWS(dev)) {
 +		ret = i915_init_phys_hws(dev);
@@ -13196,7 +13246,7 @@
  	return ret;
  }
  
-@@ -791,15 +835,41 @@ int i915_driver_unload(struct drm_device *dev)
+@@ -791,15 +838,41 @@ int i915_driver_unload(struct drm_device *dev)
  {
  	struct drm_i915_private *dev_priv = dev->dev_private;
  
@@ -13238,7 +13288,7 @@
  void i915_driver_lastclose(struct drm_device * dev)
  {
  	drm_i915_private_t *dev_priv = dev->dev_private;
-@@ -807,6 +877,8 @@ void i915_driver_lastclose(struct drm_device * dev)
+@@ -807,6 +880,8 @@ void i915_driver_lastclose(struct drm_device * dev)
  	if (!dev_priv)
  		return;
  
@@ -13247,7 +13297,7 @@
  	if (dev_priv->agp_heap)
  		i915_mem_takedown(&(dev_priv->agp_heap));
  
-@@ -819,6 +891,13 @@ void i915_driver_preclose(struct drm_device * dev, struct drm_file *file_priv)
+@@ -819,6 +894,13 @@ void i915_driver_preclose(struct drm_device * dev, struct drm_file *file_priv)
  	i915_mem_release(dev, file_priv, dev_priv->agp_heap);
  }
  
@@ -13261,7 +13311,7 @@
  struct drm_ioctl_desc i915_ioctls[] = {
  	DRM_IOCTL_DEF(DRM_I915_INIT, i915_dma_init, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
  	DRM_IOCTL_DEF(DRM_I915_FLUSH, i915_flush_ioctl, DRM_AUTH),
-@@ -837,6 +916,22 @@ struct drm_ioctl_desc i915_ioctls[] = {
+@@ -837,6 +919,22 @@ struct drm_ioctl_desc i915_ioctls[] = {
  	DRM_IOCTL_DEF(DRM_I915_GET_VBLANK_PIPE,  i915_vblank_pipe_get, DRM_AUTH ),
  	DRM_IOCTL_DEF(DRM_I915_VBLANK_SWAP, i915_vblank_swap, DRM_AUTH),
  	DRM_IOCTL_DEF(DRM_I915_HWS_ADDR, i915_set_status_page, DRM_AUTH),
@@ -13285,7 +13335,7 @@
  
  int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls);
 diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
-index 93aed1c..6975454 100644
+index 93aed1c..ce20981 100644
 --- a/drivers/gpu/drm/i915/i915_drv.c
 +++ b/drivers/gpu/drm/i915/i915_drv.c
 @@ -279,13 +279,13 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
@@ -13469,7 +13519,7 @@
  	    DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | /* DRIVER_USE_MTRR |*/
  	    DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL |
 -	    DRIVER_IRQ_VBL2,
-+	    DRIVER_IRQ_VBL2, DRIVER_GEM,
++	    DRIVER_IRQ_VBL2 | DRIVER_GEM,
  	.load = i915_driver_load,
  	.unload = i915_driver_unload,
 +	.open = i915_driver_open,
@@ -13493,7 +13543,7 @@
  	.fops = {
  		 .owner = THIS_MODULE,
 diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
-index d7326d9..5d00fe2 100644
+index d7326d9..22b6925 100644
 --- a/drivers/gpu/drm/i915/i915_drv.h
 +++ b/drivers/gpu/drm/i915/i915_drv.h
 @@ -30,6 +30,8 @@
@@ -13927,7 +13977,7 @@
 +#if WATCH_INACTIVE
 +void i915_verify_inactive(struct drm_device *dev, char *file, int line);
 +#else
-+#define i915_verify_inactive(dev,file,line)
++#define i915_verify_inactive(dev, file, line)
 +#endif
 +void i915_gem_object_check_coherency(struct drm_gem_object *obj, int handle);
 +void i915_gem_dump_object(struct drm_gem_object *obj, int len,
@@ -14775,10 +14825,10 @@
  #define IS_845G(dev) ((dev)->pci_device == 0x2562)
 diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
 new file mode 100644
-index 0000000..86980e2
+index 0000000..440659e
 --- /dev/null
 +++ b/drivers/gpu/drm/i915/i915_gem.c
-@@ -0,0 +1,2525 @@
+@@ -0,0 +1,2536 @@
 +/*
 + * Copyright © 2008 Intel Corporation
 + *
@@ -14822,7 +14872,7 @@
 +				 uint64_t size,
 +				 uint32_t read_domains,
 +				 uint32_t write_domain);
-+int
++static int
 +i915_gem_set_domain(struct drm_gem_object *obj,
 +		    struct drm_file *file_priv,
 +		    uint32_t read_domains,
@@ -14999,11 +15049,10 @@
 +
 +		pfn = (dev->agp->base >> PAGE_SHIFT) + i;
 +
-+#ifdef DRM_KMAP_ATOMIC_PROT_PFN
++#ifdef CONFIG_HIGHMEM
 +		/* kmap_atomic can't map IO pages on non-HIGHMEM kernels
 +		 */
-+		vaddr = kmap_atomic_prot_pfn(pfn, KM_USER0,
-+					     __pgprot(__PAGE_KERNEL));
++		vaddr = kmap_atomic_pfn(pfn, KM_USER0);
 +#if WATCH_PWRITE
 +		DRM_INFO("pwrite i %d o %d l %d pfn %ld vaddr %p\n",
 +			 i, o, l, pfn, vaddr);
@@ -15013,7 +15062,7 @@
 +		kunmap_atomic(vaddr, KM_USER0);
 +
 +		if (unwritten)
-+#endif
++#endif /* CONFIG_HIGHMEM */
 +		{
 +			vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE);
 +#if WATCH_PWRITE
@@ -15159,6 +15208,10 @@
 +		return -EBADF;
 +
 +	mutex_lock(&dev->struct_mutex);
++#if WATCH_BUF
++	DRM_INFO("set_domain_ioctl %p(%d), %08x %08x\n",
++		 obj, obj->size, args->read_domains, args->write_domain);
++#endif
 +	ret = i915_gem_set_domain(obj, file_priv,
 +				  args->read_domains, args->write_domain);
 +	drm_gem_object_unreference(obj);
@@ -15189,8 +15242,8 @@
 +	}
 +
 +#if WATCH_BUF
-+	DRM_INFO("%s: sw_finish %d (%p)\n",
-+		 __func__, args->handle, obj);
++	DRM_INFO("%s: sw_finish %d (%p %d)\n",
++		 __func__, args->handle, obj, obj->size);
 +#endif
 +	obj_priv = obj->driver_private;
 +
@@ -15393,25 +15446,6 @@
 +{
 +	drm_i915_private_t *dev_priv = dev->dev_private;
 +
-+	if (request->flush_domains != 0) {
-+		struct drm_i915_gem_object *obj_priv, *next;
-+
-+		/* First clear any buffers that were only waiting for a flush
-+		 * matching the one just retired.
-+		 */
-+
-+		list_for_each_entry_safe(obj_priv, next,
-+					 &dev_priv->mm.flushing_list, list) {
-+			struct drm_gem_object *obj = obj_priv->obj;
-+
-+			if (obj->write_domain & request->flush_domains) {
-+				obj->write_domain = 0;
-+				i915_gem_object_move_to_inactive(obj);
-+			}
-+		}
-+
-+	}
-+
 +	/* Move any buffers on the active list that are no longer referenced
 +	 * by the ringbuffer to the flushing/inactive lists as appropriate.
 +	 */
@@ -15442,6 +15476,24 @@
 +			i915_gem_object_move_to_inactive(obj);
 +		}
 +	}
++
++	if (request->flush_domains != 0) {
++		struct drm_i915_gem_object *obj_priv, *next;
++
++		/* Clear the write domain and activity from any buffers
++		 * that are just waiting for a flush matching the one retired.
++		 */
++		list_for_each_entry_safe(obj_priv, next,
++					 &dev_priv->mm.flushing_list, list) {
++			struct drm_gem_object *obj = obj_priv->obj;
++
++			if (obj->write_domain & request->flush_domains) {
++				obj->write_domain = 0;
++				i915_gem_object_move_to_inactive(obj);
++			}
++		}
++
++	}
 +}
 +
 +/**
@@ -15534,7 +15586,7 @@
 +	if (dev_priv->mm.wedged)
 +		ret = -EIO;
 +
-+	if (ret)
++	if (ret && ret != -ERESTARTSYS)
 +		DRM_ERROR("%s returns %d (awaiting %d at %d)\n",
 +			  __func__, ret, seqno, i915_get_gem_seqno(dev));
 +
@@ -15642,7 +15694,6 @@
 +			  __func__, obj, write_domain);
 +#endif
 +		i915_gem_flush(dev, 0, write_domain);
-+		obj->write_domain = 0;
 +
 +		i915_gem_object_move_to_active(obj);
 +		obj_priv->last_rendering_seqno = i915_add_request(dev,
@@ -15652,6 +15703,7 @@
 +		DRM_INFO("%s: flush moves to exec list %p\n", __func__, obj);
 +#endif
 +	}
++
 +	/* If there is rendering queued on the buffer being evicted, wait for
 +	 * it.
 +	 */
@@ -15850,20 +15902,12 @@
 +	inode = obj->filp->f_path.dentry->d_inode;
 +	mapping = inode->i_mapping;
 +	for (i = 0; i < page_count; i++) {
-+		page = find_get_page(mapping, i);
-+		if (page == NULL || !PageUptodate(page)) {
-+			if (page) {
-+				page_cache_release(page);
-+				page = NULL;
-+			}
-+			ret = shmem_getpage(inode, i, &page, SGP_DIRTY, NULL);
-+
-+			if (ret) {
-+				DRM_ERROR("shmem_getpage failed: %d\n", ret);
-+				i915_gem_object_free_page_list(obj);
-+				return ret;
-+			}
-+			unlock_page(page);
++		page = read_mapping_page(mapping, i, NULL);
++		if (IS_ERR(page)) {
++			ret = PTR_ERR(page);
++			DRM_ERROR("read_mapping_page failed: %d\n", ret);
++			i915_gem_object_free_page_list(obj);
++			return ret;
 +		}
 +		obj_priv->page_list[i] = page;
 +	}
@@ -16541,7 +16585,7 @@
 +	struct drm_gem_object *batch_obj;
 +	int ret, i, pinned = 0;
 +	uint64_t exec_offset;
-+	uint32_t seqno, flush_domains;
++	uint32_t seqno, flush_domains, pre_flush_domains;
 +
 +#if WATCH_EXEC
 +	DRM_INFO("buffers_ptr %d buffer_count %d len %08x\n",
@@ -16668,6 +16712,8 @@
 +			      ~0);
 +#endif
 +
++	pre_flush_domains = flush_domains;
++
 +	/* Exec the batchbuffer */
 +	ret = i915_dispatch_gem_execbuffer(dev, args, exec_offset);
 +	if (ret) {
@@ -16697,6 +16743,20 @@
 +		struct drm_gem_object *obj = object_list[i];
 +		struct drm_i915_gem_object *obj_priv = obj->driver_private;
 +
++		if (pre_flush_domains & obj->pending_write_domain &
++		    ~(I915_GEM_DOMAIN_CPU | I915_GEM_DOMAIN_GTT)) {
++			/* If we had a batchbuffer that resulted in a GPU
++			 * domain being flushed before execution, followed by
++			 * execution that resulted in the write_domain being
++			 * set, then when that request is retired the
++			 * write_domain would be incorrectly cleared.  We're not
++			 * sure that this can be triggered.
++			 */
++			DRM_ERROR("Going to lose the write domain on "
++				  "obj %d size %d\n",
++				  exec_list[i].handle, obj->size);
++		}
++
 +		i915_gem_object_move_to_active(obj);
 +		obj_priv->last_rendering_seqno = seqno;
 +#if WATCH_LRU
@@ -16956,7 +17016,7 @@
 +	drm_free(obj->driver_private, 1, DRM_MEM_DRIVER);
 +}
 +
-+int
++static int
 +i915_gem_set_domain(struct drm_gem_object *obj,
 +		    struct drm_file *file_priv,
 +		    uint32_t read_domains,
@@ -17290,7 +17350,8 @@
 +	mutex_unlock(&dev->struct_mutex);
 +}
 +
-+void i915_gem_load(struct drm_device *dev)
++void
++i915_gem_load(struct drm_device *dev)
 +{
 +	drm_i915_private_t *dev_priv = dev->dev_private;
 +
@@ -17811,10 +17872,10 @@
 +}
 diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
 new file mode 100644
-index 0000000..b83720a
+index 0000000..0c1b3a0
 --- /dev/null
 +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
-@@ -0,0 +1,314 @@
+@@ -0,0 +1,256 @@
 +/*
 + * Copyright © 2008 Intel Corporation
 + *
@@ -17904,94 +17965,16 @@
 +i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
 +{
 +	drm_i915_private_t *dev_priv = dev->dev_private;
-+	struct pci_dev *bridge;
 +	uint32_t swizzle_x = I915_BIT_6_SWIZZLE_UNKNOWN;
 +	uint32_t swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
-+	int mchbar_offset;
-+	enum pci_bar_type mchbar_type;
-+	char __iomem *mchbar;
-+	int ret;
-+
-+	bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0));
-+	if (bridge == NULL) {
-+		DRM_ERROR("Couldn't get bridge device\n");
-+		return;
-+	}
-+
-+	ret = pci_enable_device(bridge);
-+	if (ret != 0) {
-+		DRM_ERROR("pci_enable_device failed: %d\n", ret);
-+		return;
-+	}
-+
-+	if (IS_I965G(dev)) {
-+		mchbar_type = pci_bar_mem64;
-+		mchbar_offset = 0x48;
-+	} else {
-+		mchbar_type = pci_bar_mem32;
-+		mchbar_offset = 0x44;
-+	}
-+
-+	/* Use resource 2 for our BAR that's stashed in a nonstandard location,
-+	 * since the bridge would only ever use standard BARs 0-1 (though it
-+	 * doesn't anyway)
-+	 */
-+	ret = pci_read_base(bridge, mchbar_type, mchbar_offset,
-+			    &bridge->resource[2]);
-+	if (ret != 0) {
-+		DRM_ERROR("pci_read_base failed: %d\n", ret);
-+		return;
-+	}
-+
-+	mchbar = ioremap(pci_resource_start(bridge, 2),
-+			 pci_resource_len(bridge, 2));
-+	if (mchbar == NULL) {
-+		DRM_ERROR("Couldn't map MCHBAR to determine tile swizzling\n");
-+		return;
-+	}
-+
-+	if (IS_I965G(dev) && !IS_I965GM(dev)) {
-+		uint32_t chdecmisc;
 +
-+		/* On the 965, channel interleave appears to be determined by
-+		 * the flex bit.  If flex is set, then the ranks (sides of a
-+		 * DIMM) of memory will be "stacked" (physical addresses walk
-+		 * through one rank then move on to the next, flipping channels
-+		 * or not depending on rank configuration).  The GPU in this
-+		 * case does exactly the same addressing as the CPU.
-+		 *
-+		 * Unlike the 945, channel randomization based does not
-+		 * appear to be available.
-+		 *
-+		 * XXX: While the G965 doesn't appear to do any interleaving
-+		 * when the DIMMs are not exactly matched, the G4x chipsets
-+		 * might be for "L-shaped" configurations, and will need to be
-+		 * detected.
-+		 *
-+		 * L-shaped configuration:
-+		 *
-+		 * +-----+
-+		 * |     |
-+		 * |DIMM2|         <-- non-interleaved
-+		 * +-----+
-+		 * +-----+ +-----+
-+		 * |     | |     |
-+		 * |DIMM0| |DIMM1| <-- interleaved area
-+		 * +-----+ +-----+
++	if (!IS_I9XX(dev)) {
++		/* As far as we know, the 865 doesn't have these bit 6
++		 * swizzling issues.
 +		 */
-+		chdecmisc = readb(mchbar + CHDECMISC);
-+
-+		if (chdecmisc == 0xff) {
-+			DRM_ERROR("Couldn't read from MCHBAR.  "
-+				  "Disabling tiling.\n");
-+		} else if (chdecmisc & CHDECMISC_FLEXMEMORY) {
-+			swizzle_x = I915_BIT_6_SWIZZLE_NONE;
-+			swizzle_y = I915_BIT_6_SWIZZLE_NONE;
-+		} else {
-+			swizzle_x = I915_BIT_6_SWIZZLE_9_10;
-+			swizzle_y = I915_BIT_6_SWIZZLE_9;
-+		}
-+	} else if (IS_I9XX(dev)) {
++		swizzle_x = I915_BIT_6_SWIZZLE_NONE;
++		swizzle_y = I915_BIT_6_SWIZZLE_NONE;
++	} else if (!IS_I965G(dev) || IS_I965GM(dev)) {
 +		uint32_t dcc;
 +
 +		/* On 915-945 and GM965, channel interleave by the CPU is
@@ -18001,7 +17984,7 @@
 +		 * alternate based on bit 17 (XOR not disabled and XOR
 +		 * bit == 17).
 +		 */
-+		dcc = readl(mchbar + DCC);
++		dcc = I915_READ(DCC);
 +		switch (dcc & DCC_ADDRESSING_MODE_MASK) {
 +		case DCC_ADDRESSING_MODE_SINGLE_CHANNEL:
 +		case DCC_ADDRESSING_MODE_DUAL_CHANNEL_ASYMMETRIC:
@@ -18033,15 +18016,35 @@
 +			swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
 +		}
 +	} else {
-+		/* As far as we know, the 865 doesn't have these bit 6
-+		 * swizzling issues.
++		/* The 965, G33, and newer, have a very flexible memory
++		 * configuration.  It will enable dual-channel mode
++		 * (interleaving) on as much memory as it can, and the GPU
++		 * will additionally sometimes enable different bit 6
++		 * swizzling for tiled objects from the CPU.
++		 *
++		 * Here's what I found on the G965:
++		 *    slot fill         memory size  swizzling
++		 * 0A   0B   1A   1B    1-ch   2-ch
++		 * 512  0    0    0     512    0     O
++		 * 512  0    512  0     16     1008  X
++		 * 512  0    0    512   16     1008  X
++		 * 0    512  0    512   16     1008  X
++		 * 1024 1024 1024 0     2048   1024  O
++		 *
++		 * We could probably detect this based on either the DRB
++		 * matching, which was the case for the swizzling required in
++		 * the table above, or from the 1-ch value being less than
++		 * the minimum size of a rank.
 +		 */
-+		swizzle_x = I915_BIT_6_SWIZZLE_NONE;
-+		swizzle_y = I915_BIT_6_SWIZZLE_NONE;
++		if (I915_READ16(C0DRB3) != I915_READ16(C1DRB3)) {
++			swizzle_x = I915_BIT_6_SWIZZLE_NONE;
++			swizzle_y = I915_BIT_6_SWIZZLE_NONE;
++		} else {
++			swizzle_x = I915_BIT_6_SWIZZLE_9_10;
++			swizzle_y = I915_BIT_6_SWIZZLE_9;
++		}
 +	}
 +
-+	iounmap(mchbar);
-+
 +	dev_priv->mm.bit_6_swizzle_x = swizzle_x;
 +	dev_priv->mm.bit_6_swizzle_y = swizzle_y;
 +}
@@ -18992,10 +18995,10 @@
 +}
 diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
 new file mode 100644
-index 0000000..43ad2cb
+index 0000000..5c2d9f2
 --- /dev/null
 +++ b/drivers/gpu/drm/i915/i915_reg.h
-@@ -0,0 +1,1406 @@
+@@ -0,0 +1,1417 @@
 +/* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
 + * All Rights Reserved.
 + *
@@ -19023,19 +19026,6 @@
 +#ifndef _I915_REG_H_
 +#define _I915_REG_H_
 +
-+/* MCH MMIO space */
-+/** 915-945 and GM965 MCH register controlling DRAM channel access */
-+#define DCC		0x200
-+#define DCC_ADDRESSING_MODE_SINGLE_CHANNEL		(0 << 0)
-+#define DCC_ADDRESSING_MODE_DUAL_CHANNEL_ASYMMETRIC	(1 << 0)
-+#define DCC_ADDRESSING_MODE_DUAL_CHANNEL_INTERLEAVED	(2 << 0)
-+#define DCC_ADDRESSING_MODE_MASK			(3 << 0)
-+#define DCC_CHANNEL_XOR_DISABLE				(1 << 10)
-+
-+/** 965 MCH register controlling DRAM channel configuration */
-+#define CHDECMISC		0x111
-+#define CHDECMISC_FLEXMEMORY		(1 << 1)
-+
 +/*
 + * The Bridge device's PCI config space has information about the
 + * fb aperture size and the amount of pre-reserved memory.
@@ -19514,6 +19504,30 @@
 +#define PALETTE_A		0x0a000
 +#define PALETTE_B		0x0a800
 +
++/* MCH MMIO space */
++
++/*
++ * MCHBAR mirror.
++ *
++ * This mirrors the MCHBAR MMIO space whose location is determined by
++ * device 0 function 0's pci config register 0x44 or 0x48 and matches it in
++ * every way.  It is not accessible from the CP register read instructions.
++ *
++ */
++#define MCHBAR_MIRROR_BASE	0x10000
++
++/** 915-945 and GM965 MCH register controlling DRAM channel access */
++#define DCC			0x10200
++#define DCC_ADDRESSING_MODE_SINGLE_CHANNEL		(0 << 0)
++#define DCC_ADDRESSING_MODE_DUAL_CHANNEL_ASYMMETRIC	(1 << 0)
++#define DCC_ADDRESSING_MODE_DUAL_CHANNEL_INTERLEAVED	(2 << 0)
++#define DCC_ADDRESSING_MODE_MASK			(3 << 0)
++#define DCC_CHANNEL_XOR_DISABLE				(1 << 10)
++
++/** 965 MCH register controlling DRAM channel configuration */
++#define C0DRB3			0x10206
++#define C1DRB3			0x10606
++
 +/*
 + * Overlay regs
 + */
@@ -46898,7 +46912,7 @@
   * Device specific ioctls should only be in their respective headers
   * The device specific ioctl range is from 0x40 to 0x99.
 diff --git a/include/drm/drmP.h b/include/drm/drmP.h
-index 1c1b13e..6a533a5 100644
+index 1c1b13e..31e2f17 100644
 --- a/include/drm/drmP.h
 +++ b/include/drm/drmP.h
 @@ -87,6 +87,7 @@ struct drm_device;
@@ -47285,7 +47299,7 @@
  extern int drm_irq_uninstall(struct drm_device *dev);
  extern void drm_driver_irq_preinstall(struct drm_device *dev);
  extern void drm_driver_irq_postinstall(struct drm_device *dev);
-@@ -1026,12 +1216,21 @@ extern DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge, size
+@@ -1026,8 +1216,17 @@ extern DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge, size
  extern int drm_agp_free_memory(DRM_AGP_MEM * handle);
  extern int drm_agp_bind_memory(DRM_AGP_MEM * handle, off_t start);
  extern int drm_agp_unbind_memory(DRM_AGP_MEM * handle);
@@ -47303,11 +47317,6 @@
  extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
  		       struct drm_driver *driver);
  extern int drm_put_dev(struct drm_device *dev);
--extern int drm_put_minor(struct drm_minor **minor);
-+extern int drm_put_minor(struct drm_minor **minor_p);
- extern unsigned int drm_debug;
- 
- extern struct class *drm_class;
 @@ -1059,6 +1258,8 @@ extern int drm_ati_pcigart_init(struct drm_device *dev,
  				struct drm_ati_pcigart_info * gart_info);
  extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
@@ -47334,11 +47343,11 @@
  extern int drm_mm_add_space_to_tail(struct drm_mm *mm, unsigned long size);
  
 +/* Graphics Execution Manager library functions (drm_gem.c) */
-+int drm_gem_init (struct drm_device *dev);
-+void drm_gem_object_free (struct kref *kref);
++int drm_gem_init(struct drm_device *dev);
++void drm_gem_object_free(struct kref *kref);
 +struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev,
 +					    size_t size);
-+void drm_gem_object_handle_free (struct kref *kref);
++void drm_gem_object_handle_free(struct kref *kref);
 +
 +static inline void
 +drm_gem_object_reference(struct drm_gem_object *obj)


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.910
retrieving revision 1.911
diff -u -r1.910 -r1.911
--- kernel.spec	28 Aug 2008 11:43:00 -0000	1.910
+++ kernel.spec	28 Aug 2008 23:44:24 -0000	1.911
@@ -1739,6 +1739,9 @@
 %kernel_variant_files -k vmlinux %{with_kdump} kdump
 
 %changelog
+* Fri Aug 29 2008 Dave Airlie <airlied at redhat.com>
+- rebase i915 GEM support to avoid oopsing.
+
 * Thu Aug 28 2008 Dave Airlie <airlied at redhat.com>
 - hopefully fix r300 lvds
 




More information about the scm-commits mailing list