summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi Cardona <remi@gentoo.org>2008-06-13 05:15:03 +0000
committerRemi Cardona <remi@gentoo.org>2008-06-13 05:15:03 +0000
commit5525f46d1f6f946f78acdfc3735f51b5b0b78dca (patch)
tree8d00e2b4975b7f82604106af76ae0c924eee1bc7 /x11-drivers/xf86-video-i810
parentBug #222721 - Replace the !<sys-apps/portage-2.1.4_rc1 blocker (diff)
downloadhistorical-5525f46d1f6f946f78acdfc3735f51b5b0b78dca.tar.gz
historical-5525f46d1f6f946f78acdfc3735f51b5b0b78dca.tar.bz2
historical-5525f46d1f6f946f78acdfc3735f51b5b0b78dca.zip
x11-drivers/xf86-video-i810: add patches from the upcoming 2.3.2 release
Package-Manager: portage-2.1.5.4
Diffstat (limited to 'x11-drivers/xf86-video-i810')
-rw-r--r--x11-drivers/xf86-video-i810/ChangeLog37
-rw-r--r--x11-drivers/xf86-video-i810/Manifest33
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0001-Skip-copying-on-FOURCC_XVMC-surfaces.patch2
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0002-Only-use-FOURCC_XVMC-when-INTEL_XVMC-is-defined.patch2
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0003-Panel-fitting-fix-letterbox-modes.patch2
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0004-Add-glproto-to-DRI-dependencies.patch2
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0005-Revert-Add-FIFO-watermark-regs-to-register-dumper.patch2
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0006-Fix-typo-in-xvmc-block-destroy.patch22
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0007-Define-DEFFILEMODE-for-OS-es-that-don-t-have-it.patch25
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0008-Disable-a-bunch-of-clock-gating-disables-on-IGD_GM.patch31
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0009-Fixup-power-saving-registers.patch206
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0010-xvmc-remove-unused-dri-drawable.patch316
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0011-xvmc-a-little-cleanup.patch140
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0012-Set-SDVO-sync-polarity-to-default-on-965.patch41
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0013-Just-remove-the-mprotect-kludge.patch33
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0014-Replace-a-couple-of-wait-for-ring-idles-with-a-singl.patch102
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0015-Remove-duplicated-i830_stop_ring-SetHWOperatingSta.patch24
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0016-Remove-gratuitous-wait_ring_idle-after-I830Sync.-Sy.patch30
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0017-Move-BIOS-scratch-register-setup-to-EnterVT-instead.patch105
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0018-Initialize-clock-gating-from-EnterVT-and-save-restor.patch90
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0019-Remove-SVG_WORK_CONTROL-init.patch29
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0020-Move-debug-clock-printout-from-ErrorF-to-X_INFO.patch54
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0021-Fix-TV-out-connection-type-detection.patch27
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0022-Fix-TV-programming-add-vblank-wait-after-TV_CTL-wr.patch40
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0023-Two-more-Dell-quirks.patch33
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0024-Set-up-restore-PWRCTXA-from-enter-leavevt-not-server.patch77
-rw-r--r--x11-drivers/xf86-video-i810/files/2.3.1/0025-Fix-compiler-warning-when-disable-xvmc-config.patch26
-rw-r--r--x11-drivers/xf86-video-i810/xf86-video-i810-2.3.1-r2.ebuild69
28 files changed, 1588 insertions, 12 deletions
diff --git a/x11-drivers/xf86-video-i810/ChangeLog b/x11-drivers/xf86-video-i810/ChangeLog
index 34e36986041b..9fb3d77bec17 100644
--- a/x11-drivers/xf86-video-i810/ChangeLog
+++ b/x11-drivers/xf86-video-i810/ChangeLog
@@ -1,6 +1,41 @@
# ChangeLog for x11-drivers/xf86-video-i810
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-i810/ChangeLog,v 1.92 2008/05/22 12:19:29 remi Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-i810/ChangeLog,v 1.93 2008/06/13 05:15:02 remi Exp $
+
+*xf86-video-i810-2.3.1-r2 (13 Jun 2008)
+
+ 13 Jun 2008; Rémi Cardona <remi@gentoo.org>
+ files/2.3.1/0001-Skip-copying-on-FOURCC_XVMC-surfaces.patch,
+ files/2.3.1/0002-Only-use-FOURCC_XVMC-when-INTEL_XVMC-is-defined.patch,
+ files/2.3.1/0003-Panel-fitting-fix-letterbox-modes.patch,
+ files/2.3.1/0004-Add-glproto-to-DRI-dependencies.patch,
+ files/2.3.1/0005-Revert-Add-FIFO-watermark-regs-to-register-dumper.patch,
+ +files/2.3.1/0006-Fix-typo-in-xvmc-block-destroy.patch,
+ +files/2.3.1/0007-Define-DEFFILEMODE-for-OS-es-that-don-t-have-it.patch,
+ +files/2.3.1/0008-Disable-a-bunch-of-clock-gating-disables-on-IGD_GM.patch
+ , +files/2.3.1/0009-Fixup-power-saving-registers.patch,
+ +files/2.3.1/0010-xvmc-remove-unused-dri-drawable.patch,
+ +files/2.3.1/0011-xvmc-a-little-cleanup.patch,
+ +files/2.3.1/0012-Set-SDVO-sync-polarity-to-default-on-965.patch,
+ +files/2.3.1/0013-Just-remove-the-mprotect-kludge.patch,
+ +files/2.3.1/0014-Replace-a-couple-of-wait-for-ring-idles-with-a-singl.pat
+ ch,
+ +files/2.3.1/0015-Remove-duplicated-i830_stop_ring-SetHWOperatingSta.patch
+ ,
+ +files/2.3.1/0016-Remove-gratuitous-wait_ring_idle-after-I830Sync.-Sy.patc
+ h,
+ +files/2.3.1/0017-Move-BIOS-scratch-register-setup-to-EnterVT-instead.patc
+ h,
+ +files/2.3.1/0018-Initialize-clock-gating-from-EnterVT-and-save-restor.pat
+ ch, +files/2.3.1/0019-Remove-SVG_WORK_CONTROL-init.patch,
+ +files/2.3.1/0020-Move-debug-clock-printout-from-ErrorF-to-X_INFO.patch,
+ +files/2.3.1/0021-Fix-TV-out-connection-type-detection.patch,
+ +files/2.3.1/0022-Fix-TV-programming-add-vblank-wait-after-TV_CTL-wr.patch
+ , +files/2.3.1/0023-Two-more-Dell-quirks.patch,
+ +files/2.3.1/0024-Set-up-restore-PWRCTXA-from-enter-leavevt-not-server.pat
+ ch, +files/2.3.1/0025-Fix-compiler-warning-when-disable-xvmc-config.patch,
+ +xf86-video-i810-2.3.1-r2.ebuild:
+ add patches from the upcoming 2.3.2 release
*xf86-video-i810-2.3.1-r1 (22 May 2008)
diff --git a/x11-drivers/xf86-video-i810/Manifest b/x11-drivers/xf86-video-i810/Manifest
index e2474eaa7338..2ee2d57959cc 100644
--- a/x11-drivers/xf86-video-i810/Manifest
+++ b/x11-drivers/xf86-video-i810/Manifest
@@ -1,10 +1,30 @@
AUX 0001-fixup-pciaccess-version-detect.patch 824 RMD160 6e148f2fe467ba6e9d48e046f067ba405d10b0d1 SHA1 e80e2c8a24a4b54b35d6da5a28d4b70c0b20d8f1 SHA256 05d4ba845535c3bd6a28500251b9e6425af49e671a548d718cac81f57242823e
AUX 1.6.5-fix_no_dri.patch 1236 RMD160 5ab3bf1c3951c2fe7064fa13ffb573754ef594b1 SHA1 60f13aad5aa5f2a199ebc4b38ff468df9728ce5d SHA256 5b560f31a70b1998749e6cbcbfb6d7a94d3f9caf9ca4dad147662bc6eeb344da
-AUX 2.3.1/0001-Skip-copying-on-FOURCC_XVMC-surfaces.patch 2102 RMD160 4b6e84b093157985bafb71f067a46730a610b6c2 SHA1 622dd20bfea2489a19daa4e40b2ee00fa3ba196b SHA256 c2327cea9c60f95f37acab23ab790014e96ca96862da639867bd6c254899735d
-AUX 2.3.1/0002-Only-use-FOURCC_XVMC-when-INTEL_XVMC-is-defined.patch 1396 RMD160 870f69bf59d29e012e5ceb24b9ba72cb88da4285 SHA1 ae675a29ce99d7e77353d99f1fa101d7ca2605e7 SHA256 d806111bfb0bcc4fc5101465f6878d3e6f582db15932151414ae06bc5e14f14f
-AUX 2.3.1/0003-Panel-fitting-fix-letterbox-modes.patch 1025 RMD160 34877241390e2294ed869bc3d6e1a82dfa5c6060 SHA1 7b1c3138ce751678268d5a07537002ce7ba5905a SHA256 1d70715f9028ccca115951300da1b87b0ef1f1137b43bf982452b1611a1766b5
-AUX 2.3.1/0004-Add-glproto-to-DRI-dependencies.patch 828 RMD160 fc0b5016ebd6e4aae9be01f892b184da9be2dd16 SHA1 3786cfc6dc0317ab2347d8e607d2cc80e2c2423e SHA256 e51b729e028ad2b2d5f4c82b3cb5152564814dca7918bffbf63a58605ab1bad9
-AUX 2.3.1/0005-Revert-Add-FIFO-watermark-regs-to-register-dumper.patch 1296 RMD160 5e9f45e1cde726cc1aabffbb57f6fc9541c87eb1 SHA1 1e82fb2bc452e614d8c5ca6e00e464c76bed8dfd SHA256 1946a330109abbcdbccd1836158ebb1061c356ca057f275853a75472943347b1
+AUX 2.3.1/0001-Skip-copying-on-FOURCC_XVMC-surfaces.patch 2102 RMD160 09b1aca271cc7bb823c1dc89141a8a4c8907c435 SHA1 04688d7cb945515f7c4b28c76b624363a01a5e3b SHA256 faf12d228421ca09c1dc31017eff7b9f660a83a6f87af3a04c2547b23a9dbc84
+AUX 2.3.1/0002-Only-use-FOURCC_XVMC-when-INTEL_XVMC-is-defined.patch 1396 RMD160 ae6deecd003ca335d21193013317f30e4faa9c7e SHA1 08aa46fb77f89ea981126d61356d95f70b57a8a9 SHA256 2ecad981cec8de4fead76957562f8f57c4334ce391de9b74fbaae424e833c95d
+AUX 2.3.1/0003-Panel-fitting-fix-letterbox-modes.patch 1025 RMD160 790e6c4c1c59fddef42ca814f35d697caecca5c7 SHA1 9eaf8fc32ab809c00df08ad4de30e085af9747a2 SHA256 99c3d01bf03791f1da69e040128191ce54ec2423a4ae49a820e776d6b11e04ee
+AUX 2.3.1/0004-Add-glproto-to-DRI-dependencies.patch 828 RMD160 833bfc24b9230ce5cae7ff886e6f6bf6456f2bb4 SHA1 606f6bfdc1f1d2dc8ca2df1f25a47f8da4b6b218 SHA256 cfa7f7c3905ccf1a2121b83f04120292182950278e19de77af72074324ff5028
+AUX 2.3.1/0005-Revert-Add-FIFO-watermark-regs-to-register-dumper.patch 1296 RMD160 9ee91ac49d08d15401746e6742ddbb64c49d5e8a SHA1 4f7c3443148c70faf65448533aea6cabaaa8afcc SHA256 27551a8e7583bb6f826771ff3ddb4f2e8ba4ec6cb6c5d945e24195bf1cba3c19
+AUX 2.3.1/0006-Fix-typo-in-xvmc-block-destroy.patch 623 RMD160 086359a5b7c4457f3b96dfd2152103a751c5f625 SHA1 cc77a1ed172fba856f33954374e6801e8a2fc7ef SHA256 8e751ed9f12e6877087d90ecbe6c330c21115326e51e280a6a3fd5d4d7c8ecbd
+AUX 2.3.1/0007-Define-DEFFILEMODE-for-OS-es-that-don-t-have-it.patch 746 RMD160 b209eb7c737c43fe9a2df1b4d4ab9ab642b67712 SHA1 1101d53050640c2a10964e39543ba73e55cef6a7 SHA256 cdc40de87b499426fafea3775cdbbaabda9f7f98d80047f4cf11a602ef30b8f4
+AUX 2.3.1/0008-Disable-a-bunch-of-clock-gating-disables-on-IGD_GM.patch 1182 RMD160 6f21f6343169c00c43adb1c46b126f3a0284dd2a SHA1 be2d75ed54ced6d8f2ecc4351d1b531055a50dc4 SHA256 dcd42c78e7830ad5fd7d5d2ac727c6463092b072069d83d0efe04e4b14d4b47d
+AUX 2.3.1/0009-Fixup-power-saving-registers.patch 6433 RMD160 85db087cc061524dd26253cb814981dc3bf6ce86 SHA1 e4fea07d76c5b421458ca8d9bf941df17426a283 SHA256 914e397455418475c749ef21c137927a14e41dbdf61feded0a81e4a5762a0357
+AUX 2.3.1/0010-xvmc-remove-unused-dri-drawable.patch 10056 RMD160 20b10ff1a22a0a2503205de4ee68cdc9c2ea9783 SHA1 f0f9ff45691b61ea7a6dd00232b59286eca3c2f1 SHA256 75fe890be1fb5c57c4b93b1b345cafd0e79a31f88e634f953b6d1e6084aa6e97
+AUX 2.3.1/0011-xvmc-a-little-cleanup.patch 4393 RMD160 968f9eb9b2867a431920ee4b19a3b22583f52b96 SHA1 a05b0771f9659a0c7a57491b0dc0bb89cb3dadb7 SHA256 7b9a75f5dc81ad3d1080bb7757d8636f55d6dc815e07ddbee93bda00ce3d2bde
+AUX 2.3.1/0012-Set-SDVO-sync-polarity-to-default-on-965.patch 1386 RMD160 b66acf2a0fde06dcbe34294a8f8587612f9b2b18 SHA1 3f241c90bb554b55d84d4ff4fae8e4ff98012236 SHA256 fe96f581a491c2a730390b5a841bbcac0d254b15b80a7d1cebb5e2a47e144901
+AUX 2.3.1/0013-Just-remove-the-mprotect-kludge.patch 1226 RMD160 4ec7b63937e54bbec3c5faf9d73b553ee441ef09 SHA1 82b5cb4d1b93e03ffe480a468c46f6763e712efb SHA256 05842b5248e4301bf0494d94676a58670533205fcfead32cdfc574e7f4cebc60
+AUX 2.3.1/0014-Replace-a-couple-of-wait-for-ring-idles-with-a-singl.patch 2999 RMD160 000e4094d96cdf5d65bc706779a8fdcdd0025103 SHA1 3c3d1c26475847a3f857504da1caa6339e3662ba SHA256 52e1259e8738d404ef7204f90c29f22fc575709a49ddefe1ed8f4255180cde81
+AUX 2.3.1/0015-Remove-duplicated-i830_stop_ring-SetHWOperatingSta.patch 749 RMD160 142ed3d044ec4850cb33bf560002a68dc5d6b562 SHA1 830867dcebba27c34315c8d317f3257b51490b9e SHA256 d13b574d06584129cd83065c5a5de995bf0057c8e748fe6b8afcdedc71714f17
+AUX 2.3.1/0016-Remove-gratuitous-wait_ring_idle-after-I830Sync.-Sy.patch 887 RMD160 9636629c6dfe6d205f3ea3d79cbc05c9e07f9f63 SHA1 20f0bd9aafb739975ee4bc0f662a84188c55df46 SHA256 ea2bd0c9547222c1455d3390c8740eec1edcdd8ae2746816b04e07ec967ad587
+AUX 2.3.1/0017-Move-BIOS-scratch-register-setup-to-EnterVT-instead.patch 2872 RMD160 6d9dc8b733df48948750b167408de7616a8f63e4 SHA1 066bde6add35b8f86953645ddda4aba1d552279b SHA256 db5e51b009b4c2ff21a336de099415654a82666f00f99ea4dee0eb21add45f1d
+AUX 2.3.1/0018-Initialize-clock-gating-from-EnterVT-and-save-restor.patch 2825 RMD160 e10dc56dbdfdbc6067d413e9a9b0a163a8a86b4b SHA1 b757c945437a5c44d7c41351c1468dbb5200b225 SHA256 4b9b131533783643ba186cd4197f174359fe0540e4180c0bbacc287aa85b5508
+AUX 2.3.1/0019-Remove-SVG_WORK_CONTROL-init.patch 932 RMD160 7a4d7b860d3bca41dd0ebe8b4cf26eed56271b83 SHA1 f7eee5afb99b7a6c6c8efbec19546208be2ca9e2 SHA256 b776e32b4e5fa27833aab6feaa440f7a9ad6bdcd42e9121f4609f46d72b27da0
+AUX 2.3.1/0020-Move-debug-clock-printout-from-ErrorF-to-X_INFO.patch 1771 RMD160 2b65545514a8c65cde6199764697bedbb6538c96 SHA1 50a992827580e949fd69fc441f16493b3b92cd2d SHA256 0e1bb118a58954a64d23751af0c8b2cb0bbdc4aef54d504e1f638969649f7699
+AUX 2.3.1/0021-Fix-TV-out-connection-type-detection.patch 790 RMD160 d9c468985cf182bee8b22a0f4ee6f0979f54577d SHA1 6774ce9ba184311ac4af210ea83fe79c1d9ff4d7 SHA256 50298915a867f98d0ffe1c9886e628cae0ee1baf35d1297a7e51441fb53a6fe3
+AUX 2.3.1/0022-Fix-TV-programming-add-vblank-wait-after-TV_CTL-wr.patch 1236 RMD160 ce7ff59143aaf8e7c8fac3c395f7cd40d46ab06e SHA1 5c08b4393b492a51dc190ebe8ab74d6683676609 SHA256 2fb2d9d69b88950b887feccb6aeee81795a7e46f0c73f4edc4027c5d02ba3da0
+AUX 2.3.1/0023-Two-more-Dell-quirks.patch 1382 RMD160 029fc98641dabb2ea268268649f0215b22cb6502 SHA1 a1f7bfac3ed0df71816f2eda7908cf8e575cb1f3 SHA256 9773277474bf50a441a96a4f22b0c4c685cb628ef9a6e6a2c6419e9689da5046
+AUX 2.3.1/0024-Set-up-restore-PWRCTXA-from-enter-leavevt-not-server.patch 2320 RMD160 4b68ce5535f6ce328af9454f7325e74c36ed5f92 SHA1 e94653f0f0d21f3fc850c2f8a510835a851c7308 SHA256 3b82228ce6fad78c3accae720dcc359c5b0745e9545dcddf0e3537f1cdc9098b
+AUX 2.3.1/0025-Fix-compiler-warning-when-disable-xvmc-config.patch 646 RMD160 3a3651c1843d5b152d45742dfa8085250502dc7f SHA1 8e3bd4821e9670cde100a9ef3ef0e9be5af3076c SHA256 f75a3a3588d65aba333fe0a9bae12eb2a6b0e3ed49da6602ffad06bc52b27c74
AUX i810.xinf 1442 RMD160 38dff5ef3b6548c9fdea8f6df2b607eee8f670f2 SHA1 cf0b700f6fa0734ea56ff9a167098649d8e3767e SHA256 c690ba8705e21394dcb927f4a5499c7dbdba492042d7d54eb3c21daf5d326347
AUX xf86-video-i810-2.1.1-fix_build_without_dri.patch 1207 RMD160 8f562c70bb6f0612981bacf28bd0bc005d358cf3 SHA1 226de2c0d345099c3eb4eb48fddd37c384b5557c SHA256 48d2864503d3bc756fcb766cd61a7e0f4b71bfa0fbe78b3a22bf46cf6249ee61
DIST xf86-video-i810-1.6.5.tar.bz2 439503 RMD160 1a55fdfe89f855dd7bf1e16619c89da42383eef6 SHA1 7d9cf4fa18ec6dd7eefcb1589675c7bcffa384d0 SHA256 30d0cd555d8b8b5bb53d93eaae1ad2aecb5c94a760e2346d60b6e194c254e40f
@@ -21,6 +41,7 @@ EBUILD xf86-video-i810-2.2.0.90.ebuild 1184 RMD160 9afd30f21c9112b2a70c8d6318465
EBUILD xf86-video-i810-2.2.1.ebuild 1246 RMD160 784e0fb29f68161a01f9f330caad8fb241196b66 SHA1 d8c938d8b33e97e79a36ad9481553ba54405eee8 SHA256 287b7127f3635d35b05dc6ec57fe9c3667b9d8dac586f0df782292c57de7bd4d
EBUILD xf86-video-i810-2.3.0.ebuild 1180 RMD160 2ff676518a6a0e45dfc274d68cb4b07e698c7068 SHA1 28d249dcc67e0a96f7a7daaacd1ac72922ea3419 SHA256 217385101dc388352f35d420cc591e38f519bb442975ad03bc2a03bcfdc3e05b
EBUILD xf86-video-i810-2.3.1-r1.ebuild 1550 RMD160 98137c7a143d73d11fdb8906b86170620f1e0d72 SHA1 3ded76ae92fe51bc0d26a553a9c3547ea13e498b SHA256 72a41415c4976d0001610f11a1a211782599f50f129d6497130227674e20aabf
+EBUILD xf86-video-i810-2.3.1-r2.ebuild 3002 RMD160 d47e80a633901708d1a81b1303810acb13607c35 SHA1 4d98888c64c7a49952cf07c4432f8606f6dfa9e7 SHA256 8a3adcc9464f031cce7f958f2f1668ffe996dfc7d527e8e4781ad0eac3615a9e
EBUILD xf86-video-i810-2.3.1.ebuild 1180 RMD160 6d5bf90f2aebeadafb4db430c4b5b3077a7513a2 SHA1 4e6348787ea102a738e485b377d82be4f85928ef SHA256 b006375303a8dcfe4f4a0c51ab030f846668d61e85dfe9f8cf20eca8486a402b
-MISC ChangeLog 17351 RMD160 15de1ee38dcb97659c997030e50e171bef3cb0e2 SHA1 175dab7c99b2b568ecb77d6117ba09c9db58eea2 SHA256 a67cb575d38906834bb2cb354a683b198027c0a12e4a7568c36cf2fc9ba2945f
+MISC ChangeLog 19241 RMD160 54316fa4fb00f30fd5fda2760e7685fed0e6e2c3 SHA1 16661d321e4b99617b33994e3f49738b07522c16 SHA256 3c232e5b8c09c89c6f438bba1aeeb1aa14d081067cee0c81bbf9f6b69588ca18
MISC metadata.xml 248 RMD160 1bc22252fb59ed171fe013e765baa171151843cf SHA1 1df26c31e85768bb440888be23ba6fdcb421843d SHA256 a52fe0f6937ba347182a10ae3c710ee5524086af9b011567f5629ba165bf7dcd
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0001-Skip-copying-on-FOURCC_XVMC-surfaces.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0001-Skip-copying-on-FOURCC_XVMC-surfaces.patch
index 3e1af7fd6af3..a3f39f1f52ce 100644
--- a/x11-drivers/xf86-video-i810/files/2.3.1/0001-Skip-copying-on-FOURCC_XVMC-surfaces.patch
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0001-Skip-copying-on-FOURCC_XVMC-surfaces.patch
@@ -70,5 +70,5 @@ index 67fe291..5d6c209 100644
if (pDraw->type == DRAWABLE_WINDOW) {
--
-1.5.5.1
+1.5.5.3
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0002-Only-use-FOURCC_XVMC-when-INTEL_XVMC-is-defined.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0002-Only-use-FOURCC_XVMC-when-INTEL_XVMC-is-defined.patch
index 569fcfcae576..3ca822394270 100644
--- a/x11-drivers/xf86-video-i810/files/2.3.1/0002-Only-use-FOURCC_XVMC-when-INTEL_XVMC-is-defined.patch
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0002-Only-use-FOURCC_XVMC-when-INTEL_XVMC-is-defined.patch
@@ -43,5 +43,5 @@ index 5d6c209..91e0e00 100644
break;
}
--
-1.5.5.1
+1.5.5.3
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0003-Panel-fitting-fix-letterbox-modes.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0003-Panel-fitting-fix-letterbox-modes.patch
index 5dc936b88e8e..43ef83e18d7e 100644
--- a/x11-drivers/xf86-video-i810/files/2.3.1/0003-Panel-fitting-fix-letterbox-modes.patch
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0003-Panel-fitting-fix-letterbox-modes.patch
@@ -23,5 +23,5 @@ index 48402df..899c6cb 100644
if (mode->VDisplay & 1)
bottom_border++;
--
-1.5.5.1
+1.5.5.3
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0004-Add-glproto-to-DRI-dependencies.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0004-Add-glproto-to-DRI-dependencies.patch
index 3fc53fc04cad..f4eeace49783 100644
--- a/x11-drivers/xf86-video-i810/files/2.3.1/0004-Add-glproto-to-DRI-dependencies.patch
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0004-Add-glproto-to-DRI-dependencies.patch
@@ -19,5 +19,5 @@ index f8a3824..94562dd 100644
AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
PKG_CHECK_MODULES(DRI_MM, [libdrm >= 2.3.1],[DRI_MM=yes], [DRI_MM=no])
--
-1.5.5.1
+1.5.5.3
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0005-Revert-Add-FIFO-watermark-regs-to-register-dumper.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0005-Revert-Add-FIFO-watermark-regs-to-register-dumper.patch
index b5f0ce02dea8..13752309f30b 100644
--- a/x11-drivers/xf86-video-i810/files/2.3.1/0005-Revert-Add-FIFO-watermark-regs-to-register-dumper.patch
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0005-Revert-Add-FIFO-watermark-regs-to-register-dumper.patch
@@ -37,5 +37,5 @@ index 0eba57f..15b02ce 100644
DEFINEREG2(FPA1, i830_debug_fp),
DEFINEREG2(DPLL_A, i830_debug_dpll),
--
-1.5.5.1
+1.5.5.3
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0006-Fix-typo-in-xvmc-block-destroy.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0006-Fix-typo-in-xvmc-block-destroy.patch
new file mode 100644
index 000000000000..50c36255c7b7
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0006-Fix-typo-in-xvmc-block-destroy.patch
@@ -0,0 +1,22 @@
+From 87ace420a34df7425641d089f71830e44fced098 Mon Sep 17 00:00:00 2001
+From: Shuang He <shuang.he@intel.com>
+Date: Mon, 26 May 2008 09:20:53 +0800
+Subject: [PATCH] Fix typo in xvmc block destroy
+
+
+diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c
+index 1be8cc6..3c14f73 100644
+--- a/src/xvmc/intel_xvmc.c
++++ b/src/xvmc/intel_xvmc.c
+@@ -513,7 +513,7 @@ Status XvMCCreateBlocks(Display *display, XvMCContext *context,
+ */
+ Status XvMCDestroyBlocks(Display *display, XvMCBlockArray *block)
+ {
+- if (!display || block)
++ if (!display || !block)
+ return BadValue;
+
+ if (block->blocks)
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0007-Define-DEFFILEMODE-for-OS-es-that-don-t-have-it.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0007-Define-DEFFILEMODE-for-OS-es-that-don-t-have-it.patch
new file mode 100644
index 000000000000..1e775da1e778
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0007-Define-DEFFILEMODE-for-OS-es-that-don-t-have-it.patch
@@ -0,0 +1,25 @@
+From 5dd06d08015cf9c0721f34f7005ecd670025c334 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Wed, 21 May 2008 14:56:27 -0700
+Subject: [PATCH] Define DEFFILEMODE for OS'es that don't have it
+ (cherry picked from commit 165c0865d849b7d280a3a119fe9ae0ad34637df0)
+
+
+diff --git a/src/bios_reader/bios_dumper.c b/src/bios_reader/bios_dumper.c
+index e2f3064..1353eda 100644
+--- a/src/bios_reader/bios_dumper.c
++++ b/src/bios_reader/bios_dumper.c
+@@ -36,6 +36,10 @@
+ #include <pciaccess.h>
+ #include <err.h>
+
++#ifndef DEFFILEMODE
++#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) /* 0666*/
++#endif
++
+ static void usage(void)
+ {
+ fprintf(stderr, "usage: bios_dumper <filename>\n");
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0008-Disable-a-bunch-of-clock-gating-disables-on-IGD_GM.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0008-Disable-a-bunch-of-clock-gating-disables-on-IGD_GM.patch
new file mode 100644
index 000000000000..fd68cbc051ba
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0008-Disable-a-bunch-of-clock-gating-disables-on-IGD_GM.patch
@@ -0,0 +1,31 @@
+From 0deedbcc98a831284f6e9db2510e88e90e01c286 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Mon, 24 Mar 2008 13:25:37 -0700
+Subject: [PATCH] Disable a bunch of clock gating disables on IGD_GM, which doesn't need them.
+
+Besides our driver having fallen through to the GM965 path for
+RENCLK_GATE_D1, the BIOS was turning some of these on. It may be relevant
+for previous platforms as well to zero out the fields that should be zero
+in the other registers.
+(cherry picked from commit 552a1b824db31a234d7c5cb71057ed0e0ce64477)
+
+diff --git a/src/i830_driver.c b/src/i830_driver.c
+index 0db174b..7a08522 100644
+--- a/src/i830_driver.c
++++ b/src/i830_driver.c
+@@ -1903,7 +1903,11 @@ SetHWOperatingState(ScrnInfoPtr pScrn)
+
+ /* Disable clock gating reported to work incorrectly according to the specs.
+ */
+- if (IS_I965GM(pI830)) {
++ if (IS_IGD_GM(pI830)) {
++ OUTREG(RENCLK_GATE_D1, 0);
++ OUTREG(RENCLK_GATE_D2, 0);
++ OUTREG(DSPCLK_GATE_D, VRHUNIT_CLOCK_GATE_DISABLE);
++ } else if (IS_I965GM(pI830)) {
+ OUTREG(RENCLK_GATE_D1, I965_RCC_CLOCK_GATE_DISABLE);
+ } else if (IS_I965G(pI830)) {
+ OUTREG(RENCLK_GATE_D1,
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0009-Fixup-power-saving-registers.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0009-Fixup-power-saving-registers.patch
new file mode 100644
index 000000000000..bed1544d4673
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0009-Fixup-power-saving-registers.patch
@@ -0,0 +1,206 @@
+From 88232a9b9af2c73460eec206c4971679af9dcb43 Mon Sep 17 00:00:00 2001
+From: Jesse Barnes <jbarnes@hobbes.lan>
+Date: Mon, 26 May 2008 09:34:34 -0700
+Subject: [PATCH] Fixup power saving registers
+
+Update clock gating disable bits to match docs and allocate a power context
+memory area so that newer chips can save state and power down the render unit.
+(cherry picked from commit 89bb53cc7a853d88fc34a0ca65ae2b6227a8dd24)
+
+diff --git a/src/i810_reg.h b/src/i810_reg.h
+index 834b948..5ca8ca9 100644
+--- a/src/i810_reg.h
++++ b/src/i810_reg.h
+@@ -460,6 +460,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * - new bits for i810
+ * - new register hwstam (mask)
+ */
++#define PWRCTXA 0x2088 /* 965GM+ only */
++#define PWRCTX_EN (1<<0)
+ #define HWSTAM 0x2098 /* p290 */
+ #define IER 0x20a0 /* p291 */
+ #define IIR 0x20a4 /* p292 */
+@@ -1120,6 +1122,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ #define RENCLK_GATE_D2 0x6208
+ #define RAMCLK_GATE_D 0x6210 /* CRL only */
++#define DEUC 0x6214 /* CRL only */
+
+ /*
+ * This is a PCI config space register to manipulate backlight brightness
+diff --git a/src/i830.h b/src/i830.h
+index 0ae8270..755c773 100644
+--- a/src/i830.h
++++ b/src/i830.h
+@@ -426,6 +426,8 @@ typedef struct _I830Rec {
+
+ i830_memory *logical_context;
+
++ i830_memory *power_context;
++
+ #ifdef XF86DRI
+ i830_memory *back_buffer;
+ i830_memory *third_buffer;
+@@ -768,6 +770,7 @@ void i830_free_memory(ScrnInfoPtr pScrn, i830_memory *mem);
+ extern long I830CheckAvailableMemory(ScrnInfoPtr pScrn);
+ Bool i830_allocate_2d_memory(ScrnInfoPtr pScrn);
+ Bool i830_allocate_texture_memory(ScrnInfoPtr pScrn);
++Bool i830_allocate_pwrctx(ScrnInfoPtr pScrn);
+ Bool i830_allocate_3d_memory(ScrnInfoPtr pScrn);
+ #ifdef INTEL_XVMC
+ Bool i830_allocate_xvmc_buffer(ScrnInfoPtr pScrn, const char *name,
+diff --git a/src/i830_driver.c b/src/i830_driver.c
+index 7a08522..f1efa7b 100644
+--- a/src/i830_driver.c
++++ b/src/i830_driver.c
+@@ -934,6 +934,40 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
+ }
+ }
+
++static void
++i830_init_clock_gating(ScrnInfoPtr pScrn)
++{
++ I830Ptr pI830 = I830PTR(pScrn);
++
++ /* Disable clock gating reported to work incorrectly according to the specs.
++ */
++ if (IS_IGD_GM(pI830)) {
++ OUTREG(RENCLK_GATE_D1, 0);
++ OUTREG(RENCLK_GATE_D2, 0);
++ OUTREG(RAMCLK_GATE_D, 0);
++ OUTREG(DSPCLK_GATE_D, VRHUNIT_CLOCK_GATE_DISABLE |
++ OVRUNIT_CLOCK_GATE_DISABLE |
++ OVCUNIT_CLOCK_GATE_DISABLE);
++ } else if (IS_I965GM(pI830)) {
++ OUTREG(RENCLK_GATE_D1, I965_RCC_CLOCK_GATE_DISABLE);
++ OUTREG(RENCLK_GATE_D2, 0);
++ OUTREG(DSPCLK_GATE_D, 0);
++ OUTREG(RAMCLK_GATE_D, 0);
++ OUTREG16(DEUC, 0);
++ } else if (IS_I965G(pI830)) {
++ OUTREG(RENCLK_GATE_D1, I965_RCZ_CLOCK_GATE_DISABLE |
++ I965_RCC_CLOCK_GATE_DISABLE |
++ I965_RCPB_CLOCK_GATE_DISABLE |
++ I965_ISC_CLOCK_GATE_DISABLE |
++ I965_FBC_CLOCK_GATE_DISABLE);
++ OUTREG(RENCLK_GATE_D2, 0);
++ } else if (IS_I855(pI830) || IS_I865G(pI830)) {
++ OUTREG(RENCLK_GATE_D1, SV_CLOCK_GATE_DISABLE);
++ } else if (IS_I830(pI830)) {
++ OUTREG(DSPCLK_GATE_D, OVRUNIT_CLOCK_GATE_DISABLE);
++ }
++}
++
+ static int
+ I830LVDSPresent(ScrnInfoPtr pScrn)
+ {
+@@ -1461,6 +1495,8 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
+
+ i830TakeRegSnapshot(pScrn);
+
++ i830_init_clock_gating(pScrn);
++
+ #if 1
+ pI830->saveSWF0 = INREG(SWF0);
+ pI830->saveSWF4 = INREG(SWF4);
+@@ -1901,23 +1937,6 @@ SetHWOperatingState(ScrnInfoPtr pScrn)
+
+ DPRINTF(PFX, "SetHWOperatingState\n");
+
+- /* Disable clock gating reported to work incorrectly according to the specs.
+- */
+- if (IS_IGD_GM(pI830)) {
+- OUTREG(RENCLK_GATE_D1, 0);
+- OUTREG(RENCLK_GATE_D2, 0);
+- OUTREG(DSPCLK_GATE_D, VRHUNIT_CLOCK_GATE_DISABLE);
+- } else if (IS_I965GM(pI830)) {
+- OUTREG(RENCLK_GATE_D1, I965_RCC_CLOCK_GATE_DISABLE);
+- } else if (IS_I965G(pI830)) {
+- OUTREG(RENCLK_GATE_D1,
+- I965_RCC_CLOCK_GATE_DISABLE | I965_ISC_CLOCK_GATE_DISABLE);
+- } else if (IS_I855(pI830) || IS_I865G(pI830)) {
+- OUTREG(RENCLK_GATE_D1, SV_CLOCK_GATE_DISABLE);
+- } else if (IS_I830(pI830)) {
+- OUTREG(DSPCLK_GATE_D, OVRUNIT_CLOCK_GATE_DISABLE);
+- }
+-
+ i830_start_ring(pScrn);
+ if (!pI830->SWCursor)
+ I830InitHWCursor(pScrn);
+@@ -2504,6 +2523,10 @@ i830_try_memory_allocation(ScrnInfoPtr pScrn)
+ if (!i830_allocate_2d_memory(pScrn))
+ goto failed;
+
++ if (IS_I965GM(pI830) || IS_IGD_GM(pI830))
++ if (!i830_allocate_pwrctx(pScrn))
++ goto failed;
++
+ if (dri && !i830_allocate_3d_memory(pScrn))
+ goto failed;
+
+@@ -2825,6 +2848,9 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ return FALSE;
+ }
+
++ if (pI830->power_context)
++ OUTREG(PWRCTXA, pI830->power_context->offset | PWRCTX_EN);
++
+ I830UnmapMMIO(pScrn);
+
+ i830_fixup_mtrrs(pScrn);
+@@ -3448,6 +3474,9 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen)
+ }
+ #endif
+
++ if (IS_I965GM(pI830) || IS_IGD_GM(pI830))
++ OUTREG(PWRCTXA, 0);
++
+ if (I830IsPrimary(pScrn)) {
+ xf86GARTCloseScreen(scrnIndex);
+
+diff --git a/src/i830_memory.c b/src/i830_memory.c
+index 6835a6f..9ceb254 100644
+--- a/src/i830_memory.c
++++ b/src/i830_memory.c
+@@ -112,6 +112,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ /* Our hardware status area is just a single page */
+ #define HWSTATUS_PAGE_SIZE GTT_PAGE_SIZE
++#define PWRCTX_SIZE GTT_PAGE_SIZE
+
+ static i830_memory *
+ i830_allocate_aperture(ScrnInfoPtr pScrn, const char *name,
+@@ -337,6 +338,7 @@ i830_reset_allocations(ScrnInfoPtr pScrn)
+ pI830->exa_965_state = NULL;
+ pI830->overlay_regs = NULL;
+ pI830->logical_context = NULL;
++ pI830->power_context = NULL;
+ #ifdef XF86DRI
+ pI830->back_buffer = NULL;
+ pI830->third_buffer = NULL;
+@@ -1654,6 +1656,22 @@ i830_allocate_hwstatus(ScrnInfoPtr pScrn)
+ }
+
+ Bool
++i830_allocate_pwrctx(ScrnInfoPtr pScrn)
++{
++ I830Ptr pI830 = I830PTR(pScrn);
++
++ pI830->power_context = i830_allocate_memory(pScrn, "power context",
++ PWRCTX_SIZE, GTT_PAGE_SIZE,
++ NEED_LIFETIME_FIXED);
++ if (!pI830->power_context) {
++ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
++ "Failed to allocate power context.\n");
++ return FALSE;
++ }
++ return TRUE;
++}
++
++Bool
+ i830_allocate_3d_memory(ScrnInfoPtr pScrn)
+ {
+ I830Ptr pI830 = I830PTR(pScrn);
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0010-xvmc-remove-unused-dri-drawable.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0010-xvmc-remove-unused-dri-drawable.patch
new file mode 100644
index 000000000000..16b2bcd61887
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0010-xvmc-remove-unused-dri-drawable.patch
@@ -0,0 +1,316 @@
+From ce674bd39c2fe2844b449fad6cfe83b4d18adad6 Mon Sep 17 00:00:00 2001
+From: Zhenyu Wang <zhenyu.z.wang@intel.com>
+Date: Tue, 3 Jun 2008 16:13:52 +0800
+Subject: [PATCH] xvmc: remove unused dri drawable
+ (cherry picked from commit 96955003557686469c7ae9f7d42620d2851e6fad)
+
+
+diff --git a/src/xvmc/Makefile.am b/src/xvmc/Makefile.am
+index f571743..f2dab22 100644
+--- a/src/xvmc/Makefile.am
++++ b/src/xvmc/Makefile.am
+@@ -19,9 +19,8 @@ libIntelXvMC_la_SOURCES = intel_xvmc.c \
+ intel_batchbuffer.h \
+ xf86dri.c \
+ xf86dri.h \
+- xf86dristr.h \
+- driDrawable.c \
+- driDrawable.h
++ xf86dristr.h
++
+ libIntelXvMC_la_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @XVMCLIB_CFLAGS@ -I$(top_srcdir)/src -DTRUE=1 -DFALSE=0
+ libIntelXvMC_la_LDFLAGS = -version-number 1:0:0
+ libIntelXvMC_la_LIBADD = @DRI_LIBS@
+diff --git a/src/xvmc/driDrawable.c b/src/xvmc/driDrawable.c
+deleted file mode 100644
+index 8386334..0000000
+--- a/src/xvmc/driDrawable.c
++++ /dev/null
+@@ -1,174 +0,0 @@
+-/*****************************************************************************
+- * driDrawable.c: Lean Version of DRI utilities.
+- *
+- * Copyright (c) 2005 Thomas Hellstrom. All rights reserved.
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a
+- * copy of this software and associated documentation files (the "Software"),
+- * to deal in the Software without restriction, including without limitation
+- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+- * and/or sell copies of the Software, and to permit persons to whom the
+- * Software is furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in
+- * all copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+- * AUTHOR(S) OR COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+- * DEALINGS IN THE SOFTWARE.
+- */
+-
+-
+-#include <X11/Xlibint.h>
+-#include <X11/Xutil.h>
+-#include "xf86drm.h"
+-#include "drm.h"
+-#include "xf86dri.h"
+-#include "drm_sarea.h"
+-#include "driDrawable.h"
+-
+-static unsigned
+-drawStamp(volatile drm_sarea_t * pSarea, int index)
+-{
+- return pSarea->drawableTable[index].stamp;
+-}
+-
+-int
+-getDRIDrawableInfoLocked(void *drawHash, Display * display, int screen,
+- Drawable draw, unsigned lockFlags, int drmFD, drm_context_t drmContext,
+- drmAddress sarea, Bool updateInfo, drawableInfo ** info,
+- unsigned long infoSize)
+-{
+- drawableInfo *drawInfo;
+- void *res;
+- drm_drawable_t drmDraw = 0;
+- volatile drm_sarea_t *pSarea = (drm_sarea_t *) sarea;
+- drm_clip_rect_t *clipFront, *clipBack;
+-
+- int ret;
+-
+- if (drmHashLookup(drawHash, (unsigned long)draw, &res)) {
+-
+- /*
+- * The drawable is unknown to us. Create it and put it in the
+- * hash table.
+- */
+-
+- DRM_UNLOCK(drmFD, &pSarea->lock, drmContext);
+- if (!uniDRICreateDrawable(display, screen, draw, &drmDraw)) {
+- DRM_LOCK(drmFD, &pSarea->lock, drmContext, lockFlags);
+- return 1;
+- }
+- DRM_LOCK(drmFD, &pSarea->lock, drmContext, lockFlags);
+-
+- drawInfo = (drawableInfo *) malloc(infoSize);
+- if (!drawInfo)
+- return 1;
+-
+- drawInfo->drmDraw = drmDraw;
+- drawInfo->stamp = 0;
+- drawInfo->clipFront = 0;
+- drawInfo->clipBack = 0;
+-
+- drmHashInsert(drawHash, (unsigned long)draw, drawInfo);
+-
+- } else {
+- drawInfo = res;
+- }
+-
+- drawInfo->touched = FALSE;
+- while (!drawInfo->clipFront
+- || drawInfo->stamp != drawStamp(pSarea, drawInfo->index)) {
+-
+- /*
+- * The drawable has been touched since we last got info about it.
+- * obtain new info from the X server.
+- */
+-
+- drawInfo->touched = TRUE;
+-
+- if (updateInfo || !drawInfo->clipFront) {
+- DRM_UNLOCK(drmFD, &pSarea->lock, drmContext);
+-
+- ret = uniDRIGetDrawableInfo(display, screen, draw,
+- &drawInfo->index, &drawInfo->stamp, &drawInfo->x,
+- &drawInfo->y, &drawInfo->w, &drawInfo->h,
+- &drawInfo->numClipFront, &clipFront,
+- &drawInfo->backX, &drawInfo->backY,
+- &drawInfo->numClipBack, &clipBack);
+-
+- DRM_LIGHT_LOCK(drmFD, &pSarea->lock, drmContext);
+-
+- /*
+- * Error. Probably the drawable is destroyed. Return error and old values.
+- */
+-
+- if (!ret) {
+- free(drawInfo);
+- drawInfo = NULL;
+- drmHashDelete(drawHash, (unsigned long)draw);
+-
+- DRM_UNLOCK(drmFD, &pSarea->lock, drmContext);
+- uniDRIDestroyDrawable(display, screen, draw);
+- DRM_LOCK(drmFD, &pSarea->lock, drmContext, lockFlags);
+-
+- return 1;
+- }
+-
+- if (drawInfo->stamp != drawStamp(pSarea, drawInfo->index)) {
+-
+- /*
+- * The info is already outdated. Sigh. Have another go.
+- */
+-
+- XFree(clipFront);
+- XFree(clipBack);
+- continue;
+- }
+-
+- if (drawInfo->clipFront)
+- XFree(drawInfo->clipFront);
+- drawInfo->clipFront = clipFront;
+- if (drawInfo->clipBack)
+- XFree(drawInfo->clipBack);
+- drawInfo->clipBack = clipBack;
+- } else {
+- if (!drawInfo->clipFront)
+- drawInfo->clipFront = (drm_clip_rect_t *) ~ 0UL;
+- drawInfo->stamp = drawStamp(pSarea, drawInfo->index);
+- }
+- }
+- *info = drawInfo;
+- return 0;
+-}
+-
+-void
+-driDestroyHashContents(void *drawHash)
+-{
+- unsigned long key;
+- void *content;
+- drawableInfo *drawInfo;
+-
+- if (drmHashFirst(drawHash, &key, &content) < 1)
+- return;
+- drawInfo = (drawableInfo *) content;
+- if (drawInfo->clipBack)
+- XFree(drawInfo->clipBack);
+- if (drawInfo->clipFront)
+- XFree(drawInfo->clipFront);
+- free(drawInfo);
+- while (drmHashNext(drawHash, &key, &content) == 1) {
+- drawInfo = (drawableInfo *) content;
+- if (drawInfo->clipBack)
+- XFree(drawInfo->clipBack);
+- if (drawInfo->clipFront)
+- XFree(drawInfo->clipFront);
+- free(drawInfo);
+- }
+-
+- return;
+-}
+diff --git a/src/xvmc/driDrawable.h b/src/xvmc/driDrawable.h
+deleted file mode 100644
+index a758c7c..0000000
+--- a/src/xvmc/driDrawable.h
++++ /dev/null
+@@ -1,64 +0,0 @@
+-/*****************************************************************************
+- * driDrawable.h: Lean Version of DRI utilities.
+- *
+- * Copyright (c) 2005 Thomas Hellstrom. All rights reserved.
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a
+- * copy of this software and associated documentation files (the "Software"),
+- * to deal in the Software without restriction, including without limitation
+- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+- * and/or sell copies of the Software, and to permit persons to whom the
+- * Software is furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in
+- * all copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+- * AUTHOR(S) OR COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+- * DEALINGS IN THE SOFTWARE.
+- */
+-
+-#ifndef _DRIDRAWABLE_H
+-#define _DRIDRAWABLE_H
+-
+-typedef struct _drawableInfo
+-{
+- drm_drawable_t drmDraw;
+- unsigned stamp;
+- unsigned index;
+- drm_clip_rect_t *clipFront;
+- drm_clip_rect_t *clipBack;
+- int x;
+- int y;
+- int w;
+- int h;
+- int backX;
+- int backY;
+- int numClipFront;
+- int numClipBack;
+- Bool touched;
+-} drawableInfo;
+-
+-/*
+- * Get updated info about the drawable "draw". The drawableInfo record returned is malloced
+- * and administrated internally. Never free it unless you know exactly what you are doing.
+- * The drm hash table "drawHash" needs to be initialized externally.
+- */
+-
+-extern int
+-getDRIDrawableInfoLocked(void *drawHash, Display * display, int screen,
+- Drawable draw, unsigned lockFlags, int drmFD, drm_context_t drmContext,
+- drmAddress sarea, Bool updateInfo, drawableInfo ** info,
+- unsigned long infoSize);
+-
+-/*
+- * Free all resources created by the above function. Typically done on exit.
+- */
+-
+-extern void driDestroyHashContents(void *drawHash);
+-
+-#endif
+diff --git a/src/xvmc/i915_xvmc.c b/src/xvmc/i915_xvmc.c
+index 20b2e61..f2d8ded 100644
+--- a/src/xvmc/i915_xvmc.c
++++ b/src/xvmc/i915_xvmc.c
+@@ -1608,9 +1608,6 @@ static void i915_release_resource(Display *display, XvMCContext *context)
+ pI915XvMC->ref--;
+ i915_xvmc_unmap_buffers(pI915XvMC);
+
+- driDestroyHashContents(pI915XvMC->drawHash);
+- drmHashDestroy(pI915XvMC->drawHash);
+-
+ free(pI915XvMC);
+ context->privData = NULL;
+ }
+@@ -1683,13 +1680,6 @@ static Status i915_xvmc_mc_create_context(Display *display, XvMCContext *context
+ pSAREA = (drm_sarea_t *)xvmc_driver->sarea_address;
+ pI915XvMC->sarea = (drmI830Sarea*)((char*)pSAREA + pI915XvMC->sarea_priv_offset);
+
+- if (NULL == (pI915XvMC->drawHash = drmHashCreate())) {
+- XVMC_ERR("Could not allocate drawable hash table.");
+- free(pI915XvMC);
+- context->privData = NULL;
+- return BadAlloc;
+- }
+-
+ if (i915_xvmc_map_buffers(pI915XvMC)) {
+ i915_xvmc_unmap_buffers(pI915XvMC);
+ free(pI915XvMC);
+diff --git a/src/xvmc/intel_xvmc.h b/src/xvmc/intel_xvmc.h
+index 5506683..bc863c4 100644
+--- a/src/xvmc/intel_xvmc.h
++++ b/src/xvmc/intel_xvmc.h
+@@ -53,7 +53,6 @@
+ #include <drm_sarea.h>
+
+ #include "xf86dri.h"
+-#include "driDrawable.h"
+
+ #include "intel_batchbuffer.h"
+
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0011-xvmc-a-little-cleanup.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0011-xvmc-a-little-cleanup.patch
new file mode 100644
index 000000000000..45348de05cca
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0011-xvmc-a-little-cleanup.patch
@@ -0,0 +1,140 @@
+From 14dc93cb4dabdd83ee62a2a497c210aeb52f6c30 Mon Sep 17 00:00:00 2001
+From: Zhenyu Wang <zhenyu.z.wang@intel.com>
+Date: Thu, 12 Jun 2008 13:47:04 +0800
+Subject: [PATCH] xvmc: a little cleanup
+
+Also safe check context size to not exceed surface max.
+
+diff --git a/src/i830.h b/src/i830.h
+index 755c773..db930a0 100644
+--- a/src/i830.h
++++ b/src/i830.h
+@@ -660,6 +660,8 @@ typedef struct _I830Rec {
+
+ #define I830PTR(p) ((I830Ptr)((p)->driverPrivate))
+
++#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
++
+ #define I830_SELECT_FRONT 0
+ #define I830_SELECT_BACK 1
+ #define I830_SELECT_DEPTH 2
+diff --git a/src/i915_hwmc.c b/src/i915_hwmc.c
+index c3d3c75..50e1106 100644
+--- a/src/i915_hwmc.c
++++ b/src/i915_hwmc.c
+@@ -95,8 +95,6 @@ typedef struct _I915XvMC
+ PutImageFuncPtr savePutImage;
+ } I915XvMC, *I915XvMCPtr;
+
+-#define ARRARY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+-
+ /*
+ static int yv12_subpicture_index_list[2] =
+ {
+@@ -161,6 +159,22 @@ static XF86ImagePtr i915_subpicture_list[2] =
+ };
+ #endif
+
++/* Check context size not exceed surface type max */
++static void
++i915_check_context_size(XvMCContextPtr ctx)
++{
++ int i;
++
++ for (i = 0; i < ARRAY_SIZE(ppSI); i++) {
++ if (ctx->surface_type_id == ppSI[i]->surface_type_id) {
++ if (ctx->width > ppSI[i]->max_width)
++ ctx->width = ppSI[i]->max_width;
++ if (ctx->height > ppSI[i]->max_height)
++ ctx->height = ppSI[i]->max_height;
++ }
++ }
++}
++
+ /*
+ * Init and clean up the screen private parts of XvMC.
+ */
+@@ -430,6 +444,8 @@ static int i915_xvmc_create_context (ScrnInfoPtr pScrn, XvMCContextPtr pContext,
+ return BadAlloc;
+ }
+
++ i915_check_context_size(pContext);
++
+ *priv = xcalloc(1, sizeof(I915XvMCCreateContextRec));
+ contextRec = (I915XvMCCreateContextRec *)*priv;
+
+@@ -776,10 +792,9 @@ static int i915_xvmc_put_image(ScrnInfoPtr pScrn,
+ struct intel_xvmc_command *xvmc_cmd = (struct intel_xvmc_command *)buf;
+ int ret;
+
+- if (pI830->XvMCEnabled) {
+- if (FOURCC_XVMC == id) {
+- switch (xvmc_cmd->command) {
+- case INTEL_XVMC_COMMAND_DISPLAY:
++ if (FOURCC_XVMC == id) {
++ switch (xvmc_cmd->command) {
++ case INTEL_XVMC_COMMAND_DISPLAY:
+ if ((xvmc_cmd->srfNo >= I915_XVMC_MAX_SURFACES) ||
+ !pXvMC->surfaces[xvmc_cmd->srfNo] ||
+ !pXvMC->sfprivs[xvmc_cmd->srfNo]) {
+@@ -793,10 +808,9 @@ static int i915_xvmc_put_image(ScrnInfoPtr pScrn,
+ id = xvmc_cmd->real_id;
+ pI830->IsXvMCSurface = 1;
+ break;
+- default:
+- return 0;
+- }
+- }
++ default:
++ return 0;
++ }
+ }
+
+ ret = pXvMC->savePutImage(pScrn, src_x, src_y, drw_x, drw_y, src_w, src_h,
+@@ -850,7 +864,7 @@ static void i915_xvmc_fini(ScrnInfoPtr pScrn)
+ static XF86MCAdaptorRec pAdapt =
+ {
+ .name = "Intel(R) Textured Video",
+- .num_surfaces = ARRARY_SIZE(ppSI),
++ .num_surfaces = ARRAY_SIZE(ppSI),
+ .surfaces = ppSI,
+ #if 0
+ .num_subpictures = ARRARY_SIZE(i915_subpicture_list),
+diff --git a/src/i915_hwmc.h b/src/i915_hwmc.h
+index 0141fb2..7d90afc 100644
+--- a/src/i915_hwmc.h
++++ b/src/i915_hwmc.h
+@@ -32,7 +32,7 @@
+ #define STRIDE(w) (((w) + 0x3ff) & ~0x3ff)
+ #define SIZE_Y420(w, h) (h * STRIDE(w))
+ #define SIZE_UV420(w, h) ((h >> 1) * STRIDE(w >> 1))
+-#define SIZE_YUV420(w, h) (h * (STRIDE(w) + STRIDE(w >> 1)))
++#define SIZE_YUV420(w, h) (SIZE_Y420(w,h) + SIZE_UV420(w,h) * 2)
+ #define SIZE_XX44(w, h) (h * STRIDE(w))
+
+ #define I915_NUM_XVMC_ATTRIBUTES 0x02
+diff --git a/src/xvmc/i915_xvmc.c b/src/xvmc/i915_xvmc.c
+index f2d8ded..b1a17b4 100644
+--- a/src/xvmc/i915_xvmc.c
++++ b/src/xvmc/i915_xvmc.c
+@@ -1987,7 +1987,7 @@ static int i915_xvmc_mc_render_surface(Display *display, XvMCContext *context,
+ XVMC_ERR("Invalid Macroblock Parameters found.");
+ break;
+ }
+- } else { /* Frame Picture */
++ } else { /* Field Picture */
+ switch (mb->motion_type & 3) {
+ case XVMC_PREDICTION_FIELD: /* Field Based */
+ i915_mc_mpeg_macroblock_1fbmv(context, mb);
+@@ -2005,7 +2005,7 @@ static int i915_xvmc_mc_render_surface(Display *display, XvMCContext *context,
+ XVMC_ERR("Invalid Macroblock Parameters found.");
+ break;
+ }
+- } /* Field Picture */
++ }
+ }
+
+ intelFlushBatch(TRUE);
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0012-Set-SDVO-sync-polarity-to-default-on-965.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0012-Set-SDVO-sync-polarity-to-default-on-965.patch
new file mode 100644
index 000000000000..6bb59e4a883b
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0012-Set-SDVO-sync-polarity-to-default-on-965.patch
@@ -0,0 +1,41 @@
+From 85308ab8aaf58b6620a41621128eba0b7e1ffb44 Mon Sep 17 00:00:00 2001
+From: Hong Liu <hong.liu@intel.com>
+Date: Wed, 4 Jun 2008 16:58:05 +0800
+Subject: [PATCH] Set SDVO sync polarity to default on 965
+
+Fix fd.o bug 15766
+(cherry picked from commit beb72ae5aa053303f5cc419e9c9d7c6db964f160)
+
+diff --git a/src/i810_reg.h b/src/i810_reg.h
+index 5ca8ca9..79a5b1e 100644
+--- a/src/i810_reg.h
++++ b/src/i810_reg.h
+@@ -1222,6 +1222,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #define SDVO_CLOCK_OUTPUT_INVERT (1 << 18)
+ #define SDVOC_GANG_MODE (1 << 16)
+ #define SDVO_BORDER_ENABLE (1 << 7)
++/** new with 965, default is to be set */
++#define SDVO_VSYNC_ACTIVE_HIGH (1 << 4)
++#define SDVO_HSYNC_ACTIVE_HIGH (1 << 3)
++/** 915/945 only, read-only bit */
+ #define SDVOB_PCIE_CONCURRENCY (1 << 3)
+ #define SDVO_DETECTED (1 << 2)
+ /* Bits to be preserved when writing */
+diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
+index f60e38c..0dc6dca 100644
+--- a/src/i830_sdvo.c
++++ b/src/i830_sdvo.c
+@@ -730,7 +730,9 @@ i830_sdvo_mode_set(xf86OutputPtr output, DisplayModePtr mode,
+
+ /* Set the SDVO control regs. */
+ if (IS_I965G(pI830)) {
+- sdvox = SDVO_BORDER_ENABLE;
++ sdvox = SDVO_BORDER_ENABLE |
++ SDVO_VSYNC_ACTIVE_HIGH |
++ SDVO_HSYNC_ACTIVE_HIGH;
+ } else {
+ sdvox = INREG(dev_priv->output_device);
+ switch (dev_priv->output_device) {
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0013-Just-remove-the-mprotect-kludge.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0013-Just-remove-the-mprotect-kludge.patch
new file mode 100644
index 000000000000..42097e09b182
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0013-Just-remove-the-mprotect-kludge.patch
@@ -0,0 +1,33 @@
+From 7d267e27c152a4935ec5301d9fbbfd6eff8816d4 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Thu, 5 Jun 2008 11:26:02 -0700
+Subject: [PATCH] Just remove the mprotect kludge.
+
+Besides not being #ifdef __linux__ed as requested, some linux kernels break
+in exciting new ways when you try to mprotect from PROT_NONE back to
+PROT_READ|PROT_WRITE. Yes, there are bugs in the code we're calling in a
+bug-exploiting bug workaround.
+
+If you want this workaround for the original bug exposed when moving to
+libpciaccess, it's already in libpciaccess.
+(cherry picked from commit 65306cdd71dad71e4ca7229764f81a0880dd70bf)
+
+diff --git a/src/i830_driver.c b/src/i830_driver.c
+index f1efa7b..a237374 100644
+--- a/src/i830_driver.c
++++ b/src/i830_driver.c
+@@ -692,11 +692,6 @@ I830MapMem(ScrnInfoPtr pScrn)
+ (void **) &pI830->FbBase);
+ if (err)
+ return FALSE;
+- /* KLUDGE ALERT -- rewrite the PTEs to turn off the CD and WT bits */
+-#if HAVE_MPROTECT
+- mprotect (pI830->FbBase, pI830->FbMapSize, PROT_NONE);
+- mprotect (pI830->FbBase, pI830->FbMapSize, PROT_READ|PROT_WRITE);
+-#endif
+ #else
+ pI830->FbBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
+ pI830->PciTag,
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0014-Replace-a-couple-of-wait-for-ring-idles-with-a-singl.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0014-Replace-a-couple-of-wait-for-ring-idles-with-a-singl.patch
new file mode 100644
index 000000000000..e7bb3dbf34bc
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0014-Replace-a-couple-of-wait-for-ring-idles-with-a-singl.patch
@@ -0,0 +1,102 @@
+From a4e8b188d469c8092d4314be96a697fb4f780276 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Thu, 5 Jun 2008 11:56:42 -0700
+Subject: [PATCH] Replace a couple of wait-for-ring-idles with a single function to do so.
+ (cherry picked from commit 7e51384c973a96366b02ea646392c43574674111)
+
+
+diff --git a/src/i830.h b/src/i830.h
+index db930a0..a7cdb8c 100644
+--- a/src/i830.h
++++ b/src/i830.h
+@@ -853,6 +853,14 @@ i830_get_transformed_coordinates_3d(int x, int y, PictTransformPtr transform,
+
+ void i830_enter_render(ScrnInfoPtr);
+
++static inline void
++i830_wait_ring_idle(ScrnInfoPtr pScrn)
++{
++ I830Ptr pI830 = I830PTR(pScrn);
++
++ I830WaitLpRing(pScrn, pI830->LpRing->mem->size - 8, 0);
++}
++
+ static inline int i830_fb_compression_supported(I830Ptr pI830)
+ {
+ if (!IS_MOBILE(pI830))
+diff --git a/src/i830_accel.c b/src/i830_accel.c
+index 953a73b..7784c62 100644
+--- a/src/i830_accel.c
++++ b/src/i830_accel.c
+@@ -201,7 +201,7 @@ I830Sync(ScrnInfoPtr pScrn)
+ ADVANCE_BATCH();
+ }
+
+- I830WaitLpRing(pScrn, pI830->LpRing->mem->size - 8, 0);
++ i830_wait_ring_idle(pScrn);
+
+ pI830->LpRing->space = pI830->LpRing->mem->size - 8;
+ pI830->nextColorExpandBuf = 0;
+diff --git a/src/i830_driver.c b/src/i830_driver.c
+index a237374..16092dd 100644
+--- a/src/i830_driver.c
++++ b/src/i830_driver.c
+@@ -1851,7 +1851,7 @@ i830_stop_ring(ScrnInfoPtr pScrn, Bool flush)
+ if (temp & RING_VALID) {
+ i830_refresh_ring(pScrn);
+ I830Sync(pScrn);
+- DO_RING_IDLE();
++ i830_wait_ring_idle(pScrn);
+ }
+
+ OUTREG(LP_RING + RING_LEN, 0);
+@@ -3358,10 +3358,10 @@ I830EnterVT(int scrnIndex, int flags)
+ int i;
+
+ I830DRIResume(screenInfo.screens[scrnIndex]);
+-
++
+ i830_refresh_ring(pScrn);
+ I830Sync(pScrn);
+- DO_RING_IDLE();
++ i830_wait_ring_idle(pScrn);
+
+ sarea->texAge++;
+ for(i = 0; i < I830_NR_TEX_REGIONS+1 ; i++)
+diff --git a/src/i830_ring.h b/src/i830_ring.h
+index cf789eb..c2078fb 100644
+--- a/src/i830_ring.h
++++ b/src/i830_ring.h
+@@ -75,28 +75,13 @@ union intfloat {
+ pI830->ring_emitting = 0; \
+ } while (0)
+
+-/*
+- * XXX Note: the head/tail masks are different for 810 and i830.
+- * If the i810 always sets the higher bits to 0, then this shouldn't be
+- * a problem. Check this!
+- */
+-#define DO_RING_IDLE() do { \
+- int _head; \
+- int _tail; \
+- do { \
+- _head = INREG(LP_RING + RING_HEAD) & I830_HEAD_MASK; \
+- _tail = INREG(LP_RING + RING_TAIL) & I830_TAIL_MASK; \
+- DELAY(10); \
+- } while (_head != _tail); \
+-} while (0)
+-
+ #define BEGIN_LP_RING(n) \
+ do { \
+ if (pI830->ring_emitting != 0) \
+ FatalError("%s: BEGIN_LP_RING called without closing " \
+ "ADVANCE_LP_RING\n", __FUNCTION__); \
+ if ((n) > 2 && (I810_DEBUG&DEBUG_ALWAYS_SYNC)) \
+- DO_RING_IDLE(); \
++ i830_wait_ring_idle(pScrn); \
+ pI830->ring_emitting = (n) * 4; \
+ if ((n) & 1) \
+ pI830->ring_emitting += 4; \
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0015-Remove-duplicated-i830_stop_ring-SetHWOperatingSta.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0015-Remove-duplicated-i830_stop_ring-SetHWOperatingSta.patch
new file mode 100644
index 000000000000..044dedba1cf5
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0015-Remove-duplicated-i830_stop_ring-SetHWOperatingSta.patch
@@ -0,0 +1,24 @@
+From e0a2b1008f751ee8cddb0d7587514ea574821af6 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Thu, 5 Jun 2008 13:39:08 -0700
+Subject: [PATCH] Remove duplicated i830_stop_ring()/SetHWOperatingState() in EnterVT().
+ (cherry picked from commit adb4f5a5e826e584ab212d23fc8d474c3e7bb8e8)
+
+
+diff --git a/src/i830_driver.c b/src/i830_driver.c
+index 16092dd..cf4586b 100644
+--- a/src/i830_driver.c
++++ b/src/i830_driver.c
+@@ -3323,9 +3323,6 @@ I830EnterVT(int scrnIndex, int flags)
+ }
+ i830DescribeOutputConfiguration(pScrn);
+
+- i830_stop_ring(pScrn, TRUE);
+- SetHWOperatingState(pScrn);
+-
+ #ifdef XF86DRI
+ if (pI830->directRenderingEnabled) {
+ /* HW status is fixed, we need to set it up before any drm
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0016-Remove-gratuitous-wait_ring_idle-after-I830Sync.-Sy.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0016-Remove-gratuitous-wait_ring_idle-after-I830Sync.-Sy.patch
new file mode 100644
index 000000000000..0c013dd4b5de
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0016-Remove-gratuitous-wait_ring_idle-after-I830Sync.-Sy.patch
@@ -0,0 +1,30 @@
+From ae65ddbbc8064c33febc7608122828998ee15a2e Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Thu, 5 Jun 2008 13:57:54 -0700
+Subject: [PATCH] Remove gratuitous wait_ring_idle after I830Sync. Syncing implies that.
+ (cherry picked from commit b61cb9283185eb5211e84eb7d8e68beea607c2eb)
+
+
+diff --git a/src/i830_driver.c b/src/i830_driver.c
+index cf4586b..c53d2c3 100644
+--- a/src/i830_driver.c
++++ b/src/i830_driver.c
+@@ -1851,7 +1851,6 @@ i830_stop_ring(ScrnInfoPtr pScrn, Bool flush)
+ if (temp & RING_VALID) {
+ i830_refresh_ring(pScrn);
+ I830Sync(pScrn);
+- i830_wait_ring_idle(pScrn);
+ }
+
+ OUTREG(LP_RING + RING_LEN, 0);
+@@ -3358,7 +3357,6 @@ I830EnterVT(int scrnIndex, int flags)
+
+ i830_refresh_ring(pScrn);
+ I830Sync(pScrn);
+- i830_wait_ring_idle(pScrn);
+
+ sarea->texAge++;
+ for(i = 0; i < I830_NR_TEX_REGIONS+1 ; i++)
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0017-Move-BIOS-scratch-register-setup-to-EnterVT-instead.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0017-Move-BIOS-scratch-register-setup-to-EnterVT-instead.patch
new file mode 100644
index 000000000000..5f192e0eb76f
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0017-Move-BIOS-scratch-register-setup-to-EnterVT-instead.patch
@@ -0,0 +1,105 @@
+From 71befe0581bcc7d75ed982b543bbf575c2f48c37 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Thu, 5 Jun 2008 14:09:45 -0700
+Subject: [PATCH] Move BIOS scratch register setup to EnterVT instead of PreInit.
+
+We want these to always be set when our driver's in control. They are
+already appropriately save/restored at leave/entervt.
+(cherry picked from commit 8061e5ac27a5f61f940bccc940be922999cc1d3f)
+
+diff --git a/src/i830.h b/src/i830.h
+index a7cdb8c..ca7acc9 100644
+--- a/src/i830.h
++++ b/src/i830.h
+@@ -554,10 +554,6 @@ typedef struct _I830Rec {
+
+ Bool StolenOnly;
+
+- Bool swfSaved;
+- uint32_t saveSWF0;
+- uint32_t saveSWF4;
+-
+ Bool checkDevices;
+
+ /* Driver phase/state information */
+diff --git a/src/i830_driver.c b/src/i830_driver.c
+index c53d2c3..862ddde 100644
+--- a/src/i830_driver.c
++++ b/src/i830_driver.c
+@@ -963,6 +963,19 @@ i830_init_clock_gating(ScrnInfoPtr pScrn)
+ }
+ }
+
++static void
++i830_init_bios_control(ScrnInfoPtr pScrn)
++{
++ I830Ptr pI830 = I830PTR(pScrn);
++
++ /* Set "extended desktop" */
++ OUTREG(SWF0, INREG(SWF0) | (1 << 21));
++
++ /* Set "driver loaded", "OS unknown", "APM 1.2" */
++ OUTREG(SWF4, (INREG(SWF4) & ~((3 << 19) | (7 << 16))) |
++ (1 << 23) | (2 << 16));
++}
++
+ static int
+ I830LVDSPresent(ScrnInfoPtr pScrn)
+ {
+@@ -1021,10 +1034,6 @@ PreInitCleanup(ScrnInfoPtr pScrn)
+ if (pI830->entityPrivate)
+ pI830->entityPrivate->pScrn_2 = NULL;
+ }
+- if (pI830->swfSaved) {
+- OUTREG(SWF0, pI830->saveSWF0);
+- OUTREG(SWF4, pI830->saveSWF4);
+- }
+ if (pI830->MMIOBase)
+ I830UnmapMMIO(pScrn);
+ I830FreeRec(pScrn);
+@@ -1492,19 +1501,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
+
+ i830_init_clock_gating(pScrn);
+
+-#if 1
+- pI830->saveSWF0 = INREG(SWF0);
+- pI830->saveSWF4 = INREG(SWF4);
+- pI830->swfSaved = TRUE;
+-
+- /* Set "extended desktop" */
+- OUTREG(SWF0, pI830->saveSWF0 | (1 << 21));
+-
+- /* Set "driver loaded", "OS unknown", "APM 1.2" */
+- OUTREG(SWF4, (pI830->saveSWF4 & ~((3 << 19) | (7 << 16))) |
+- (1 << 23) | (2 << 16));
+-#endif
+-
+ if (DEVICE_ID(pI830->PciInfo) == PCI_CHIP_E7221_G)
+ num_pipe = 1;
+ else
+@@ -1739,12 +1735,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
+ pI830->noAccel = TRUE;
+ }
+
+- /* Don't need MMIO access anymore. */
+- if (pI830->swfSaved) {
+- OUTREG(SWF0, pI830->saveSWF0);
+- OUTREG(SWF4, pI830->saveSWF4);
+- }
+-
+ /* Set display resolution */
+ xf86SetDpi(pScrn, 0, 0);
+
+@@ -3309,6 +3299,9 @@ I830EnterVT(int scrnIndex, int flags)
+ i830_stop_ring(pScrn, FALSE);
+ SetHWOperatingState(pScrn);
+
++ /* Tell the BIOS that we're in control of mode setting now. */
++ i830_init_bios_control(pScrn);
++
+ /* Clear the framebuffer */
+ memset(pI830->FbBase + pScrn->fbOffset, 0,
+ pScrn->virtualY * pScrn->displayWidth * pI830->cpp);
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0018-Initialize-clock-gating-from-EnterVT-and-save-restor.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0018-Initialize-clock-gating-from-EnterVT-and-save-restor.patch
new file mode 100644
index 000000000000..da5e56b49b5e
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0018-Initialize-clock-gating-from-EnterVT-and-save-restor.patch
@@ -0,0 +1,90 @@
+From 34ce546153ce9dd0571ce0a5cec7a481641fbbdd Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Thu, 5 Jun 2008 14:37:26 -0700
+Subject: [PATCH] Initialize clock gating from EnterVT and save/restore it appropriately.
+
+
+diff --git a/src/i830.h b/src/i830.h
+index ca7acc9..a96fa5b 100644
+--- a/src/i830.h
++++ b/src/i830.h
+@@ -645,6 +645,10 @@ typedef struct _I830Rec {
+ uint32_t saveFBC_CONTROL2;
+ uint32_t saveFBC_CONTROL;
+ uint32_t saveFBC_FENCE_OFF;
++ uint32_t saveRENCLK_GATE_D1;
++ uint32_t saveRENCLK_GATE_D2;
++ uint32_t saveDSPCLK_GATE_D;
++ uint32_t saveRAMCLK_GATE_D;
+
+ enum last_3d *last_3d;
+
+diff --git a/src/i830_driver.c b/src/i830_driver.c
+index 862ddde..33c49e3 100644
+--- a/src/i830_driver.c
++++ b/src/i830_driver.c
+@@ -1499,8 +1499,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
+
+ i830TakeRegSnapshot(pScrn);
+
+- i830_init_clock_gating(pScrn);
+-
+ if (DEVICE_ID(pI830->PciInfo) == PCI_CHIP_E7221_G)
+ num_pipe = 1;
+ else
+@@ -2063,6 +2061,14 @@ SaveHWState(ScrnInfoPtr pScrn)
+ pI830->saveSWF[15] = INREG(SWF31);
+ pI830->saveSWF[16] = INREG(SWF32);
+
++ pI830->saveDSPCLK_GATE_D = INREG(DSPCLK_GATE_D);
++ pI830->saveRENCLK_GATE_D1 = INREG(RENCLK_GATE_D1);
++
++ if (IS_I965G(pI830)) {
++ pI830->saveRENCLK_GATE_D2 = INREG(RENCLK_GATE_D2);
++ pI830->saveRAMCLK_GATE_D = INREG(RAMCLK_GATE_D);
++ }
++
+ if (IS_MOBILE(pI830) && !IS_I830(pI830))
+ pI830->saveLVDS = INREG(LVDS);
+ pI830->savePFIT_CONTROL = INREG(PFIT_CONTROL);
+@@ -2120,6 +2126,14 @@ RestoreHWState(ScrnInfoPtr pScrn)
+ if (!IS_I830(pI830) && !IS_845G(pI830))
+ OUTREG(PFIT_CONTROL, pI830->savePFIT_CONTROL);
+
++ OUTREG(DSPCLK_GATE_D, pI830->saveDSPCLK_GATE_D);
++ OUTREG(RENCLK_GATE_D1, pI830->saveRENCLK_GATE_D1);
++
++ if (IS_I965G(pI830)) {
++ OUTREG(RENCLK_GATE_D2, pI830->saveRENCLK_GATE_D2);
++ OUTREG(RAMCLK_GATE_D, pI830->saveRAMCLK_GATE_D);
++ }
++
+ /*
+ * Pipe regs
+ * To restore the saved state, we first need to program the PLL regs,
+@@ -3113,13 +3127,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
+
+ if (IS_I965G(pI830)) {
+- /* turn off clock gating */
+-#if 0
+- OUTREG(0x6204, 0x70804000);
+- OUTREG(0x6208, 0x00000001);
+-#else
+- OUTREG(0x6204, 0x70000000);
+-#endif
+ /* Enable DAP stateless accesses.
+ * Required for all i965 steppings.
+ */
+@@ -3302,6 +3309,8 @@ I830EnterVT(int scrnIndex, int flags)
+ /* Tell the BIOS that we're in control of mode setting now. */
+ i830_init_bios_control(pScrn);
+
++ i830_init_clock_gating(pScrn);
++
+ /* Clear the framebuffer */
+ memset(pI830->FbBase + pScrn->fbOffset, 0,
+ pScrn->virtualY * pScrn->displayWidth * pI830->cpp);
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0019-Remove-SVG_WORK_CONTROL-init.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0019-Remove-SVG_WORK_CONTROL-init.patch
new file mode 100644
index 000000000000..08211531ee81
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0019-Remove-SVG_WORK_CONTROL-init.patch
@@ -0,0 +1,29 @@
+From e520316dd5f7bfdffadfa19b3046ba40ca367219 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Thu, 5 Jun 2008 14:37:59 -0700
+Subject: [PATCH] Remove SVG_WORK_CONTROL init.
+
+The bit set is now reserved -- used to be a workaround for early revisions.
+(cherry picked from commit ad459b21b7de4a79552ac155803d5930432fb84b)
+
+diff --git a/src/i830_driver.c b/src/i830_driver.c
+index 33c49e3..cff1fe8 100644
+--- a/src/i830_driver.c
++++ b/src/i830_driver.c
+@@ -3126,13 +3126,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ if (serverGeneration == 1)
+ xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
+
+- if (IS_I965G(pI830)) {
+- /* Enable DAP stateless accesses.
+- * Required for all i965 steppings.
+- */
+- OUTREG(SVG_WORK_CTL, 0x00000010);
+- }
+-
+ pI830->starting = FALSE;
+ pI830->closing = FALSE;
+ pI830->suspended = FALSE;
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0020-Move-debug-clock-printout-from-ErrorF-to-X_INFO.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0020-Move-debug-clock-printout-from-ErrorF-to-X_INFO.patch
new file mode 100644
index 000000000000..bf3904021ed1
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0020-Move-debug-clock-printout-from-ErrorF-to-X_INFO.patch
@@ -0,0 +1,54 @@
+From 4054725c3cf0956cc1717ad8acc558203a7af40d Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Thu, 5 Jun 2008 14:55:23 -0700
+Subject: [PATCH] Move debug clock printout from ErrorF to X_INFO.
+ (cherry picked from commit bff180e6cac4452ef491c81855eb12bfa03d0bf3)
+
+
+diff --git a/src/i830_display.c b/src/i830_display.c
+index 4910d96..df2f1a2 100644
+--- a/src/i830_display.c
++++ b/src/i830_display.c
+@@ -241,13 +241,15 @@ static void intel_clock(I830Ptr pI830, int refclk, intel_clock_t *clock)
+ }
+
+ static void
+-i830PrintPll(char *prefix, intel_clock_t *clock)
++i830PrintPll(ScrnInfoPtr pScrn, char *prefix, intel_clock_t *clock)
+ {
+- ErrorF("%s: dotclock %d vco %d ((m %d, m1 %d, m2 %d), n %d, (p %d, p1 %d, p2 %d))\n",
+- prefix, clock->dot, clock->vco,
+- clock->m, clock->m1, clock->m2,
+- clock->n,
+- clock->p, clock->p1, clock->p2);
++ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
++ "%s: dotclock %d vco %d ((m %d, m1 %d, m2 %d), n %d, "
++ "(p %d, p1 %d, p2 %d))\n",
++ prefix, clock->dot, clock->vco,
++ clock->m, clock->m1, clock->m2,
++ clock->n,
++ clock->p, clock->p1, clock->p2);
+ }
+
+ /**
+@@ -1262,7 +1264,7 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
+ "Adjusted mode for pipe %c:\n", pipe == 0 ? 'A' : 'B');
+ xf86PrintModeline(pScrn->scrnIndex, adjusted_mode);
+ }
+- i830PrintPll("chosen", &clock);
++ i830PrintPll(pScrn, "chosen", &clock);
+ }
+
+ if (dpll & DPLL_VCO_ENABLE)
+@@ -1755,7 +1757,7 @@ i830_crtc_clock_get(ScrnInfoPtr pScrn, xf86CrtcPtr crtc)
+ * configuration being accurate, which it isn't necessarily.
+ */
+ if (0)
+- i830PrintPll("probed", &clock);
++ i830PrintPll(pScrn, "probed", &clock);
+
+ return clock.dot;
+ }
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0021-Fix-TV-out-connection-type-detection.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0021-Fix-TV-out-connection-type-detection.patch
new file mode 100644
index 000000000000..125442ca4a08
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0021-Fix-TV-out-connection-type-detection.patch
@@ -0,0 +1,27 @@
+From 7d9676c8cc309d42c49f82274f7dc43ab327bea3 Mon Sep 17 00:00:00 2001
+From: Robert Lowery <rglowery@exemail.com.au>
+Date: Tue, 20 May 2008 21:09:23 +1000
+Subject: [PATCH] Fix TV out connection type detection
+
+Make sure we wait for vblank when using the TV DAC to detect the connection
+type.
+
+Fixes FDO bug #14000.
+(cherry picked from commit 64a8f2433d7774d06119793b57cec6d3be6389c1)
+(cherry picked from commit e4e61e8c97c585993b4b69b86350b3987178a47e)
+
+diff --git a/src/i830_tv.c b/src/i830_tv.c
+index 6adb9f2..2fc6199 100644
+--- a/src/i830_tv.c
++++ b/src/i830_tv.c
+@@ -1303,6 +1303,7 @@ i830_tv_detect_type (xf86CrtcPtr crtc,
+ tv_dac = INREG(TV_DAC);
+ OUTREG(TV_DAC, save_tv_dac);
+ OUTREG(TV_CTL, save_tv_ctl);
++ i830WaitForVblank(pScrn);
+ }
+ /*
+ * A B C
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0022-Fix-TV-programming-add-vblank-wait-after-TV_CTL-wr.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0022-Fix-TV-programming-add-vblank-wait-after-TV_CTL-wr.patch
new file mode 100644
index 000000000000..7c5a6c5c9de8
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0022-Fix-TV-programming-add-vblank-wait-after-TV_CTL-wr.patch
@@ -0,0 +1,40 @@
+From 9a8d70fe3d1db2e2d34c79b7d0b271127a63e415 Mon Sep 17 00:00:00 2001
+From: Jesse Barnes <jbarnes@hobbes.lan>
+Date: Mon, 9 Jun 2008 08:52:59 -0700
+Subject: [PATCH] Fix TV programming: add vblank wait after TV_CTL writes
+
+Fxies FDO bug #14000; we need to wait for vblank after writing TV_CTL or followi
+ng "DPMS on" calls may not actually enable the output.
+(cherry picked from commit 1142be53eb8d2ee8a9b60ace5d49f0ba27332275)
+
+diff --git a/src/i830_tv.c b/src/i830_tv.c
+index 2fc6199..cde929a 100644
+--- a/src/i830_tv.c
++++ b/src/i830_tv.c
+@@ -788,6 +788,7 @@ i830_tv_dpms(xf86OutputPtr output, int mode)
+ OUTREG(TV_CTL, INREG(TV_CTL) & ~TV_ENC_ENABLE);
+ break;
+ }
++ i830WaitForVblank(pScrn);
+ }
+
+ static void
+@@ -920,6 +921,7 @@ i830_tv_restore(xf86OutputPtr output)
+
+ OUTREG(TV_DAC, dev_priv->save_TV_DAC);
+ OUTREG(TV_CTL, dev_priv->save_TV_CTL);
++ i830WaitForVblank(pScrn);
+ }
+
+ static const tv_mode_t *
+@@ -1237,6 +1239,7 @@ i830_tv_mode_set(xf86OutputPtr output, DisplayModePtr mode,
+ OUTREG(TV_V_CHROMA_0 + (i<<2), tv_mode->filter_table[j++]);
+ OUTREG(TV_DAC, 0);
+ OUTREG(TV_CTL, tv_ctl);
++ i830WaitForVblank(pScrn);
+ }
+
+ static const DisplayModeRec reported_modes[] = {
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0023-Two-more-Dell-quirks.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0023-Two-more-Dell-quirks.patch
new file mode 100644
index 000000000000..cf5f9d48890f
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0023-Two-more-Dell-quirks.patch
@@ -0,0 +1,33 @@
+From 9d767d62fec724079178844915cd3feb9df93c7e Mon Sep 17 00:00:00 2001
+From: Bryce Harrington <bryce@bryceharrington.org>
+Date: Tue, 10 Jun 2008 14:10:39 +0800
+Subject: [PATCH] Two more Dell quirks
+
+fd.o #16160
+(cherry picked from commit 231a302013981cc597ba09ee89b367c8ab56e8ba)
+
+diff --git a/src/i830_quirks.c b/src/i830_quirks.c
+index b1c1423..1bd8885 100644
+--- a/src/i830_quirks.c
++++ b/src/i830_quirks.c
+@@ -237,6 +237,8 @@ static i830_quirk i830_quirk_list[] = {
+ { PCI_CHIP_I965_GM, 0x1028, 0x0256, quirk_ignore_tv },
+ /* Dell Inspiron 1318 */
+ { PCI_CHIP_I965_GM, 0x1028, 0x0286, quirk_ignore_tv },
++ /* Dell Vostro A840 (LP: #235155) */
++ { PCI_CHIP_I965_GM, 0x1028, 0x0298, quirk_ignore_tv },
+
+ /* Lenovo Napa TV (use dmi)*/
+ { PCI_CHIP_I945_GM, 0x17aa, SUBSYS_ANY, quirk_lenovo_tv_dmi },
+@@ -272,6 +274,8 @@ static i830_quirk i830_quirk_list[] = {
+ { PCI_CHIP_I855_GM, 0x1028, 0x0139, quirk_pipea_force },
+ /* Dell Latitude D500 needs pipe A force quirk */
+ { PCI_CHIP_I855_GM, 0x1028, 0x0152, quirk_pipea_force },
++ /* Dell Latitude D505 needs pipe A force quirk (LP: #235643) */
++ { PCI_CHIP_I855_GM, 0x1028, 0x0163, quirk_pipea_force },
+ /* Dell Latitude X300 needs pipe A force quirk */
+ { PCI_CHIP_I855_GM, 0x1028, 0x014f, quirk_pipea_force },
+ /* Dell Inspiron 510m needs pipe A force quirk */
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0024-Set-up-restore-PWRCTXA-from-enter-leavevt-not-server.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0024-Set-up-restore-PWRCTXA-from-enter-leavevt-not-server.patch
new file mode 100644
index 000000000000..e1f9c08edac6
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0024-Set-up-restore-PWRCTXA-from-enter-leavevt-not-server.patch
@@ -0,0 +1,77 @@
+From d3df74ebb0b61cda347e5e4754f2fc8a4c3110b0 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Tue, 10 Jun 2008 11:31:22 -0700
+Subject: [PATCH] Set up/restore PWRCTXA from enter/leavevt not server start/exit.
+
+This should improve behavior in the presence of VT switching, but also avoids
+a crash on X exit from writing the register after unmapping mmio.
+
+diff --git a/src/i830.h b/src/i830.h
+index a96fa5b..def693f 100644
+--- a/src/i830.h
++++ b/src/i830.h
+@@ -649,6 +649,7 @@ typedef struct _I830Rec {
+ uint32_t saveRENCLK_GATE_D2;
+ uint32_t saveDSPCLK_GATE_D;
+ uint32_t saveRAMCLK_GATE_D;
++ uint32_t savePWRCTXA;
+
+ enum last_3d *last_3d;
+
+diff --git a/src/i830_driver.c b/src/i830_driver.c
+index cff1fe8..563d167 100644
+--- a/src/i830_driver.c
++++ b/src/i830_driver.c
+@@ -2069,6 +2069,9 @@ SaveHWState(ScrnInfoPtr pScrn)
+ pI830->saveRAMCLK_GATE_D = INREG(RAMCLK_GATE_D);
+ }
+
++ if (IS_I965GM(pI830) || IS_IGD_GM(pI830))
++ pI830->savePWRCTXA = INREG(PWRCTXA);
++
+ if (IS_MOBILE(pI830) && !IS_I830(pI830))
+ pI830->saveLVDS = INREG(LVDS);
+ pI830->savePFIT_CONTROL = INREG(PFIT_CONTROL);
+@@ -2134,6 +2137,9 @@ RestoreHWState(ScrnInfoPtr pScrn)
+ OUTREG(RAMCLK_GATE_D, pI830->saveRAMCLK_GATE_D);
+ }
+
++ if (IS_I965GM(pI830) || IS_IGD_GM(pI830))
++ OUTREG(PWRCTXA, pI830->savePWRCTXA);
++
+ /*
+ * Pipe regs
+ * To restore the saved state, we first need to program the PLL regs,
+@@ -2846,9 +2852,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ return FALSE;
+ }
+
+- if (pI830->power_context)
+- OUTREG(PWRCTXA, pI830->power_context->offset | PWRCTX_EN);
+-
+ I830UnmapMMIO(pScrn);
+
+ i830_fixup_mtrrs(pScrn);
+@@ -3304,6 +3307,9 @@ I830EnterVT(int scrnIndex, int flags)
+
+ i830_init_clock_gating(pScrn);
+
++ if (pI830->power_context)
++ OUTREG(PWRCTXA, pI830->power_context->offset | PWRCTX_EN);
++
+ /* Clear the framebuffer */
+ memset(pI830->FbBase + pScrn->fbOffset, 0,
+ pScrn->virtualY * pScrn->displayWidth * pI830->cpp);
+@@ -3459,9 +3465,6 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen)
+ }
+ #endif
+
+- if (IS_I965GM(pI830) || IS_IGD_GM(pI830))
+- OUTREG(PWRCTXA, 0);
+-
+ if (I830IsPrimary(pScrn)) {
+ xf86GARTCloseScreen(scrnIndex);
+
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/files/2.3.1/0025-Fix-compiler-warning-when-disable-xvmc-config.patch b/x11-drivers/xf86-video-i810/files/2.3.1/0025-Fix-compiler-warning-when-disable-xvmc-config.patch
new file mode 100644
index 000000000000..f037f467ce2a
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/files/2.3.1/0025-Fix-compiler-warning-when-disable-xvmc-config.patch
@@ -0,0 +1,26 @@
+From df0bbdc7cbb6ff357a81ed28d12e56c9c7d643f7 Mon Sep 17 00:00:00 2001
+From: Zhenyu Wang <zhenyu.z.wang@intel.com>
+Date: Thu, 12 Jun 2008 14:04:41 +0800
+Subject: [PATCH] Fix compiler warning when disable xvmc config
+
+
+diff --git a/src/i830_memory.c b/src/i830_memory.c
+index 9ceb254..ccbe7bd 100644
+--- a/src/i830_memory.c
++++ b/src/i830_memory.c
+@@ -2020,6 +2020,7 @@ I830CheckAvailableMemory(ScrnInfoPtr pScrn)
+ return maxPages * 4;
+ }
+
++#ifdef INTEL_XVMC
+ /*
+ * Allocate memory for MC compensation
+ */
+@@ -2041,3 +2042,4 @@ Bool i830_allocate_xvmc_buffer(ScrnInfoPtr pScrn, const char *name,
+
+ return TRUE;
+ }
++#endif
+--
+1.5.5.3
+
diff --git a/x11-drivers/xf86-video-i810/xf86-video-i810-2.3.1-r2.ebuild b/x11-drivers/xf86-video-i810/xf86-video-i810-2.3.1-r2.ebuild
new file mode 100644
index 000000000000..63560aa660af
--- /dev/null
+++ b/x11-drivers/xf86-video-i810/xf86-video-i810-2.3.1-r2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-i810/xf86-video-i810-2.3.1-r2.ebuild,v 1.1 2008/06/13 05:15:02 remi Exp $
+
+# Must be before x-modular eclass is inherited
+# Enable snapshot to get the man page in the right place
+# This should be fixed with a XDP patch later
+SNAPSHOT="yes"
+XDPVER=-1
+
+inherit x-modular
+
+# This really needs a pkgmove...
+SRC_URI="http://xorg.freedesktop.org/archive/individual/driver/xf86-video-intel-${PV}.tar.bz2"
+
+S="${WORKDIR}/xf86-video-intel-${PV}"
+
+DESCRIPTION="X.Org driver for Intel cards"
+
+KEYWORDS="~amd64 ~arm ~ia64 ~sh ~x86 ~x86-fbsd"
+IUSE="dri"
+
+RDEPEND=">=x11-base/xorg-server-1.2
+ x11-libs/libXvMC"
+DEPEND="${RDEPEND}
+ x11-proto/fontsproto
+ x11-proto/randrproto
+ x11-proto/renderproto
+ x11-proto/xextproto
+ x11-proto/xineramaproto
+ x11-proto/xproto
+ dri? ( x11-proto/xf86driproto
+ x11-proto/glproto
+ >=x11-libs/libdrm-2.2
+ x11-libs/libX11 )"
+
+CONFIGURE_OPTIONS="$(use_enable dri)"
+PATCHES=(
+"${FILESDIR}/2.3.1/0001-Skip-copying-on-FOURCC_XVMC-surfaces.patch"
+"${FILESDIR}/2.3.1/0002-Only-use-FOURCC_XVMC-when-INTEL_XVMC-is-defined.patch"
+"${FILESDIR}/2.3.1/0003-Panel-fitting-fix-letterbox-modes.patch"
+"${FILESDIR}/2.3.1/0004-Add-glproto-to-DRI-dependencies.patch"
+"${FILESDIR}/2.3.1/0005-Revert-Add-FIFO-watermark-regs-to-register-dumper.patch"
+"${FILESDIR}/2.3.1/0006-Fix-typo-in-xvmc-block-destroy.patch"
+"${FILESDIR}/2.3.1/0007-Define-DEFFILEMODE-for-OS-es-that-don-t-have-it.patch"
+"${FILESDIR}/2.3.1/0008-Disable-a-bunch-of-clock-gating-disables-on-IGD_GM.patch"
+"${FILESDIR}/2.3.1/0009-Fixup-power-saving-registers.patch"
+"${FILESDIR}/2.3.1/0010-xvmc-remove-unused-dri-drawable.patch"
+"${FILESDIR}/2.3.1/0011-xvmc-a-little-cleanup.patch"
+"${FILESDIR}/2.3.1/0012-Set-SDVO-sync-polarity-to-default-on-965.patch"
+"${FILESDIR}/2.3.1/0013-Just-remove-the-mprotect-kludge.patch"
+"${FILESDIR}/2.3.1/0014-Replace-a-couple-of-wait-for-ring-idles-with-a-singl.patch"
+"${FILESDIR}/2.3.1/0015-Remove-duplicated-i830_stop_ring-SetHWOperatingSta.patch"
+"${FILESDIR}/2.3.1/0016-Remove-gratuitous-wait_ring_idle-after-I830Sync.-Sy.patch"
+"${FILESDIR}/2.3.1/0017-Move-BIOS-scratch-register-setup-to-EnterVT-instead.patch"
+"${FILESDIR}/2.3.1/0018-Initialize-clock-gating-from-EnterVT-and-save-restor.patch"
+"${FILESDIR}/2.3.1/0019-Remove-SVG_WORK_CONTROL-init.patch"
+"${FILESDIR}/2.3.1/0020-Move-debug-clock-printout-from-ErrorF-to-X_INFO.patch"
+"${FILESDIR}/2.3.1/0021-Fix-TV-out-connection-type-detection.patch"
+"${FILESDIR}/2.3.1/0022-Fix-TV-programming-add-vblank-wait-after-TV_CTL-wr.patch"
+"${FILESDIR}/2.3.1/0023-Two-more-Dell-quirks.patch"
+"${FILESDIR}/2.3.1/0024-Set-up-restore-PWRCTXA-from-enter-leavevt-not-server.patch"
+"${FILESDIR}/2.3.1/0025-Fix-compiler-warning-when-disable-xvmc-config.patch")
+
+pkg_setup() {
+ if use dri && ! built_with_use x11-base/xorg-server dri; then
+ die "Build x11-base/xorg-server with USE=dri."
+ fi
+}