summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreisnerd <eisnerd@localhost>2009-10-18 09:19:16 +0000
committereisnerd <eisnerd@localhost>2009-10-18 09:19:16 +0000
commit8bb5ff1b10dac99dae00e459b26e3f85b4c837a0 (patch)
tree295494aae7857b96ac49b263d049ecf5347da6c8 /sys-kernel
parentfix nls doins in headless mode (diff)
downloadjokey-8bb5ff1b10dac99dae00e459b26e3f85b4c837a0.tar.gz
jokey-8bb5ff1b10dac99dae00e459b26e3f85b4c837a0.tar.bz2
jokey-8bb5ff1b10dac99dae00e459b26e3f85b4c837a0.zip
sys-kernel/thinkpad-sources: Bump to 2.6.31, cleaning all older versions, it is a incomplete inbetween release, so please inform me if you miss something. The ~* -r1 version applies some drm-next patches, really experimental, I may get some newer patches if some one like to have them
svn path=/trunk/; revision=736
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/thinkpad-sources/ChangeLog27
-rw-r--r--sys-kernel/thinkpad-sources/Manifest44
-rw-r--r--sys-kernel/thinkpad-sources/files/2.6.27/01-disk-protect-for-2.6.27.2.patch966
-rw-r--r--sys-kernel/thinkpad-sources/files/2.6.27/colored-printk-2.6.26.patch355
-rw-r--r--sys-kernel/thinkpad-sources/files/2.6.27/linux-phc-0.3.2-kernel-vanilla-2.6.26.patch554
-rw-r--r--sys-kernel/thinkpad-sources/files/2.6.27/power-off-unused-ports.patch133
-rw-r--r--sys-kernel/thinkpad-sources/files/2.6.28/02-ipw2200-inject-for-2.6.27.patch86
-rw-r--r--sys-kernel/thinkpad-sources/files/2.6.28/power-off-unused-ports.patch133
-rw-r--r--sys-kernel/thinkpad-sources/files/2.6.31/02-ipw2200-inject-for-2.6.27.patch (renamed from sys-kernel/thinkpad-sources/files/2.6.27/02-ipw2200-inject-for-2.6.27.patch)0
-rw-r--r--sys-kernel/thinkpad-sources/files/2.6.31/colored-printk-2.6.30.patch (renamed from sys-kernel/thinkpad-sources/files/2.6.28/colored-printk-2.6.26.patch)102
-rw-r--r--sys-kernel/thinkpad-sources/files/2.6.31/drm-next.patch88389
-rw-r--r--sys-kernel/thinkpad-sources/files/2.6.31/linux-phc-0.3.2-2.6.31.patch (renamed from sys-kernel/thinkpad-sources/files/2.6.28/linux-phc-0.3.2-kernel-vanilla-2.6.26.patch)31
-rw-r--r--sys-kernel/thinkpad-sources/files/2.6.31/mac80211.compat08082009.wl_frag+ack_v1.patch (renamed from sys-kernel/thinkpad-sources/files/2.6.28/01-mac80211_2.6.28-rc4-wl_frag+ack_v2.patch)8
-rw-r--r--sys-kernel/thinkpad-sources/files/2.6.31/thinkpad-acpi-0.23-20090920-fix1.patch.gzbin0 -> 731 bytes
-rw-r--r--sys-kernel/thinkpad-sources/files/configs/config-for-core-2.6.272393
-rw-r--r--sys-kernel/thinkpad-sources/files/configs/config-for-core-2.6.31 (renamed from sys-kernel/thinkpad-sources/files/configs/config-for-core-2.6.28-r1)624
-rw-r--r--sys-kernel/thinkpad-sources/thinkpad-sources-2.6.27-r2.ebuild70
-rw-r--r--sys-kernel/thinkpad-sources/thinkpad-sources-2.6.31-r1.ebuild (renamed from sys-kernel/thinkpad-sources/thinkpad-sources-2.6.28-r1.ebuild)34
-rw-r--r--sys-kernel/thinkpad-sources/thinkpad-sources-2.6.31.ebuild (renamed from sys-kernel/thinkpad-sources/thinkpad-sources-2.6.28-r2.ebuild)26
19 files changed, 88959 insertions, 5016 deletions
diff --git a/sys-kernel/thinkpad-sources/ChangeLog b/sys-kernel/thinkpad-sources/ChangeLog
index d97ef38..e527870 100644
--- a/sys-kernel/thinkpad-sources/ChangeLog
+++ b/sys-kernel/thinkpad-sources/ChangeLog
@@ -2,6 +2,33 @@
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 18 Oct 2009; Florian Manschwetus <florianmanschwetus@gmx.de>
+ -files/2.6.27/colored-printk-2.6.26.patch,
+ -files/configs/config-for-core-2.6.27, -thinkpad-sources-2.6.27-r2.ebuild,
+ -files/2.6.27, -files/2.6.28/01-mac80211_2.6.28-rc4-wl_frag+ack_v2.patch,
+ +files/2.6.31, -files/2.6.28/linux-phc-0.3.2-kernel-vanilla-2.6.26.patch,
+ +files/2.6.31/mac80211.compat08082009.wl_frag+ack_v1.patch,
+ +files/2.6.31/linux-phc-0.3.2-2.6.31.patch,
+ +files/2.6.31/thinkpad-acpi-0.23-20090920-fix1.patch.gz,
+ -files/2.6.27/01-disk-protect-for-2.6.27.2.patch,
+ +files/2.6.31/02-ipw2200-inject-for-2.6.27.patch,
+ -files/2.6.28/02-ipw2200-inject-for-2.6.27.patch,
+ -thinkpad-sources-2.6.28-r1.ebuild, -files/2.6.28,
+ -files/configs/config-for-core-2.6.28-r1,
+ -thinkpad-sources-2.6.28-r2.ebuild,
+ -files/2.6.28/power-off-unused-ports.patch, +files/2.6.31/drm-next.patch,
+ -files/2.6.28/colored-printk-2.6.26.patch,
+ -files/2.6.27/02-ipw2200-inject-for-2.6.27.patch,
+ +files/2.6.31/colored-printk-2.6.30.patch,
+ +files/configs/config-for-core-2.6.31, +thinkpad-sources-2.6.31.ebuild,
+ -files/2.6.27/power-off-unused-ports.patch,
+ -files/2.6.27/linux-phc-0.3.2-kernel-vanilla-2.6.26.patch,
+ +thinkpad-sources-2.6.31-r1.ebuild:
+ Bump to 2.6.31, cleaning all older versions, it is a incomplete inbetween
+ release, so please inform me if you miss something. The ~* -r1 version
+ applies some drm-next patches, really experimental, I may get some newer
+ patches if some one like to have them
+
05 Feb 2009; Florian Manschwetus <florianmanschwetus@gmx.de>
+thinkpad-sources-2.6.28-r2.ebuild:
pumb to 2.6.28-r2
diff --git a/sys-kernel/thinkpad-sources/Manifest b/sys-kernel/thinkpad-sources/Manifest
index be15142..3843219 100644
--- a/sys-kernel/thinkpad-sources/Manifest
+++ b/sys-kernel/thinkpad-sources/Manifest
@@ -1,30 +1,16 @@
-AUX 2.6.27/01-disk-protect-for-2.6.27.2.patch 32538 RMD160 fbe408c71c006dc5f344f20ef1cfa886191ea91c SHA1 e927b4ecb17b74a0a6b0809d3d8facac251f9ee1 SHA256 bc4690bc2fb40fb82765a68d47288134e0fc62770db8b058b4c8eb9ca7d63be6
-AUX 2.6.27/02-ipw2200-inject-for-2.6.27.patch 2376 RMD160 4856f02093faa941a51dafe54d34c27b6c4a21db SHA1 328c8947089c84fb3ce78fe20400ad03f51ac381 SHA256 01b4f715de58660ab779abc0e28398d348fe31344c300bdd9eaeca73c6090cb0
-AUX 2.6.27/colored-printk-2.6.26.patch 11265 RMD160 1e520168b8813754906513317f5c683dbec2b31b SHA1 d321509ccc286b29b8c0fac9ae18205705fea332 SHA256 e8afce0c43cd534a6f707dc9f8769d0ba03322efccd55e3dc3edc3375e44c4ba
-AUX 2.6.27/linux-phc-0.3.2-kernel-vanilla-2.6.26.patch 16865 RMD160 f5795436830ec3302c2a32c14a17ab52e089c8e2 SHA1 d24375cb01431b785228fae77682e9ee09286bf4 SHA256 e1fbb0909cee3cfb7623adae6ddd1384c95c977d111db8b5afc466aeab447f67
-AUX 2.6.27/power-off-unused-ports.patch 4722 RMD160 2c5928c6a9d24e965d3f84bb2f1b157347d90d7c SHA1 77e39d8d99ac1045e3fb2db82e1c0ab2049c89d9 SHA256 9134a0e89a583d51f84bab2df3fe015fadb92a6d44655b7e3f1d3da1d21f0067
-AUX 2.6.28/01-mac80211_2.6.28-rc4-wl_frag+ack_v2.patch 1061 RMD160 071a0580487d29076083c37194617ce9bf184f51 SHA1 7e0bac3781840ea47f3cc72b29437f29d94e70c0 SHA256 6781652b6ecdd12024d6638ad206fff365c0ebedfd755b1aa65ea4d66a75978f
-AUX 2.6.28/02-ipw2200-inject-for-2.6.27.patch 2376 RMD160 4856f02093faa941a51dafe54d34c27b6c4a21db SHA1 328c8947089c84fb3ce78fe20400ad03f51ac381 SHA256 01b4f715de58660ab779abc0e28398d348fe31344c300bdd9eaeca73c6090cb0
-AUX 2.6.28/colored-printk-2.6.26.patch 11265 RMD160 1e520168b8813754906513317f5c683dbec2b31b SHA1 d321509ccc286b29b8c0fac9ae18205705fea332 SHA256 e8afce0c43cd534a6f707dc9f8769d0ba03322efccd55e3dc3edc3375e44c4ba
-AUX 2.6.28/linux-phc-0.3.2-kernel-vanilla-2.6.26.patch 16865 RMD160 f5795436830ec3302c2a32c14a17ab52e089c8e2 SHA1 d24375cb01431b785228fae77682e9ee09286bf4 SHA256 e1fbb0909cee3cfb7623adae6ddd1384c95c977d111db8b5afc466aeab447f67
-AUX 2.6.28/power-off-unused-ports.patch 4722 RMD160 2c5928c6a9d24e965d3f84bb2f1b157347d90d7c SHA1 77e39d8d99ac1045e3fb2db82e1c0ab2049c89d9 SHA256 9134a0e89a583d51f84bab2df3fe015fadb92a6d44655b7e3f1d3da1d21f0067
-AUX configs/config-for-core-2.6.27 59869 RMD160 d319df13c5dc9d2d4c997b4af53583686c0f6ea3 SHA1 b01ce0e0529d2c3f7c9cf2674fd58175e346f6b0 SHA256 e9bf5afde95a14366cc4ee60e343569163a52fca79e6a070a1aa0fc076fd13d8
-AUX configs/config-for-core-2.6.28-r1 57980 RMD160 38a821bd0f9c441bace8be799c0657c726d5ba57 SHA1 10a3a0858ad31c1953bc7b26628c42ef4061685e SHA256 dd72447c9be91b97dfcea99ced3636cda6264ad59e7ae8a31c26592b4e4ac2ee
-DIST genpatches-2.6.27-9.base.tar.bz2 165591 RMD160 d2be1a56b8bafd7de330379f322699d2b05d6e7f SHA1 7303a1ff17427fc70b8e1e8ab41cdc8d74b2f296 SHA256 426891253109b520da1fe308e8544bdefd14255402fd72d3646ced48b64d2858
-DIST genpatches-2.6.27-9.extras.tar.bz2 41456 RMD160 bd6e5fc57d4895c23401f22892f630097174aead SHA1 35a86799ee1d4f55e347b2f01f64e4abbda8a7ae SHA256 384ecb94815261a960dd57b942206d73e2a7ad0e4d883400860a47f01573bd41
-DIST genpatches-2.6.28-1.base.tar.bz2 7410 RMD160 70f0b01b5e5cae6f01cfa202219b1e5503c6fea2 SHA1 de553ff85be1619f5679c9a6c3eaf867380ead3d SHA256 fedfe7b685786733f259bbed106bf37c85e8561cb4b5a28e3c3902bf9e8bc361
-DIST genpatches-2.6.28-1.extras.tar.bz2 41314 RMD160 58a67311e49d68a62256143af166d362e501f43d SHA1 8219f7c373341bf07651960490a8ec636254ed64 SHA256 a19f6757e0a70c076012f51bfc366efe95f61d5f402d407cac95c13b919397dd
-DIST genpatches-2.6.28-2.base.tar.bz2 61118 RMD160 892e3dceb49fa7df420222df2d5e5a3bce949fde SHA1 11d6835dbe9d77885568294237e2e27e0ef84b30 SHA256 4f0770074806d66b1636e352a9ffb4fed3ab69908a5919cfcf2baf08ee726245
-DIST genpatches-2.6.28-2.extras.tar.bz2 41314 RMD160 58a67311e49d68a62256143af166d362e501f43d SHA1 8219f7c373341bf07651960490a8ec636254ed64 SHA256 a19f6757e0a70c076012f51bfc366efe95f61d5f402d407cac95c13b919397dd
-DIST linux-2.6.27.tar.bz2 50355835 RMD160 5be4595ad824a4af67c1ec0c692838ad0c31f0c0 SHA1 8425ec3be2652f9d511911ff4fcf99039d4574be SHA256 0e99bf9e83f4d1ae0c656741a84dfddfa9c4d2469cf35475f5939d02dc3e4393
-DIST linux-2.6.28.tar.bz2 52665364 RMD160 47e8925220e29e239f9478228fc53543c1f7b300 SHA1 4f40f8bf3fd110b0cc6e1fea5f539c98f9959e94 SHA256 ae0d97c55efe7fce01273c97f8152af0deff5541e3bbf5b9ad98689112b54380
-DIST thinkpad-acpi-0.21-20081111_v2.6.27.5.patch.gz 19706 RMD160 fcc9678ae6c3d4c5493d2b1380ba408272711689 SHA1 1ad13938e7f3bd5e0b28664b3780b2b964079ea6 SHA256 d92c26efe3ecd578eab3a2547dfe359829dca7cf94bf196e563b56638a46527e
-DIST thinkpad-acpi-0.21-20081111_v2.6.28-rc7.patch.gz 15025 RMD160 9a6fe67f8b2520f50f59e496054c14a3ce8cd32f SHA1 353a520941c5c4ce8241f0898f0720e58715cf89 SHA256 4b0bd280a5958be637ff418279623ac56c71f950294777f8b04ce1c59cb1f3a1
-DIST thinkpad-acpi-0.22_v2.6.28.gz 91175 RMD160 af5dcb84a071ae8e6a138c802ecf180d5ff88ede SHA1 2ed12eec35c874a624ef62976d53d697046d5ebd SHA256 9208b3f17d69a1f9d32084b7748137c24b4f97852c6edb3a1da4e6ba65f5ef46
-DIST tuxonice-3.0-rc8-for-2.6.27.patch.bz2 111585 RMD160 7c595a96917ca3868068b56a2d9024cf07403a73 SHA1 7606aba9bab9878763e34dab3e1a0f01f0663bb5 SHA256 9724f4c851ca4276054236c4df32c7486a7a3040391285092737241026c1e2f9
-DIST tuxonice-3.0-rc8-for-2.6.28.patch.bz2 111532 RMD160 808d33d1484ee30f75606831c2df38e5e70e40ba SHA1 cb8564cbc9579361daa58da1c2abbcd814dfe737 SHA256 c7d72a964926e063ca9ff79adee7be90ab49c131c91ebf40ac9fc7c7cd852657
-EBUILD thinkpad-sources-2.6.27-r2.ebuild 2764 RMD160 f6de699f826f9aef3c21743ee1f0e8edb877334e SHA1 2d41c152d66ff8ada20c7983e151442119420e0a SHA256 893b3f085fbaf198bbfe8af2ea66c4f8dfd8c3d1b815c8de172a6b3711310f21
-EBUILD thinkpad-sources-2.6.28-r1.ebuild 2775 RMD160 49fef15362cd11abcc9a430507b6bcb663d7810d SHA1 c3f17582050d0f2836bd3ce3b7d34aef64ee5c60 SHA256 2d10cd69b484001db36f33c03272a84e2cc757c5d4f89ffd07c81f0a725bcd22
-EBUILD thinkpad-sources-2.6.28-r2.ebuild 2759 RMD160 c904dfcc600287c3700bfddb7101cc363f6d48d4 SHA1 618b20d45d8533d3a7b57068ed749b37a5ca8cd0 SHA256 d7329515d6e8a0d45c722ab245f5a5ad3ec21b7153ca80f1e53825ff6d3afd51
-MISC ChangeLog 1481 RMD160 7348e30065a1383af4cd3479cb6b5289e1e1c27e SHA1 f14fe6fe0cef252160b5b93612ea485b85d04f98 SHA256 136ff6bd719547ce65c7e5a06c5237a4ac7cf5f871c1685794480d467bebeaa4
+AUX 2.6.31/02-ipw2200-inject-for-2.6.27.patch 2376 RMD160 4856f02093faa941a51dafe54d34c27b6c4a21db SHA1 328c8947089c84fb3ce78fe20400ad03f51ac381 SHA256 01b4f715de58660ab779abc0e28398d348fe31344c300bdd9eaeca73c6090cb0
+AUX 2.6.31/colored-printk-2.6.30.patch 11432 RMD160 7cc66e37fc129ea7b7f588273a5409d43e9b5b60 SHA1 dbf0570a1d8ccc1fab3cd7976e5767444b3ddf7d SHA256 015f416ce7b7d643e4f72ad46a8483fb051352b6e60f8906ef3a30bb24aa55a5
+AUX 2.6.31/drm-next.patch 2775965 RMD160 0d92465453e90e7b8f73a0f1bef3d0b52c4f2c30 SHA1 b891c31557d25e52073325a99f985e1291e475cb SHA256 2aa08c589d99dc0255b1212bd3f7f23303824e51762266b40fc5fe3a7dbda5a9
+AUX 2.6.31/linux-phc-0.3.2-2.6.31.patch 16746 RMD160 05f0c6935543070c46747f15f6c814ea0e1d530d SHA1 d60ac35a4e39e1062bffc81eb556ca99673c5c9b SHA256 3ff2b9bfff8e431d3579a4deccfd95694d21e8afa35931bb5155587b0e9c0320
+AUX 2.6.31/mac80211.compat08082009.wl_frag+ack_v1.patch 1049 RMD160 e864ee2e0c70ce344000baa8ee5fca3b23c3305a SHA1 85f7a1b141549b774f5631fba259bc414aeeffb8 SHA256 e04ed9997e1578cc1becd4ef9d9f2f6f606590aa91a56e42835963913e1b0f52
+AUX 2.6.31/thinkpad-acpi-0.23-20090920-fix1.patch.gz 731 RMD160 a77fb839eaea078c8623066ad09ff20cc54b954a SHA1 0548feff11d7043de347ae3872225d905ae30def SHA256 9ccaf71e20b49924014d2e030b8fe29bbf2ffe7459601f4bad031331ed5e1851
+AUX configs/config-for-core-2.6.31 64902 RMD160 5bff5c63ff7600db2a45c850c39abc857ccb5176 SHA1 180f497a661ed0bfac14fac0f38063b1f81a24f1 SHA256 8d28e63780e3a60f66ccb7a697ad7b23381eed85aaf0e59eb95cd19f1e5b11aa
+DIST current-tuxonice-for-2.6.31.patch-20090911-v1.bz2 114786 RMD160 aa41c159ebe826fc9312b5a21f1ed8cc74e88503 SHA1 f711554205de079a429c6cee620ee818399b246e SHA256 1b55326ee385bc4486302fdee5b2f0436b8183455ad26915f78d60518d466578
+DIST genpatches-2.6.31-2.base.tar.bz2 23763 RMD160 6cade8251df85907c1f4f7d02b5d3272932dd0a3 SHA1 b2fbb60bafaa7cf0bc9d690f5a4194f76af18320 SHA256 824e031f36cfae7c69d48bb6f0e4f99e8c2475beb051da48a6546d89513c66f5
+DIST genpatches-2.6.31-2.extras.tar.bz2 24978 RMD160 3d7efe69b70580343927b031460b225b2987791a SHA1 ad6d1b383ae3c9073c45dab6ce355695bdbf0e83 SHA256 ad111e0117f15d54a514add96a08bb15db6726fb19085e27a9d270e36e458c1d
+DIST linux-2.6.31.tar.bz2 61494822 RMD160 c0d88e63740abf0d4f9d82557260a31643f5a01b SHA1 c6e0e6b473ba2b80d164e37cfabf294e783c03d9 SHA256 0acd83f7b85db7ee18c2b0b7505e1ba6fd722c36f49a8870a831c851660e3512
+DIST thinkpad-acpi-0.23-20090920_v2.6.31.patch.gz 15913 RMD160 737d633b36a33a52b71d0380dfb636ece5223454 SHA1 305e5675379685dd738541d79d3a677b14412ba5 SHA256 7288c5708f2a87e8d9711c3332d5958a5b074adf7acbcd0778897aa15b244364
+EBUILD thinkpad-sources-2.6.31-r1.ebuild 2827 RMD160 877e3a92cc781b32d641928d6d8b61e5386e8c6c SHA1 fe7e832f2d092606e2c5c16a86935f66048c9783 SHA256 dca41105b0c1e2010ce2e6c37f5c144b8481ed6f733aff375ee00f3c70543bf4
+EBUILD thinkpad-sources-2.6.31.ebuild 2777 RMD160 01daee397a75c2cd574de7d654d1b049864d86c6 SHA1 a4f4ff243df7429c8359a716b8d35dc9688fa7c9 SHA256 8f53c3578c08bfbaf63d5b218e62d62cdd95beb6d3efcce79399a91f2e3408a9
+MISC ChangeLog 2978 RMD160 1d4107081e039c972c158ca2c0953bb578eef35f SHA1 b65d5072ee152cbc15f41cb5d2659cc2cf7296dd SHA256 185ca0ff22b19b0f5a4a82682884de6bfdd0a8ffd942c6ced5956916560fb8bf
MISC metadata.xml 284 RMD160 5062b08f804b7eaf9e1765c0d38b7fc95bc467e4 SHA1 687ba9103e597aad8a7231ff9a470d841f7121df SHA256 6ca83c8927bd3516baac49bc9ea82ddbeeddbe38a5a98b637d6eb1f1d436c84a
diff --git a/sys-kernel/thinkpad-sources/files/2.6.27/01-disk-protect-for-2.6.27.2.patch b/sys-kernel/thinkpad-sources/files/2.6.27/01-disk-protect-for-2.6.27.2.patch
deleted file mode 100644
index 2be4a67..0000000
--- a/sys-kernel/thinkpad-sources/files/2.6.27/01-disk-protect-for-2.6.27.2.patch
+++ /dev/null
@@ -1,966 +0,0 @@
----
-
- Documentation/laptops/disk-shock-protection.txt | 149 +++++++++++++++++++++++
- drivers/ata/ahci.c | 1
- drivers/ata/libata-core.c | 1
- drivers/ata/libata-eh.c | 126 +++++++++++++++++++
- drivers/ata/libata-scsi.c | 109 +++++++++++++++++
- drivers/ide/Makefile | 2
- drivers/ide/ide-io.c | 27 ++++
- drivers/ide/ide-iops.c | 28 ++++
- drivers/ide/ide-park.c | 120 +++++++++++++++++++
- drivers/ide/ide-probe.c | 5 +
- drivers/ide/ide-taskfile.c | 34 +++++
- drivers/ide/ide.c | 1
- include/linux/ata.h | 9 +
- include/linux/ide.h | 12 ++
- include/linux/libata.h | 13 ++
- 15 files changed, 631 insertions(+), 6 deletions(-)
- create mode 100644 Documentation/laptops/disk-shock-protection.txt
- create mode 100644 drivers/ide/ide-park.c
-
-diff --git a/Documentation/laptops/disk-shock-protection.txt b/Documentation/laptops/disk-shock-protection.txt
-new file mode 100644
-index 0000000..0e6ba26
---- /dev/null
-+++ b/Documentation/laptops/disk-shock-protection.txt
-@@ -0,0 +1,149 @@
-+Hard disk shock protection
-+==========================
-+
-+Author: Elias Oltmanns <eo@nebensachen.de>
-+Last modified: 2008-10-03
-+
-+
-+0. Contents
-+-----------
-+
-+1. Intro
-+2. The interface
-+3. References
-+4. CREDITS
-+
-+
-+1. Intro
-+--------
-+
-+ATA/ATAPI-7 specifies the IDLE IMMEDIATE command with unload feature.
-+Issuing this command should cause the drive to switch to idle mode and
-+unload disk heads. This feature is being used in modern laptops in
-+conjunction with accelerometers and appropriate software to implement
-+a shock protection facility. The idea is to stop all I/O operations on
-+the internal hard drive and park its heads on the ramp when critical
-+situations are anticipated. The desire to have such a feature
-+available on GNU/Linux systems has been the original motivation to
-+implement a generic disk head parking interface in the Linux kernel.
-+Please note, however, that other components have to be set up on your
-+system in order to get disk shock protection working (see
-+section 3. References below for pointers to more information about
-+that).
-+
-+
-+2. The interface
-+----------------
-+
-+For each ATA device, the kernel exports the file
-+block/*/device/unload_heads in sysfs (here assumed to be mounted under
-+/sys). Access to /sys/block/*/device/unload_heads is denied with
-+-EOPNOTSUPP if the device does not support the unload feature.
-+Otherwise, writing an integer value to this file will take the heads
-+of the respective drive off the platter and block all I/O operations
-+for the specified number of milliseconds. When the timeout expires and
-+no further disk head park request has been issued in the meantime,
-+normal operation will be resumed. The maximal value accepted for a
-+timeout is 30000 milliseconds. Exceeding this limit will return
-+-EOVERFLOW, but heads will be parked anyway and the timeout will be
-+set to 30 seconds. However, you can always change a timeout to any
-+value between 0 and 30000 by issuing a subsequent head park request
-+before the timeout of the previous one has expired. In particular, the
-+total timeout can exceed 30 seconds and, more importantly, you can
-+cancel a previously set timeout and resume normal operation
-+immediately by specifying a timeout of 0. Values below -2 are rejected
-+with -EINVAL (see below for the special meaning of -1 and -2). If the
-+timeout specified for a recent head park request has not yet expired,
-+reading from /sys/block/*/device/unload_heads will report the number
-+of milliseconds remaining until normal operation will be resumed;
-+otherwise, reading the unload_heads attribute will return 0.
-+
-+For example, do the following in order to park the heads of drive
-+/dev/sda and stop all I/O operations for five seconds:
-+
-+# echo 5000 > /sys/block/sda/device/unload_heads
-+
-+A simple
-+
-+# cat /sys/block/sda/device/unload_heads
-+
-+will show you how many milliseconds are left before normal operation
-+will be resumed.
-+
-+A word of caution: The fact that the interface operates on a basis of
-+milliseconds may raise expectations that cannot be satisfied in
-+reality. In fact, the ATA specs clearly state that the time for an
-+unload operation to complete is vendor specific. The hint in ATA-7
-+that this will typically be within 500 milliseconds apparently has
-+been dropped in ATA-8.
-+
-+There is a technical detail of this implementation that may cause some
-+confusion and should be discussed here. When a head park request has
-+been issued to a device successfully, all I/O operations on the
-+controller port this device is attached to will be deferred. That is
-+to say, any other device that may be connected to the same port will
-+be affected too. The only exception is that a subsequent head unload
-+request to that other device will be executed immediately. Further
-+operations on that port will be deferred until the timeout specified
-+for either device on the port has expired. As far as PATA (old style
-+IDE) configurations are concerned, there can only be two devices
-+attached to any single port. In SATA world we have port multipliers
-+which means that a user-issued head parking request to one device may
-+actually result in stopping I/O to a whole bunch of devices. However,
-+since this feature is supposed to be used on laptops and does not seem
-+to be very useful in any other environment, there will be mostly one
-+device per port. Even if the CD/DVD writer happens to be connected to
-+the same port as the hard drive, it generally *should* recover just
-+fine from the occasional buffer under-run incurred by a head park
-+request to the HD. Actually, when you are using an ide driver rather
-+than its libata counterpart (i.e. your disk is called /dev/hda
-+instead of /dev/sda), then parking the heads of one drive (drive X)
-+will generally not affect the mode of operation of another drive
-+(drive Y) on the same port as described above. It is only when a port
-+reset is required to recover from an exception on drive Y that further
-+I/O operations on that drive (and the reset itself) will be delayed
-+until drive X is no longer in the parked state.
-+
-+Finally, there are some hard drives that only comply with an earlier
-+version of the ATA standard than ATA-7, but do support the unload
-+feature nonetheless. Unfortunately, there is no safe way Linux can
-+detect these devices, so you won't be able to write to the
-+unload_heads attribute. If you know that your device really does
-+support the unload feature (for instance, because the vendor of your
-+laptop or the hard drive itself told you so), then you can tell the
-+kernel to enable the usage of this feature for that drive by writing
-+the special value -1 to the unload_heads attribute:
-+
-+# echo -1 > /sys/block/sda/device/unload_heads
-+
-+will enable the feature for /dev/sda, and giving -2 instead of -1 will
-+disable it again.
-+
-+
-+3. References
-+-------------
-+
-+There are several laptops from different vendors featuring shock
-+protection capabilities. As manufacturers have refused to support open
-+source development of the required software components so far, Linux
-+support for shock protection varies considerably between different
-+hardware implementations. Ideally, this section should contain a list
-+of pointers at different projects aiming at an implementation of shock
-+protection on different systems. Unfortunately, I only know of a
-+single project which, although still considered experimental, is fit
-+for use. Please feel free to add projects that have been the victims
-+of my ignorance.
-+
-+- http://www.thinkwiki.org/wiki/HDAPS
-+ See this page for information about Linux support of the hard disk
-+ active protection system as implemented in IBM/Lenovo Thinkpads.
-+
-+
-+4. CREDITS
-+----------
-+
-+This implementation of disk head parking has been inspired by a patch
-+originally published by Jon Escombe <lists@dresco.co.uk>. My efforts
-+to develop an implementation of this feature that is fit to be merged
-+into mainline have been aided by various kernel developers, in
-+particular by Tejun Heo and Bartlomiej Zolnierkiewicz.
-diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
-index 2e1a7cb..fd813fa 100644
---- a/drivers/ata/ahci.c
-+++ b/drivers/ata/ahci.c
-@@ -316,6 +316,7 @@ static struct device_attribute *ahci_shost_attrs[] = {
-
- static struct device_attribute *ahci_sdev_attrs[] = {
- &dev_attr_sw_activity,
-+ &dev_attr_unload_heads,
- NULL
- };
-
-diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
-index 79e3a8e..b8102d7 100644
---- a/drivers/ata/libata-core.c
-+++ b/drivers/ata/libata-core.c
-@@ -5264,6 +5264,7 @@ struct ata_port *ata_port_alloc(struct ata_host *host)
- INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan);
- INIT_LIST_HEAD(&ap->eh_done_q);
- init_waitqueue_head(&ap->eh_wait_q);
-+ init_completion(&ap->park_req_pending);
- init_timer_deferrable(&ap->fastdrain_timer);
- ap->fastdrain_timer.function = ata_eh_fastdrain_timerfn;
- ap->fastdrain_timer.data = (unsigned long)ap;
-diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
-index c1db2f2..2efe3ae 100644
---- a/drivers/ata/libata-eh.c
-+++ b/drivers/ata/libata-eh.c
-@@ -2446,6 +2446,80 @@ int ata_eh_reset(struct ata_link *link, int classify,
- goto retry;
- }
-
-+static inline void ata_eh_pull_park_action(struct ata_port *ap)
-+{
-+ struct ata_link *link;
-+ struct ata_device *dev;
-+ unsigned long flags;
-+
-+ /*
-+ * This function can be thought of as an extended version of
-+ * ata_eh_about_to_do() specially crafted to accommodate the
-+ * requirements of ATA_EH_PARK handling. Since the EH thread
-+ * does not leave the do {} while () loop in ata_eh_recover as
-+ * long as the timeout for a park request to *one* device on
-+ * the port has not expired, and since we still want to pick
-+ * up park requests to other devices on the same port or
-+ * timeout updates for the same device, we have to pull
-+ * ATA_EH_PARK actions from eh_info into eh_context.i
-+ * ourselves at the beginning of each pass over the loop.
-+ *
-+ * Additionally, all write accesses to &ap->park_req_pending
-+ * through INIT_COMPLETION() (see below) or complete_all()
-+ * (see ata_scsi_park_store()) are protected by the host lock.
-+ * As a result we have that park_req_pending.done is zero on
-+ * exit from this function, i.e. when ATA_EH_PARK actions for
-+ * *all* devices on port ap have been pulled into the
-+ * respective eh_context structs. If, and only if,
-+ * park_req_pending.done is non-zero by the time we reach
-+ * wait_for_completion_timeout(), another ATA_EH_PARK action
-+ * has been scheduled for at least one of the devices on port
-+ * ap and we have to cycle over the do {} while () loop in
-+ * ata_eh_recover() again.
-+ */
-+
-+ spin_lock_irqsave(ap->lock, flags);
-+ INIT_COMPLETION(ap->park_req_pending);
-+ ata_port_for_each_link(link, ap) {
-+ ata_link_for_each_dev(dev, link) {
-+ struct ata_eh_info *ehi = &link->eh_info;
-+
-+ link->eh_context.i.dev_action[dev->devno] |=
-+ ehi->dev_action[dev->devno] & ATA_EH_PARK;
-+ ata_eh_clear_action(link, dev, ehi, ATA_EH_PARK);
-+ }
-+ }
-+ spin_unlock_irqrestore(ap->lock, flags);
-+}
-+
-+static void ata_eh_park_issue_cmd(struct ata_device *dev, int park)
-+{
-+ struct ata_eh_context *ehc = &dev->link->eh_context;
-+ struct ata_taskfile tf;
-+ unsigned int err_mask;
-+
-+ ata_tf_init(dev, &tf);
-+ if (park) {
-+ ehc->unloaded_mask |= 1 << dev->devno;
-+ tf.command = ATA_CMD_IDLEIMMEDIATE;
-+ tf.feature = 0x44;
-+ tf.lbal = 0x4c;
-+ tf.lbam = 0x4e;
-+ tf.lbah = 0x55;
-+ } else {
-+ ehc->unloaded_mask &= ~(1 << dev->devno);
-+ tf.command = ATA_CMD_CHK_POWER;
-+ }
-+
-+ tf.flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR;
-+ tf.protocol |= ATA_PROT_NODATA;
-+ err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);
-+ if (park && (err_mask || tf.lbal != 0xc4)) {
-+ ata_dev_printk(dev, KERN_ERR, "head unload failed!\n");
-+ ehc->unloaded_mask &= ~(1 << dev->devno);
-+ }
-+}
-+
- static int ata_eh_revalidate_and_attach(struct ata_link *link,
- struct ata_device **r_failed_dev)
- {
-@@ -2755,7 +2829,7 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
- struct ata_device *dev;
- int nr_failed_devs;
- int rc;
-- unsigned long flags;
-+ unsigned long flags, deadline;
-
- DPRINTK("ENTER\n");
-
-@@ -2829,6 +2903,56 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
- }
- }
-
-+ do {
-+ unsigned long now;
-+
-+ /*
-+ * clears ATA_EH_PARK in eh_info and resets
-+ * ap->park_req_pending
-+ */
-+ ata_eh_pull_park_action(ap);
-+
-+ deadline = jiffies;
-+ ata_port_for_each_link(link, ap) {
-+ ata_link_for_each_dev(dev, link) {
-+ struct ata_eh_context *ehc = &link->eh_context;
-+ unsigned long tmp;
-+
-+ if (dev->class != ATA_DEV_ATA)
-+ continue;
-+ if (!(ehc->i.dev_action[dev->devno] &
-+ ATA_EH_PARK))
-+ continue;
-+ tmp = dev->unpark_deadline;
-+ if (time_before(deadline, tmp))
-+ deadline = tmp;
-+ else if (time_before_eq(tmp, jiffies))
-+ continue;
-+ if (ehc->unloaded_mask & (1 << dev->devno))
-+ continue;
-+
-+ ata_eh_park_issue_cmd(dev, 1);
-+ }
-+ }
-+
-+ now = jiffies;
-+ if (time_before_eq(deadline, now))
-+ break;
-+
-+ deadline = wait_for_completion_timeout(&ap->park_req_pending,
-+ deadline - now);
-+ } while (deadline);
-+ ata_port_for_each_link(link, ap) {
-+ ata_link_for_each_dev(dev, link) {
-+ if (!(link->eh_context.unloaded_mask &
-+ (1 << dev->devno)))
-+ continue;
-+
-+ ata_eh_park_issue_cmd(dev, 0);
-+ ata_eh_done(link, dev, ATA_EH_PARK);
-+ }
-+ }
-+
- /* the rest */
- ata_port_for_each_link(link, ap) {
- struct ata_eh_context *ehc = &link->eh_context;
-diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
-index b9d3ba4..e1f916f 100644
---- a/drivers/ata/libata-scsi.c
-+++ b/drivers/ata/libata-scsi.c
-@@ -183,6 +183,106 @@ DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR,
- ata_scsi_lpm_show, ata_scsi_lpm_put);
- EXPORT_SYMBOL_GPL(dev_attr_link_power_management_policy);
-
-+static ssize_t ata_scsi_park_show(struct device *device,
-+ struct device_attribute *attr, char *buf)
-+{
-+ struct scsi_device *sdev = to_scsi_device(device);
-+ struct ata_port *ap;
-+ struct ata_link *link;
-+ struct ata_device *dev;
-+ unsigned long flags, now;
-+ unsigned int uninitialized_var(msecs);
-+ int rc = 0;
-+
-+ ap = ata_shost_to_port(sdev->host);
-+
-+ spin_lock_irqsave(ap->lock, flags);
-+ dev = ata_scsi_find_dev(ap, sdev);
-+ if (!dev) {
-+ rc = -ENODEV;
-+ goto unlock;
-+ }
-+ if (dev->flags & ATA_DFLAG_NO_UNLOAD) {
-+ rc = -EOPNOTSUPP;
-+ goto unlock;
-+ }
-+
-+ link = dev->link;
-+ now = jiffies;
-+ if (ap->pflags & ATA_PFLAG_EH_IN_PROGRESS &&
-+ link->eh_context.unloaded_mask & (1 << dev->devno) &&
-+ time_after(dev->unpark_deadline, now))
-+ msecs = jiffies_to_msecs(dev->unpark_deadline - now);
-+ else
-+ msecs = 0;
-+
-+unlock:
-+ spin_unlock_irq(ap->lock);
-+
-+ return rc ? rc : snprintf(buf, 20, "%u\n", msecs);
-+}
-+
-+static ssize_t ata_scsi_park_store(struct device *device,
-+ struct device_attribute *attr,
-+ const char *buf, size_t len)
-+{
-+ struct scsi_device *sdev = to_scsi_device(device);
-+ struct ata_port *ap;
-+ struct ata_device *dev;
-+ long int input;
-+ unsigned long flags;
-+ int rc;
-+
-+ rc = strict_strtol(buf, 10, &input);
-+ if (rc || input < -2)
-+ return -EINVAL;
-+ if (input > ATA_TMOUT_MAX_PARK) {
-+ rc = -EOVERFLOW;
-+ input = ATA_TMOUT_MAX_PARK;
-+ }
-+
-+ ap = ata_shost_to_port(sdev->host);
-+
-+ spin_lock_irqsave(ap->lock, flags);
-+ dev = ata_scsi_find_dev(ap, sdev);
-+ if (unlikely(!dev)) {
-+ rc = -ENODEV;
-+ goto unlock;
-+ }
-+ if (dev->class != ATA_DEV_ATA) {
-+ rc = -EOPNOTSUPP;
-+ goto unlock;
-+ }
-+
-+ if (input >= 0) {
-+ if (dev->flags & ATA_DFLAG_NO_UNLOAD) {
-+ rc = -EOPNOTSUPP;
-+ goto unlock;
-+ }
-+
-+ dev->unpark_deadline = ata_deadline(jiffies, input);
-+ dev->link->eh_info.dev_action[dev->devno] |= ATA_EH_PARK;
-+ ata_port_schedule_eh(ap);
-+ complete(&ap->park_req_pending);
-+ } else {
-+ switch (input) {
-+ case -1:
-+ dev->flags &= ~ATA_DFLAG_NO_UNLOAD;
-+ break;
-+ case -2:
-+ dev->flags |= ATA_DFLAG_NO_UNLOAD;
-+ break;
-+ }
-+ }
-+unlock:
-+ spin_unlock_irqrestore(ap->lock, flags);
-+
-+ return rc ? rc : len;
-+}
-+DEVICE_ATTR(unload_heads, S_IRUGO | S_IWUSR,
-+ ata_scsi_park_show, ata_scsi_park_store);
-+EXPORT_SYMBOL_GPL(dev_attr_unload_heads);
-+
- static void ata_scsi_set_sense(struct scsi_cmnd *cmd, u8 sk, u8 asc, u8 ascq)
- {
- cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION;
-@@ -269,6 +369,12 @@ DEVICE_ATTR(sw_activity, S_IWUGO | S_IRUGO, ata_scsi_activity_show,
- ata_scsi_activity_store);
- EXPORT_SYMBOL_GPL(dev_attr_sw_activity);
-
-+struct device_attribute *ata_common_sdev_attrs[] = {
-+ &dev_attr_unload_heads,
-+ NULL
-+};
-+EXPORT_SYMBOL_GPL(ata_common_sdev_attrs);
-+
- static void ata_scsi_invalid_field(struct scsi_cmnd *cmd,
- void (*done)(struct scsi_cmnd *))
- {
-@@ -954,6 +1060,9 @@ static int atapi_drain_needed(struct request *rq)
- static int ata_scsi_dev_config(struct scsi_device *sdev,
- struct ata_device *dev)
- {
-+ if (!ata_id_has_unload(dev->id))
-+ dev->flags |= ATA_DFLAG_NO_UNLOAD;
-+
- /* configure max sectors */
- blk_queue_max_sectors(sdev->request_queue, dev->max_sectors);
-
-diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile
-index 64e0ecd..564bf9d 100644
---- a/drivers/ide/Makefile
-+++ b/drivers/ide/Makefile
-@@ -5,7 +5,7 @@
- EXTRA_CFLAGS += -Idrivers/ide
-
- ide-core-y += ide.o ide-io.o ide-iops.o ide-lib.o ide-probe.o ide-taskfile.o \
-- ide-pio-blacklist.o
-+ ide-park.o ide-pio-blacklist.o
-
- # core IDE code
- ide-core-$(CONFIG_IDE_TIMINGS) += ide-timings.o
-diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
-index a896a28..c83e9f0 100644
---- a/drivers/ide/ide-io.c
-+++ b/drivers/ide/ide-io.c
-@@ -718,7 +718,31 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
-
- static ide_startstop_t ide_special_rq(ide_drive_t *drive, struct request *rq)
- {
-- switch (rq->cmd[0]) {
-+ u8 cmd = rq->cmd[0];
-+
-+ if (cmd == REQ_PARK_HEADS || cmd == REQ_UNPARK_HEADS) {
-+ ide_task_t task;
-+ struct ide_taskfile *tf = &task.tf;
-+
-+ memset(&task, 0, sizeof(task));
-+ if (cmd == REQ_PARK_HEADS) {
-+ drive->sleep = *(unsigned long *)rq->special;
-+ drive->sleeping = 1;
-+ tf->command = WIN_IDLEIMMEDIATE;
-+ tf->feature = 0x44;
-+ tf->lbal = 0x4c;
-+ tf->lbam = 0x4e;
-+ tf->lbah = 0x55;
-+ } else /* cmd == REQ_UNPARK_HEADS */
-+ tf->command = WIN_CHECKPOWERMODE1;
-+
-+ task.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE |
-+ IDE_TFLAG_CUSTOM_HANDLER;
-+ drive->hwif->data_phase = task.data_phase = TASKFILE_NO_DATA;
-+ return do_rw_taskfile(drive, &task);
-+ }
-+
-+ switch (cmd) {
- case REQ_DRIVE_RESET:
- return ide_do_reset(drive);
- default:
-@@ -1047,6 +1071,7 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq)
- hwgroup->hwif = hwif;
- hwgroup->drive = drive;
- drive->sleeping = 0;
-+ drive->parked = 0;
- drive->service_start = jiffies;
-
- if (blk_queue_plugged(drive->queue)) {
-diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
-index 2cbadff..446ec28 100644
---- a/drivers/ide/ide-iops.c
-+++ b/drivers/ide/ide-iops.c
-@@ -1108,6 +1108,7 @@ static void ide_disk_pre_reset(ide_drive_t *drive)
- drive->special.b.set_geometry = legacy;
- drive->special.b.recalibrate = legacy;
- drive->mult_count = 0;
-+ drive->parked = 0;
- if (!drive->keep_settings && !drive->using_dma)
- drive->mult_req = 0;
- if (drive->mult_req != drive->mult_count)
-@@ -1164,12 +1165,13 @@ static void pre_reset(ide_drive_t *drive)
- static ide_startstop_t do_reset1 (ide_drive_t *drive, int do_not_try_atapi)
- {
- unsigned int unit;
-- unsigned long flags;
-+ unsigned long flags, timeout;
- ide_hwif_t *hwif;
- ide_hwgroup_t *hwgroup;
- struct ide_io_ports *io_ports;
- const struct ide_tp_ops *tp_ops;
- const struct ide_port_ops *port_ops;
-+ DEFINE_WAIT(wait);
-
- spin_lock_irqsave(&ide_lock, flags);
- hwif = HWIF(drive);
-@@ -1196,6 +1198,30 @@ static ide_startstop_t do_reset1 (ide_drive_t *drive, int do_not_try_atapi)
- return ide_started;
- }
-
-+ /* We must not disturb devices in the parked state. */
-+ do {
-+ unsigned long now;
-+
-+ prepare_to_wait(&ide_park_wq, &wait, TASK_UNINTERRUPTIBLE);
-+ timeout = jiffies;
-+ for (unit = 0; unit < MAX_DRIVES; unit++) {
-+ ide_drive_t *tdrive = &hwif->drives[unit];
-+
-+ if (tdrive->present && tdrive->parked &&
-+ time_after(tdrive->sleep, timeout))
-+ timeout = tdrive->sleep;
-+ }
-+
-+ now = jiffies;
-+ if (time_before_eq(timeout, now))
-+ break;
-+
-+ spin_unlock_irqrestore(&ide_lock, flags);
-+ timeout = schedule_timeout_uninterruptible(timeout - now);
-+ spin_lock_irqsave(&ide_lock, flags);
-+ } while (timeout);
-+ finish_wait(&ide_park_wq, &wait);
-+
- /*
- * First, reset any device state data we were maintaining
- * for any of the drives on this interface.
-diff --git a/drivers/ide/ide-park.c b/drivers/ide/ide-park.c
-new file mode 100644
-index 0000000..18adda6
---- /dev/null
-+++ b/drivers/ide/ide-park.c
-@@ -0,0 +1,120 @@
-+#include <linux/kernel.h>
-+#include <linux/ide.h>
-+#include <linux/jiffies.h>
-+#include <linux/blkdev.h>
-+
-+DECLARE_WAIT_QUEUE_HEAD(ide_park_wq);
-+
-+static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout)
-+{
-+ struct request_queue *q = drive->queue;
-+ struct request *rq;
-+ int rc;
-+
-+ timeout += jiffies;
-+ spin_lock_irq(&ide_lock);
-+ if (drive->parked) {
-+ ide_hwgroup_t *hwgroup = drive->hwif->hwgroup;
-+ int reset_timer;
-+
-+ reset_timer = time_before(timeout, drive->sleep);
-+ drive->sleep = timeout;
-+ wake_up_all(&ide_park_wq);
-+ if (reset_timer && hwgroup->sleeping &&
-+ del_timer(&hwgroup->timer)) {
-+ hwgroup->sleeping = 0;
-+ hwgroup->busy = 0;
-+ blk_start_queueing(q);
-+ }
-+ spin_unlock_irq(&ide_lock);
-+ return;
-+ }
-+ spin_unlock_irq(&ide_lock);
-+
-+ rq = blk_get_request(q, READ, __GFP_WAIT);
-+ rq->cmd[0] = REQ_PARK_HEADS;
-+ rq->cmd_len = 1;
-+ rq->cmd_type = REQ_TYPE_SPECIAL;
-+ rq->special = &timeout;
-+ rc = blk_execute_rq(q, NULL, rq, 1);
-+ blk_put_request(rq);
-+ if (rc)
-+ goto out;
-+
-+ /*
-+ * Make sure that *some* command is sent to the drive after the
-+ * timeout has expired, so power management will be reenabled.
-+ */
-+ rq = blk_get_request(q, READ, GFP_NOWAIT);
-+ if (unlikely(!rq))
-+ goto out;
-+
-+ rq->cmd[0] = REQ_UNPARK_HEADS;
-+ rq->cmd_len = 1;
-+ rq->cmd_type = REQ_TYPE_SPECIAL;
-+ elv_add_request(q, rq, ELEVATOR_INSERT_FRONT, 1);
-+
-+out:
-+ return;
-+}
-+
-+ssize_t ide_park_show(struct device *dev, struct device_attribute *attr,
-+ char *buf)
-+{
-+ ide_drive_t *drive = to_ide_device(dev);
-+ unsigned long now;
-+ unsigned int msecs;
-+
-+ if (drive->no_unload)
-+ return -EOPNOTSUPP;
-+
-+ spin_lock_irq(&ide_lock);
-+ now = jiffies;
-+ if (drive->parked && time_after(drive->sleep, now))
-+ msecs = jiffies_to_msecs(drive->sleep - now);
-+ else
-+ msecs = 0;
-+ spin_unlock_irq(&ide_lock);
-+
-+ return snprintf(buf, 20, "%u\n", msecs);
-+}
-+
-+ssize_t ide_park_store(struct device *dev, struct device_attribute *attr,
-+ const char *buf, size_t len)
-+{
-+#define MAX_PARK_TIMEOUT 30000
-+ ide_drive_t *drive = to_ide_device(dev);
-+ long int input;
-+ int rc;
-+
-+ rc = strict_strtol(buf, 10, &input);
-+ if (rc || input < -2)
-+ return -EINVAL;
-+ if (input > MAX_PARK_TIMEOUT) {
-+ input = MAX_PARK_TIMEOUT;
-+ rc = -EOVERFLOW;
-+ }
-+
-+ mutex_lock(&ide_setting_mtx);
-+ if (input >= 0) {
-+ if (drive->no_unload)
-+ rc = -EOPNOTSUPP;
-+ else if (input || drive->parked)
-+ issue_park_cmd(drive, msecs_to_jiffies(input));
-+ } else {
-+ if (drive->media == ide_disk)
-+ switch (input) {
-+ case -1:
-+ drive->no_unload = 0;
-+ break;
-+ case -2:
-+ drive->no_unload = 1;
-+ break;
-+ }
-+ else
-+ rc = -EOPNOTSUPP;
-+ }
-+ mutex_unlock(&ide_setting_mtx);
-+
-+ return rc ? rc : len;
-+}
-diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
-index a51a30e..0df3c91 100644
---- a/drivers/ide/ide-probe.c
-+++ b/drivers/ide/ide-probe.c
-@@ -210,6 +210,8 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd)
- drive->media = type;
- /* an ATAPI device ignores DRDY */
- drive->ready_stat = 0;
-+ /* we don't do head unloading on ATAPI devices */
-+ drive->no_unload = 1;
- return;
- }
-
-@@ -227,6 +229,9 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd)
-
- drive->media = ide_disk;
-
-+ if (!ata_id_has_unload((const u16 *)drive->id))
-+ drive->no_unload = 1;
-+
- printk(KERN_CONT "%s DISK drive\n",
- (id->config == 0x848a) ? "CFA" : "ATA");
-
-diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
-index 7fb6f1c..255c960 100644
---- a/drivers/ide/ide-taskfile.c
-+++ b/drivers/ide/ide-taskfile.c
-@@ -56,6 +56,7 @@ static ide_startstop_t task_no_data_intr(ide_drive_t *);
- static ide_startstop_t set_geometry_intr(ide_drive_t *);
- static ide_startstop_t recal_intr(ide_drive_t *);
- static ide_startstop_t set_multmode_intr(ide_drive_t *);
-+static ide_startstop_t park_intr(ide_drive_t *);
- static ide_startstop_t pre_task_out_intr(ide_drive_t *, struct request *);
- static ide_startstop_t task_in_intr(ide_drive_t *);
-
-@@ -105,6 +106,8 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
- case WIN_SPECIFY: handler = set_geometry_intr; break;
- case WIN_RESTORE: handler = recal_intr; break;
- case WIN_SETMULT: handler = set_multmode_intr; break;
-+ case WIN_IDLEIMMEDIATE: /* fall through */
-+ case WIN_CHECKPOWERMODE1: handler = park_intr; break;
- }
- }
- ide_execute_command(drive, tf->command, handler,
-@@ -186,6 +189,37 @@ static ide_startstop_t recal_intr(ide_drive_t *drive)
- }
-
- /*
-+ * park_intr() is invoked on completion of a REQ_PARK_HEADS cmd.
-+ */
-+static ide_startstop_t park_intr(ide_drive_t *drive)
-+{
-+ ide_hwif_t *hwif = drive->hwif;
-+ u8 stat;
-+
-+ local_irq_enable_in_hardirq();
-+ stat = hwif->tp_ops->read_status(hwif);
-+
-+ if (!OK_STAT(stat, READY_STAT, BAD_STAT))
-+ return ide_error(drive, "park_intr", stat);
-+
-+ if (hwif->hwgroup->rq->cmd[0] == REQ_PARK_HEADS) {
-+ ide_task_t task;
-+
-+ task.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
-+ hwif->tp_ops->tf_read(drive, &task);
-+ if (task.tf.lbal != 0xc4) {
-+ printk(KERN_ERR "%s: head unload failed!\n",
-+ drive->name);
-+ ide_tf_dump(drive->name, &task.tf);
-+ } else
-+ drive->parked = 1;
-+ }
-+
-+ ide_end_drive_cmd(drive, stat, ide_read_error(drive));
-+ return ide_stopped;
-+}
-+
-+/*
- * Handler for commands without a data phase
- */
- static ide_startstop_t task_no_data_intr(ide_drive_t *drive)
-diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
-index 7724516..9416ffb 100644
---- a/drivers/ide/ide.c
-+++ b/drivers/ide/ide.c
-@@ -734,6 +734,7 @@ static struct device_attribute ide_dev_attrs[] = {
- __ATTR_RO(model),
- __ATTR_RO(firmware),
- __ATTR(serial, 0400, serial_show, NULL),
-+ __ATTR(unload_heads, 0644, ide_park_show, ide_park_store),
- __ATTR_NULL
- };
-
-diff --git a/include/linux/ata.h b/include/linux/ata.h
-index 8a12d71..a26ebd2 100644
---- a/include/linux/ata.h
-+++ b/include/linux/ata.h
-@@ -667,6 +667,15 @@ static inline int ata_id_has_dword_io(const u16 *id)
- return 0;
- }
-
-+static inline int ata_id_has_unload(const u16 *id)
-+{
-+ if (ata_id_major_version(id) >= 7 &&
-+ (id[ATA_ID_CFSSE] & 0xC000) == 0x4000 &&
-+ id[ATA_ID_CFSSE] & (1 << 13))
-+ return 1;
-+ return 0;
-+}
-+
- static inline int ata_id_current_chs_valid(const u16 *id)
- {
- /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command
-diff --git a/include/linux/ide.h b/include/linux/ide.h
-index 6514db8..03b6dea 100644
---- a/include/linux/ide.h
-+++ b/include/linux/ide.h
-@@ -143,6 +143,8 @@ struct ide_io_ports {
- * Values should be in the range of 0x20 to 0x3f.
- */
- #define REQ_DRIVE_RESET 0x20
-+#define REQ_PARK_HEADS 0x22
-+#define REQ_UNPARK_HEADS 0x23
-
- /*
- * Check for an interrupt and acknowledge the interrupt status
-@@ -423,6 +425,8 @@ struct ide_drive_s {
- unsigned sleeping : 1; /* 1=sleeping & sleep field valid */
- unsigned post_reset : 1;
- unsigned udma33_warned : 1;
-+ unsigned no_unload : 1; /* no support for unload feature */
-+ unsigned parked : 1; /* device parked, heads unloaded */
-
- u8 addressing; /* 0=28-bit, 1=48-bit, 2=48-bit doing 28-bit */
- u8 quirk_list; /* considered quirky, set for a specific host */
-@@ -1061,6 +1065,7 @@ extern int drive_is_ready(ide_drive_t *);
-
- void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8);
-
-+
- ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc,
- ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry,
- void (*update_buffers)(ide_drive_t *, struct ide_atapi_pc *),
-@@ -1072,6 +1077,13 @@ ide_startstop_t ide_transfer_pc(ide_drive_t *, struct ide_atapi_pc *,
- ide_startstop_t ide_issue_pc(ide_drive_t *, struct ide_atapi_pc *,
- ide_handler_t *, unsigned int, ide_expiry_t *);
-
-+/* Disk head parking */
-+extern wait_queue_head_t ide_park_wq;
-+ssize_t ide_park_show(struct device *dev, struct device_attribute *attr,
-+ char *buf);
-+ssize_t ide_park_store(struct device *dev, struct device_attribute *attr,
-+ const char *buf, size_t len);
-+
- ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *);
-
- void task_end_request(ide_drive_t *, struct request *, u8);
-diff --git a/include/linux/libata.h b/include/linux/libata.h
-index 225bfc5..adc16cf 100644
---- a/include/linux/libata.h
-+++ b/include/linux/libata.h
-@@ -146,6 +146,7 @@ enum {
- ATA_DFLAG_SPUNDOWN = (1 << 14), /* XXX: for spindown_compat */
- ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */
- ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */
-+ ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */
- ATA_DFLAG_INIT_MASK = (1 << 24) - 1,
-
- ATA_DFLAG_DETACH = (1 << 24),
-@@ -244,6 +245,7 @@ enum {
- ATA_TMOUT_BOOT = 30000, /* heuristic */
- ATA_TMOUT_BOOT_QUICK = 7000, /* heuristic */
- ATA_TMOUT_INTERNAL_QUICK = 5000,
-+ ATA_TMOUT_MAX_PARK = 30000,
-
- /* FIXME: GoVault needs 2s but we can't afford that without
- * parallel probing. 800ms is enough for iVDR disk
-@@ -319,8 +321,9 @@ enum {
- ATA_EH_RESET = ATA_EH_SOFTRESET | ATA_EH_HARDRESET,
- ATA_EH_ENABLE_LINK = (1 << 3),
- ATA_EH_LPM = (1 << 4), /* link power management action */
-+ ATA_EH_PARK = (1 << 5), /* unload heads and stop I/O */
-
-- ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE,
-+ ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE | ATA_EH_PARK,
-
- /* ata_eh_info->flags */
- ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */
-@@ -452,6 +455,7 @@ enum link_pm {
- MEDIUM_POWER,
- };
- extern struct device_attribute dev_attr_link_power_management_policy;
-+extern struct device_attribute dev_attr_unload_heads;
- extern struct device_attribute dev_attr_em_message_type;
- extern struct device_attribute dev_attr_em_message;
- extern struct device_attribute dev_attr_sw_activity;
-@@ -564,6 +568,7 @@ struct ata_device {
- /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */
- u64 n_sectors; /* size of device, if ATA */
- unsigned int class; /* ATA_DEV_xxx */
-+ unsigned long unpark_deadline;
-
- u8 pio_mode;
- u8 dma_mode;
-@@ -621,6 +626,7 @@ struct ata_eh_context {
- [ATA_EH_CMD_TIMEOUT_TABLE_SIZE];
- unsigned int classes[ATA_MAX_DEVICES];
- unsigned int did_probe_mask;
-+ unsigned int unloaded_mask;
- unsigned int saved_ncq_enabled;
- u8 saved_xfer_mode[ATA_MAX_DEVICES];
- /* timestamp for the last reset attempt or success */
-@@ -709,6 +715,7 @@ struct ata_port {
- struct list_head eh_done_q;
- wait_queue_head_t eh_wait_q;
- int eh_tries;
-+ struct completion park_req_pending;
-
- pm_message_t pm_mesg;
- int *pm_result;
-@@ -1098,6 +1105,7 @@ extern void ata_std_error_handler(struct ata_port *ap);
- */
- extern const struct ata_port_operations ata_base_port_ops;
- extern const struct ata_port_operations sata_port_ops;
-+extern struct device_attribute *ata_common_sdev_attrs[];
-
- #define ATA_BASE_SHT(drv_name) \
- .module = THIS_MODULE, \
-@@ -1112,7 +1120,8 @@ extern const struct ata_port_operations sata_port_ops;
- .proc_name = drv_name, \
- .slave_configure = ata_scsi_slave_config, \
- .slave_destroy = ata_scsi_slave_destroy, \
-- .bios_param = ata_std_bios_param
-+ .bios_param = ata_std_bios_param, \
-+ .sdev_attrs = ata_common_sdev_attrs
-
- #define ATA_NCQ_SHT(drv_name) \
- ATA_BASE_SHT(drv_name), \
diff --git a/sys-kernel/thinkpad-sources/files/2.6.27/colored-printk-2.6.26.patch b/sys-kernel/thinkpad-sources/files/2.6.27/colored-printk-2.6.26.patch
deleted file mode 100644
index dc97636..0000000
--- a/sys-kernel/thinkpad-sources/files/2.6.27/colored-printk-2.6.26.patch
+++ /dev/null
@@ -1,355 +0,0 @@
-diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
-index 643fd86..837f3c2 100644
---- a/arch/x86/kernel/early_printk.c
-+++ b/arch/x86/kernel/early_printk.c
-@@ -15,7 +15,8 @@
- static int max_ypos = 25, max_xpos = 80;
- static int current_ypos = 25, current_xpos;
-
--static void early_vga_write(struct console *con, const char *str, unsigned n)
-+static void early_vga_write(struct console *con, const char *str, unsigned n,
-+ unsigned int loglevel)
- {
- char c;
- int i, k, j;
-@@ -84,7 +85,8 @@ static int early_serial_putc(unsigned char ch)
- return timeout ? 0 : -1;
- }
-
--static void early_serial_write(struct console *con, const char *s, unsigned n)
-+static void early_serial_write(struct console *con, const char *s, unsigned n,
-+ unsigned int loglevel)
- {
- while (*s && n-- > 0) {
- if (*s == '\n')
-@@ -180,7 +182,8 @@ static void __init simnow_init(char *str)
- simnow_fd = simnow(XOPEN, (unsigned long)fn, O_WRONLY|O_APPEND|O_CREAT, 0644);
- }
-
--static void simnow_write(struct console *con, const char *s, unsigned n)
-+static void simnow_write(struct console *con, const char *s, unsigned n,
-+ unsigned int loglevel)
- {
- simnow(XWRITE, simnow_fd, (unsigned long)s, n);
- }
-@@ -204,7 +207,7 @@ void early_printk(const char *fmt, ...)
-
- va_start(ap, fmt);
- n = vscnprintf(buf, 512, fmt, ap);
-- early_console->write(early_console, buf, n);
-+ early_console->write(early_console, buf, n, 0);
- va_end(ap);
- }
-
-diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
-index 57ba5c2..10556dd 100644
---- a/drivers/char/Kconfig
-+++ b/drivers/char/Kconfig
-@@ -71,6 +71,111 @@ config NR_TTY_DEVICES
-
- If unsure, say 63.
-
-+menuconfig VT_CKO
-+ bool "Colored kernel message output"
-+ depends on VT_CONSOLE
-+ ---help---
-+ This option enables kernel messages to be emitted in
-+ colors other than the default.
-+
-+ The color value you need to enter is composed (OR-ed)
-+ of a foreground and a background color.
-+
-+ Foreground:
-+ 0x00 = black, 0x08 = dark gray,
-+ 0x01 = red, 0x09 = light red,
-+ 0x02 = green, 0x0A = light green,
-+ 0x03 = brown, 0x0B = yellow,
-+ 0x04 = blue, 0x0C = light blue,
-+ 0x05 = magenta, 0x0D = light magenta,
-+ 0x06 = cyan, 0x0E = light cyan,
-+ 0x07 = gray, 0x0F = white,
-+
-+ (Foreground colors 0x08 to 0x0F do not work when a VGA
-+ console font with 512 glyphs is used.)
-+
-+ Background:
-+ 0x00 = black, 0x40 = blue,
-+ 0x10 = red, 0x50 = magenta,
-+ 0x20 = green, 0x60 = cyan,
-+ 0x30 = brown, 0x70 = gray,
-+
-+ For example, 0x1F would yield white on red.
-+
-+ If unsure, say N.
-+
-+config VT_PRINTK_EMERG_COLOR
-+ hex "Emergency messages color"
-+ range 0x00 0xFF
-+ depends on VT_CKO
-+ default 0x07
-+ ---help---
-+ This option defines with which color kernel emergency messages will
-+ be printed to the console.
-+
-+config VT_PRINTK_ALERT_COLOR
-+ hex "Alert messages color"
-+ range 0x00 0xFF
-+ depends on VT_CKO
-+ default 0x07
-+ ---help---
-+ This option defines with which color kernel alert messages will
-+ be printed to the console.
-+
-+config VT_PRINTK_CRIT_COLOR
-+ hex "Critical messages color"
-+ range 0x00 0xFF
-+ depends on VT_CKO
-+ default 0x07
-+ ---help---
-+ This option defines with which color kernel critical messages will
-+ be printed to the console.
-+
-+config VT_PRINTK_ERR_COLOR
-+ hex "Error messages color"
-+ range 0x00 0xFF
-+ depends on VT_CKO
-+ default 0x07
-+ ---help---
-+ This option defines with which color kernel error messages will
-+ be printed to the console.
-+
-+config VT_PRINTK_WARNING_COLOR
-+ hex "Warning messages color"
-+ range 0x00 0xFF
-+ depends on VT_CKO
-+ default 0x07
-+ ---help---
-+ This option defines with which color kernel warning messages will
-+ be printed to the console.
-+
-+config VT_PRINTK_NOTICE_COLOR
-+ hex "Notice messages color"
-+ range 0x00 0xFF
-+ depends on VT_CKO
-+ default 0x07
-+ ---help---
-+ This option defines with which color kernel notice messages will
-+ be printed to the console.
-+
-+config VT_PRINTK_INFO_COLOR
-+ hex "Information messages color"
-+ range 0x00 0xFF
-+ depends on VT_CKO
-+ default 0x07
-+ ---help---
-+ This option defines with which color kernel information messages will
-+ be printed to the console.
-+
-+config VT_PRINTK_DEBUG_COLOR
-+ hex "Debug messages color"
-+ range 0x00 0xFF
-+ depends on VT_CKO
-+ default 0x07
-+ ---help---
-+ This option defines with which color kernel debug messages will
-+ be printed to the console.
-+
- config HW_CONSOLE
- bool
- depends on VT && !S390 && !UML
-diff --git a/drivers/char/vt.c b/drivers/char/vt.c
-index 935f1c2..1fee2dc 100644
---- a/drivers/char/vt.c
-+++ b/drivers/char/vt.c
-@@ -73,6 +73,7 @@
- */
-
- #include <linux/module.h>
-+#include <linux/moduleparam.h>
- #include <linux/types.h>
- #include <linux/sched.h>
- #include <linux/tty.h>
-@@ -2409,17 +2410,45 @@ struct tty_driver *console_driver;
-
- #ifdef CONFIG_VT_CONSOLE
-
-+#ifdef CONFIG_VT_CKO
-+static unsigned int printk_color[8] __read_mostly = {
-+ CONFIG_VT_PRINTK_EMERG_COLOR, /* KERN_EMERG */
-+ CONFIG_VT_PRINTK_ALERT_COLOR, /* KERN_ALERT */
-+ CONFIG_VT_PRINTK_CRIT_COLOR, /* KERN_CRIT */
-+ CONFIG_VT_PRINTK_ERR_COLOR, /* KERN_ERR */
-+ CONFIG_VT_PRINTK_WARNING_COLOR, /* KERN_WARNING */
-+ CONFIG_VT_PRINTK_NOTICE_COLOR, /* KERN_NOTICE */
-+ CONFIG_VT_PRINTK_INFO_COLOR, /* KERN_INFO */
-+ CONFIG_VT_PRINTK_DEBUG_COLOR, /* KERN_DEBUG */
-+};
-+module_param_array(printk_color, uint, NULL, S_IRUGO | S_IWUSR);
-+
-+static inline void vc_set_color(struct vc_data *vc, unsigned char color)
-+{
-+ vc->vc_color = color_table[color & 0xF] |
-+ (color_table[(color >> 4) & 0x7] << 4) |
-+ (color & 0x80);
-+ update_attr(vc);
-+}
-+#else
-+static unsigned int printk_color[8];
-+static inline void vc_set_color(const struct vc_data *vc, unsigned char c)
-+{
-+}
-+#endif
-+
- /*
- * Console on virtual terminal
- *
- * The console must be locked when we get here.
- */
-
--static void vt_console_print(struct console *co, const char *b, unsigned count)
-+static void vt_console_print(struct console *co, const char *b, unsigned count,
-+ unsigned int loglevel)
- {
- struct vc_data *vc = vc_cons[fg_console].d;
-- unsigned char c;
- static DEFINE_SPINLOCK(printing_lock);
-+ unsigned char current_color, c;
- const ushort *start;
- ushort cnt = 0;
- ushort myx;
-@@ -2452,11 +2481,19 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
-
- start = (ushort *)vc->vc_pos;
-
-+ /*
-+ * We always get a valid loglevel - <8> and "no level" is transformed
-+ * to <4> in the typical kernel.
-+ */
-+ current_color = printk_color[loglevel];
-+ vc_set_color(vc, current_color);
-+
- /* Contrived structure to try to emulate original need_wrap behaviour
- * Problems caused when we have need_wrap set on '\n' character */
- while (count--) {
- c = *b++;
- if (c == 10 || c == 13 || c == 8 || vc->vc_need_wrap) {
-+ vc_set_color(vc, vc->vc_def_color);
- if (cnt > 0) {
- if (CON_IS_VISIBLE(vc))
- vc->vc_sw->con_putcs(vc, start, cnt, vc->vc_y, vc->vc_x);
-@@ -2469,6 +2506,7 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
- bs(vc);
- start = (ushort *)vc->vc_pos;
- myx = vc->vc_x;
-+ vc_set_color(vc, current_color);
- continue;
- }
- if (c != 13)
-@@ -2476,6 +2514,7 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
- cr(vc);
- start = (ushort *)vc->vc_pos;
- myx = vc->vc_x;
-+ vc_set_color(vc, current_color);
- if (c == 10 || c == 13)
- continue;
- }
-@@ -2498,6 +2537,7 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
- vc->vc_need_wrap = 1;
- }
- }
-+ vc_set_color(vc, vc->vc_def_color);
- set_cursor(vc);
- notify_update(vc);
-
-diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
-index 665341e..4c27de8 100644
---- a/drivers/net/netconsole.c
-+++ b/drivers/net/netconsole.c
-@@ -694,7 +694,8 @@ static struct notifier_block netconsole_netdev_notifier = {
- .notifier_call = netconsole_netdev_event,
- };
-
--static void write_msg(struct console *con, const char *msg, unsigned int len)
-+static void write_msg(struct console *con, const char *msg, unsigned int len,
-+ unsigned int loglevel)
- {
- int frag, left;
- unsigned long flags;
-diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
-index 1bc00b7..b4f1b6f 100644
---- a/drivers/serial/8250.c
-+++ b/drivers/serial/8250.c
-@@ -2527,7 +2527,8 @@ static void serial8250_console_putchar(struct uart_port *port, int ch)
- * The console_lock must be held when we get here.
- */
- static void
--serial8250_console_write(struct console *co, const char *s, unsigned int count)
-+serial8250_console_write(struct console *co, const char *s, unsigned int count,
-+ unsigned int loglevel)
- {
- struct uart_8250_port *up = &serial8250_ports[co->index];
- unsigned long flags;
-diff --git a/drivers/serial/8250_early.c b/drivers/serial/8250_early.c
-index f279745..2a928bd 100644
---- a/drivers/serial/8250_early.c
-+++ b/drivers/serial/8250_early.c
-@@ -83,7 +83,7 @@ static void __init serial_putc(struct uart_port *port, int c)
- }
-
- static void __init early_serial8250_write(struct console *console,
-- const char *s, unsigned int count)
-+ const char *s, unsigned int count, unsigned int loglevel)
- {
- struct uart_port *port = &early_device.port;
- unsigned int ier;
-diff --git a/include/linux/console.h b/include/linux/console.h
-index a4f27fb..46fcfd3 100644
---- a/include/linux/console.h
-+++ b/include/linux/console.h
-@@ -95,7 +95,7 @@ void give_up_console(const struct consw *sw);
-
- struct console {
- char name[16];
-- void (*write)(struct console *, const char *, unsigned);
-+ void (*write)(struct console *, const char *, unsigned, unsigned int);
- int (*read)(struct console *, char *, unsigned);
- struct tty_driver *(*device)(struct console *, int *);
- void (*unblank)(void);
-diff --git a/kernel/printk.c b/kernel/printk.c
-index 6e920ce..a1aaa3f 100644
---- a/kernel/printk.c
-+++ b/kernel/printk.c
-@@ -444,7 +444,8 @@ asmlinkage long sys_syslog(int type, char __user *buf, int len)
- /*
- * Call the console drivers on a range of log_buf
- */
--static void __call_console_drivers(unsigned start, unsigned end)
-+static void __call_console_drivers(unsigned start, unsigned end,
-+ unsigned int loglevel)
- {
- struct console *con;
-
-@@ -452,7 +453,7 @@ static void __call_console_drivers(unsigned start, unsigned end)
- if ((con->flags & CON_ENABLED) && con->write &&
- (cpu_online(smp_processor_id()) ||
- (con->flags & CON_ANYTIME)))
-- con->write(con, &LOG_BUF(start), end - start);
-+ con->write(con, &LOG_BUF(start), end - start, loglevel);
- }
- }
-
-@@ -479,10 +480,11 @@ static void _call_console_drivers(unsigned start,
- if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) {
- /* wrapped write */
- __call_console_drivers(start & LOG_BUF_MASK,
-- log_buf_len);
-- __call_console_drivers(0, end & LOG_BUF_MASK);
-+ log_buf_len, msg_log_level);
-+ __call_console_drivers(0, end & LOG_BUF_MASK,
-+ msg_log_level);
- } else {
-- __call_console_drivers(start, end);
-+ __call_console_drivers(start, end, msg_log_level);
- }
- }
- }
diff --git a/sys-kernel/thinkpad-sources/files/2.6.27/linux-phc-0.3.2-kernel-vanilla-2.6.26.patch b/sys-kernel/thinkpad-sources/files/2.6.27/linux-phc-0.3.2-kernel-vanilla-2.6.26.patch
deleted file mode 100644
index 4a4db8b..0000000
--- a/sys-kernel/thinkpad-sources/files/2.6.27/linux-phc-0.3.2-kernel-vanilla-2.6.26.patch
+++ /dev/null
@@ -1,554 +0,0 @@
-diff --new-file -a --unified=5 --recursive linux-source-2.6.26-rc9_orig/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c linux-source-2.6.26-rc9-custom8/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
---- linux-source-2.6.26-rc9_orig/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2008-07-09 16:59:37.000000000 +0200
-+++ linux-source-2.6.26-rc9-custom8/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2008-07-09 12:41:37.000000000 +0200
-@@ -23,10 +23,14 @@
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- *
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- */
-
-+/* This file has been patched with Linux PHC: http://phc.athousandnights.de
-+ * Patch version: linux-phc-0.3.1-kernel-vanilla-2.6.26.patch
-+ */
-+
- #include <linux/kernel.h>
- #include <linux/module.h>
- #include <linux/init.h>
- #include <linux/smp.h>
- #include <linux/sched.h>
-@@ -56,17 +60,22 @@
- SYSTEM_IO_CAPABLE,
- };
-
- #define INTEL_MSR_RANGE (0xffff)
- #define CPUID_6_ECX_APERFMPERF_CAPABILITY (0x1)
-+#define INTEL_MSR_VID_MASK (0x00ff)
-+#define INTEL_MSR_FID_MASK (0xff00)
-+#define INTEL_MSR_FID_SHIFT (0x8)
-+#define PHC_VERSION_STRING "0.3.2:1"
-
- struct acpi_cpufreq_data {
- struct acpi_processor_performance *acpi_data;
- struct cpufreq_frequency_table *freq_table;
- unsigned int max_freq;
- unsigned int resume;
- unsigned int cpu_feature;
-+ acpi_integer *original_controls;
- };
-
- static DEFINE_PER_CPU(struct acpi_cpufreq_data *, drv_data);
-
- /* acpi_perf_data is a pointer to percpu data. */
-@@ -102,17 +111,18 @@
- }
-
- static unsigned extract_msr(u32 msr, struct acpi_cpufreq_data *data)
- {
- int i;
-+ u32 fid;
- struct acpi_processor_performance *perf;
-
-- msr &= INTEL_MSR_RANGE;
-+ fid = msr & INTEL_MSR_FID_MASK;
- perf = data->acpi_data;
-
- for (i=0; data->freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
-- if (msr == perf->states[data->freq_table[i].index].status)
-+ if (fid == (perf->states[data->freq_table[i].index].status & INTEL_MSR_FID_MASK))
- return data->freq_table[i].frequency;
- }
- return data->freq_table[0].frequency;
- }
-
-@@ -740,10 +750,12 @@
- if (data) {
- cpufreq_frequency_table_put_attr(policy->cpu);
- per_cpu(drv_data, policy->cpu) = NULL;
- acpi_processor_unregister_performance(data->acpi_data,
- policy->cpu);
-+ if (data->original_controls)
-+ kfree(data->original_controls);
- kfree(data);
- }
-
- return 0;
- }
-@@ -757,12 +769,477 @@
- data->resume = 1;
-
- return 0;
- }
-
-+
-+
-+
-+/* sysfs interface to change operating points voltages */
-+
-+static unsigned int extract_fid_from_control(unsigned int control)
-+{
-+ return ((control & INTEL_MSR_FID_MASK) >> INTEL_MSR_FID_SHIFT);
-+}
-+
-+static unsigned int extract_vid_from_control(unsigned int control)
-+{
-+ return (control & INTEL_MSR_VID_MASK);
-+}
-+
-+
-+static bool check_cpu_control_capability(struct acpi_cpufreq_data *data) {
-+ /* check if the cpu we are running on is capable of setting new control data
-+ *
-+ */
-+ if (unlikely(data == NULL ||
-+ data->acpi_data == NULL ||
-+ data->freq_table == NULL ||
-+ data->cpu_feature != SYSTEM_INTEL_MSR_CAPABLE)) {
-+ return false;
-+ } else {
-+ return true;
-+ };
-+}
-+
-+
-+static ssize_t check_origial_table (struct acpi_cpufreq_data *data)
-+{
-+
-+ struct acpi_processor_performance *acpi_data;
-+ struct cpufreq_frequency_table *freq_table;
-+ unsigned int state_index;
-+
-+ acpi_data = data->acpi_data;
-+ freq_table = data->freq_table;
-+
-+ if (data->original_controls == NULL) {
-+ // Backup original control values
-+ data->original_controls = kcalloc(acpi_data->state_count,
-+ sizeof(acpi_integer), GFP_KERNEL);
-+ if (data->original_controls == NULL) {
-+ printk("failed to allocate memory for original control values\n");
-+ return -ENOMEM;
-+ }
-+ for (state_index = 0; state_index < acpi_data->state_count; state_index++) {
-+ data->original_controls[state_index] = acpi_data->states[state_index].control;
-+ }
-+ }
-+ return 0;
-+}
-+
-+static ssize_t show_freq_attr_vids(struct cpufreq_policy *policy, char *buf)
-+ /* display phc's voltage id's
-+ *
-+ */
-+{
-+ struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu);
-+ struct acpi_processor_performance *acpi_data;
-+ struct cpufreq_frequency_table *freq_table;
-+ unsigned int i;
-+ unsigned int vid;
-+ ssize_t count = 0;
-+
-+ if (!check_cpu_control_capability(data)) return -ENODEV; //check if CPU is capable of changing controls
-+
-+ acpi_data = data->acpi_data;
-+ freq_table = data->freq_table;
-+
-+ for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
-+ vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
-+ count += sprintf(&buf[count], "%u ", vid);
-+ }
-+ count += sprintf(&buf[count], "\n");
-+
-+ return count;
-+}
-+
-+static ssize_t show_freq_attr_default_vids(struct cpufreq_policy *policy, char *buf)
-+ /* display acpi's default voltage id's
-+ *
-+ */
-+{
-+ struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu);
-+ struct cpufreq_frequency_table *freq_table;
-+ unsigned int i;
-+ unsigned int vid;
-+ ssize_t count = 0;
-+ ssize_t retval;
-+
-+ if (!check_cpu_control_capability(data)) return -ENODEV; //check if CPU is capable of changing controls
-+
-+ retval = check_origial_table(data);
-+ if (0 != retval)
-+ return retval;
-+
-+ freq_table = data->freq_table;
-+
-+ for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
-+ vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
-+ count += sprintf(&buf[count], "%u ", vid);
-+ }
-+ count += sprintf(&buf[count], "\n");
-+
-+ return count;
-+}
-+
-+static ssize_t show_freq_attr_fids(struct cpufreq_policy *policy, char *buf)
-+ /* display phc's frequeny id's
-+ *
-+ */
-+{
-+ struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu);
-+ struct acpi_processor_performance *acpi_data;
-+ struct cpufreq_frequency_table *freq_table;
-+ unsigned int i;
-+ unsigned int fid;
-+ ssize_t count = 0;
-+
-+ if (!check_cpu_control_capability(data)) return -ENODEV; //check if CPU is capable of changing controls
-+
-+ acpi_data = data->acpi_data;
-+ freq_table = data->freq_table;
-+
-+ for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
-+ fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
-+ count += sprintf(&buf[count], "%u ", fid);
-+ }
-+ count += sprintf(&buf[count], "\n");
-+
-+ return count;
-+}
-+
-+static ssize_t show_freq_attr_controls(struct cpufreq_policy *policy, char *buf)
-+ /* display phc's controls for the cpu (frequency id's and related voltage id's)
-+ *
-+ */
-+{
-+ struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu);
-+ struct acpi_processor_performance *acpi_data;
-+ struct cpufreq_frequency_table *freq_table;
-+ unsigned int i;
-+ unsigned int fid;
-+ unsigned int vid;
-+ ssize_t count = 0;
-+
-+ if (!check_cpu_control_capability(data)) return -ENODEV; //check if CPU is capable of changing controls
-+
-+ acpi_data = data->acpi_data;
-+ freq_table = data->freq_table;
-+
-+ for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
-+ fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
-+ vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
-+ count += sprintf(&buf[count], "%u:%u ", fid, vid);
-+ }
-+ count += sprintf(&buf[count], "\n");
-+
-+ return count;
-+}
-+
-+static ssize_t show_freq_attr_default_controls(struct cpufreq_policy *policy, char *buf)
-+ /* display acpi's default controls for the cpu (frequency id's and related voltage id's)
-+ *
-+ */
-+{
-+ struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu);
-+ struct cpufreq_frequency_table *freq_table;
-+ unsigned int i;
-+ unsigned int fid;
-+ unsigned int vid;
-+ ssize_t count = 0;
-+ ssize_t retval;
-+
-+ if (!check_cpu_control_capability(data)) return -ENODEV; //check if CPU is capable of changing controls
-+
-+ retval = check_origial_table(data);
-+ if (0 != retval)
-+ return retval;
-+
-+ freq_table = data->freq_table;
-+
-+ for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
-+ fid = extract_fid_from_control(data->original_controls[freq_table[i].index]);
-+ vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
-+ count += sprintf(&buf[count], "%u:%u ", fid, vid);
-+ }
-+ count += sprintf(&buf[count], "\n");
-+
-+ return count;
-+}
-+
-+
-+static ssize_t store_freq_attr_vids(struct cpufreq_policy *policy, const char *buf, size_t count)
-+ /* store the voltage id's for the related frequency
-+ * We are going to do some sanity checks here to prevent users
-+ * from setting higher voltages than the default one.
-+ */
-+{
-+ struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu);
-+ struct acpi_processor_performance *acpi_data;
-+ struct cpufreq_frequency_table *freq_table;
-+ unsigned int freq_index;
-+ unsigned int state_index;
-+ unsigned int new_vid;
-+ unsigned int original_vid;
-+ unsigned int new_control;
-+ unsigned int original_control;
-+ const char *curr_buf = buf;
-+ char *next_buf;
-+ ssize_t retval;
-+
-+ if (!check_cpu_control_capability(data)) return -ENODEV; //check if CPU is capable of changing controls
-+
-+ retval = check_origial_table(data);
-+ if (0 != retval)
-+ return retval;
-+
-+ acpi_data = data->acpi_data;
-+ freq_table = data->freq_table;
-+
-+ /* for each value taken from the sysfs interfalce (phc_vids) get entrys and convert them to unsigned long integers*/
-+ for (freq_index = 0; freq_table[freq_index].frequency != CPUFREQ_TABLE_END; freq_index++) {
-+ new_vid = simple_strtoul(curr_buf, &next_buf, 10);
-+ if (next_buf == curr_buf) {
-+ if ((curr_buf - buf == count - 1) && (*curr_buf == '\n')) { //end of line?
-+ curr_buf++;
-+ break;
-+ }
-+ //if we didn't got end of line but there is nothing more to read something went wrong...
-+ printk("failed to parse vid value at %i (%s)\n", freq_index, curr_buf);
-+ return -EINVAL;
-+ }
-+
-+ state_index = freq_table[freq_index].index;
-+ original_control = data->original_controls[state_index];
-+ original_vid = original_control & INTEL_MSR_VID_MASK;
-+
-+ /* before we store the values we do some checks to prevent
-+ * users to set up values higher than the default one
-+ */
-+ if (new_vid <= original_vid) {
-+ new_control = (original_control & ~INTEL_MSR_VID_MASK) | new_vid;
-+ dprintk("setting control at %i to %x (default is %x)\n",
-+ freq_index, new_control, original_control);
-+ acpi_data->states[state_index].control = new_control;
-+
-+ } else {
-+ printk("skipping vid at %i, %u is greater than default %u\n",
-+ freq_index, new_vid, original_vid);
-+ }
-+
-+ curr_buf = next_buf;
-+ /* jump over value seperators (space or comma).
-+ * There could be more than one space or comma character
-+ * to separate two values so we better do it using a loop.
-+ */
-+ while ((curr_buf - buf < count) && ((*curr_buf == ' ') || (*curr_buf == ','))) {
-+ curr_buf++;
-+ }
-+ }
-+
-+ /* set new voltage for current frequency */
-+ data->resume = 1;
-+ acpi_cpufreq_target(policy, get_cur_freq_on_cpu(policy->cpu), CPUFREQ_RELATION_L);
-+
-+ return curr_buf - buf;
-+}
-+
-+static ssize_t store_freq_attr_controls(struct cpufreq_policy *policy, const char *buf, size_t count)
-+ /* store the controls (frequency id's and related voltage id's)
-+ * We are going to do some sanity checks here to prevent users
-+ * from setting higher voltages than the default one.
-+ */
-+{
-+ struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu);
-+ struct acpi_processor_performance *acpi_data;
-+ struct cpufreq_frequency_table *freq_table;
-+ const char *curr_buf;
-+ unsigned int op_count;
-+ unsigned int state_index;
-+ int isok;
-+ char *next_buf;
-+ ssize_t retval;
-+ unsigned int new_vid;
-+ unsigned int original_vid;
-+ unsigned int new_fid;
-+ unsigned int old_fid;
-+ unsigned int original_control;
-+ unsigned int old_control;
-+ unsigned int new_control;
-+ int found;
-+
-+ if (!check_cpu_control_capability(data)) return -ENODEV;
-+
-+ retval = check_origial_table(data);
-+ if (0 != retval)
-+ return retval;
-+
-+ acpi_data = data->acpi_data;
-+ freq_table = data->freq_table;
-+
-+ op_count = 0;
-+ curr_buf = buf;
-+ next_buf = NULL;
-+ isok = 1;
-+
-+ while ( (isok) && (curr_buf != NULL) )
-+ {
-+ op_count++;
-+ // Parse fid
-+ new_fid = simple_strtoul(curr_buf, &next_buf, 10);
-+ if ((next_buf != curr_buf) && (next_buf != NULL))
-+ {
-+ // Parse separator between frequency and voltage
-+ curr_buf = next_buf;
-+ next_buf = NULL;
-+ if (*curr_buf==':')
-+ {
-+ curr_buf++;
-+ // Parse vid
-+ new_vid = simple_strtoul(curr_buf, &next_buf, 10);
-+ if ((next_buf != curr_buf) && (next_buf != NULL))
-+ {
-+ found = 0;
-+ for (state_index = 0; state_index < acpi_data->state_count; state_index++) {
-+ old_control = acpi_data->states[state_index].control;
-+ old_fid = extract_fid_from_control(old_control);
-+ if (new_fid == old_fid)
-+ {
-+ found = 1;
-+ original_control = data->original_controls[state_index];
-+ original_vid = extract_vid_from_control(original_control);
-+ if (new_vid <= original_vid)
-+ {
-+ new_control = (original_control & ~INTEL_MSR_VID_MASK) | new_vid;
-+ dprintk("setting control at %i to %x (default is %x)\n",
-+ state_index, new_control, original_control);
-+ acpi_data->states[state_index].control = new_control;
-+
-+ } else {
-+ printk("skipping vid at %i, %u is greater than default %u\n",
-+ state_index, new_vid, original_vid);
-+ }
-+ }
-+ }
-+
-+ if (found == 0)
-+ {
-+ printk("operating point # %u not found (FID = %u)\n", op_count, new_fid);
-+ isok = 0;
-+ }
-+
-+ // Parse seprator before next operating point, if any
-+ curr_buf = next_buf;
-+ next_buf = NULL;
-+ if ((*curr_buf == ',') || (*curr_buf == ' '))
-+ curr_buf++;
-+ else
-+ curr_buf = NULL;
-+ }
-+ else
-+ {
-+ printk("failed to parse VID of operating point # %u (%s)\n", op_count, curr_buf);
-+ isok = 0;
-+ }
-+ }
-+ else
-+ {
-+ printk("failed to parse operating point # %u (%s)\n", op_count, curr_buf);
-+ isok = 0;
-+ }
-+ }
-+ else
-+ {
-+ printk("failed to parse FID of operating point # %u (%s)\n", op_count, curr_buf);
-+ isok = 0;
-+ }
-+ }
-+
-+ if (isok)
-+ {
-+ retval = count;
-+ /* set new voltage at current frequency */
-+ data->resume = 1;
-+ acpi_cpufreq_target(policy, get_cur_freq_on_cpu(policy->cpu), CPUFREQ_RELATION_L);
-+ }
-+ else
-+ {
-+ retval = -EINVAL;
-+ }
-+
-+ return retval;
-+}
-+
-+static ssize_t show_freq_attr_phc_version(struct cpufreq_policy *policy, char *buf)
-+ /* print out the phc version string set at the beginning of that file
-+ */
-+{
-+ ssize_t count = 0;
-+ count += sprintf(&buf[count], "%s\n", PHC_VERSION_STRING);
-+ return count;
-+}
-+
-+
-+
-+static struct freq_attr cpufreq_freq_attr_phc_version =
-+{
-+ /*display phc's version string*/
-+ .attr = { .name = "phc_version", .mode = 0444, .owner = THIS_MODULE },
-+ .show = show_freq_attr_phc_version,
-+ .store = NULL,
-+};
-+
-+static struct freq_attr cpufreq_freq_attr_vids =
-+{
-+ /*display phc's voltage id's for the cpu*/
-+ .attr = { .name = "phc_vids", .mode = 0644, .owner = THIS_MODULE },
-+ .show = show_freq_attr_vids,
-+ .store = store_freq_attr_vids,
-+};
-+
-+static struct freq_attr cpufreq_freq_attr_default_vids =
-+{
-+ /*display acpi's default frequency id's for the cpu*/
-+ .attr = { .name = "phc_default_vids", .mode = 0444, .owner = THIS_MODULE },
-+ .show = show_freq_attr_default_vids,
-+ .store = NULL,
-+};
-+
-+static struct freq_attr cpufreq_freq_attr_fids =
-+{
-+ /*display phc's default frequency id's for the cpu*/
-+ .attr = { .name = "phc_fids", .mode = 0444, .owner = THIS_MODULE },
-+ .show = show_freq_attr_fids,
-+ .store = NULL,
-+};
-+
-+static struct freq_attr cpufreq_freq_attr_controls =
-+{
-+ /*display phc's current voltage/frequency controls for the cpu*/
-+ .attr = { .name = "phc_controls", .mode = 0644, .owner = THIS_MODULE },
-+ .show = show_freq_attr_controls,
-+ .store = store_freq_attr_controls,
-+};
-+
-+static struct freq_attr cpufreq_freq_attr_default_controls =
-+{
-+ /*display acpi's default voltage/frequency controls for the cpu*/
-+ .attr = { .name = "phc_default_controls", .mode = 0444, .owner = THIS_MODULE },
-+ .show = show_freq_attr_default_controls,
-+ .store = NULL,
-+};
-+
-+
- static struct freq_attr *acpi_cpufreq_attr[] = {
-- &cpufreq_freq_attr_scaling_available_freqs,
-+ &cpufreq_freq_attr_phc_version,
-+ &cpufreq_freq_attr_scaling_available_freqs,
-+ &cpufreq_freq_attr_vids,
-+ &cpufreq_freq_attr_default_vids,
-+ &cpufreq_freq_attr_fids,
-+ &cpufreq_freq_attr_controls,
-+ &cpufreq_freq_attr_default_controls,
- NULL,
- };
-
- static struct cpufreq_driver acpi_cpufreq_driver = {
- .verify = acpi_cpufreq_verify,
diff --git a/sys-kernel/thinkpad-sources/files/2.6.27/power-off-unused-ports.patch b/sys-kernel/thinkpad-sources/files/2.6.27/power-off-unused-ports.patch
deleted file mode 100644
index d7225a2..0000000
--- a/sys-kernel/thinkpad-sources/files/2.6.27/power-off-unused-ports.patch
+++ /dev/null
@@ -1,133 +0,0 @@
- drivers/ata/ahci.c | 21 +++++++++++++++++++++
- drivers/ata/libata-core.c | 24 ++++++++++++++++++++++++
- include/linux/libata.h | 1 +
- 3 files changed, 46 insertions(+)
-
-Index: linux-ahci-phy/drivers/ata/ahci.c
-===================================================================
---- linux-ahci-phy.orig/drivers/ata/ahci.c 2008-05-08 14:29:02.000000000 -0700
-+++ linux-ahci-phy/drivers/ata/ahci.c 2008-05-08 14:31:05.000000000 -0700
-@@ -53,14 +53,18 @@ static int ahci_skip_host_reset;
- module_param_named(skip_host_reset, ahci_skip_host_reset, int, 0444);
- MODULE_PARM_DESC(skip_host_reset, "skip global host reset (0=don't skip, 1=skip)");
-
-+static int ahci_power_save = 1;
-+module_param_named(power_save, ahci_power_save, int, 0444);
-+MODULE_PARM_DESC(power_save, "Power off unused ports (0=don't power off, 1=power off)");
- static int ahci_enable_alpm(struct ata_port *ap,
- enum link_pm policy);
- static void ahci_disable_alpm(struct ata_port *ap);
- static ssize_t ahci_led_show(struct ata_port *ap, char *buf);
- static ssize_t ahci_led_store(struct ata_port *ap, const char *buf,
- size_t size);
- static ssize_t ahci_transmit_led_message(struct ata_port *ap, u32 state,
- ssize_t size);
-+static int ahci_is_hotplug_capable(struct ata_port *ap);
- #define MAX_SLOTS 8
-
- enum {
-@@ -166,6 +170,8 @@ enum {
- PORT_CMD_ASP = (1 << 27), /* Aggressive Slumber/Partial */
- PORT_CMD_ALPE = (1 << 26), /* Aggressive Link PM enable */
- PORT_CMD_ATAPI = (1 << 24), /* Device is ATAPI */
-+ PORT_CMD_ESP = (1 << 21), /* External SATA Port */
-+ PORT_CMD_HPCP = (1 << 18), /* port is hot plug capable */
- PORT_CMD_PMP = (1 << 17), /* PMP attached */
- PORT_CMD_LIST_ON = (1 << 15), /* cmd list DMA engine running */
- PORT_CMD_FIS_ON = (1 << 14), /* FIS DMA engine running */
-@@ -1900,6 +1906,18 @@ static int ahci_pci_device_resume(struct
- }
- #endif
-
-+static int ahci_is_hotplug_capable(struct ata_port *ap)
-+{
-+ void __iomem *port_mmio = ahci_port_base(ap);
-+ u8 cmd;
-+
-+ if (!ahci_power_save)
-+ return 1;
-+
-+ cmd = readl(port_mmio + PORT_CMD);
-+ return ((cmd & PORT_CMD_HPCP) || (cmd & PORT_CMD_ESP));
-+}
-+
- static int ahci_port_start(struct ata_port *ap)
- {
- struct device *dev = ap->host->dev;
-@@ -1951,6 +1969,9 @@ static int ahci_port_start(struct ata_po
-
- ap->private_data = pp;
-
-+ /* set some flags based on port capabilities */
-+ if (!ahci_is_hotplug_capable(ap))
-+ ap->flags |= ATA_FLAG_NO_HOTPLUG;
- /* engage engines, captain */
- return ahci_port_resume(ap);
- }
-Index: linux-ahci-phy/drivers/ata/libata-core.c
-===================================================================
---- linux-ahci-phy.orig/drivers/ata/libata-core.c 2008-05-08 14:28:57.000000000 -0700
-+++ linux-ahci-phy/drivers/ata/libata-core.c 2008-05-08 14:29:50.000000000 -0700
-@@ -162,6 +162,19 @@ MODULE_DESCRIPTION("Library module for A
- MODULE_LICENSE("GPL");
- MODULE_VERSION(DRV_VERSION);
-
-+static void ata_phy_offline(struct ata_link *link)
-+{
-+ u32 scontrol;
-+ int rc;
-+
-+ /* set DET to 4 */
-+ rc = sata_scr_read(link, SCR_CONTROL, &scontrol);
-+ if (rc)
-+ return;
-+ scontrol &= ~0xf;
-+ scontrol |= (1 << 2);
-+ sata_scr_write(link, SCR_CONTROL, scontrol);
-+}
-
- /**
- * ata_force_cbl - force cable type according to libata.force
-@@ -2671,6 +2684,7 @@ void ata_port_disable(struct ata_port *a
- ap->link.device[0].class = ATA_DEV_NONE;
- ap->link.device[1].class = ATA_DEV_NONE;
- ap->flags |= ATA_FLAG_DISABLED;
-+ ata_phy_offline(&ap->link);
- }
-
- /**
-@@ -5609,6 +5623,8 @@ int ata_host_register(struct ata_host *h
- if (ap->ops->error_handler) {
- struct ata_eh_info *ehi = &ap->link.eh_info;
- unsigned long flags;
-+ int device_attached = 0;
-+ struct ata_device *dev;
-
- ata_port_probe(ap);
-
-@@ -5627,6 +5643,14 @@ int ata_host_register(struct ata_host *h
-
- /* wait for EH to finish */
- ata_port_wait_eh(ap);
-+ ata_link_for_each_dev(dev, &ap->link)
-+ if (ata_dev_enabled(dev))
-+ device_attached++;
-+ if (!device_attached &&
-+ (ap->flags & ATA_FLAG_NO_HOTPLUG)) {
-+ /* no device present, disable port */
-+ ata_port_disable(ap);
-+ }
- } else {
- DPRINTK("ata%u: bus probe begin\n", ap->print_id);
- rc = ata_bus_probe(ap);
-Index: linux-ahci-phy/include/linux/libata.h
-===================================================================
---- linux-ahci-phy.orig/include/linux/libata.h 2008-05-08 14:28:57.000000000 -0700
-+++ linux-ahci-phy/include/linux/libata.h 2008-05-08 14:29:50.000000000 -0700
-@@ -207,4 +207,6 @@ ATA_FLAG_DISABLED = (1 << 23), /* port is disabled, ignore it */
-
- /* bits 24:31 of ap->flags are reserved for LLD specific flags */
-+
-+ ATA_FLAG_NO_HOTPLUG = (1 << 32), /* port doesn't support HP */
-
- /* struct ata_port pflags */
diff --git a/sys-kernel/thinkpad-sources/files/2.6.28/02-ipw2200-inject-for-2.6.27.patch b/sys-kernel/thinkpad-sources/files/2.6.28/02-ipw2200-inject-for-2.6.27.patch
deleted file mode 100644
index ec44f16..0000000
--- a/sys-kernel/thinkpad-sources/files/2.6.28/02-ipw2200-inject-for-2.6.27.patch
+++ /dev/null
@@ -1,86 +0,0 @@
---- a/drivers/net/wireless/ipw2200.c 2007-10-07 12:41:29.000000000 +0200
-+++ b/drivers/net/wireless/ipw2200.c 2007-10-07 12:50:43.000000000 +0200
-@@ -31,7 +31,7 @@
- ******************************************************************************/
-
- #include "ipw2200.h"
--
-+#include <linux/version.h>
-
- #ifndef KBUILD_EXTMOD
- #define VK "k"
-@@ -1862,6 +1862,66 @@
- static DEVICE_ATTR(net_stats, S_IWUSR | S_IRUGO,
- show_net_stats, store_net_stats);
-
-+static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, int pri);
-+
-+/* SYSFS INJECT */
-+static ssize_t store_inject(struct device *d,
-+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)
-+ struct device_attribute *attr,
-+#endif
-+ const char *buf, size_t count)
-+{
-+ struct ipw_priv *priv = (struct ipw_priv *)d->driver_data;
-+ struct ieee80211_device *ieee = priv->ieee;
-+ struct ieee80211_txb * txb;
-+ struct sk_buff *skb_frag;
-+ unsigned char * newbuf;
-+ unsigned long flags;
-+
-+ // should test (ieee->is_queue_full)
-+
-+ // Fw only accepts data, so avoid accidental fw errors.
-+ if ( (buf[0]&0x0c) != '\x08') {
-+ //printk("ipw2200: inject: discarding non-data frame (type=%02X)\n",(int)(unsigned char)buf[0]);
-+ return count;
-+ }
-+
-+ if (count>1500) {
-+ count=1500;
-+ printk("ipw2200: inject: cutting down frame to 1500 bytes\n");
-+ }
-+
-+ spin_lock_irqsave(&priv->lock, flags);
-+
-+ // Create a txb with one skb
-+ txb = kmalloc(sizeof(struct ieee80211_txb) + sizeof(u8 *), GFP_ATOMIC);
-+ if (!txb)
-+ goto nosepuede;
-+ txb->nr_frags=1;
-+ txb->frag_size = ieee->tx_headroom;
-+ txb->fragments[0]=__dev_alloc_skb(count + ieee->tx_headroom, GFP_ATOMIC);
-+ if (!txb->fragments[0]) {
-+ kfree(txb);
-+ goto nosepuede;
-+ }
-+ skb_reserve(txb->fragments[0], ieee->tx_headroom);
-+ txb->encrypted=0;
-+ txb->payload_size=count;
-+ skb_frag = txb->fragments[0];
-+ newbuf=skb_put(skb_frag, count);
-+
-+ // copy data into txb->skb and send it
-+ memcpy(newbuf, buf, count);
-+
-+ ipw_tx_skb(priv, txb, 0);
-+
-+nosepuede:
-+ spin_unlock_irqrestore(&priv->lock, flags);
-+ return count;
-+}
-+
-+static DEVICE_ATTR(inject, S_IWUSR, NULL, store_inject);
-+
- static ssize_t show_channels(struct device *d,
- struct device_attribute *attr,
- char *buf)
-@@ -11478,6 +11538,7 @@
- #ifdef CONFIG_IPW2200_PROMISCUOUS
- &dev_attr_rtap_iface.attr,
- &dev_attr_rtap_filter.attr,
-+ &dev_attr_inject.attr,
- #endif
- NULL
- };
diff --git a/sys-kernel/thinkpad-sources/files/2.6.28/power-off-unused-ports.patch b/sys-kernel/thinkpad-sources/files/2.6.28/power-off-unused-ports.patch
deleted file mode 100644
index d7225a2..0000000
--- a/sys-kernel/thinkpad-sources/files/2.6.28/power-off-unused-ports.patch
+++ /dev/null
@@ -1,133 +0,0 @@
- drivers/ata/ahci.c | 21 +++++++++++++++++++++
- drivers/ata/libata-core.c | 24 ++++++++++++++++++++++++
- include/linux/libata.h | 1 +
- 3 files changed, 46 insertions(+)
-
-Index: linux-ahci-phy/drivers/ata/ahci.c
-===================================================================
---- linux-ahci-phy.orig/drivers/ata/ahci.c 2008-05-08 14:29:02.000000000 -0700
-+++ linux-ahci-phy/drivers/ata/ahci.c 2008-05-08 14:31:05.000000000 -0700
-@@ -53,14 +53,18 @@ static int ahci_skip_host_reset;
- module_param_named(skip_host_reset, ahci_skip_host_reset, int, 0444);
- MODULE_PARM_DESC(skip_host_reset, "skip global host reset (0=don't skip, 1=skip)");
-
-+static int ahci_power_save = 1;
-+module_param_named(power_save, ahci_power_save, int, 0444);
-+MODULE_PARM_DESC(power_save, "Power off unused ports (0=don't power off, 1=power off)");
- static int ahci_enable_alpm(struct ata_port *ap,
- enum link_pm policy);
- static void ahci_disable_alpm(struct ata_port *ap);
- static ssize_t ahci_led_show(struct ata_port *ap, char *buf);
- static ssize_t ahci_led_store(struct ata_port *ap, const char *buf,
- size_t size);
- static ssize_t ahci_transmit_led_message(struct ata_port *ap, u32 state,
- ssize_t size);
-+static int ahci_is_hotplug_capable(struct ata_port *ap);
- #define MAX_SLOTS 8
-
- enum {
-@@ -166,6 +170,8 @@ enum {
- PORT_CMD_ASP = (1 << 27), /* Aggressive Slumber/Partial */
- PORT_CMD_ALPE = (1 << 26), /* Aggressive Link PM enable */
- PORT_CMD_ATAPI = (1 << 24), /* Device is ATAPI */
-+ PORT_CMD_ESP = (1 << 21), /* External SATA Port */
-+ PORT_CMD_HPCP = (1 << 18), /* port is hot plug capable */
- PORT_CMD_PMP = (1 << 17), /* PMP attached */
- PORT_CMD_LIST_ON = (1 << 15), /* cmd list DMA engine running */
- PORT_CMD_FIS_ON = (1 << 14), /* FIS DMA engine running */
-@@ -1900,6 +1906,18 @@ static int ahci_pci_device_resume(struct
- }
- #endif
-
-+static int ahci_is_hotplug_capable(struct ata_port *ap)
-+{
-+ void __iomem *port_mmio = ahci_port_base(ap);
-+ u8 cmd;
-+
-+ if (!ahci_power_save)
-+ return 1;
-+
-+ cmd = readl(port_mmio + PORT_CMD);
-+ return ((cmd & PORT_CMD_HPCP) || (cmd & PORT_CMD_ESP));
-+}
-+
- static int ahci_port_start(struct ata_port *ap)
- {
- struct device *dev = ap->host->dev;
-@@ -1951,6 +1969,9 @@ static int ahci_port_start(struct ata_po
-
- ap->private_data = pp;
-
-+ /* set some flags based on port capabilities */
-+ if (!ahci_is_hotplug_capable(ap))
-+ ap->flags |= ATA_FLAG_NO_HOTPLUG;
- /* engage engines, captain */
- return ahci_port_resume(ap);
- }
-Index: linux-ahci-phy/drivers/ata/libata-core.c
-===================================================================
---- linux-ahci-phy.orig/drivers/ata/libata-core.c 2008-05-08 14:28:57.000000000 -0700
-+++ linux-ahci-phy/drivers/ata/libata-core.c 2008-05-08 14:29:50.000000000 -0700
-@@ -162,6 +162,19 @@ MODULE_DESCRIPTION("Library module for A
- MODULE_LICENSE("GPL");
- MODULE_VERSION(DRV_VERSION);
-
-+static void ata_phy_offline(struct ata_link *link)
-+{
-+ u32 scontrol;
-+ int rc;
-+
-+ /* set DET to 4 */
-+ rc = sata_scr_read(link, SCR_CONTROL, &scontrol);
-+ if (rc)
-+ return;
-+ scontrol &= ~0xf;
-+ scontrol |= (1 << 2);
-+ sata_scr_write(link, SCR_CONTROL, scontrol);
-+}
-
- /**
- * ata_force_cbl - force cable type according to libata.force
-@@ -2671,6 +2684,7 @@ void ata_port_disable(struct ata_port *a
- ap->link.device[0].class = ATA_DEV_NONE;
- ap->link.device[1].class = ATA_DEV_NONE;
- ap->flags |= ATA_FLAG_DISABLED;
-+ ata_phy_offline(&ap->link);
- }
-
- /**
-@@ -5609,6 +5623,8 @@ int ata_host_register(struct ata_host *h
- if (ap->ops->error_handler) {
- struct ata_eh_info *ehi = &ap->link.eh_info;
- unsigned long flags;
-+ int device_attached = 0;
-+ struct ata_device *dev;
-
- ata_port_probe(ap);
-
-@@ -5627,6 +5643,14 @@ int ata_host_register(struct ata_host *h
-
- /* wait for EH to finish */
- ata_port_wait_eh(ap);
-+ ata_link_for_each_dev(dev, &ap->link)
-+ if (ata_dev_enabled(dev))
-+ device_attached++;
-+ if (!device_attached &&
-+ (ap->flags & ATA_FLAG_NO_HOTPLUG)) {
-+ /* no device present, disable port */
-+ ata_port_disable(ap);
-+ }
- } else {
- DPRINTK("ata%u: bus probe begin\n", ap->print_id);
- rc = ata_bus_probe(ap);
-Index: linux-ahci-phy/include/linux/libata.h
-===================================================================
---- linux-ahci-phy.orig/include/linux/libata.h 2008-05-08 14:28:57.000000000 -0700
-+++ linux-ahci-phy/include/linux/libata.h 2008-05-08 14:29:50.000000000 -0700
-@@ -207,4 +207,6 @@ ATA_FLAG_DISABLED = (1 << 23), /* port is disabled, ignore it */
-
- /* bits 24:31 of ap->flags are reserved for LLD specific flags */
-+
-+ ATA_FLAG_NO_HOTPLUG = (1 << 32), /* port doesn't support HP */
-
- /* struct ata_port pflags */
diff --git a/sys-kernel/thinkpad-sources/files/2.6.27/02-ipw2200-inject-for-2.6.27.patch b/sys-kernel/thinkpad-sources/files/2.6.31/02-ipw2200-inject-for-2.6.27.patch
index ec44f16..ec44f16 100644
--- a/sys-kernel/thinkpad-sources/files/2.6.27/02-ipw2200-inject-for-2.6.27.patch
+++ b/sys-kernel/thinkpad-sources/files/2.6.31/02-ipw2200-inject-for-2.6.27.patch
diff --git a/sys-kernel/thinkpad-sources/files/2.6.28/colored-printk-2.6.26.patch b/sys-kernel/thinkpad-sources/files/2.6.31/colored-printk-2.6.30.patch
index dc97636..d48f769 100644
--- a/sys-kernel/thinkpad-sources/files/2.6.28/colored-printk-2.6.26.patch
+++ b/sys-kernel/thinkpad-sources/files/2.6.31/colored-printk-2.6.30.patch
@@ -1,8 +1,7 @@
-diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
-index 643fd86..837f3c2 100644
---- a/arch/x86/kernel/early_printk.c
-+++ b/arch/x86/kernel/early_printk.c
-@@ -15,7 +15,8 @@
+diff -pruN -X linux/Documentation/dontdiff linux-2.6.29.3/arch/x86/kernel/early_printk.c linux-2.6.29.3-cprintk/arch/x86/kernel/early_printk.c
+--- a/arch/x86/kernel/early_printk.c 2009-03-24 00:12:14.000000000 +0100
++++ b/arch/x86/kernel/early_printk.c 2009-05-09 16:10:36.000000000 +0200
+@@ -23,7 +23,8 @@
static int max_ypos = 25, max_xpos = 80;
static int current_ypos = 25, current_xpos;
@@ -12,7 +11,7 @@ index 643fd86..837f3c2 100644
{
char c;
int i, k, j;
-@@ -84,7 +85,8 @@ static int early_serial_putc(unsigned char ch)
+@@ -93,7 +94,8 @@ static int early_serial_putc(unsigned ch
return timeout ? 0 : -1;
}
@@ -22,32 +21,21 @@ index 643fd86..837f3c2 100644
{
while (*s && n-- > 0) {
if (*s == '\n')
-@@ -180,7 +182,8 @@ static void __init simnow_init(char *str)
- simnow_fd = simnow(XOPEN, (unsigned long)fn, O_WRONLY|O_APPEND|O_CREAT, 0644);
- }
-
--static void simnow_write(struct console *con, const char *s, unsigned n)
-+static void simnow_write(struct console *con, const char *s, unsigned n,
-+ unsigned int loglevel)
- {
- simnow(XWRITE, simnow_fd, (unsigned long)s, n);
- }
-@@ -204,7 +207,7 @@ void early_printk(const char *fmt, ...)
+@@ -887,7 +889,7 @@ asmlinkage void early_printk(const char
va_start(ap, fmt);
- n = vscnprintf(buf, 512, fmt, ap);
+ n = vscnprintf(buf, sizeof(buf), fmt, ap);
- early_console->write(early_console, buf, n);
+ early_console->write(early_console, buf, n, 0);
va_end(ap);
}
-diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
-index 57ba5c2..10556dd 100644
---- a/drivers/char/Kconfig
-+++ b/drivers/char/Kconfig
-@@ -71,6 +71,111 @@ config NR_TTY_DEVICES
+diff -pruN -X linux/Documentation/dontdiff linux-2.6.29.3/drivers/char/Kconfig linux-2.6.29.3-cprintk/drivers/char/Kconfig
+--- a/drivers/char/Kconfig 2009-03-24 00:12:14.000000000 +0100
++++ b/drivers/char/Kconfig 2009-05-09 14:43:48.000000000 +0200
+@@ -66,6 +66,111 @@ config VT_CONSOLE
- If unsure, say 63.
+ If unsure, say Y.
+menuconfig VT_CKO
+ bool "Colored kernel message output"
@@ -157,10 +145,9 @@ index 57ba5c2..10556dd 100644
config HW_CONSOLE
bool
depends on VT && !S390 && !UML
-diff --git a/drivers/char/vt.c b/drivers/char/vt.c
-index 935f1c2..1fee2dc 100644
---- a/drivers/char/vt.c
-+++ b/drivers/char/vt.c
+diff -pruN -X linux/Documentation/dontdiff linux-2.6.29.3/drivers/char/vt.c linux-2.6.29.3-cprintk/drivers/char/vt.c
+--- a/drivers/char/vt.c 2009-05-09 10:46:57.000000000 +0200
++++ b/drivers/char/vt.c 2009-05-09 14:43:48.000000000 +0200
@@ -73,6 +73,7 @@
*/
@@ -169,7 +156,7 @@ index 935f1c2..1fee2dc 100644
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/tty.h>
-@@ -2409,17 +2410,45 @@ struct tty_driver *console_driver;
+@@ -2431,17 +2432,45 @@ struct tty_driver *console_driver;
#ifdef CONFIG_VT_CONSOLE
@@ -217,7 +204,7 @@ index 935f1c2..1fee2dc 100644
const ushort *start;
ushort cnt = 0;
ushort myx;
-@@ -2452,11 +2481,19 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
+@@ -2474,11 +2503,19 @@ static void vt_console_print(struct cons
start = (ushort *)vc->vc_pos;
@@ -237,7 +224,7 @@ index 935f1c2..1fee2dc 100644
if (cnt > 0) {
if (CON_IS_VISIBLE(vc))
vc->vc_sw->con_putcs(vc, start, cnt, vc->vc_y, vc->vc_x);
-@@ -2469,6 +2506,7 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
+@@ -2491,6 +2528,7 @@ static void vt_console_print(struct cons
bs(vc);
start = (ushort *)vc->vc_pos;
myx = vc->vc_x;
@@ -245,7 +232,7 @@ index 935f1c2..1fee2dc 100644
continue;
}
if (c != 13)
-@@ -2476,6 +2514,7 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
+@@ -2498,6 +2536,7 @@ static void vt_console_print(struct cons
cr(vc);
start = (ushort *)vc->vc_pos;
myx = vc->vc_x;
@@ -253,7 +240,7 @@ index 935f1c2..1fee2dc 100644
if (c == 10 || c == 13)
continue;
}
-@@ -2498,6 +2537,7 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
+@@ -2520,6 +2559,7 @@ static void vt_console_print(struct cons
vc->vc_need_wrap = 1;
}
}
@@ -261,11 +248,10 @@ index 935f1c2..1fee2dc 100644
set_cursor(vc);
notify_update(vc);
-diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
-index 665341e..4c27de8 100644
---- a/drivers/net/netconsole.c
-+++ b/drivers/net/netconsole.c
-@@ -694,7 +694,8 @@ static struct notifier_block netconsole_netdev_notifier = {
+diff -pruN -X linux/Documentation/dontdiff linux-2.6.29.3/drivers/net/netconsole.c linux-2.6.29.3-cprintk/drivers/net/netconsole.c
+--- a/drivers/net/netconsole.c 2009-03-24 00:12:14.000000000 +0100
++++ b/drivers/net/netconsole.c 2009-05-09 14:43:48.000000000 +0200
+@@ -691,7 +691,8 @@ static struct notifier_block netconsole_
.notifier_call = netconsole_netdev_event,
};
@@ -275,11 +261,10 @@ index 665341e..4c27de8 100644
{
int frag, left;
unsigned long flags;
-diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
-index 1bc00b7..b4f1b6f 100644
---- a/drivers/serial/8250.c
-+++ b/drivers/serial/8250.c
-@@ -2527,7 +2527,8 @@ static void serial8250_console_putchar(struct uart_port *port, int ch)
+diff -pruN -X linux/Documentation/dontdiff linux-2.6.29.3/drivers/serial/8250.c linux-2.6.29.3-cprintk/drivers/serial/8250.c
+--- a/drivers/serial/8250.c 2009-03-24 00:12:14.000000000 +0100
++++ b/drivers/serial/8250.c 2009-05-09 14:43:48.000000000 +0200
+@@ -2698,7 +2698,8 @@ static void serial8250_console_putchar(s
* The console_lock must be held when we get here.
*/
static void
@@ -289,11 +274,10 @@ index 1bc00b7..b4f1b6f 100644
{
struct uart_8250_port *up = &serial8250_ports[co->index];
unsigned long flags;
-diff --git a/drivers/serial/8250_early.c b/drivers/serial/8250_early.c
-index f279745..2a928bd 100644
---- a/drivers/serial/8250_early.c
-+++ b/drivers/serial/8250_early.c
-@@ -83,7 +83,7 @@ static void __init serial_putc(struct uart_port *port, int c)
+diff -pruN -X linux/Documentation/dontdiff linux-2.6.29.3/drivers/serial/8250_early.c linux-2.6.29.3-cprintk/drivers/serial/8250_early.c
+--- a/drivers/serial/8250_early.c 2009-03-24 00:12:14.000000000 +0100
++++ b/drivers/serial/8250_early.c 2009-05-09 14:43:48.000000000 +0200
+@@ -83,7 +83,7 @@ static void __init serial_putc(struct ua
}
static void __init early_serial8250_write(struct console *console,
@@ -302,11 +286,10 @@ index f279745..2a928bd 100644
{
struct uart_port *port = &early_device.port;
unsigned int ier;
-diff --git a/include/linux/console.h b/include/linux/console.h
-index a4f27fb..46fcfd3 100644
---- a/include/linux/console.h
-+++ b/include/linux/console.h
-@@ -95,7 +95,7 @@ void give_up_console(const struct consw *sw);
+diff -pruN -X linux/Documentation/dontdiff linux-2.6.29.3/include/linux/console.h linux-2.6.29.3-cprintk/include/linux/console.h
+--- a/include/linux/console.h 2009-03-24 00:12:14.000000000 +0100
++++ b/include/linux/console.h 2009-05-09 14:43:48.000000000 +0200
+@@ -95,7 +95,7 @@ void give_up_console(const struct consw
struct console {
char name[16];
@@ -315,11 +298,10 @@ index a4f27fb..46fcfd3 100644
int (*read)(struct console *, char *, unsigned);
struct tty_driver *(*device)(struct console *, int *);
void (*unblank)(void);
-diff --git a/kernel/printk.c b/kernel/printk.c
-index 6e920ce..a1aaa3f 100644
---- a/kernel/printk.c
-+++ b/kernel/printk.c
-@@ -444,7 +444,8 @@ asmlinkage long sys_syslog(int type, char __user *buf, int len)
+diff -pruN -X linux/Documentation/dontdiff linux-2.6.29.3/kernel/printk.c linux-2.6.29.3-cprintk/kernel/printk.c
+--- a/kernel/printk.c 2009-03-24 00:12:14.000000000 +0100
++++ b/kernel/printk.c 2009-05-09 14:43:48.000000000 +0200
+@@ -389,7 +389,8 @@ SYSCALL_DEFINE3(syslog, int, type, char
/*
* Call the console drivers on a range of log_buf
*/
@@ -329,7 +311,7 @@ index 6e920ce..a1aaa3f 100644
{
struct console *con;
-@@ -452,7 +453,7 @@ static void __call_console_drivers(unsigned start, unsigned end)
+@@ -397,7 +398,7 @@ static void __call_console_drivers(unsig
if ((con->flags & CON_ENABLED) && con->write &&
(cpu_online(smp_processor_id()) ||
(con->flags & CON_ANYTIME)))
@@ -338,7 +320,7 @@ index 6e920ce..a1aaa3f 100644
}
}
-@@ -479,10 +480,11 @@ static void _call_console_drivers(unsigned start,
+@@ -424,10 +425,11 @@ static void _call_console_drivers(unsign
if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) {
/* wrapped write */
__call_console_drivers(start & LOG_BUF_MASK,
diff --git a/sys-kernel/thinkpad-sources/files/2.6.31/drm-next.patch b/sys-kernel/thinkpad-sources/files/2.6.31/drm-next.patch
new file mode 100644
index 0000000..5bb0323
--- /dev/null
+++ b/sys-kernel/thinkpad-sources/files/2.6.31/drm-next.patch
@@ -0,0 +1,88389 @@
+diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
+index 39b393d..e4d971c 100644
+--- a/drivers/gpu/drm/Kconfig
++++ b/drivers/gpu/drm/Kconfig
+@@ -18,6 +18,14 @@ menuconfig DRM
+ details. You should also select and configure AGP
+ (/dev/agpgart) support.
+
++config DRM_KMS_HELPER
++ tristate
++ depends on DRM
++ select FB
++ select FRAMEBUFFER_CONSOLE if !EMBEDDED
++ help
++ FB and CRTC helpers for KMS drivers.
++
+ config DRM_TTM
+ tristate
+ depends on DRM
+@@ -36,6 +44,7 @@ config DRM_TDFX
+ config DRM_R128
+ tristate "ATI Rage 128"
+ depends on DRM && PCI
++ select FW_LOADER
+ help
+ Choose this option if you have an ATI Rage 128 graphics card. If M
+ is selected, the module will be called r128. AGP support for
+@@ -47,8 +56,9 @@ config DRM_RADEON
+ select FB_CFB_FILLRECT
+ select FB_CFB_COPYAREA
+ select FB_CFB_IMAGEBLIT
+- select FB
+- select FRAMEBUFFER_CONSOLE if !EMBEDDED
++ select FW_LOADER
++ select DRM_KMS_HELPER
++ select DRM_TTM
+ help
+ Choose this option if you have an ATI Radeon graphics card. There
+ are both PCI and AGP versions. You don't need to choose this to
+@@ -82,11 +92,10 @@ config DRM_I830
+ config DRM_I915
+ tristate "i915 driver"
+ depends on AGP_INTEL
++ select DRM_KMS_HELPER
+ select FB_CFB_FILLRECT
+ select FB_CFB_COPYAREA
+ select FB_CFB_IMAGEBLIT
+- select FB
+- select FRAMEBUFFER_CONSOLE if !EMBEDDED
+ # i915 depends on ACPI_VIDEO when ACPI is enabled
+ # but for select to work, need to select ACPI_VIDEO's dependencies, ick
+ select VIDEO_OUTPUT_CONTROL if ACPI
+@@ -116,6 +125,7 @@ endchoice
+ config DRM_MGA
+ tristate "Matrox g200/g400"
+ depends on DRM
++ select FW_LOADER
+ help
+ Choose this option if you have a Matrox G200, G400 or G450 graphics
+ card. If M is selected, the module will be called mga. AGP
+diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
+index fe23f29..3c8827a 100644
+--- a/drivers/gpu/drm/Makefile
++++ b/drivers/gpu/drm/Makefile
+@@ -10,11 +10,15 @@ drm-y := drm_auth.o drm_bufs.o drm_cache.o \
+ drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
+ drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
+ drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o \
+- drm_crtc.o drm_crtc_helper.o drm_modes.o drm_edid.o \
+- drm_info.o drm_debugfs.o
++ drm_crtc.o drm_modes.o drm_edid.o \
++ drm_info.o drm_debugfs.o drm_encoder_slave.o
+
+ drm-$(CONFIG_COMPAT) += drm_ioc32.o
+
++drm_kms_helper-y := drm_fb_helper.o drm_crtc_helper.o
++
++obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
++
+ obj-$(CONFIG_DRM) += drm.o
+ obj-$(CONFIG_DRM_TTM) += ttm/
+ obj-$(CONFIG_DRM_TDFX) += tdfx/
+diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
+index 6246e3f..3d09e30 100644
+--- a/drivers/gpu/drm/drm_bufs.c
++++ b/drivers/gpu/drm/drm_bufs.c
+@@ -310,10 +310,10 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset,
+ (unsigned long long)map->offset, map->size);
+
+ break;
++ }
+ case _DRM_GEM:
+- DRM_ERROR("tried to rmmap GEM object\n");
++ DRM_ERROR("tried to addmap GEM object\n");
+ break;
+- }
+ case _DRM_SCATTER_GATHER:
+ if (!dev->sg) {
+ kfree(map);
+diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
+index 0e994a0..0e3bd5b 100644
+--- a/drivers/gpu/drm/drm_cache.c
++++ b/drivers/gpu/drm/drm_cache.c
+@@ -45,6 +45,23 @@ drm_clflush_page(struct page *page)
+ clflush(page_virtual + i);
+ kunmap_atomic(page_virtual, KM_USER0);
+ }
++
++static void drm_cache_flush_clflush(struct page *pages[],
++ unsigned long num_pages)
++{
++ unsigned long i;
++
++ mb();
++ for (i = 0; i < num_pages; i++)
++ drm_clflush_page(*pages++);
++ mb();
++}
++
++static void
++drm_clflush_ipi_handler(void *null)
++{
++ wbinvd();
++}
+ #endif
+
+ void
+@@ -53,17 +70,30 @@ drm_clflush_pages(struct page *pages[], unsigned long num_pages)
+
+ #if defined(CONFIG_X86)
+ if (cpu_has_clflush) {
+- unsigned long i;
+-
+- mb();
+- for (i = 0; i < num_pages; ++i)
+- drm_clflush_page(*pages++);
+- mb();
+-
++ drm_cache_flush_clflush(pages, num_pages);
+ return;
+ }
+
+- wbinvd();
++ if (on_each_cpu(drm_clflush_ipi_handler, NULL, 1) != 0)
++ printk(KERN_ERR "Timed out waiting for cache flush.\n");
++
++#elif defined(__powerpc__)
++ unsigned long i;
++ for (i = 0; i < num_pages; i++) {
++ struct page *page = pages[i];
++ void *page_virtual;
++
++ if (unlikely(page == NULL))
++ continue;
++
++ page_virtual = kmap_atomic(page, KM_USER0);
++ flush_dcache_range((unsigned long)page_virtual,
++ (unsigned long)page_virtual + PAGE_SIZE);
++ kunmap_atomic(page_virtual, KM_USER0);
++ }
++#else
++ printk(KERN_ERR "Architecture has no drm_cache.c support\n");
++ WARN_ON_ONCE(1);
+ #endif
+ }
+ EXPORT_SYMBOL(drm_clflush_pages);
+diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
+index 2f631c7..8e7b0eb 100644
+--- a/drivers/gpu/drm/drm_crtc.c
++++ b/drivers/gpu/drm/drm_crtc.c
+@@ -68,10 +68,10 @@ DRM_ENUM_NAME_FN(drm_get_dpms_name, drm_dpms_enum_list)
+ */
+ static struct drm_prop_enum_list drm_scaling_mode_enum_list[] =
+ {
+- { DRM_MODE_SCALE_NON_GPU, "Non-GPU" },
+- { DRM_MODE_SCALE_FULLSCREEN, "Fullscreen" },
+- { DRM_MODE_SCALE_NO_SCALE, "No scale" },
+- { DRM_MODE_SCALE_ASPECT, "Aspect" },
++ { DRM_MODE_SCALE_NONE, "None" },
++ { DRM_MODE_SCALE_FULLSCREEN, "Full" },
++ { DRM_MODE_SCALE_CENTER, "Center" },
++ { DRM_MODE_SCALE_ASPECT, "Full aspect" },
+ };
+
+ static struct drm_prop_enum_list drm_dithering_mode_enum_list[] =
+@@ -108,6 +108,7 @@ static struct drm_prop_enum_list drm_tv_select_enum_list[] =
+ { DRM_MODE_SUBCONNECTOR_Composite, "Composite" }, /* TV-out */
+ { DRM_MODE_SUBCONNECTOR_SVIDEO, "SVIDEO" }, /* TV-out */
+ { DRM_MODE_SUBCONNECTOR_Component, "Component" }, /* TV-out */
++ { DRM_MODE_SUBCONNECTOR_SCART, "SCART" }, /* TV-out */
+ };
+
+ DRM_ENUM_NAME_FN(drm_get_tv_select_name, drm_tv_select_enum_list)
+@@ -118,6 +119,7 @@ static struct drm_prop_enum_list drm_tv_subconnector_enum_list[] =
+ { DRM_MODE_SUBCONNECTOR_Composite, "Composite" }, /* TV-out */
+ { DRM_MODE_SUBCONNECTOR_SVIDEO, "SVIDEO" }, /* TV-out */
+ { DRM_MODE_SUBCONNECTOR_Component, "Component" }, /* TV-out */
++ { DRM_MODE_SUBCONNECTOR_SCART, "SCART" }, /* TV-out */
+ };
+
+ DRM_ENUM_NAME_FN(drm_get_tv_subconnector_name,
+@@ -146,6 +148,7 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] =
+ { DRM_MODE_CONNECTOR_DisplayPort, "DisplayPort", 0 },
+ { DRM_MODE_CONNECTOR_HDMIA, "HDMI Type A", 0 },
+ { DRM_MODE_CONNECTOR_HDMIB, "HDMI Type B", 0 },
++ { DRM_MODE_CONNECTOR_TV, "TV", 0 },
+ };
+
+ static struct drm_prop_enum_list drm_encoder_enum_list[] =
+@@ -165,6 +168,7 @@ char *drm_get_encoder_name(struct drm_encoder *encoder)
+ encoder->base.id);
+ return buf;
+ }
++EXPORT_SYMBOL(drm_get_encoder_name);
+
+ char *drm_get_connector_name(struct drm_connector *connector)
+ {
+@@ -478,6 +482,7 @@ void drm_connector_cleanup(struct drm_connector *connector)
+ list_for_each_entry_safe(mode, t, &connector->user_modes, head)
+ drm_mode_remove(connector, mode);
+
++ kfree(connector->fb_helper_private);
+ mutex_lock(&dev->mode_config.mutex);
+ drm_mode_object_put(dev, &connector->base);
+ list_del(&connector->head);
+@@ -699,6 +704,42 @@ int drm_mode_create_tv_properties(struct drm_device *dev, int num_modes,
+ drm_property_add_enum(dev->mode_config.tv_mode_property, i,
+ i, modes[i]);
+
++ dev->mode_config.tv_brightness_property =
++ drm_property_create(dev, DRM_MODE_PROP_RANGE,
++ "brightness", 2);
++ dev->mode_config.tv_brightness_property->values[0] = 0;
++ dev->mode_config.tv_brightness_property->values[1] = 100;
++
++ dev->mode_config.tv_contrast_property =
++ drm_property_create(dev, DRM_MODE_PROP_RANGE,
++ "contrast", 2);
++ dev->mode_config.tv_contrast_property->values[0] = 0;
++ dev->mode_config.tv_contrast_property->values[1] = 100;
++
++ dev->mode_config.tv_flicker_reduction_property =
++ drm_property_create(dev, DRM_MODE_PROP_RANGE,
++ "flicker reduction", 2);
++ dev->mode_config.tv_flicker_reduction_property->values[0] = 0;
++ dev->mode_config.tv_flicker_reduction_property->values[1] = 100;
++
++ dev->mode_config.tv_overscan_property =
++ drm_property_create(dev, DRM_MODE_PROP_RANGE,
++ "overscan", 2);
++ dev->mode_config.tv_overscan_property->values[0] = 0;
++ dev->mode_config.tv_overscan_property->values[1] = 100;
++
++ dev->mode_config.tv_saturation_property =
++ drm_property_create(dev, DRM_MODE_PROP_RANGE,
++ "saturation", 2);
++ dev->mode_config.tv_saturation_property->values[0] = 0;
++ dev->mode_config.tv_saturation_property->values[1] = 100;
++
++ dev->mode_config.tv_hue_property =
++ drm_property_create(dev, DRM_MODE_PROP_RANGE,
++ "hue", 2);
++ dev->mode_config.tv_hue_property->values[0] = 0;
++ dev->mode_config.tv_hue_property->values[1] = 100;
++
+ return 0;
+ }
+ EXPORT_SYMBOL(drm_mode_create_tv_properties);
+@@ -1044,7 +1085,7 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
+ if (file_priv->master->minor->type == DRM_MINOR_CONTROL) {
+ list_for_each_entry(crtc, &dev->mode_config.crtc_list,
+ head) {
+- DRM_DEBUG("CRTC ID is %d\n", crtc->base.id);
++ DRM_DEBUG_KMS("CRTC ID is %d\n", crtc->base.id);
+ if (put_user(crtc->base.id, crtc_id + copied)) {
+ ret = -EFAULT;
+ goto out;
+@@ -1072,7 +1113,7 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
+ list_for_each_entry(encoder,
+ &dev->mode_config.encoder_list,
+ head) {
+- DRM_DEBUG("ENCODER ID is %d\n",
++ DRM_DEBUG_KMS("ENCODER ID is %d\n",
+ encoder->base.id);
+ if (put_user(encoder->base.id, encoder_id +
+ copied)) {
+@@ -1103,7 +1144,7 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
+ list_for_each_entry(connector,
+ &dev->mode_config.connector_list,
+ head) {
+- DRM_DEBUG("CONNECTOR ID is %d\n",
++ DRM_DEBUG_KMS("CONNECTOR ID is %d\n",
+ connector->base.id);
+ if (put_user(connector->base.id,
+ connector_id + copied)) {
+@@ -1127,7 +1168,7 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
+ }
+ card_res->count_connectors = connector_count;
+
+- DRM_DEBUG("Counted %d %d %d\n", card_res->count_crtcs,
++ DRM_DEBUG_KMS("Counted %d %d %d\n", card_res->count_crtcs,
+ card_res->count_connectors, card_res->count_encoders);
+
+ out:
+@@ -1230,7 +1271,7 @@ int drm_mode_getconnector(struct drm_device *dev, void *data,
+
+ memset(&u_mode, 0, sizeof(struct drm_mode_modeinfo));
+
+- DRM_DEBUG("connector id %d:\n", out_resp->connector_id);
++ DRM_DEBUG_KMS("connector id %d:\n", out_resp->connector_id);
+
+ mutex_lock(&dev->mode_config.mutex);
+
+@@ -1406,7 +1447,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
+ obj = drm_mode_object_find(dev, crtc_req->crtc_id,
+ DRM_MODE_OBJECT_CRTC);
+ if (!obj) {
+- DRM_DEBUG("Unknown CRTC ID %d\n", crtc_req->crtc_id);
++ DRM_DEBUG_KMS("Unknown CRTC ID %d\n", crtc_req->crtc_id);
+ ret = -EINVAL;
+ goto out;
+ }
+@@ -1419,7 +1460,8 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
+ list_for_each_entry(crtcfb,
+ &dev->mode_config.crtc_list, head) {
+ if (crtcfb == crtc) {
+- DRM_DEBUG("Using current fb for setmode\n");
++ DRM_DEBUG_KMS("Using current fb for "
++ "setmode\n");
+ fb = crtc->fb;
+ }
+ }
+@@ -1427,7 +1469,8 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
+ obj = drm_mode_object_find(dev, crtc_req->fb_id,
+ DRM_MODE_OBJECT_FB);
+ if (!obj) {
+- DRM_DEBUG("Unknown FB ID%d\n", crtc_req->fb_id);
++ DRM_DEBUG_KMS("Unknown FB ID%d\n",
++ crtc_req->fb_id);
+ ret = -EINVAL;
+ goto out;
+ }
+@@ -1440,13 +1483,13 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
+ }
+
+ if (crtc_req->count_connectors == 0 && mode) {
+- DRM_DEBUG("Count connectors is 0 but mode set\n");
++ DRM_DEBUG_KMS("Count connectors is 0 but mode set\n");
+ ret = -EINVAL;
+ goto out;
+ }
+
+ if (crtc_req->count_connectors > 0 && (!mode || !fb)) {
+- DRM_DEBUG("Count connectors is %d but no mode or fb set\n",
++ DRM_DEBUG_KMS("Count connectors is %d but no mode or fb set\n",
+ crtc_req->count_connectors);
+ ret = -EINVAL;
+ goto out;
+@@ -1479,7 +1522,8 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
+ obj = drm_mode_object_find(dev, out_id,
+ DRM_MODE_OBJECT_CONNECTOR);
+ if (!obj) {
+- DRM_DEBUG("Connector id %d unknown\n", out_id);
++ DRM_DEBUG_KMS("Connector id %d unknown\n",
++ out_id);
+ ret = -EINVAL;
+ goto out;
+ }
+@@ -1512,7 +1556,7 @@ int drm_mode_cursor_ioctl(struct drm_device *dev,
+ struct drm_crtc *crtc;
+ int ret = 0;
+
+- DRM_DEBUG("\n");
++ DRM_DEBUG_KMS("\n");
+
+ if (!req->flags) {
+ DRM_ERROR("no operation set\n");
+@@ -1522,7 +1566,7 @@ int drm_mode_cursor_ioctl(struct drm_device *dev,
+ mutex_lock(&dev->mode_config.mutex);
+ obj = drm_mode_object_find(dev, req->crtc_id, DRM_MODE_OBJECT_CRTC);
+ if (!obj) {
+- DRM_DEBUG("Unknown CRTC ID %d\n", req->crtc_id);
++ DRM_DEBUG_KMS("Unknown CRTC ID %d\n", req->crtc_id);
+ ret = -EINVAL;
+ goto out;
+ }
+diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
+index 6aaa2cb..1fe4e1d 100644
+--- a/drivers/gpu/drm/drm_crtc_helper.c
++++ b/drivers/gpu/drm/drm_crtc_helper.c
+@@ -32,15 +32,7 @@
+ #include "drmP.h"
+ #include "drm_crtc.h"
+ #include "drm_crtc_helper.h"
+-
+-/*
+- * Detailed mode info for 800x600@60Hz
+- */
+-static struct drm_display_mode std_modes[] = {
+- { DRM_MODE("800x600", DRM_MODE_TYPE_DEFAULT, 40000, 800, 840,
+- 968, 1056, 0, 600, 601, 605, 628, 0,
+- DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
+-};
++#include "drm_fb_helper.h"
+
+ static void drm_mode_validate_flag(struct drm_connector *connector,
+ int flags)
+@@ -94,23 +86,33 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
+ int count = 0;
+ int mode_flags = 0;
+
+- DRM_DEBUG("%s\n", drm_get_connector_name(connector));
++ DRM_DEBUG_KMS("%s\n", drm_get_connector_name(connector));
+ /* set all modes to the unverified state */
+ list_for_each_entry_safe(mode, t, &connector->modes, head)
+ mode->status = MODE_UNVERIFIED;
+
+- connector->status = connector->funcs->detect(connector);
++ if (connector->force) {
++ if (connector->force == DRM_FORCE_ON)
++ connector->status = connector_status_connected;
++ else
++ connector->status = connector_status_disconnected;
++ if (connector->funcs->force)
++ connector->funcs->force(connector);
++ } else
++ connector->status = connector->funcs->detect(connector);
+
+ if (connector->status == connector_status_disconnected) {
+- DRM_DEBUG("%s is disconnected\n",
++ DRM_DEBUG_KMS("%s is disconnected\n",
+ drm_get_connector_name(connector));
+- /* TODO set EDID to NULL */
+- return 0;
++ goto prune;
+ }
+
+ count = (*connector_funcs->get_modes)(connector);
+- if (!count)
+- return 0;
++ if (!count) {
++ count = drm_add_modes_noedid(connector, 800, 600);
++ if (!count)
++ return 0;
++ }
+
+ drm_mode_connector_list_update(connector);
+
+@@ -130,7 +132,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
+ mode);
+ }
+
+-
++prune:
+ drm_mode_prune_invalid(dev, &connector->modes, true);
+
+ if (list_empty(&connector->modes))
+@@ -138,7 +140,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
+
+ drm_mode_sort(&connector->modes);
+
+- DRM_DEBUG("Probed modes for %s\n", drm_get_connector_name(connector));
++ DRM_DEBUG_KMS("Probed modes for %s\n",
++ drm_get_connector_name(connector));
+ list_for_each_entry_safe(mode, t, &connector->modes, head) {
+ mode->vrefresh = drm_mode_vrefresh(mode);
+
+@@ -165,39 +168,6 @@ int drm_helper_probe_connector_modes(struct drm_device *dev, uint32_t maxX,
+ }
+ EXPORT_SYMBOL(drm_helper_probe_connector_modes);
+
+-static void drm_helper_add_std_modes(struct drm_device *dev,
+- struct drm_connector *connector)
+-{
+- struct drm_display_mode *mode, *t;
+- int i;
+-
+- for (i = 0; i < ARRAY_SIZE(std_modes); i++) {
+- struct drm_display_mode *stdmode;
+-
+- /*
+- * When no valid EDID modes are available we end up
+- * here and bailed in the past, now we add some standard
+- * modes and move on.
+- */
+- stdmode = drm_mode_duplicate(dev, &std_modes[i]);
+- drm_mode_probed_add(connector, stdmode);
+- drm_mode_list_concat(&connector->probed_modes,
+- &connector->modes);
+-
+- DRM_DEBUG("Adding mode %s to %s\n", stdmode->name,
+- drm_get_connector_name(connector));
+- }
+- drm_mode_sort(&connector->modes);
+-
+- DRM_DEBUG("Added std modes on %s\n", drm_get_connector_name(connector));
+- list_for_each_entry_safe(mode, t, &connector->modes, head) {
+- mode->vrefresh = drm_mode_vrefresh(mode);
+-
+- drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V);
+- drm_mode_debug_printmodeline(mode);
+- }
+-}
+-
+ /**
+ * drm_helper_encoder_in_use - check if a given encoder is in use
+ * @encoder: encoder to check
+@@ -258,13 +228,27 @@ EXPORT_SYMBOL(drm_helper_crtc_in_use);
+ void drm_helper_disable_unused_functions(struct drm_device *dev)
+ {
+ struct drm_encoder *encoder;
++ struct drm_connector *connector;
+ struct drm_encoder_helper_funcs *encoder_funcs;
+ struct drm_crtc *crtc;
+
++ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
++ if (!connector->encoder)
++ continue;
++ if (connector->status == connector_status_disconnected)
++ connector->encoder = NULL;
++ }
++
+ list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
+ encoder_funcs = encoder->helper_private;
+- if (!drm_helper_encoder_in_use(encoder))
+- (*encoder_funcs->dpms)(encoder, DRM_MODE_DPMS_OFF);
++ if (!drm_helper_encoder_in_use(encoder)) {
++ if (encoder_funcs->disable)
++ (*encoder_funcs->disable)(encoder);
++ else
++ (*encoder_funcs->dpms)(encoder, DRM_MODE_DPMS_OFF);
++ /* disconnector encoder from any connector */
++ encoder->crtc = NULL;
++ }
+ }
+
+ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+@@ -292,6 +276,65 @@ static struct drm_display_mode *drm_has_preferred_mode(struct drm_connector *con
+ return NULL;
+ }
+
++static bool drm_has_cmdline_mode(struct drm_connector *connector)
++{
++ struct drm_fb_helper_connector *fb_help_conn = connector->fb_helper_private;
++ struct drm_fb_helper_cmdline_mode *cmdline_mode;
++
++ if (!fb_help_conn)
++ return false;
++
++ cmdline_mode = &fb_help_conn->cmdline_mode;
++ return cmdline_mode->specified;
++}
++
++static struct drm_display_mode *drm_pick_cmdline_mode(struct drm_connector *connector, int width, int height)
++{
++ struct drm_fb_helper_connector *fb_help_conn = connector->fb_helper_private;
++ struct drm_fb_helper_cmdline_mode *cmdline_mode;
++ struct drm_display_mode *mode = NULL;
++
++ if (!fb_help_conn)
++ return mode;
++
++ cmdline_mode = &fb_help_conn->cmdline_mode;
++ if (cmdline_mode->specified == false)
++ return mode;
++
++ /* attempt to find a matching mode in the list of modes
++ * we have gotten so far, if not add a CVT mode that conforms
++ */
++ if (cmdline_mode->rb || cmdline_mode->margins)
++ goto create_mode;
++
++ list_for_each_entry(mode, &connector->modes, head) {
++ /* check width/height */
++ if (mode->hdisplay != cmdline_mode->xres ||
++ mode->vdisplay != cmdline_mode->yres)
++ continue;
++
++ if (cmdline_mode->refresh_specified) {
++ if (mode->vrefresh != cmdline_mode->refresh)
++ continue;
++ }
++
++ if (cmdline_mode->interlace) {
++ if (!(mode->flags & DRM_MODE_FLAG_INTERLACE))
++ continue;
++ }
++ return mode;
++ }
++
++create_mode:
++ mode = drm_cvt_mode(connector->dev, cmdline_mode->xres,
++ cmdline_mode->yres,
++ cmdline_mode->refresh_specified ? cmdline_mode->refresh : 60,
++ cmdline_mode->rb, cmdline_mode->interlace,
++ cmdline_mode->margins);
++ list_add(&mode->head, &connector->modes);
++ return mode;
++}
++
+ static bool drm_connector_enabled(struct drm_connector *connector, bool strict)
+ {
+ bool enable;
+@@ -312,7 +355,7 @@ static void drm_enable_connectors(struct drm_device *dev, bool *enabled)
+
+ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+ enabled[i] = drm_connector_enabled(connector, true);
+- DRM_DEBUG("connector %d enabled? %s\n", connector->base.id,
++ DRM_DEBUG_KMS("connector %d enabled? %s\n", connector->base.id,
+ enabled[i] ? "yes" : "no");
+ any_enabled |= enabled[i];
+ i++;
+@@ -342,16 +385,22 @@ static bool drm_target_preferred(struct drm_device *dev,
+ continue;
+ }
+
+- DRM_DEBUG("looking for preferred mode on connector %d\n",
+- connector->base.id);
++ DRM_DEBUG_KMS("looking for cmdline mode on connector %d\n",
++ connector->base.id);
+
+- modes[i] = drm_has_preferred_mode(connector, width, height);
++ /* got for command line mode first */
++ modes[i] = drm_pick_cmdline_mode(connector, width, height);
++ if (!modes[i]) {
++ DRM_DEBUG_KMS("looking for preferred mode on connector %d\n",
++ connector->base.id);
++ modes[i] = drm_has_preferred_mode(connector, width, height);
++ }
+ /* No preferred modes, pick one off the list */
+ if (!modes[i] && !list_empty(&connector->modes)) {
+ list_for_each_entry(modes[i], &connector->modes, head)
+ break;
+ }
+- DRM_DEBUG("found mode %s\n", modes[i] ? modes[i]->name :
++ DRM_DEBUG_KMS("found mode %s\n", modes[i] ? modes[i]->name :
+ "none");
+ i++;
+ }
+@@ -394,6 +443,8 @@ static int drm_pick_crtcs(struct drm_device *dev,
+ my_score = 1;
+ if (connector->status == connector_status_connected)
+ my_score++;
++ if (drm_has_cmdline_mode(connector))
++ my_score++;
+ if (drm_has_preferred_mode(connector, width, height))
+ my_score++;
+
+@@ -409,7 +460,7 @@ static int drm_pick_crtcs(struct drm_device *dev,
+ c = 0;
+ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+
+- if ((connector->encoder->possible_crtcs & (1 << c)) == 0) {
++ if ((encoder->possible_crtcs & (1 << c)) == 0) {
+ c++;
+ continue;
+ }
+@@ -452,7 +503,7 @@ static void drm_setup_crtcs(struct drm_device *dev)
+ int width, height;
+ int i, ret;
+
+- DRM_DEBUG("\n");
++ DRM_DEBUG_KMS("\n");
+
+ width = dev->mode_config.max_width;
+ height = dev->mode_config.max_height;
+@@ -475,7 +526,7 @@ static void drm_setup_crtcs(struct drm_device *dev)
+ if (!ret)
+ DRM_ERROR("Unable to find initial modes\n");
+
+- DRM_DEBUG("picking CRTCs for %dx%d config\n", width, height);
++ DRM_DEBUG_KMS("picking CRTCs for %dx%d config\n", width, height);
+
+ drm_pick_crtcs(dev, crtcs, modes, 0, width, height);
+
+@@ -490,12 +541,14 @@ static void drm_setup_crtcs(struct drm_device *dev)
+ }
+
+ if (mode && crtc) {
+- DRM_DEBUG("desired mode %s set on crtc %d\n",
++ DRM_DEBUG_KMS("desired mode %s set on crtc %d\n",
+ mode->name, crtc->base.id);
+ crtc->desired_mode = mode;
+ connector->encoder->crtc = crtc;
+- } else
++ } else {
+ connector->encoder->crtc = NULL;
++ connector->encoder = NULL;
++ }
+ i++;
+ }
+
+@@ -702,18 +755,17 @@ EXPORT_SYMBOL(drm_crtc_helper_set_mode);
+ int drm_crtc_helper_set_config(struct drm_mode_set *set)
+ {
+ struct drm_device *dev;
+- struct drm_crtc **save_crtcs, *new_crtc;
+- struct drm_encoder **save_encoders, *new_encoder;
++ struct drm_crtc *save_crtcs, *new_crtc, *crtc;
++ struct drm_encoder *save_encoders, *new_encoder, *encoder;
+ struct drm_framebuffer *old_fb = NULL;
+- bool save_enabled;
+ bool mode_changed = false; /* if true do a full mode set */
+ bool fb_changed = false; /* if true and !mode_changed just do a flip */
+- struct drm_connector *connector;
++ struct drm_connector *save_connectors, *connector;
+ int count = 0, ro, fail = 0;
+ struct drm_crtc_helper_funcs *crtc_funcs;
+ int ret = 0;
+
+- DRM_DEBUG("\n");
++ DRM_DEBUG_KMS("\n");
+
+ if (!set)
+ return -EINVAL;
+@@ -726,37 +778,60 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
+
+ crtc_funcs = set->crtc->helper_private;
+
+- DRM_DEBUG("crtc: %p %d fb: %p connectors: %p num_connectors: %d (x, y) (%i, %i)\n",
++ DRM_DEBUG_KMS("crtc: %p %d fb: %p connectors: %p num_connectors:"
++ " %d (x, y) (%i, %i)\n",
+ set->crtc, set->crtc->base.id, set->fb, set->connectors,
+ (int)set->num_connectors, set->x, set->y);
+
+ dev = set->crtc->dev;
+
+- /* save previous config */
+- save_enabled = set->crtc->enabled;
+-
+- /*
+- * We do mode_config.num_connectors here since we'll look at the
+- * CRTC and encoder associated with each connector later.
+- */
+- save_crtcs = kzalloc(dev->mode_config.num_connector *
+- sizeof(struct drm_crtc *), GFP_KERNEL);
++ /* Allocate space for the backup of all (non-pointer) crtc, encoder and
++ * connector data. */
++ save_crtcs = kzalloc(dev->mode_config.num_crtc *
++ sizeof(struct drm_crtc), GFP_KERNEL);
+ if (!save_crtcs)
+ return -ENOMEM;
+
+- save_encoders = kzalloc(dev->mode_config.num_connector *
+- sizeof(struct drm_encoders *), GFP_KERNEL);
++ save_encoders = kzalloc(dev->mode_config.num_encoder *
++ sizeof(struct drm_encoder), GFP_KERNEL);
+ if (!save_encoders) {
+ kfree(save_crtcs);
+ return -ENOMEM;
+ }
+
++ save_connectors = kzalloc(dev->mode_config.num_connector *
++ sizeof(struct drm_connector), GFP_KERNEL);
++ if (!save_connectors) {
++ kfree(save_crtcs);
++ kfree(save_encoders);
++ return -ENOMEM;
++ }
++
++ /* Copy data. Note that driver private data is not affected.
++ * Should anything bad happen only the expected state is
++ * restored, not the drivers personal bookkeeping.
++ */
++ count = 0;
++ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
++ save_crtcs[count++] = *crtc;
++ }
++
++ count = 0;
++ list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
++ save_encoders[count++] = *encoder;
++ }
++
++ count = 0;
++ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
++ save_connectors[count++] = *connector;
++ }
++
+ /* We should be able to check here if the fb has the same properties
+ * and then just flip_or_move it */
+ if (set->crtc->fb != set->fb) {
+ /* If we have no fb then treat it as a full mode set */
+ if (set->crtc->fb == NULL) {
+- DRM_DEBUG("crtc has no fb, full mode set\n");
++ DRM_DEBUG_KMS("crtc has no fb, full mode set\n");
+ mode_changed = true;
+ } else if (set->fb == NULL) {
+ mode_changed = true;
+@@ -772,7 +847,7 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
+ fb_changed = true;
+
+ if (set->mode && !drm_mode_equal(set->mode, &set->crtc->mode)) {
+- DRM_DEBUG("modes are different, full mode set\n");
++ DRM_DEBUG_KMS("modes are different, full mode set\n");
+ drm_mode_debug_printmodeline(&set->crtc->mode);
+ drm_mode_debug_printmodeline(set->mode);
+ mode_changed = true;
+@@ -783,7 +858,6 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
+ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+ struct drm_connector_helper_funcs *connector_funcs =
+ connector->helper_private;
+- save_encoders[count++] = connector->encoder;
+ new_encoder = connector->encoder;
+ for (ro = 0; ro < set->num_connectors; ro++) {
+ if (set->connectors[ro] == connector) {
+@@ -798,15 +872,20 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
+ }
+
+ if (new_encoder != connector->encoder) {
+- DRM_DEBUG("encoder changed, full mode switch\n");
++ DRM_DEBUG_KMS("encoder changed, full mode switch\n");
+ mode_changed = true;
++ /* If the encoder is reused for another connector, then
++ * the appropriate crtc will be set later.
++ */
++ if (connector->encoder)
++ connector->encoder->crtc = NULL;
+ connector->encoder = new_encoder;
+ }
+ }
+
+ if (fail) {
+ ret = -EINVAL;
+- goto fail_no_encoder;
++ goto fail;
+ }
+
+ count = 0;
+@@ -814,8 +893,6 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
+ if (!connector->encoder)
+ continue;
+
+- save_crtcs[count++] = connector->encoder->crtc;
+-
+ if (connector->encoder->crtc == set->crtc)
+ new_crtc = NULL;
+ else
+@@ -830,14 +907,14 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
+ if (new_crtc &&
+ !drm_encoder_crtc_ok(connector->encoder, new_crtc)) {
+ ret = -EINVAL;
+- goto fail_set_mode;
++ goto fail;
+ }
+ if (new_crtc != connector->encoder->crtc) {
+- DRM_DEBUG("crtc changed, full mode switch\n");
++ DRM_DEBUG_KMS("crtc changed, full mode switch\n");
+ mode_changed = true;
+ connector->encoder->crtc = new_crtc;
+ }
+- DRM_DEBUG("setting connector %d crtc to %p\n",
++ DRM_DEBUG_KMS("setting connector %d crtc to %p\n",
+ connector->base.id, new_crtc);
+ }
+
+@@ -850,7 +927,8 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
+ set->crtc->fb = set->fb;
+ set->crtc->enabled = (set->mode != NULL);
+ if (set->mode != NULL) {
+- DRM_DEBUG("attempting to set mode from userspace\n");
++ DRM_DEBUG_KMS("attempting to set mode from"
++ " userspace\n");
+ drm_mode_debug_printmodeline(set->mode);
+ if (!drm_crtc_helper_set_mode(set->crtc, set->mode,
+ set->x, set->y,
+@@ -858,7 +936,7 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
+ DRM_ERROR("failed to set mode on crtc %p\n",
+ set->crtc);
+ ret = -EINVAL;
+- goto fail_set_mode;
++ goto fail;
+ }
+ /* TODO are these needed? */
+ set->crtc->desired_x = set->x;
+@@ -867,43 +945,50 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
+ }
+ drm_helper_disable_unused_functions(dev);
+ } else if (fb_changed) {
++ set->crtc->x = set->x;
++ set->crtc->y = set->y;
++
+ old_fb = set->crtc->fb;
+ if (set->crtc->fb != set->fb)
+ set->crtc->fb = set->fb;
+ ret = crtc_funcs->mode_set_base(set->crtc,
+ set->x, set->y, old_fb);
+ if (ret != 0)
+- goto fail_set_mode;
++ goto fail;
+ }
+
++ kfree(save_connectors);
+ kfree(save_encoders);
+ kfree(save_crtcs);
+ return 0;
+
+-fail_set_mode:
+- set->crtc->enabled = save_enabled;
+- set->crtc->fb = old_fb;
++fail:
++ /* Restore all previous data. */
+ count = 0;
+- list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+- if (!connector->encoder)
+- continue;
++ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
++ *crtc = save_crtcs[count++];
++ }
+
+- connector->encoder->crtc = save_crtcs[count++];
++ count = 0;
++ list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
++ *encoder = save_encoders[count++];
+ }
+-fail_no_encoder:
+- kfree(save_crtcs);
++
+ count = 0;
+ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+- connector->encoder = save_encoders[count++];
++ *connector = save_connectors[count++];
+ }
++
++ kfree(save_connectors);
+ kfree(save_encoders);
++ kfree(save_crtcs);
+ return ret;
+ }
+ EXPORT_SYMBOL(drm_crtc_helper_set_config);
+
+ bool drm_helper_plugged_event(struct drm_device *dev)
+ {
+- DRM_DEBUG("\n");
++ DRM_DEBUG_KMS("\n");
+
+ drm_helper_probe_connector_modes(dev, dev->mode_config.max_width,
+ dev->mode_config.max_height);
+@@ -932,24 +1017,18 @@ bool drm_helper_plugged_event(struct drm_device *dev)
+ */
+ bool drm_helper_initial_config(struct drm_device *dev)
+ {
+- struct drm_connector *connector;
+ int count = 0;
+
++ drm_fb_helper_parse_command_line(dev);
++
+ count = drm_helper_probe_connector_modes(dev,
+ dev->mode_config.max_width,
+ dev->mode_config.max_height);
+
+ /*
+- * None of the available connectors had any modes, so add some
+- * and try to light them up anyway
++ * we shouldn't end up with no modes here.
+ */
+- if (!count) {
+- DRM_ERROR("connectors have no modes, using standard modes\n");
+- list_for_each_entry(connector,
+- &dev->mode_config.connector_list,
+- head)
+- drm_helper_add_std_modes(dev, connector);
+- }
++ WARN(!count, "No connectors reported connected with modes\n");
+
+ drm_setup_crtcs(dev);
+
+diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
+index b39d7bf..a75ca63 100644
+--- a/drivers/gpu/drm/drm_drv.c
++++ b/drivers/gpu/drm/drm_drv.c
+@@ -63,12 +63,12 @@ static struct drm_ioctl_desc drm_ioctls[] = {
+ DRM_IOCTL_DEF(DRM_IOCTL_GET_MAP, drm_getmap, 0),
+ DRM_IOCTL_DEF(DRM_IOCTL_GET_CLIENT, drm_getclient, 0),
+ DRM_IOCTL_DEF(DRM_IOCTL_GET_STATS, drm_getstats, 0),
+- DRM_IOCTL_DEF(DRM_IOCTL_SET_VERSION, drm_setversion, DRM_MASTER|DRM_ROOT_ONLY),
++ DRM_IOCTL_DEF(DRM_IOCTL_SET_VERSION, drm_setversion, DRM_MASTER),
+
+ DRM_IOCTL_DEF(DRM_IOCTL_SET_UNIQUE, drm_setunique, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
+ DRM_IOCTL_DEF(DRM_IOCTL_BLOCK, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
+ DRM_IOCTL_DEF(DRM_IOCTL_UNBLOCK, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
+- DRM_IOCTL_DEF(DRM_IOCTL_AUTH_MAGIC, drm_authmagic, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
++ DRM_IOCTL_DEF(DRM_IOCTL_AUTH_MAGIC, drm_authmagic, DRM_AUTH|DRM_MASTER),
+
+ DRM_IOCTL_DEF(DRM_IOCTL_ADD_MAP, drm_addmap_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
+ DRM_IOCTL_DEF(DRM_IOCTL_RM_MAP, drm_rmmap_ioctl, DRM_AUTH),
+diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
+index 7f2728b..3c0d2b3 100644
+--- a/drivers/gpu/drm/drm_edid.c
++++ b/drivers/gpu/drm/drm_edid.c
+@@ -60,6 +60,12 @@
+ #define EDID_QUIRK_FIRST_DETAILED_PREFERRED (1 << 5)
+ /* use +hsync +vsync for detailed mode */
+ #define EDID_QUIRK_DETAILED_SYNC_PP (1 << 6)
++/* define the number of Extension EDID block */
++#define MAX_EDID_EXT_NUM 4
++
++#define LEVEL_DMT 0
++#define LEVEL_GTF 1
++#define LEVEL_CVT 2
+
+ static struct edid_quirk {
+ char *vendor;
+@@ -103,7 +109,9 @@ static struct edid_quirk {
+
+
+ /* Valid EDID header has these bytes */
+-static u8 edid_header[] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 };
++static const u8 edid_header[] = {
++ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00
++};
+
+ /**
+ * edid_is_valid - sanity check EDID data
+@@ -237,39 +245,345 @@ static void edid_fixup_preferred(struct drm_connector *connector,
+ preferred_mode->type |= DRM_MODE_TYPE_PREFERRED;
+ }
+
++/*
++ * Add the Autogenerated from the DMT spec.
++ * This table is copied from xfree86/modes/xf86EdidModes.c.
++ * But the mode with Reduced blank feature is deleted.
++ */
++static struct drm_display_mode drm_dmt_modes[] = {
++ /* 640x350@85Hz */
++ { DRM_MODE("640x350", DRM_MODE_TYPE_DRIVER, 31500, 640, 672,
++ 736, 832, 0, 350, 382, 385, 445, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) },
++ /* 640x400@85Hz */
++ { DRM_MODE("640x400", DRM_MODE_TYPE_DRIVER, 31500, 640, 672,
++ 736, 832, 0, 400, 401, 404, 445, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 720x400@85Hz */
++ { DRM_MODE("720x400", DRM_MODE_TYPE_DRIVER, 35500, 720, 756,
++ 828, 936, 0, 400, 401, 404, 446, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 640x480@60Hz */
++ { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 25175, 640, 656,
++ 752, 800, 0, 480, 489, 492, 525, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
++ /* 640x480@72Hz */
++ { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 664,
++ 704, 832, 0, 480, 489, 492, 520, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
++ /* 640x480@75Hz */
++ { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 656,
++ 720, 840, 0, 480, 481, 484, 500, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
++ /* 640x480@85Hz */
++ { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 36000, 640, 696,
++ 752, 832, 0, 480, 481, 484, 509, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
++ /* 800x600@56Hz */
++ { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 36000, 800, 824,
++ 896, 1024, 0, 600, 601, 603, 625, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 800x600@60Hz */
++ { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 40000, 800, 840,
++ 968, 1056, 0, 600, 601, 605, 628, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 800x600@72Hz */
++ { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 50000, 800, 856,
++ 976, 1040, 0, 600, 637, 643, 666, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 800x600@75Hz */
++ { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 49500, 800, 816,
++ 896, 1056, 0, 600, 601, 604, 625, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 800x600@85Hz */
++ { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 56250, 800, 832,
++ 896, 1048, 0, 600, 601, 604, 631, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 848x480@60Hz */
++ { DRM_MODE("848x480", DRM_MODE_TYPE_DRIVER, 33750, 848, 864,
++ 976, 1088, 0, 480, 486, 494, 517, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1024x768@43Hz, interlace */
++ { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 44900, 1024, 1032,
++ 1208, 1264, 0, 768, 768, 772, 817, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
++ DRM_MODE_FLAG_INTERLACE) },
++ /* 1024x768@60Hz */
++ { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 65000, 1024, 1048,
++ 1184, 1344, 0, 768, 771, 777, 806, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
++ /* 1024x768@70Hz */
++ { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 75000, 1024, 1048,
++ 1184, 1328, 0, 768, 771, 777, 806, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
++ /* 1024x768@75Hz */
++ { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 78750, 1024, 1040,
++ 1136, 1312, 0, 768, 769, 772, 800, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1024x768@85Hz */
++ { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 94500, 1024, 1072,
++ 1072, 1376, 0, 768, 769, 772, 808, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1152x864@75Hz */
++ { DRM_MODE("1152x864", DRM_MODE_TYPE_DRIVER, 108000, 1152, 1216,
++ 1344, 1600, 0, 864, 865, 868, 900, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1280x768@60Hz */
++ { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 79500, 1280, 1344,
++ 1472, 1664, 0, 768, 771, 778, 798, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1280x768@75Hz */
++ { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 102250, 1280, 1360,
++ 1488, 1696, 0, 768, 771, 778, 805, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) },
++ /* 1280x768@85Hz */
++ { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 117500, 1280, 1360,
++ 1496, 1712, 0, 768, 771, 778, 809, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1280x800@60Hz */
++ { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 83500, 1280, 1352,
++ 1480, 1680, 0, 800, 803, 809, 831, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) },
++ /* 1280x800@75Hz */
++ { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 106500, 1280, 1360,
++ 1488, 1696, 0, 800, 803, 809, 838, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1280x800@85Hz */
++ { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 122500, 1280, 1360,
++ 1496, 1712, 0, 800, 803, 809, 843, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1280x960@60Hz */
++ { DRM_MODE("1280x960", DRM_MODE_TYPE_DRIVER, 108000, 1280, 1376,
++ 1488, 1800, 0, 960, 961, 964, 1000, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1280x960@85Hz */
++ { DRM_MODE("1280x960", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1344,
++ 1504, 1728, 0, 960, 961, 964, 1011, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1280x1024@60Hz */
++ { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 108000, 1280, 1328,
++ 1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1280x1024@75Hz */
++ { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 135000, 1280, 1296,
++ 1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1280x1024@85Hz */
++ { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 157500, 1280, 1344,
++ 1504, 1728, 0, 1024, 1025, 1028, 1072, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1360x768@60Hz */
++ { DRM_MODE("1360x768", DRM_MODE_TYPE_DRIVER, 85500, 1360, 1424,
++ 1536, 1792, 0, 768, 771, 777, 795, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1440x1050@60Hz */
++ { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 121750, 1400, 1488,
++ 1632, 1864, 0, 1050, 1053, 1057, 1089, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1440x1050@75Hz */
++ { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 156000, 1400, 1504,
++ 1648, 1896, 0, 1050, 1053, 1057, 1099, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1440x1050@85Hz */
++ { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 179500, 1400, 1504,
++ 1656, 1912, 0, 1050, 1053, 1057, 1105, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1440x900@60Hz */
++ { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 106500, 1440, 1520,
++ 1672, 1904, 0, 900, 903, 909, 934, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1440x900@75Hz */
++ { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 136750, 1440, 1536,
++ 1688, 1936, 0, 900, 903, 909, 942, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1440x900@85Hz */
++ { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 157000, 1440, 1544,
++ 1696, 1952, 0, 900, 903, 909, 948, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1600x1200@60Hz */
++ { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 162000, 1600, 1664,
++ 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1600x1200@65Hz */
++ { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 175500, 1600, 1664,
++ 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1600x1200@70Hz */
++ { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 189000, 1600, 1664,
++ 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1600x1200@75Hz */
++ { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 2025000, 1600, 1664,
++ 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1600x1200@85Hz */
++ { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 229500, 1600, 1664,
++ 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
++ DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1680x1050@60Hz */
++ { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 146250, 1680, 1784,
++ 1960, 2240, 0, 1050, 1053, 1059, 1089, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1680x1050@75Hz */
++ { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 187000, 1680, 1800,
++ 1976, 2272, 0, 1050, 1053, 1059, 1099, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1680x1050@85Hz */
++ { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 214750, 1680, 1808,
++ 1984, 2288, 0, 1050, 1053, 1059, 1105, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1792x1344@60Hz */
++ { DRM_MODE("1792x1344", DRM_MODE_TYPE_DRIVER, 204750, 1792, 1920,
++ 2120, 2448, 0, 1344, 1345, 1348, 1394, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1729x1344@75Hz */
++ { DRM_MODE("1792x1344", DRM_MODE_TYPE_DRIVER, 261000, 1792, 1888,
++ 2104, 2456, 0, 1344, 1345, 1348, 1417, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1853x1392@60Hz */
++ { DRM_MODE("1856x1392", DRM_MODE_TYPE_DRIVER, 218250, 1856, 1952,
++ 2176, 2528, 0, 1392, 1393, 1396, 1439, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1856x1392@75Hz */
++ { DRM_MODE("1856x1392", DRM_MODE_TYPE_DRIVER, 288000, 1856, 1984,
++ 2208, 2560, 0, 1392, 1395, 1399, 1500, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1920x1200@60Hz */
++ { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 193250, 1920, 2056,
++ 2256, 2592, 0, 1200, 1203, 1209, 1245, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1920x1200@75Hz */
++ { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 245250, 1920, 2056,
++ 2264, 2608, 0, 1200, 1203, 1209, 1255, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1920x1200@85Hz */
++ { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 281250, 1920, 2064,
++ 2272, 2624, 0, 1200, 1203, 1209, 1262, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1920x1440@60Hz */
++ { DRM_MODE("1920x1440", DRM_MODE_TYPE_DRIVER, 234000, 1920, 2048,
++ 2256, 2600, 0, 1440, 1441, 1444, 1500, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 1920x1440@75Hz */
++ { DRM_MODE("1920x1440", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2064,
++ 2288, 2640, 0, 1440, 1441, 1444, 1500, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 2560x1600@60Hz */
++ { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 348500, 2560, 2752,
++ 3032, 3504, 0, 1600, 1603, 1609, 1658, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 2560x1600@75HZ */
++ { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 443250, 2560, 2768,
++ 3048, 3536, 0, 1600, 1603, 1609, 1672, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++ /* 2560x1600@85HZ */
++ { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 505250, 2560, 2768,
++ 3048, 3536, 0, 1600, 1603, 1609, 1682, 0,
++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
++};
++
++static struct drm_display_mode *drm_find_dmt(struct drm_device *dev,
++ int hsize, int vsize, int fresh)
++{
++ int i, count;
++ struct drm_display_mode *ptr, *mode;
++
++ count = sizeof(drm_dmt_modes) / sizeof(struct drm_display_mode);
++ mode = NULL;
++ for (i = 0; i < count; i++) {
++ ptr = &drm_dmt_modes[i];
++ if (hsize == ptr->hdisplay &&
++ vsize == ptr->vdisplay &&
++ fresh == drm_mode_vrefresh(ptr)) {
++ /* get the expected default mode */
++ mode = drm_mode_duplicate(dev, ptr);
++ break;
++ }
++ }
++ return mode;
++}
++
++/*
++ * 0 is reserved. The spec says 0x01 fill for unused timings. Some old
++ * monitors fill with ascii space (0x20) instead.
++ */
++static int
++bad_std_timing(u8 a, u8 b)
++{
++ return (a == 0x00 && b == 0x00) ||
++ (a == 0x01 && b == 0x01) ||
++ (a == 0x20 && b == 0x20);
++}
++
+ /**
+ * drm_mode_std - convert standard mode info (width, height, refresh) into mode
+ * @t: standard timing params
++ * @timing_level: standard timing level
+ *
+ * Take the standard timing params (in this case width, aspect, and refresh)
+- * and convert them into a real mode using CVT.
++ * and convert them into a real mode using CVT/GTF/DMT.
+ *
+ * Punts for now, but should eventually use the FB layer's CVT based mode
+ * generation code.
+ */
+ struct drm_display_mode *drm_mode_std(struct drm_device *dev,
+- struct std_timing *t)
++ struct std_timing *t,
++ int revision,
++ int timing_level)
+ {
+ struct drm_display_mode *mode;
+- int hsize = t->hsize * 8 + 248, vsize;
++ int hsize, vsize;
++ int vrefresh_rate;
+ unsigned aspect_ratio = (t->vfreq_aspect & EDID_TIMING_ASPECT_MASK)
+ >> EDID_TIMING_ASPECT_SHIFT;
++ unsigned vfreq = (t->vfreq_aspect & EDID_TIMING_VFREQ_MASK)
++ >> EDID_TIMING_VFREQ_SHIFT;
+
+- mode = drm_mode_create(dev);
+- if (!mode)
++ if (bad_std_timing(t->hsize, t->vfreq_aspect))
+ return NULL;
+
+- if (aspect_ratio == 0)
+- vsize = (hsize * 10) / 16;
+- else if (aspect_ratio == 1)
++ /* According to the EDID spec, the hdisplay = hsize * 8 + 248 */
++ hsize = t->hsize * 8 + 248;
++ /* vrefresh_rate = vfreq + 60 */
++ vrefresh_rate = vfreq + 60;
++ /* the vdisplay is calculated based on the aspect ratio */
++ if (aspect_ratio == 0) {
++ if (revision < 3)
++ vsize = hsize;
++ else
++ vsize = (hsize * 10) / 16;
++ } else if (aspect_ratio == 1)
+ vsize = (hsize * 3) / 4;
+ else if (aspect_ratio == 2)
+ vsize = (hsize * 4) / 5;
+ else
+ vsize = (hsize * 9) / 16;
+-
+- drm_mode_set_name(mode);
+-
++ /* HDTV hack */
++ if (hsize == 1360 && vsize == 765 && vrefresh_rate == 60) {
++ mode = drm_cvt_mode(dev, hsize, vsize, vrefresh_rate, 0, 0,
++ false);
++ mode->hdisplay = 1366;
++ mode->vsync_start = mode->vsync_start - 1;
++ mode->vsync_end = mode->vsync_end - 1;
++ return mode;
++ }
++ mode = NULL;
++ /* check whether it can be found in default mode table */
++ mode = drm_find_dmt(dev, hsize, vsize, vrefresh_rate);
++ if (mode)
++ return mode;
++
++ switch (timing_level) {
++ case LEVEL_DMT:
++ break;
++ case LEVEL_GTF:
++ mode = drm_gtf_mode(dev, hsize, vsize, vrefresh_rate, 0, 0);
++ break;
++ case LEVEL_CVT:
++ mode = drm_cvt_mode(dev, hsize, vsize, vrefresh_rate, 0, 0,
++ false);
++ break;
++ }
+ return mode;
+ }
+
+@@ -451,6 +765,19 @@ static int add_established_modes(struct drm_connector *connector, struct edid *e
+
+ return modes;
+ }
++/**
++ * stanard_timing_level - get std. timing level(CVT/GTF/DMT)
++ * @edid: EDID block to scan
++ */
++static int standard_timing_level(struct edid *edid)
++{
++ if (edid->revision >= 2) {
++ if (edid->revision >= 4 && (edid->features & DRM_EDID_FEATURE_DEFAULT_GTF))
++ return LEVEL_CVT;
++ return LEVEL_GTF;
++ }
++ return LEVEL_DMT;
++}
+
+ /**
+ * add_standard_modes - get std. modes from EDID and add them
+@@ -463,6 +790,9 @@ static int add_standard_modes(struct drm_connector *connector, struct edid *edid
+ {
+ struct drm_device *dev = connector->dev;
+ int i, modes = 0;
++ int timing_level;
++
++ timing_level = standard_timing_level(edid);
+
+ for (i = 0; i < EDID_STD_TIMINGS; i++) {
+ struct std_timing *t = &edid->standard_timings[i];
+@@ -472,7 +802,8 @@ static int add_standard_modes(struct drm_connector *connector, struct edid *edid
+ if (t->hsize == 1 && t->vfreq_aspect == 1)
+ continue;
+
+- newmode = drm_mode_std(dev, &edid->standard_timings[i]);
++ newmode = drm_mode_std(dev, &edid->standard_timings[i],
++ edid->revision, timing_level);
+ if (newmode) {
+ drm_mode_probed_add(connector, newmode);
+ modes++;
+@@ -496,6 +827,9 @@ static int add_detailed_info(struct drm_connector *connector,
+ {
+ struct drm_device *dev = connector->dev;
+ int i, j, modes = 0;
++ int timing_level;
++
++ timing_level = standard_timing_level(edid);
+
+ for (i = 0; i < EDID_DETAILED_TIMINGS; i++) {
+ struct detailed_timing *timing = &edid->detailed_timings[i];
+@@ -519,13 +853,14 @@ static int add_detailed_info(struct drm_connector *connector,
+ case EDID_DETAIL_MONITOR_CPDATA:
+ break;
+ case EDID_DETAIL_STD_MODES:
+- /* Five modes per detailed section */
+- for (j = 0; j < 5; i++) {
++ for (j = 0; j < 6; i++) {
+ struct std_timing *std;
+ struct drm_display_mode *newmode;
+
+ std = &data->data.timings[j];
+- newmode = drm_mode_std(dev, std);
++ newmode = drm_mode_std(dev, std,
++ edid->revision,
++ timing_level);
+ if (newmode) {
+ drm_mode_probed_add(connector, newmode);
+ modes++;
+@@ -551,6 +886,124 @@ static int add_detailed_info(struct drm_connector *connector,
+
+ return modes;
+ }
++/**
++ * add_detailed_mode_eedid - get detailed mode info from addtional timing
++ * EDID block
++ * @connector: attached connector
++ * @edid: EDID block to scan(It is only to get addtional timing EDID block)
++ * @quirks: quirks to apply
++ *
++ * Some of the detailed timing sections may contain mode information. Grab
++ * it and add it to the list.
++ */
++static int add_detailed_info_eedid(struct drm_connector *connector,
++ struct edid *edid, u32 quirks)
++{
++ struct drm_device *dev = connector->dev;
++ int i, j, modes = 0;
++ char *edid_ext = NULL;
++ struct detailed_timing *timing;
++ struct detailed_non_pixel *data;
++ struct drm_display_mode *newmode;
++ int edid_ext_num;
++ int start_offset, end_offset;
++ int timing_level;
++
++ if (edid->version == 1 && edid->revision < 3) {
++ /* If the EDID version is less than 1.3, there is no
++ * extension EDID.
++ */
++ return 0;
++ }
++ if (!edid->extensions) {
++ /* if there is no extension EDID, it is unnecessary to
++ * parse the E-EDID to get detailed info
++ */
++ return 0;
++ }
++
++ /* Chose real EDID extension number */
++ edid_ext_num = edid->extensions > MAX_EDID_EXT_NUM ?
++ MAX_EDID_EXT_NUM : edid->extensions;
++
++ /* Find CEA extension */
++ for (i = 0; i < edid_ext_num; i++) {
++ edid_ext = (char *)edid + EDID_LENGTH * (i + 1);
++ /* This block is CEA extension */
++ if (edid_ext[0] == 0x02)
++ break;
++ }
++
++ if (i == edid_ext_num) {
++ /* if there is no additional timing EDID block, return */
++ return 0;
++ }
++
++ /* Get the start offset of detailed timing block */
++ start_offset = edid_ext[2];
++ if (start_offset == 0) {
++ /* If the start_offset is zero, it means that neither detailed
++ * info nor data block exist. In such case it is also
++ * unnecessary to parse the detailed timing info.
++ */
++ return 0;
++ }
++
++ timing_level = standard_timing_level(edid);
++ end_offset = EDID_LENGTH;
++ end_offset -= sizeof(struct detailed_timing);
++ for (i = start_offset; i < end_offset;
++ i += sizeof(struct detailed_timing)) {
++ timing = (struct detailed_timing *)(edid_ext + i);
++ data = &timing->data.other_data;
++ /* Detailed mode timing */
++ if (timing->pixel_clock) {
++ newmode = drm_mode_detailed(dev, edid, timing, quirks);
++ if (!newmode)
++ continue;
++
++ drm_mode_probed_add(connector, newmode);
++
++ modes++;
++ continue;
++ }
++
++ /* Other timing or info */
++ switch (data->type) {
++ case EDID_DETAIL_MONITOR_SERIAL:
++ break;
++ case EDID_DETAIL_MONITOR_STRING:
++ break;
++ case EDID_DETAIL_MONITOR_RANGE:
++ /* Get monitor range data */
++ break;
++ case EDID_DETAIL_MONITOR_NAME:
++ break;
++ case EDID_DETAIL_MONITOR_CPDATA:
++ break;
++ case EDID_DETAIL_STD_MODES:
++ /* Five modes per detailed section */
++ for (j = 0; j < 5; i++) {
++ struct std_timing *std;
++ struct drm_display_mode *newmode;
++
++ std = &data->data.timings[j];
++ newmode = drm_mode_std(dev, std,
++ edid->revision,
++ timing_level);
++ if (newmode) {
++ drm_mode_probed_add(connector, newmode);
++ modes++;
++ }
++ }
++ break;
++ default:
++ break;
++ }
++ }
++
++ return modes;
++}
+
+ #define DDC_ADDR 0x50
+ /**
+@@ -584,7 +1037,6 @@ int drm_do_probe_ddc_edid(struct i2c_adapter *adapter,
+ if (i2c_transfer(adapter, msgs, 2) == 2)
+ return 0;
+
+- dev_info(&adapter->dev, "unable to read EDID block.\n");
+ return -1;
+ }
+ EXPORT_SYMBOL(drm_do_probe_ddc_edid);
+@@ -597,8 +1049,6 @@ static int drm_ddc_read_edid(struct drm_connector *connector,
+
+ ret = drm_do_probe_ddc_edid(adapter, buf, len);
+ if (ret != 0) {
+- dev_info(&connector->dev->pdev->dev, "%s: no EDID data\n",
+- drm_get_connector_name(connector));
+ goto end;
+ }
+ if (!edid_is_valid((struct edid *)buf)) {
+@@ -610,7 +1060,6 @@ end:
+ return ret;
+ }
+
+-#define MAX_EDID_EXT_NUM 4
+ /**
+ * drm_get_edid - get EDID data, if available
+ * @connector: connector we're probing
+@@ -763,6 +1212,7 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
+ num_modes += add_established_modes(connector, edid);
+ num_modes += add_standard_modes(connector, edid);
+ num_modes += add_detailed_info(connector, edid, quirks);
++ num_modes += add_detailed_info_eedid(connector, edid, quirks);
+
+ if (quirks & (EDID_QUIRK_PREFER_LARGE_60 | EDID_QUIRK_PREFER_LARGE_75))
+ edid_fixup_preferred(connector, quirks);
+@@ -788,3 +1238,49 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
+ return num_modes;
+ }
+ EXPORT_SYMBOL(drm_add_edid_modes);
++
++/**
++ * drm_add_modes_noedid - add modes for the connectors without EDID
++ * @connector: connector we're probing
++ * @hdisplay: the horizontal display limit
++ * @vdisplay: the vertical display limit
++ *
++ * Add the specified modes to the connector's mode list. Only when the
++ * hdisplay/vdisplay is not beyond the given limit, it will be added.
++ *
++ * Return number of modes added or 0 if we couldn't find any.
++ */
++int drm_add_modes_noedid(struct drm_connector *connector,
++ int hdisplay, int vdisplay)
++{
++ int i, count, num_modes = 0;
++ struct drm_display_mode *mode, *ptr;
++ struct drm_device *dev = connector->dev;
++
++ count = sizeof(drm_dmt_modes) / sizeof(struct drm_display_mode);
++ if (hdisplay < 0)
++ hdisplay = 0;
++ if (vdisplay < 0)
++ vdisplay = 0;
++
++ for (i = 0; i < count; i++) {
++ ptr = &drm_dmt_modes[i];
++ if (hdisplay && vdisplay) {
++ /*
++ * Only when two are valid, they will be used to check
++ * whether the mode should be added to the mode list of
++ * the connector.
++ */
++ if (ptr->hdisplay > hdisplay ||
++ ptr->vdisplay > vdisplay)
++ continue;
++ }
++ mode = drm_mode_duplicate(dev, ptr);
++ if (mode) {
++ drm_mode_probed_add(connector, mode);
++ num_modes++;
++ }
++ }
++ return num_modes;
++}
++EXPORT_SYMBOL(drm_add_modes_noedid);
+diff --git a/drivers/gpu/drm/drm_encoder_slave.c b/drivers/gpu/drm/drm_encoder_slave.c
+new file mode 100644
+index 0000000..f018469
+--- /dev/null
++++ b/drivers/gpu/drm/drm_encoder_slave.c
+@@ -0,0 +1,116 @@
++/*
++ * Copyright (C) 2009 Francisco Jerez.
++ * 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 (including the
++ * next paragraph) 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 COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS 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 "drm_encoder_slave.h"
++
++/**
++ * drm_i2c_encoder_init - Initialize an I2C slave encoder
++ * @dev: DRM device.
++ * @encoder: Encoder to be attached to the I2C device. You aren't
++ * required to have called drm_encoder_init() before.
++ * @adap: I2C adapter that will be used to communicate with
++ * the device.
++ * @info: Information that will be used to create the I2C device.
++ * Required fields are @addr and @type.
++ *
++ * Create an I2C device on the specified bus (the module containing its
++ * driver is transparently loaded) and attach it to the specified
++ * &drm_encoder_slave. The @slave_funcs field will be initialized with
++ * the hooks provided by the slave driver.
++ *
++ * Returns 0 on success or a negative errno on failure, in particular,
++ * -ENODEV is returned when no matching driver is found.
++ */
++int drm_i2c_encoder_init(struct drm_device *dev,
++ struct drm_encoder_slave *encoder,
++ struct i2c_adapter *adap,
++ const struct i2c_board_info *info)
++{
++ char modalias[sizeof(I2C_MODULE_PREFIX)
++ + I2C_NAME_SIZE];
++ struct module *module = NULL;
++ struct i2c_client *client;
++ struct drm_i2c_encoder_driver *encoder_drv;
++ int err = 0;
++
++ snprintf(modalias, sizeof(modalias),
++ "%s%s", I2C_MODULE_PREFIX, info->type);
++ request_module(modalias);
++
++ client = i2c_new_device(adap, info);
++ if (!client) {
++ err = -ENOMEM;
++ goto fail;
++ }
++
++ if (!client->driver) {
++ err = -ENODEV;
++ goto fail_unregister;
++ }
++
++ module = client->driver->driver.owner;
++ if (!try_module_get(module)) {
++ err = -ENODEV;
++ goto fail_unregister;
++ }
++
++ encoder->bus_priv = client;
++
++ encoder_drv = to_drm_i2c_encoder_driver(client->driver);
++
++ err = encoder_drv->encoder_init(client, dev, encoder);
++ if (err)
++ goto fail_unregister;
++
++ return 0;
++
++fail_unregister:
++ i2c_unregister_device(client);
++ module_put(module);
++fail:
++ return err;
++}
++EXPORT_SYMBOL(drm_i2c_encoder_init);
++
++/**
++ * drm_i2c_encoder_destroy - Unregister the I2C device backing an encoder
++ * @drm_encoder: Encoder to be unregistered.
++ *
++ * This should be called from the @destroy method of an I2C slave
++ * encoder driver once I2C access is no longer needed.
++ */
++void drm_i2c_encoder_destroy(struct drm_encoder *drm_encoder)
++{
++ struct drm_encoder_slave *encoder = to_encoder_slave(drm_encoder);
++ struct i2c_client *client = drm_i2c_encoder_get_client(drm_encoder);
++ struct module *module = client->driver->driver.owner;
++
++ i2c_unregister_device(client);
++ encoder->bus_priv = NULL;
++
++ module_put(module);
++}
++EXPORT_SYMBOL(drm_i2c_encoder_destroy);
+diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
+new file mode 100644
+index 0000000..819ddcb
+--- /dev/null
++++ b/drivers/gpu/drm/drm_fb_helper.c
+@@ -0,0 +1,940 @@
++/*
++ * Copyright (c) 2006-2009 Red Hat Inc.
++ * Copyright (c) 2006-2008 Intel Corporation
++ * Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
++ *
++ * DRM framebuffer helper functions
++ *
++ * Permission to use, copy, modify, distribute, and sell this software and its
++ * documentation for any purpose is hereby granted without fee, provided that
++ * the above copyright notice appear in all copies and that both that copyright
++ * notice and this permission notice appear in supporting documentation, and
++ * that the name of the copyright holders not be used in advertising or
++ * publicity pertaining to distribution of the software without specific,
++ * written prior permission. The copyright holders make no representations
++ * about the suitability of this software for any purpose. It is provided "as
++ * is" without express or implied warranty.
++ *
++ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
++ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
++ * OF THIS SOFTWARE.
++ *
++ * Authors:
++ * Dave Airlie <airlied@linux.ie>
++ * Jesse Barnes <jesse.barnes@intel.com>
++ */
++#include <linux/sysrq.h>
++#include <linux/fb.h>
++#include "drmP.h"
++#include "drm_crtc.h"
++#include "drm_fb_helper.h"
++#include "drm_crtc_helper.h"
++
++MODULE_AUTHOR("David Airlie, Jesse Barnes");
++MODULE_DESCRIPTION("DRM KMS helper");
++MODULE_LICENSE("GPL and additional rights");
++
++static LIST_HEAD(kernel_fb_helper_list);
++
++int drm_fb_helper_add_connector(struct drm_connector *connector)
++{
++ connector->fb_helper_private = kzalloc(sizeof(struct drm_fb_helper_connector), GFP_KERNEL);
++ if (!connector->fb_helper_private)
++ return -ENOMEM;
++
++ return 0;
++}
++EXPORT_SYMBOL(drm_fb_helper_add_connector);
++
++static int my_atoi(const char *name)
++{
++ int val = 0;
++
++ for (;; name++) {
++ switch (*name) {
++ case '0' ... '9':
++ val = 10*val+(*name-'0');
++ break;
++ default:
++ return val;
++ }
++ }
++}
++
++/**
++ * drm_fb_helper_connector_parse_command_line - parse command line for connector
++ * @connector - connector to parse line for
++ * @mode_option - per connector mode option
++ *
++ * This parses the connector specific then generic command lines for
++ * modes and options to configure the connector.
++ *
++ * This uses the same parameters as the fb modedb.c, except for extra
++ * <xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m][eDd]
++ *
++ * enable/enable Digital/disable bit at the end
++ */
++static bool drm_fb_helper_connector_parse_command_line(struct drm_connector *connector,
++ const char *mode_option)
++{
++ const char *name;
++ unsigned int namelen;
++ int res_specified = 0, bpp_specified = 0, refresh_specified = 0;
++ unsigned int xres = 0, yres = 0, bpp = 32, refresh = 0;
++ int yres_specified = 0, cvt = 0, rb = 0, interlace = 0, margins = 0;
++ int i;
++ enum drm_connector_force force = DRM_FORCE_UNSPECIFIED;
++ struct drm_fb_helper_connector *fb_help_conn = connector->fb_helper_private;
++ struct drm_fb_helper_cmdline_mode *cmdline_mode;
++
++ if (!fb_help_conn)
++ return false;
++
++ cmdline_mode = &fb_help_conn->cmdline_mode;
++ if (!mode_option)
++ mode_option = fb_mode_option;
++
++ if (!mode_option) {
++ cmdline_mode->specified = false;
++ return false;
++ }
++
++ name = mode_option;
++ namelen = strlen(name);
++ for (i = namelen-1; i >= 0; i--) {
++ switch (name[i]) {
++ case '@':
++ namelen = i;
++ if (!refresh_specified && !bpp_specified &&
++ !yres_specified) {
++ refresh = my_atoi(&name[i+1]);
++ refresh_specified = 1;
++ if (cvt || rb)
++ cvt = 0;
++ } else
++ goto done;
++ break;
++ case '-':
++ namelen = i;
++ if (!bpp_specified && !yres_specified) {
++ bpp = my_atoi(&name[i+1]);
++ bpp_specified = 1;
++ if (cvt || rb)
++ cvt = 0;
++ } else
++ goto done;
++ break;
++ case 'x':
++ if (!yres_specified) {
++ yres = my_atoi(&name[i+1]);
++ yres_specified = 1;
++ } else
++ goto done;
++ case '0' ... '9':
++ break;
++ case 'M':
++ if (!yres_specified)
++ cvt = 1;
++ break;
++ case 'R':
++ if (!cvt)
++ rb = 1;
++ break;
++ case 'm':
++ if (!cvt)
++ margins = 1;
++ break;
++ case 'i':
++ if (!cvt)
++ interlace = 1;
++ break;
++ case 'e':
++ force = DRM_FORCE_ON;
++ break;
++ case 'D':
++ if ((connector->connector_type != DRM_MODE_CONNECTOR_DVII) ||
++ (connector->connector_type != DRM_MODE_CONNECTOR_HDMIB))
++ force = DRM_FORCE_ON;
++ else
++ force = DRM_FORCE_ON_DIGITAL;
++ break;
++ case 'd':
++ force = DRM_FORCE_OFF;
++ break;
++ default:
++ goto done;
++ }
++ }
++ if (i < 0 && yres_specified) {
++ xres = my_atoi(name);
++ res_specified = 1;
++ }
++done:
++
++ DRM_DEBUG_KMS("cmdline mode for connector %s %dx%d@%dHz%s%s%s\n",
++ drm_get_connector_name(connector), xres, yres,
++ (refresh) ? refresh : 60, (rb) ? " reduced blanking" :
++ "", (margins) ? " with margins" : "", (interlace) ?
++ " interlaced" : "");
++
++ if (force) {
++ const char *s;
++ switch (force) {
++ case DRM_FORCE_OFF: s = "OFF"; break;
++ case DRM_FORCE_ON_DIGITAL: s = "ON - dig"; break;
++ default:
++ case DRM_FORCE_ON: s = "ON"; break;
++ }
++
++ DRM_INFO("forcing %s connector %s\n",
++ drm_get_connector_name(connector), s);
++ connector->force = force;
++ }
++
++ if (res_specified) {
++ cmdline_mode->specified = true;
++ cmdline_mode->xres = xres;
++ cmdline_mode->yres = yres;
++ }
++
++ if (refresh_specified) {
++ cmdline_mode->refresh_specified = true;
++ cmdline_mode->refresh = refresh;
++ }
++
++ if (bpp_specified) {
++ cmdline_mode->bpp_specified = true;
++ cmdline_mode->bpp = bpp;
++ }
++ cmdline_mode->rb = rb ? true : false;
++ cmdline_mode->cvt = cvt ? true : false;
++ cmdline_mode->interlace = interlace ? true : false;
++
++ return true;
++}
++
++int drm_fb_helper_parse_command_line(struct drm_device *dev)
++{
++ struct drm_connector *connector;
++
++ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
++ char *option = NULL;
++
++ /* do something on return - turn off connector maybe */
++ if (fb_get_options(drm_get_connector_name(connector), &option))
++ continue;
++
++ drm_fb_helper_connector_parse_command_line(connector, option);
++ }
++ return 0;
++}
++
++bool drm_fb_helper_force_kernel_mode(void)
++{
++ int i = 0;
++ bool ret, error = false;
++ struct drm_fb_helper *helper;
++
++ if (list_empty(&kernel_fb_helper_list))
++ return false;
++
++ list_for_each_entry(helper, &kernel_fb_helper_list, kernel_fb_list) {
++ for (i = 0; i < helper->crtc_count; i++) {
++ struct drm_mode_set *mode_set = &helper->crtc_info[i].mode_set;
++ ret = drm_crtc_helper_set_config(mode_set);
++ if (ret)
++ error = true;
++ }
++ }
++ return error;
++}
++
++int drm_fb_helper_panic(struct notifier_block *n, unsigned long ununsed,
++ void *panic_str)
++{
++ DRM_ERROR("panic occurred, switching back to text console\n");
++ return drm_fb_helper_force_kernel_mode();
++ return 0;
++}
++EXPORT_SYMBOL(drm_fb_helper_panic);
++
++static struct notifier_block paniced = {
++ .notifier_call = drm_fb_helper_panic,
++};
++
++/**
++ * drm_fb_helper_restore - restore the framebuffer console (kernel) config
++ *
++ * Restore's the kernel's fbcon mode, used for lastclose & panic paths.
++ */
++void drm_fb_helper_restore(void)
++{
++ bool ret;
++ ret = drm_fb_helper_force_kernel_mode();
++ if (ret == true)
++ DRM_ERROR("Failed to restore crtc configuration\n");
++}
++EXPORT_SYMBOL(drm_fb_helper_restore);
++
++#ifdef CONFIG_MAGIC_SYSRQ
++static void drm_fb_helper_restore_work_fn(struct work_struct *ignored)
++{
++ drm_fb_helper_restore();
++}
++static DECLARE_WORK(drm_fb_helper_restore_work, drm_fb_helper_restore_work_fn);
++
++static void drm_fb_helper_sysrq(int dummy1, struct tty_struct *dummy3)
++{
++ schedule_work(&drm_fb_helper_restore_work);
++}
++
++static struct sysrq_key_op sysrq_drm_fb_helper_restore_op = {
++ .handler = drm_fb_helper_sysrq,
++ .help_msg = "force-fb(V)",
++ .action_msg = "Restore framebuffer console",
++};
++#endif
++
++static void drm_fb_helper_on(struct fb_info *info)
++{
++ struct drm_fb_helper *fb_helper = info->par;
++ struct drm_device *dev = fb_helper->dev;
++ struct drm_crtc *crtc;
++ struct drm_encoder *encoder;
++ int i;
++
++ /*
++ * For each CRTC in this fb, turn the crtc on then,
++ * find all associated encoders and turn them on.
++ */
++ for (i = 0; i < fb_helper->crtc_count; i++) {
++ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
++ struct drm_crtc_helper_funcs *crtc_funcs =
++ crtc->helper_private;
++
++ /* Only mess with CRTCs in this fb */
++ if (crtc->base.id != fb_helper->crtc_info[i].crtc_id ||
++ !crtc->enabled)
++ continue;
++
++ mutex_lock(&dev->mode_config.mutex);
++ crtc_funcs->dpms(crtc, DRM_MODE_DPMS_ON);
++ mutex_unlock(&dev->mode_config.mutex);
++
++ /* Found a CRTC on this fb, now find encoders */
++ list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
++ if (encoder->crtc == crtc) {
++ struct drm_encoder_helper_funcs *encoder_funcs;
++
++ encoder_funcs = encoder->helper_private;
++ mutex_lock(&dev->mode_config.mutex);
++ encoder_funcs->dpms(encoder, DRM_MODE_DPMS_ON);
++ mutex_unlock(&dev->mode_config.mutex);
++ }
++ }
++ }
++ }
++}
++
++static void drm_fb_helper_off(struct fb_info *info, int dpms_mode)
++{
++ struct drm_fb_helper *fb_helper = info->par;
++ struct drm_device *dev = fb_helper->dev;
++ struct drm_crtc *crtc;
++ struct drm_encoder *encoder;
++ int i;
++
++ /*
++ * For each CRTC in this fb, find all associated encoders
++ * and turn them off, then turn off the CRTC.
++ */
++ for (i = 0; i < fb_helper->crtc_count; i++) {
++ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
++ struct drm_crtc_helper_funcs *crtc_funcs =
++ crtc->helper_private;
++
++ /* Only mess with CRTCs in this fb */
++ if (crtc->base.id != fb_helper->crtc_info[i].crtc_id ||
++ !crtc->enabled)
++ continue;
++
++ /* Found a CRTC on this fb, now find encoders */
++ list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
++ if (encoder->crtc == crtc) {
++ struct drm_encoder_helper_funcs *encoder_funcs;
++
++ encoder_funcs = encoder->helper_private;
++ mutex_lock(&dev->mode_config.mutex);
++ encoder_funcs->dpms(encoder, dpms_mode);
++ mutex_unlock(&dev->mode_config.mutex);
++ }
++ }
++ if (dpms_mode == DRM_MODE_DPMS_OFF) {
++ mutex_lock(&dev->mode_config.mutex);
++ crtc_funcs->dpms(crtc, dpms_mode);
++ mutex_unlock(&dev->mode_config.mutex);
++ }
++ }
++ }
++}
++
++int drm_fb_helper_blank(int blank, struct fb_info *info)
++{
++ switch (blank) {
++ case FB_BLANK_UNBLANK:
++ drm_fb_helper_on(info);
++ break;
++ case FB_BLANK_NORMAL:
++ drm_fb_helper_off(info, DRM_MODE_DPMS_STANDBY);
++ break;
++ case FB_BLANK_HSYNC_SUSPEND:
++ drm_fb_helper_off(info, DRM_MODE_DPMS_STANDBY);
++ break;
++ case FB_BLANK_VSYNC_SUSPEND:
++ drm_fb_helper_off(info, DRM_MODE_DPMS_SUSPEND);
++ break;
++ case FB_BLANK_POWERDOWN:
++ drm_fb_helper_off(info, DRM_MODE_DPMS_OFF);
++ break;
++ }
++ return 0;
++}
++EXPORT_SYMBOL(drm_fb_helper_blank);
++
++static void drm_fb_helper_crtc_free(struct drm_fb_helper *helper)
++{
++ int i;
++
++ for (i = 0; i < helper->crtc_count; i++)
++ kfree(helper->crtc_info[i].mode_set.connectors);
++ kfree(helper->crtc_info);
++}
++
++int drm_fb_helper_init_crtc_count(struct drm_fb_helper *helper, int crtc_count, int max_conn_count)
++{
++ struct drm_device *dev = helper->dev;
++ struct drm_crtc *crtc;
++ int ret = 0;
++ int i;
++
++ helper->crtc_info = kcalloc(crtc_count, sizeof(struct drm_fb_helper_crtc), GFP_KERNEL);
++ if (!helper->crtc_info)
++ return -ENOMEM;
++
++ helper->crtc_count = crtc_count;
++
++ for (i = 0; i < crtc_count; i++) {
++ helper->crtc_info[i].mode_set.connectors =
++ kcalloc(max_conn_count,
++ sizeof(struct drm_connector *),
++ GFP_KERNEL);
++
++ if (!helper->crtc_info[i].mode_set.connectors) {
++ ret = -ENOMEM;
++ goto out_free;
++ }
++ helper->crtc_info[i].mode_set.num_connectors = 0;
++ }
++
++ i = 0;
++ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
++ helper->crtc_info[i].crtc_id = crtc->base.id;
++ helper->crtc_info[i].mode_set.crtc = crtc;
++ i++;
++ }
++ helper->conn_limit = max_conn_count;
++ return 0;
++out_free:
++ drm_fb_helper_crtc_free(helper);
++ return -ENOMEM;
++}
++EXPORT_SYMBOL(drm_fb_helper_init_crtc_count);
++
++int drm_fb_helper_setcolreg(unsigned regno,
++ unsigned red,
++ unsigned green,
++ unsigned blue,
++ unsigned transp,
++ struct fb_info *info)
++{
++ struct drm_fb_helper *fb_helper = info->par;
++ struct drm_device *dev = fb_helper->dev;
++ struct drm_crtc *crtc;
++ int i;
++
++ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
++ struct drm_framebuffer *fb = fb_helper->fb;
++
++ for (i = 0; i < fb_helper->crtc_count; i++) {
++ if (crtc->base.id == fb_helper->crtc_info[i].crtc_id)
++ break;
++ }
++ if (i == fb_helper->crtc_count)
++ continue;
++
++ if (regno > 255)
++ return 1;
++
++ if (fb->depth == 8) {
++ fb_helper->funcs->gamma_set(crtc, red, green, blue, regno);
++ return 0;
++ }
++
++ if (regno < 16) {
++ switch (fb->depth) {
++ case 15:
++ fb->pseudo_palette[regno] = ((red & 0xf800) >> 1) |
++ ((green & 0xf800) >> 6) |
++ ((blue & 0xf800) >> 11);
++ break;
++ case 16:
++ fb->pseudo_palette[regno] = (red & 0xf800) |
++ ((green & 0xfc00) >> 5) |
++ ((blue & 0xf800) >> 11);
++ break;
++ case 24:
++ case 32:
++ fb->pseudo_palette[regno] =
++ (((red >> 8) & 0xff) << info->var.red.offset) |
++ (((green >> 8) & 0xff) << info->var.green.offset) |
++ (((blue >> 8) & 0xff) << info->var.blue.offset);
++ break;
++ }
++ }
++ }
++ return 0;
++}
++EXPORT_SYMBOL(drm_fb_helper_setcolreg);
++
++int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
++ struct fb_info *info)
++{
++ struct drm_fb_helper *fb_helper = info->par;
++ struct drm_framebuffer *fb = fb_helper->fb;
++ int depth;
++
++ if (var->pixclock == -1 || !var->pixclock)
++ return -EINVAL;
++
++ /* Need to resize the fb object !!! */
++ if (var->xres > fb->width || var->yres > fb->height) {
++ DRM_ERROR("Requested width/height is greater than current fb "
++ "object %dx%d > %dx%d\n", var->xres, var->yres,
++ fb->width, fb->height);
++ DRM_ERROR("Need resizing code.\n");
++ return -EINVAL;
++ }
++
++ switch (var->bits_per_pixel) {
++ case 16:
++ depth = (var->green.length == 6) ? 16 : 15;
++ break;
++ case 32:
++ depth = (var->transp.length > 0) ? 32 : 24;
++ break;
++ default:
++ depth = var->bits_per_pixel;
++ break;
++ }
++
++ switch (depth) {
++ case 8:
++ var->red.offset = 0;
++ var->green.offset = 0;
++ var->blue.offset = 0;
++ var->red.length = 8;
++ var->green.length = 8;
++ var->blue.length = 8;
++ var->transp.length = 0;
++ var->transp.offset = 0;
++ break;
++ case 15:
++ var->red.offset = 10;
++ var->green.offset = 5;
++ var->blue.offset = 0;
++ var->red.length = 5;
++ var->green.length = 5;
++ var->blue.length = 5;
++ var->transp.length = 1;
++ var->transp.offset = 15;
++ break;
++ case 16:
++ var->red.offset = 11;
++ var->green.offset = 5;
++ var->blue.offset = 0;
++ var->red.length = 5;
++ var->green.length = 6;
++ var->blue.length = 5;
++ var->transp.length = 0;
++ var->transp.offset = 0;
++ break;
++ case 24:
++ var->red.offset = 16;
++ var->green.offset = 8;
++ var->blue.offset = 0;
++ var->red.length = 8;
++ var->green.length = 8;
++ var->blue.length = 8;
++ var->transp.length = 0;
++ var->transp.offset = 0;
++ break;
++ case 32:
++ var->red.offset = 16;
++ var->green.offset = 8;
++ var->blue.offset = 0;
++ var->red.length = 8;
++ var->green.length = 8;
++ var->blue.length = 8;
++ var->transp.length = 8;
++ var->transp.offset = 24;
++ break;
++ default:
++ return -EINVAL;
++ }
++ return 0;
++}
++EXPORT_SYMBOL(drm_fb_helper_check_var);
++
++/* this will let fbcon do the mode init */
++int drm_fb_helper_set_par(struct fb_info *info)
++{
++ struct drm_fb_helper *fb_helper = info->par;
++ struct drm_device *dev = fb_helper->dev;
++ struct fb_var_screeninfo *var = &info->var;
++ struct drm_crtc *crtc;
++ int ret;
++ int i;
++
++ if (var->pixclock != -1) {
++ DRM_ERROR("PIXEL CLCOK SET\n");
++ return -EINVAL;
++ }
++
++ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
++
++ for (i = 0; i < fb_helper->crtc_count; i++) {
++ if (crtc->base.id == fb_helper->crtc_info[i].crtc_id)
++ break;
++ }
++ if (i == fb_helper->crtc_count)
++ continue;
++
++ if (crtc->fb == fb_helper->crtc_info[i].mode_set.fb) {
++ mutex_lock(&dev->mode_config.mutex);
++ ret = crtc->funcs->set_config(&fb_helper->crtc_info->mode_set);
++ mutex_unlock(&dev->mode_config.mutex);
++ if (ret)
++ return ret;
++ }
++ }
++ return 0;
++}
++EXPORT_SYMBOL(drm_fb_helper_set_par);
++
++int drm_fb_helper_pan_display(struct fb_var_screeninfo *var,
++ struct fb_info *info)
++{
++ struct drm_fb_helper *fb_helper = info->par;
++ struct drm_device *dev = fb_helper->dev;
++ struct drm_mode_set *modeset;
++ struct drm_crtc *crtc;
++ int ret = 0;
++ int i;
++
++ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
++ for (i = 0; i < fb_helper->crtc_count; i++) {
++ if (crtc->base.id == fb_helper->crtc_info[i].crtc_id)
++ break;
++ }
++
++ if (i == fb_helper->crtc_count)
++ continue;
++
++ modeset = &fb_helper->crtc_info[i].mode_set;
++
++ modeset->x = var->xoffset;
++ modeset->y = var->yoffset;
++
++ if (modeset->num_connectors) {
++ mutex_lock(&dev->mode_config.mutex);
++ ret = crtc->funcs->set_config(modeset);
++ mutex_unlock(&dev->mode_config.mutex);
++ if (!ret) {
++ info->var.xoffset = var->xoffset;
++ info->var.yoffset = var->yoffset;
++ }
++ }
++ }
++ return ret;
++}
++EXPORT_SYMBOL(drm_fb_helper_pan_display);
++
++int drm_fb_helper_single_fb_probe(struct drm_device *dev,
++ int (*fb_create)(struct drm_device *dev,
++ uint32_t fb_width,
++ uint32_t fb_height,
++ uint32_t surface_width,
++ uint32_t surface_height,
++ uint32_t surface_depth,
++ uint32_t surface_bpp,
++ struct drm_framebuffer **fb_ptr))
++{
++ struct drm_crtc *crtc;
++ struct drm_connector *connector;
++ unsigned int fb_width = (unsigned)-1, fb_height = (unsigned)-1;
++ unsigned int surface_width = 0, surface_height = 0;
++ int new_fb = 0;
++ int crtc_count = 0;
++ int ret, i, conn_count = 0;
++ struct fb_info *info;
++ struct drm_framebuffer *fb;
++ struct drm_mode_set *modeset = NULL;
++ struct drm_fb_helper *fb_helper;
++ uint32_t surface_depth = 24, surface_bpp = 32;
++
++ /* first up get a count of crtcs now in use and new min/maxes width/heights */
++ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
++ struct drm_fb_helper_connector *fb_help_conn = connector->fb_helper_private;
++
++ struct drm_fb_helper_cmdline_mode *cmdline_mode;
++
++ if (!fb_help_conn)
++ continue;
++
++ cmdline_mode = &fb_help_conn->cmdline_mode;
++
++ if (cmdline_mode->bpp_specified) {
++ switch (cmdline_mode->bpp) {
++ case 8:
++ surface_depth = surface_bpp = 8;
++ break;
++ case 15:
++ surface_depth = 15;
++ surface_bpp = 16;
++ break;
++ case 16:
++ surface_depth = surface_bpp = 16;
++ break;
++ case 24:
++ surface_depth = surface_bpp = 24;
++ break;
++ case 32:
++ surface_depth = 24;
++ surface_bpp = 32;
++ break;
++ }
++ break;
++ }
++ }
++
++ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
++ if (drm_helper_crtc_in_use(crtc)) {
++ if (crtc->desired_mode) {
++ if (crtc->desired_mode->hdisplay < fb_width)
++ fb_width = crtc->desired_mode->hdisplay;
++
++ if (crtc->desired_mode->vdisplay < fb_height)
++ fb_height = crtc->desired_mode->vdisplay;
++
++ if (crtc->desired_mode->hdisplay > surface_width)
++ surface_width = crtc->desired_mode->hdisplay;
++
++ if (crtc->desired_mode->vdisplay > surface_height)
++ surface_height = crtc->desired_mode->vdisplay;
++ }
++ crtc_count++;
++ }
++ }
++
++ if (crtc_count == 0 || fb_width == -1 || fb_height == -1) {
++ /* hmm everyone went away - assume VGA cable just fell out
++ and will come back later. */
++ return 0;
++ }
++
++ /* do we have an fb already? */
++ if (list_empty(&dev->mode_config.fb_kernel_list)) {
++ ret = (*fb_create)(dev, fb_width, fb_height, surface_width,
++ surface_height, surface_depth, surface_bpp,
++ &fb);
++ if (ret)
++ return -EINVAL;
++ new_fb = 1;
++ } else {
++ fb = list_first_entry(&dev->mode_config.fb_kernel_list,
++ struct drm_framebuffer, filp_head);
++
++ /* if someone hotplugs something bigger than we have already allocated, we are pwned.
++ As really we can't resize an fbdev that is in the wild currently due to fbdev
++ not really being designed for the lower layers moving stuff around under it.
++ - so in the grand style of things - punt. */
++ if ((fb->width < surface_width) ||
++ (fb->height < surface_height)) {
++ DRM_ERROR("Framebuffer not large enough to scale console onto.\n");
++ return -EINVAL;
++ }
++ }
++
++ info = fb->fbdev;
++ fb_helper = info->par;
++
++ crtc_count = 0;
++ /* okay we need to setup new connector sets in the crtcs */
++ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
++ modeset = &fb_helper->crtc_info[crtc_count].mode_set;
++ modeset->fb = fb;
++ conn_count = 0;
++ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
++ if (connector->encoder)
++ if (connector->encoder->crtc == modeset->crtc) {
++ modeset->connectors[conn_count] = connector;
++ conn_count++;
++ if (conn_count > fb_helper->conn_limit)
++ BUG();
++ }
++ }
++
++ for (i = conn_count; i < fb_helper->conn_limit; i++)
++ modeset->connectors[i] = NULL;
++
++ modeset->crtc = crtc;
++ crtc_count++;
++
++ modeset->num_connectors = conn_count;
++ if (modeset->crtc->desired_mode) {
++ if (modeset->mode)
++ drm_mode_destroy(dev, modeset->mode);
++ modeset->mode = drm_mode_duplicate(dev,
++ modeset->crtc->desired_mode);
++ }
++ }
++ fb_helper->crtc_count = crtc_count;
++ fb_helper->fb = fb;
++
++ if (new_fb) {
++ info->var.pixclock = -1;
++ if (register_framebuffer(info) < 0)
++ return -EINVAL;
++ } else {
++ drm_fb_helper_set_par(info);
++ }
++ printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node,
++ info->fix.id);
++
++ /* Switch back to kernel console on panic */
++ /* multi card linked list maybe */
++ if (list_empty(&kernel_fb_helper_list)) {
++ printk(KERN_INFO "registered panic notifier\n");
++ atomic_notifier_chain_register(&panic_notifier_list,
++ &paniced);
++ register_sysrq_key('v', &sysrq_drm_fb_helper_restore_op);
++ }
++ list_add(&fb_helper->kernel_fb_list, &kernel_fb_helper_list);
++ return 0;
++}
++EXPORT_SYMBOL(drm_fb_helper_single_fb_probe);
++
++void drm_fb_helper_free(struct drm_fb_helper *helper)
++{
++ list_del(&helper->kernel_fb_list);
++ if (list_empty(&kernel_fb_helper_list)) {
++ printk(KERN_INFO "unregistered panic notifier\n");
++ atomic_notifier_chain_unregister(&panic_notifier_list,
++ &paniced);
++ unregister_sysrq_key('v', &sysrq_drm_fb_helper_restore_op);
++ }
++ drm_fb_helper_crtc_free(helper);
++}
++EXPORT_SYMBOL(drm_fb_helper_free);
++
++void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch)
++{
++ info->fix.type = FB_TYPE_PACKED_PIXELS;
++ info->fix.visual = FB_VISUAL_TRUECOLOR;
++ info->fix.type_aux = 0;
++ info->fix.xpanstep = 1; /* doing it in hw */
++ info->fix.ypanstep = 1; /* doing it in hw */
++ info->fix.ywrapstep = 0;
++ info->fix.accel = FB_ACCEL_NONE;
++ info->fix.type_aux = 0;
++
++ info->fix.line_length = pitch;
++ return;
++}
++EXPORT_SYMBOL(drm_fb_helper_fill_fix);
++
++void drm_fb_helper_fill_var(struct fb_info *info, struct drm_framebuffer *fb,
++ uint32_t fb_width, uint32_t fb_height)
++{
++ info->pseudo_palette = fb->pseudo_palette;
++ info->var.xres_virtual = fb->width;
++ info->var.yres_virtual = fb->height;
++ info->var.bits_per_pixel = fb->bits_per_pixel;
++ info->var.xoffset = 0;
++ info->var.yoffset = 0;
++ info->var.activate = FB_ACTIVATE_NOW;
++ info->var.height = -1;
++ info->var.width = -1;
++
++ switch (fb->depth) {
++ case 8:
++ info->var.red.offset = 0;
++ info->var.green.offset = 0;
++ info->var.blue.offset = 0;
++ info->var.red.length = 8; /* 8bit DAC */
++ info->var.green.length = 8;
++ info->var.blue.length = 8;
++ info->var.transp.offset = 0;
++ info->var.transp.length = 0;
++ break;
++ case 15:
++ info->var.red.offset = 10;
++ info->var.green.offset = 5;
++ info->var.blue.offset = 0;
++ info->var.red.length = 5;
++ info->var.green.length = 5;
++ info->var.blue.length = 5;
++ info->var.transp.offset = 15;
++ info->var.transp.length = 1;
++ break;
++ case 16:
++ info->var.red.offset = 11;
++ info->var.green.offset = 5;
++ info->var.blue.offset = 0;
++ info->var.red.length = 5;
++ info->var.green.length = 6;
++ info->var.blue.length = 5;
++ info->var.transp.offset = 0;
++ break;
++ case 24:
++ info->var.red.offset = 16;
++ info->var.green.offset = 8;
++ info->var.blue.offset = 0;
++ info->var.red.length = 8;
++ info->var.green.length = 8;
++ info->var.blue.length = 8;
++ info->var.transp.offset = 0;
++ info->var.transp.length = 0;
++ break;
++ case 32:
++ info->var.red.offset = 16;
++ info->var.green.offset = 8;
++ info->var.blue.offset = 0;
++ info->var.red.length = 8;
++ info->var.green.length = 8;
++ info->var.blue.length = 8;
++ info->var.transp.offset = 24;
++ info->var.transp.length = 8;
++ break;
++ default:
++ break;
++ }
++
++ info->var.xres = fb_width;
++ info->var.yres = fb_height;
++}
++EXPORT_SYMBOL(drm_fb_helper_fill_var);
+diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
+index ffe8f43..230c9ff 100644
+--- a/drivers/gpu/drm/drm_gem.c
++++ b/drivers/gpu/drm/drm_gem.c
+@@ -164,7 +164,7 @@ EXPORT_SYMBOL(drm_gem_object_alloc);
+ * Removes the mapping from handle to filp for this object.
+ */
+ static int
+-drm_gem_handle_delete(struct drm_file *filp, int handle)
++drm_gem_handle_delete(struct drm_file *filp, u32 handle)
+ {
+ struct drm_device *dev;
+ struct drm_gem_object *obj;
+@@ -207,7 +207,7 @@ drm_gem_handle_delete(struct drm_file *filp, int handle)
+ int
+ drm_gem_handle_create(struct drm_file *file_priv,
+ struct drm_gem_object *obj,
+- int *handlep)
++ u32 *handlep)
+ {
+ int ret;
+
+@@ -221,7 +221,7 @@ again:
+
+ /* do the allocation under our spinlock */
+ spin_lock(&file_priv->table_lock);
+- ret = idr_get_new_above(&file_priv->object_idr, obj, 1, handlep);
++ ret = idr_get_new_above(&file_priv->object_idr, obj, 1, (int *)handlep);
+ spin_unlock(&file_priv->table_lock);
+ if (ret == -EAGAIN)
+ goto again;
+@@ -237,7 +237,7 @@ EXPORT_SYMBOL(drm_gem_handle_create);
+ /** Returns a reference to the object named by the handle. */
+ struct drm_gem_object *
+ drm_gem_object_lookup(struct drm_device *dev, struct drm_file *filp,
+- int handle)
++ u32 handle)
+ {
+ struct drm_gem_object *obj;
+
+@@ -344,7 +344,7 @@ drm_gem_open_ioctl(struct drm_device *dev, void *data,
+ struct drm_gem_open *args = data;
+ struct drm_gem_object *obj;
+ int ret;
+- int handle;
++ u32 handle;
+
+ if (!(dev->driver->driver_features & DRIVER_GEM))
+ return -ENODEV;
+@@ -539,7 +539,6 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
+ vma->vm_flags |= VM_RESERVED | VM_IO | VM_PFNMAP | VM_DONTEXPAND;
+ vma->vm_ops = obj->dev->driver->gem_vm_ops;
+ vma->vm_private_data = map->handle;
+- /* FIXME: use pgprot_writecombine when available */
+ vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
+
+ /* Take a ref for this mapping of the object, so that the fault
+diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
+index 3e47869..c861d80 100644
+--- a/drivers/gpu/drm/drm_mm.c
++++ b/drivers/gpu/drm/drm_mm.c
+@@ -44,6 +44,7 @@
+ #include "drmP.h"
+ #include "drm_mm.h"
+ #include <linux/slab.h>
++#include <linux/seq_file.h>
+
+ #define MM_UNUSED_TARGET 4
+
+@@ -370,3 +371,23 @@ void drm_mm_takedown(struct drm_mm * mm)
+ BUG_ON(mm->num_unused != 0);
+ }
+ EXPORT_SYMBOL(drm_mm_takedown);
++
++#if defined(CONFIG_DEBUG_FS)
++int drm_mm_dump_table(struct seq_file *m, struct drm_mm *mm)
++{
++ struct drm_mm_node *entry;
++ int total_used = 0, total_free = 0, total = 0;
++
++ list_for_each_entry(entry, &mm->ml_entry, ml_entry) {
++ seq_printf(m, "0x%08lx-0x%08lx: 0x%08lx: %s\n", entry->start, entry->start + entry->size, entry->size, entry->free ? "free" : "used");
++ total += entry->size;
++ if (entry->free)
++ total_free += entry->size;
++ else
++ total_used += entry->size;
++ }
++ seq_printf(m, "total: %d, used %d free %d\n", total, total_free, total_used);
++ return 0;
++}
++EXPORT_SYMBOL(drm_mm_dump_table);
++#endif
+diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
+index 7914097..51f6772 100644
+--- a/drivers/gpu/drm/drm_modes.c
++++ b/drivers/gpu/drm/drm_modes.c
+@@ -8,6 +8,8 @@
+ * Copyright © 2007 Dave Airlie
+ * Copyright © 2007-2008 Intel Corporation
+ * Jesse Barnes <jesse.barnes@intel.com>
++ * Copyright 2005-2006 Luc Verhaegen
++ * Copyright (c) 2001, Andy Ritger aritger@nvidia.com
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+@@ -38,7 +40,6 @@
+ #include "drm.h"
+ #include "drm_crtc.h"
+
+-#define DRM_MODESET_DEBUG "drm_mode"
+ /**
+ * drm_mode_debug_printmodeline - debug print a mode
+ * @dev: DRM device
+@@ -51,8 +52,8 @@
+ */
+ void drm_mode_debug_printmodeline(struct drm_display_mode *mode)
+ {
+- DRM_DEBUG_MODE(DRM_MODESET_DEBUG,
+- "Modeline %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x\n",
++ DRM_DEBUG_KMS("Modeline %d:\"%s\" %d %d %d %d %d %d %d %d %d %d "
++ "0x%x 0x%x\n",
+ mode->base.id, mode->name, mode->vrefresh, mode->clock,
+ mode->hdisplay, mode->hsync_start,
+ mode->hsync_end, mode->htotal,
+@@ -62,6 +63,419 @@ void drm_mode_debug_printmodeline(struct drm_display_mode *mode)
+ EXPORT_SYMBOL(drm_mode_debug_printmodeline);
+
+ /**
++ * drm_cvt_mode -create a modeline based on CVT algorithm
++ * @dev: DRM device
++ * @hdisplay: hdisplay size
++ * @vdisplay: vdisplay size
++ * @vrefresh : vrefresh rate
++ * @reduced : Whether the GTF calculation is simplified
++ * @interlaced:Whether the interlace is supported
++ *
++ * LOCKING:
++ * none.
++ *
++ * return the modeline based on CVT algorithm
++ *
++ * This function is called to generate the modeline based on CVT algorithm
++ * according to the hdisplay, vdisplay, vrefresh.
++ * It is based from the VESA(TM) Coordinated Video Timing Generator by
++ * Graham Loveridge April 9, 2003 available at
++ * http://www.vesa.org/public/CVT/CVTd6r1.xls
++ *
++ * And it is copied from xf86CVTmode in xserver/hw/xfree86/modes/xf86cvt.c.
++ * What I have done is to translate it by using integer calculation.
++ */
++#define HV_FACTOR 1000
++struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, int hdisplay,
++ int vdisplay, int vrefresh,
++ bool reduced, bool interlaced, bool margins)
++{
++ /* 1) top/bottom margin size (% of height) - default: 1.8, */
++#define CVT_MARGIN_PERCENTAGE 18
++ /* 2) character cell horizontal granularity (pixels) - default 8 */
++#define CVT_H_GRANULARITY 8
++ /* 3) Minimum vertical porch (lines) - default 3 */
++#define CVT_MIN_V_PORCH 3
++ /* 4) Minimum number of vertical back porch lines - default 6 */
++#define CVT_MIN_V_BPORCH 6
++ /* Pixel Clock step (kHz) */
++#define CVT_CLOCK_STEP 250
++ struct drm_display_mode *drm_mode;
++ unsigned int vfieldrate, hperiod;
++ int hdisplay_rnd, hmargin, vdisplay_rnd, vmargin, vsync;
++ int interlace;
++
++ /* allocate the drm_display_mode structure. If failure, we will
++ * return directly
++ */
++ drm_mode = drm_mode_create(dev);
++ if (!drm_mode)
++ return NULL;
++
++ /* the CVT default refresh rate is 60Hz */
++ if (!vrefresh)
++ vrefresh = 60;
++
++ /* the required field fresh rate */
++ if (interlaced)
++ vfieldrate = vrefresh * 2;
++ else
++ vfieldrate = vrefresh;
++
++ /* horizontal pixels */
++ hdisplay_rnd = hdisplay - (hdisplay % CVT_H_GRANULARITY);
++
++ /* determine the left&right borders */
++ hmargin = 0;
++ if (margins) {
++ hmargin = hdisplay_rnd * CVT_MARGIN_PERCENTAGE / 1000;
++ hmargin -= hmargin % CVT_H_GRANULARITY;
++ }
++ /* find the total active pixels */
++ drm_mode->hdisplay = hdisplay_rnd + 2 * hmargin;
++
++ /* find the number of lines per field */
++ if (interlaced)
++ vdisplay_rnd = vdisplay / 2;
++ else
++ vdisplay_rnd = vdisplay;
++
++ /* find the top & bottom borders */
++ vmargin = 0;
++ if (margins)
++ vmargin = vdisplay_rnd * CVT_MARGIN_PERCENTAGE / 1000;
++
++ drm_mode->vdisplay = vdisplay + 2 * vmargin;
++
++ /* Interlaced */
++ if (interlaced)
++ interlace = 1;
++ else
++ interlace = 0;
++
++ /* Determine VSync Width from aspect ratio */
++ if (!(vdisplay % 3) && ((vdisplay * 4 / 3) == hdisplay))
++ vsync = 4;
++ else if (!(vdisplay % 9) && ((vdisplay * 16 / 9) == hdisplay))
++ vsync = 5;
++ else if (!(vdisplay % 10) && ((vdisplay * 16 / 10) == hdisplay))
++ vsync = 6;
++ else if (!(vdisplay % 4) && ((vdisplay * 5 / 4) == hdisplay))
++ vsync = 7;
++ else if (!(vdisplay % 9) && ((vdisplay * 15 / 9) == hdisplay))
++ vsync = 7;
++ else /* custom */
++ vsync = 10;
++
++ if (!reduced) {
++ /* simplify the GTF calculation */
++ /* 4) Minimum time of vertical sync + back porch interval (µs)
++ * default 550.0
++ */
++ int tmp1, tmp2;
++#define CVT_MIN_VSYNC_BP 550
++ /* 3) Nominal HSync width (% of line period) - default 8 */
++#define CVT_HSYNC_PERCENTAGE 8
++ unsigned int hblank_percentage;
++ int vsyncandback_porch, vback_porch, hblank;
++
++ /* estimated the horizontal period */
++ tmp1 = HV_FACTOR * 1000000 -
++ CVT_MIN_VSYNC_BP * HV_FACTOR * vfieldrate;
++ tmp2 = (vdisplay_rnd + 2 * vmargin + CVT_MIN_V_PORCH) * 2 +
++ interlace;
++ hperiod = tmp1 * 2 / (tmp2 * vfieldrate);
++
++ tmp1 = CVT_MIN_VSYNC_BP * HV_FACTOR / hperiod + 1;
++ /* 9. Find number of lines in sync + backporch */
++ if (tmp1 < (vsync + CVT_MIN_V_PORCH))
++ vsyncandback_porch = vsync + CVT_MIN_V_PORCH;
++ else
++ vsyncandback_porch = tmp1;
++ /* 10. Find number of lines in back porch */
++ vback_porch = vsyncandback_porch - vsync;
++ drm_mode->vtotal = vdisplay_rnd + 2 * vmargin +
++ vsyncandback_porch + CVT_MIN_V_PORCH;
++ /* 5) Definition of Horizontal blanking time limitation */
++ /* Gradient (%/kHz) - default 600 */
++#define CVT_M_FACTOR 600
++ /* Offset (%) - default 40 */
++#define CVT_C_FACTOR 40
++ /* Blanking time scaling factor - default 128 */
++#define CVT_K_FACTOR 128
++ /* Scaling factor weighting - default 20 */
++#define CVT_J_FACTOR 20
++#define CVT_M_PRIME (CVT_M_FACTOR * CVT_K_FACTOR / 256)
++#define CVT_C_PRIME ((CVT_C_FACTOR - CVT_J_FACTOR) * CVT_K_FACTOR / 256 + \
++ CVT_J_FACTOR)
++ /* 12. Find ideal blanking duty cycle from formula */
++ hblank_percentage = CVT_C_PRIME * HV_FACTOR - CVT_M_PRIME *
++ hperiod / 1000;
++ /* 13. Blanking time */
++ if (hblank_percentage < 20 * HV_FACTOR)
++ hblank_percentage = 20 * HV_FACTOR;
++ hblank = drm_mode->hdisplay * hblank_percentage /
++ (100 * HV_FACTOR - hblank_percentage);
++ hblank -= hblank % (2 * CVT_H_GRANULARITY);
++ /* 14. find the total pixes per line */
++ drm_mode->htotal = drm_mode->hdisplay + hblank;
++ drm_mode->hsync_end = drm_mode->hdisplay + hblank / 2;
++ drm_mode->hsync_start = drm_mode->hsync_end -
++ (drm_mode->htotal * CVT_HSYNC_PERCENTAGE) / 100;
++ drm_mode->hsync_start += CVT_H_GRANULARITY -
++ drm_mode->hsync_start % CVT_H_GRANULARITY;
++ /* fill the Vsync values */
++ drm_mode->vsync_start = drm_mode->vdisplay + CVT_MIN_V_PORCH;
++ drm_mode->vsync_end = drm_mode->vsync_start + vsync;
++ } else {
++ /* Reduced blanking */
++ /* Minimum vertical blanking interval time (µs)- default 460 */
++#define CVT_RB_MIN_VBLANK 460
++ /* Fixed number of clocks for horizontal sync */
++#define CVT_RB_H_SYNC 32
++ /* Fixed number of clocks for horizontal blanking */
++#define CVT_RB_H_BLANK 160
++ /* Fixed number of lines for vertical front porch - default 3*/
++#define CVT_RB_VFPORCH 3
++ int vbilines;
++ int tmp1, tmp2;
++ /* 8. Estimate Horizontal period. */
++ tmp1 = HV_FACTOR * 1000000 -
++ CVT_RB_MIN_VBLANK * HV_FACTOR * vfieldrate;
++ tmp2 = vdisplay_rnd + 2 * vmargin;
++ hperiod = tmp1 / (tmp2 * vfieldrate);
++ /* 9. Find number of lines in vertical blanking */
++ vbilines = CVT_RB_MIN_VBLANK * HV_FACTOR / hperiod + 1;
++ /* 10. Check if vertical blanking is sufficient */
++ if (vbilines < (CVT_RB_VFPORCH + vsync + CVT_MIN_V_BPORCH))
++ vbilines = CVT_RB_VFPORCH + vsync + CVT_MIN_V_BPORCH;
++ /* 11. Find total number of lines in vertical field */
++ drm_mode->vtotal = vdisplay_rnd + 2 * vmargin + vbilines;
++ /* 12. Find total number of pixels in a line */
++ drm_mode->htotal = drm_mode->hdisplay + CVT_RB_H_BLANK;
++ /* Fill in HSync values */
++ drm_mode->hsync_end = drm_mode->hdisplay + CVT_RB_H_BLANK / 2;
++ drm_mode->hsync_start = drm_mode->hsync_end = CVT_RB_H_SYNC;
++ }
++ /* 15/13. Find pixel clock frequency (kHz for xf86) */
++ drm_mode->clock = drm_mode->htotal * HV_FACTOR * 1000 / hperiod;
++ drm_mode->clock -= drm_mode->clock % CVT_CLOCK_STEP;
++ /* 18/16. Find actual vertical frame frequency */
++ /* ignore - just set the mode flag for interlaced */
++ if (interlaced)
++ drm_mode->vtotal *= 2;
++ /* Fill the mode line name */
++ drm_mode_set_name(drm_mode);
++ if (reduced)
++ drm_mode->flags |= (DRM_MODE_FLAG_PHSYNC |
++ DRM_MODE_FLAG_NVSYNC);
++ else
++ drm_mode->flags |= (DRM_MODE_FLAG_PVSYNC |
++ DRM_MODE_FLAG_NHSYNC);
++ if (interlaced)
++ drm_mode->flags |= DRM_MODE_FLAG_INTERLACE;
++
++ return drm_mode;
++}
++EXPORT_SYMBOL(drm_cvt_mode);
++
++/**
++ * drm_gtf_mode - create the modeline based on GTF algorithm
++ *
++ * @dev :drm device
++ * @hdisplay :hdisplay size
++ * @vdisplay :vdisplay size
++ * @vrefresh :vrefresh rate.
++ * @interlaced :whether the interlace is supported
++ * @margins :whether the margin is supported
++ *
++ * LOCKING.
++ * none.
++ *
++ * return the modeline based on GTF algorithm
++ *
++ * This function is to create the modeline based on the GTF algorithm.
++ * Generalized Timing Formula is derived from:
++ * GTF Spreadsheet by Andy Morrish (1/5/97)
++ * available at http://www.vesa.org
++ *
++ * And it is copied from the file of xserver/hw/xfree86/modes/xf86gtf.c.
++ * What I have done is to translate it by using integer calculation.
++ * I also refer to the function of fb_get_mode in the file of
++ * drivers/video/fbmon.c
++ */
++struct drm_display_mode *drm_gtf_mode(struct drm_device *dev, int hdisplay,
++ int vdisplay, int vrefresh,
++ bool interlaced, int margins)
++{
++ /* 1) top/bottom margin size (% of height) - default: 1.8, */
++#define GTF_MARGIN_PERCENTAGE 18
++ /* 2) character cell horizontal granularity (pixels) - default 8 */
++#define GTF_CELL_GRAN 8
++ /* 3) Minimum vertical porch (lines) - default 3 */
++#define GTF_MIN_V_PORCH 1
++ /* width of vsync in lines */
++#define V_SYNC_RQD 3
++ /* width of hsync as % of total line */
++#define H_SYNC_PERCENT 8
++ /* min time of vsync + back porch (microsec) */
++#define MIN_VSYNC_PLUS_BP 550
++ /* blanking formula gradient */
++#define GTF_M 600
++ /* blanking formula offset */
++#define GTF_C 40
++ /* blanking formula scaling factor */
++#define GTF_K 128
++ /* blanking formula scaling factor */
++#define GTF_J 20
++ /* C' and M' are part of the Blanking Duty Cycle computation */
++#define GTF_C_PRIME (((GTF_C - GTF_J) * GTF_K / 256) + GTF_J)
++#define GTF_M_PRIME (GTF_K * GTF_M / 256)
++ struct drm_display_mode *drm_mode;
++ unsigned int hdisplay_rnd, vdisplay_rnd, vfieldrate_rqd;
++ int top_margin, bottom_margin;
++ int interlace;
++ unsigned int hfreq_est;
++ int vsync_plus_bp, vback_porch;
++ unsigned int vtotal_lines, vfieldrate_est, hperiod;
++ unsigned int vfield_rate, vframe_rate;
++ int left_margin, right_margin;
++ unsigned int total_active_pixels, ideal_duty_cycle;
++ unsigned int hblank, total_pixels, pixel_freq;
++ int hsync, hfront_porch, vodd_front_porch_lines;
++ unsigned int tmp1, tmp2;
++
++ drm_mode = drm_mode_create(dev);
++ if (!drm_mode)
++ return NULL;
++
++ /* 1. In order to give correct results, the number of horizontal
++ * pixels requested is first processed to ensure that it is divisible
++ * by the character size, by rounding it to the nearest character
++ * cell boundary:
++ */
++ hdisplay_rnd = (hdisplay + GTF_CELL_GRAN / 2) / GTF_CELL_GRAN;
++ hdisplay_rnd = hdisplay_rnd * GTF_CELL_GRAN;
++
++ /* 2. If interlace is requested, the number of vertical lines assumed
++ * by the calculation must be halved, as the computation calculates
++ * the number of vertical lines per field.
++ */
++ if (interlaced)
++ vdisplay_rnd = vdisplay / 2;
++ else
++ vdisplay_rnd = vdisplay;
++
++ /* 3. Find the frame rate required: */
++ if (interlaced)
++ vfieldrate_rqd = vrefresh * 2;
++ else
++ vfieldrate_rqd = vrefresh;
++
++ /* 4. Find number of lines in Top margin: */
++ top_margin = 0;
++ if (margins)
++ top_margin = (vdisplay_rnd * GTF_MARGIN_PERCENTAGE + 500) /
++ 1000;
++ /* 5. Find number of lines in bottom margin: */
++ bottom_margin = top_margin;
++
++ /* 6. If interlace is required, then set variable interlace: */
++ if (interlaced)
++ interlace = 1;
++ else
++ interlace = 0;
++
++ /* 7. Estimate the Horizontal frequency */
++ {
++ tmp1 = (1000000 - MIN_VSYNC_PLUS_BP * vfieldrate_rqd) / 500;
++ tmp2 = (vdisplay_rnd + 2 * top_margin + GTF_MIN_V_PORCH) *
++ 2 + interlace;
++ hfreq_est = (tmp2 * 1000 * vfieldrate_rqd) / tmp1;
++ }
++
++ /* 8. Find the number of lines in V sync + back porch */
++ /* [V SYNC+BP] = RINT(([MIN VSYNC+BP] * hfreq_est / 1000000)) */
++ vsync_plus_bp = MIN_VSYNC_PLUS_BP * hfreq_est / 1000;
++ vsync_plus_bp = (vsync_plus_bp + 500) / 1000;
++ /* 9. Find the number of lines in V back porch alone: */
++ vback_porch = vsync_plus_bp - V_SYNC_RQD;
++ /* 10. Find the total number of lines in Vertical field period: */
++ vtotal_lines = vdisplay_rnd + top_margin + bottom_margin +
++ vsync_plus_bp + GTF_MIN_V_PORCH;
++ /* 11. Estimate the Vertical field frequency: */
++ vfieldrate_est = hfreq_est / vtotal_lines;
++ /* 12. Find the actual horizontal period: */
++ hperiod = 1000000 / (vfieldrate_rqd * vtotal_lines);
++
++ /* 13. Find the actual Vertical field frequency: */
++ vfield_rate = hfreq_est / vtotal_lines;
++ /* 14. Find the Vertical frame frequency: */
++ if (interlaced)
++ vframe_rate = vfield_rate / 2;
++ else
++ vframe_rate = vfield_rate;
++ /* 15. Find number of pixels in left margin: */
++ if (margins)
++ left_margin = (hdisplay_rnd * GTF_MARGIN_PERCENTAGE + 500) /
++ 1000;
++ else
++ left_margin = 0;
++
++ /* 16.Find number of pixels in right margin: */
++ right_margin = left_margin;
++ /* 17.Find total number of active pixels in image and left and right */
++ total_active_pixels = hdisplay_rnd + left_margin + right_margin;
++ /* 18.Find the ideal blanking duty cycle from blanking duty cycle */
++ ideal_duty_cycle = GTF_C_PRIME * 1000 -
++ (GTF_M_PRIME * 1000000 / hfreq_est);
++ /* 19.Find the number of pixels in the blanking time to the nearest
++ * double character cell: */
++ hblank = total_active_pixels * ideal_duty_cycle /
++ (100000 - ideal_duty_cycle);
++ hblank = (hblank + GTF_CELL_GRAN) / (2 * GTF_CELL_GRAN);
++ hblank = hblank * 2 * GTF_CELL_GRAN;
++ /* 20.Find total number of pixels: */
++ total_pixels = total_active_pixels + hblank;
++ /* 21.Find pixel clock frequency: */
++ pixel_freq = total_pixels * hfreq_est / 1000;
++ /* Stage 1 computations are now complete; I should really pass
++ * the results to another function and do the Stage 2 computations,
++ * but I only need a few more values so I'll just append the
++ * computations here for now */
++ /* 17. Find the number of pixels in the horizontal sync period: */
++ hsync = H_SYNC_PERCENT * total_pixels / 100;
++ hsync = (hsync + GTF_CELL_GRAN / 2) / GTF_CELL_GRAN;
++ hsync = hsync * GTF_CELL_GRAN;
++ /* 18. Find the number of pixels in horizontal front porch period */
++ hfront_porch = hblank / 2 - hsync;
++ /* 36. Find the number of lines in the odd front porch period: */
++ vodd_front_porch_lines = GTF_MIN_V_PORCH ;
++
++ /* finally, pack the results in the mode struct */
++ drm_mode->hdisplay = hdisplay_rnd;
++ drm_mode->hsync_start = hdisplay_rnd + hfront_porch;
++ drm_mode->hsync_end = drm_mode->hsync_start + hsync;
++ drm_mode->htotal = total_pixels;
++ drm_mode->vdisplay = vdisplay_rnd;
++ drm_mode->vsync_start = vdisplay_rnd + vodd_front_porch_lines;
++ drm_mode->vsync_end = drm_mode->vsync_start + V_SYNC_RQD;
++ drm_mode->vtotal = vtotal_lines;
++
++ drm_mode->clock = pixel_freq;
++
++ drm_mode_set_name(drm_mode);
++ drm_mode->flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC;
++
++ if (interlaced) {
++ drm_mode->vtotal *= 2;
++ drm_mode->flags |= DRM_MODE_FLAG_INTERLACE;
++ }
++
++ return drm_mode;
++}
++EXPORT_SYMBOL(drm_gtf_mode);
++/**
+ * drm_mode_set_name - set the name on a mode
+ * @mode: name will be set in this mode
+ *
+@@ -151,7 +565,9 @@ EXPORT_SYMBOL(drm_mode_height);
+ * FIXME: why is this needed? shouldn't vrefresh be set already?
+ *
+ * RETURNS:
+- * Vertical refresh rate of @mode x 1000. For precision reasons.
++ * Vertical refresh rate. It will be the result of actual value plus 0.5.
++ * If it is 70.288, it will return 70Hz.
++ * If it is 59.6, it will return 60Hz.
+ */
+ int drm_mode_vrefresh(struct drm_display_mode *mode)
+ {
+@@ -161,14 +577,13 @@ int drm_mode_vrefresh(struct drm_display_mode *mode)
+ if (mode->vrefresh > 0)
+ refresh = mode->vrefresh;
+ else if (mode->htotal > 0 && mode->vtotal > 0) {
++ int vtotal;
++ vtotal = mode->vtotal;
+ /* work out vrefresh the value will be x1000 */
+ calc_val = (mode->clock * 1000);
+-
+ calc_val /= mode->htotal;
+- calc_val *= 1000;
+- calc_val /= mode->vtotal;
++ refresh = (calc_val + vtotal / 2) / vtotal;
+
+- refresh = calc_val;
+ if (mode->flags & DRM_MODE_FLAG_INTERLACE)
+ refresh *= 2;
+ if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
+@@ -403,8 +818,7 @@ void drm_mode_prune_invalid(struct drm_device *dev,
+ list_del(&mode->head);
+ if (verbose) {
+ drm_mode_debug_printmodeline(mode);
+- DRM_DEBUG_MODE(DRM_MODESET_DEBUG,
+- "Not using %s mode %d\n",
++ DRM_DEBUG_KMS("Not using %s mode %d\n",
+ mode->name, mode->status);
+ }
+ drm_mode_destroy(dev, mode);
+diff --git a/drivers/gpu/drm/drm_proc.c b/drivers/gpu/drm/drm_proc.c
+index bbd4b3d..d379c4f 100644
+--- a/drivers/gpu/drm/drm_proc.c
++++ b/drivers/gpu/drm/drm_proc.c
+@@ -106,20 +106,25 @@ int drm_proc_create_files(struct drm_info_list *files, int count,
+ continue;
+
+ tmp = kmalloc(sizeof(struct drm_info_node), GFP_KERNEL);
+- ent = create_proc_entry(files[i].name, S_IFREG | S_IRUGO, root);
++ if (tmp == NULL) {
++ ret = -1;
++ goto fail;
++ }
++ tmp->minor = minor;
++ tmp->info_ent = &files[i];
++ list_add(&tmp->list, &minor->proc_nodes.list);
++
++ ent = proc_create_data(files[i].name, S_IRUGO, root,
++ &drm_proc_fops, tmp);
+ if (!ent) {
+ DRM_ERROR("Cannot create /proc/dri/%s/%s\n",
+ name, files[i].name);
++ list_del(&tmp->list);
+ kfree(tmp);
+ ret = -1;
+ goto fail;
+ }
+
+- ent->proc_fops = &drm_proc_fops;
+- ent->data = tmp;
+- tmp->minor = minor;
+- tmp->info_ent = &files[i];
+- list_add(&(tmp->list), &(minor->proc_nodes.list));
+ }
+ return 0;
+
+diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
+index f7a615b..5161172 100644
+--- a/drivers/gpu/drm/drm_sysfs.c
++++ b/drivers/gpu/drm/drm_sysfs.c
+@@ -16,6 +16,7 @@
+ #include <linux/kdev_t.h>
+ #include <linux/err.h>
+
++#include "drm_sysfs.h"
+ #include "drm_core.h"
+ #include "drmP.h"
+
+@@ -253,6 +254,7 @@ static ssize_t subconnector_show(struct device *device,
+ case DRM_MODE_CONNECTOR_Composite:
+ case DRM_MODE_CONNECTOR_SVIDEO:
+ case DRM_MODE_CONNECTOR_Component:
++ case DRM_MODE_CONNECTOR_TV:
+ prop = dev->mode_config.tv_subconnector_property;
+ is_tv = 1;
+ break;
+@@ -293,6 +295,7 @@ static ssize_t select_subconnector_show(struct device *device,
+ case DRM_MODE_CONNECTOR_Composite:
+ case DRM_MODE_CONNECTOR_SVIDEO:
+ case DRM_MODE_CONNECTOR_Component:
++ case DRM_MODE_CONNECTOR_TV:
+ prop = dev->mode_config.tv_select_subconnector_property;
+ is_tv = 1;
+ break;
+@@ -391,6 +394,7 @@ int drm_sysfs_connector_add(struct drm_connector *connector)
+ case DRM_MODE_CONNECTOR_Composite:
+ case DRM_MODE_CONNECTOR_SVIDEO:
+ case DRM_MODE_CONNECTOR_Component:
++ case DRM_MODE_CONNECTOR_TV:
+ for (i = 0; i < ARRAY_SIZE(connector_attrs_opt1); i++) {
+ ret = device_create_file(&connector->kdev, &connector_attrs_opt1[i]);
+ if (ret)
+@@ -519,3 +523,27 @@ void drm_sysfs_device_remove(struct drm_minor *minor)
+ {
+ device_unregister(&minor->kdev);
+ }
++
++
++/**
++ * drm_class_device_register - Register a struct device in the drm class.
++ *
++ * @dev: pointer to struct device to register.
++ *
++ * @dev should have all relevant members pre-filled with the exception
++ * of the class member. In particular, the device_type member must
++ * be set.
++ */
++
++int drm_class_device_register(struct device *dev)
++{
++ dev->class = drm_class;
++ return device_register(dev);
++}
++EXPORT_SYMBOL_GPL(drm_class_device_register);
++
++void drm_class_device_unregister(struct device *dev)
++{
++ return device_unregister(dev);
++}
++EXPORT_SYMBOL_GPL(drm_class_device_unregister);
+diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
+index 30d6b99..5269dfa 100644
+--- a/drivers/gpu/drm/i915/Makefile
++++ b/drivers/gpu/drm/i915/Makefile
+@@ -4,10 +4,10 @@
+
+ ccflags-y := -Iinclude/drm
+ i915-y := i915_drv.o i915_dma.o i915_irq.o i915_mem.o \
++ i915_debugfs.o \
+ i915_suspend.o \
+ i915_gem.o \
+ i915_gem_debug.o \
+- i915_gem_debugfs.o \
+ i915_gem_tiling.o \
+ intel_display.o \
+ intel_crt.o \
+diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
+new file mode 100644
+index 0000000..1e3bdce
+--- /dev/null
++++ b/drivers/gpu/drm/i915/i915_debugfs.c
+@@ -0,0 +1,445 @@
++/*
++ * Copyright © 2008 Intel Corporation
++ *
++ * 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 (including the next
++ * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
++ *
++ * Authors:
++ * Eric Anholt <eric@anholt.net>
++ * Keith Packard <keithp@keithp.com>
++ *
++ */
++
++#include <linux/seq_file.h>
++#include "drmP.h"
++#include "drm.h"
++#include "i915_drm.h"
++#include "i915_drv.h"
++
++#define DRM_I915_RING_DEBUG 1
++
++
++#if defined(CONFIG_DEBUG_FS)
++
++#define ACTIVE_LIST 1
++#define FLUSHING_LIST 2
++#define INACTIVE_LIST 3
++
++static const char *get_pin_flag(struct drm_i915_gem_object *obj_priv)
++{
++ if (obj_priv->user_pin_count > 0)
++ return "P";
++ else if (obj_priv->pin_count > 0)
++ return "p";
++ else
++ return " ";
++}
++
++static const char *get_tiling_flag(struct drm_i915_gem_object *obj_priv)
++{
++ switch (obj_priv->tiling_mode) {
++ default:
++ case I915_TILING_NONE: return " ";
++ case I915_TILING_X: return "X";
++ case I915_TILING_Y: return "Y";
++ }
++}
++
++static int i915_gem_object_list_info(struct seq_file *m, void *data)
++{
++ struct drm_info_node *node = (struct drm_info_node *) m->private;
++ uintptr_t list = (uintptr_t) node->info_ent->data;
++ struct list_head *head;
++ struct drm_device *dev = node->minor->dev;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++ struct drm_i915_gem_object *obj_priv;
++ spinlock_t *lock = NULL;
++
++ switch (list) {
++ case ACTIVE_LIST:
++ seq_printf(m, "Active:\n");
++ lock = &dev_priv->mm.active_list_lock;
++ head = &dev_priv->mm.active_list;
++ break;
++ case INACTIVE_LIST:
++ seq_printf(m, "Inactive:\n");
++ head = &dev_priv->mm.inactive_list;
++ break;
++ case FLUSHING_LIST:
++ seq_printf(m, "Flushing:\n");
++ head = &dev_priv->mm.flushing_list;
++ break;
++ default:
++ DRM_INFO("Ooops, unexpected list\n");
++ return 0;
++ }
++
++ if (lock)
++ spin_lock(lock);
++ list_for_each_entry(obj_priv, head, list)
++ {
++ struct drm_gem_object *obj = obj_priv->obj;
++
++ seq_printf(m, " %p: %s %08x %08x %d",
++ obj,
++ get_pin_flag(obj_priv),
++ obj->read_domains, obj->write_domain,
++ obj_priv->last_rendering_seqno);
++
++ if (obj->name)
++ seq_printf(m, " (name: %d)", obj->name);
++ if (obj_priv->fence_reg != I915_FENCE_REG_NONE)
++ seq_printf(m, " (fence: %d)", obj_priv->fence_reg);
++ if (obj_priv->gtt_space != NULL)
++ seq_printf(m, " (gtt_offset: %08x)", obj_priv->gtt_offset);
++
++ seq_printf(m, "\n");
++ }
++
++ if (lock)
++ spin_unlock(lock);
++ return 0;
++}
++
++static int i915_gem_request_info(struct seq_file *m, void *data)
++{
++ struct drm_info_node *node = (struct drm_info_node *) m->private;
++ struct drm_device *dev = node->minor->dev;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++ struct drm_i915_gem_request *gem_request;
++
++ seq_printf(m, "Request:\n");
++ list_for_each_entry(gem_request, &dev_priv->mm.request_list, list) {
++ seq_printf(m, " %d @ %d\n",
++ gem_request->seqno,
++ (int) (jiffies - gem_request->emitted_jiffies));
++ }
++ return 0;
++}
++
++static int i915_gem_seqno_info(struct seq_file *m, void *data)
++{
++ struct drm_info_node *node = (struct drm_info_node *) m->private;
++ struct drm_device *dev = node->minor->dev;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++
++ if (dev_priv->hw_status_page != NULL) {
++ seq_printf(m, "Current sequence: %d\n",
++ i915_get_gem_seqno(dev));
++ } else {
++ seq_printf(m, "Current sequence: hws uninitialized\n");
++ }
++ seq_printf(m, "Waiter sequence: %d\n",
++ dev_priv->mm.waiting_gem_seqno);
++ seq_printf(m, "IRQ sequence: %d\n", dev_priv->mm.irq_gem_seqno);
++ return 0;
++}
++
++
++static int i915_interrupt_info(struct seq_file *m, void *data)
++{
++ struct drm_info_node *node = (struct drm_info_node *) m->private;
++ struct drm_device *dev = node->minor->dev;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++
++ if (!IS_IGDNG(dev)) {
++ seq_printf(m, "Interrupt enable: %08x\n",
++ I915_READ(IER));
++ seq_printf(m, "Interrupt identity: %08x\n",
++ I915_READ(IIR));
++ seq_printf(m, "Interrupt mask: %08x\n",
++ I915_READ(IMR));
++ seq_printf(m, "Pipe A stat: %08x\n",
++ I915_READ(PIPEASTAT));
++ seq_printf(m, "Pipe B stat: %08x\n",
++ I915_READ(PIPEBSTAT));
++ } else {
++ seq_printf(m, "North Display Interrupt enable: %08x\n",
++ I915_READ(DEIER));
++ seq_printf(m, "North Display Interrupt identity: %08x\n",
++ I915_READ(DEIIR));
++ seq_printf(m, "North Display Interrupt mask: %08x\n",
++ I915_READ(DEIMR));
++ seq_printf(m, "South Display Interrupt enable: %08x\n",
++ I915_READ(SDEIER));
++ seq_printf(m, "South Display Interrupt identity: %08x\n",
++ I915_READ(SDEIIR));
++ seq_printf(m, "South Display Interrupt mask: %08x\n",
++ I915_READ(SDEIMR));
++ seq_printf(m, "Graphics Interrupt enable: %08x\n",
++ I915_READ(GTIER));
++ seq_printf(m, "Graphics Interrupt identity: %08x\n",
++ I915_READ(GTIIR));
++ seq_printf(m, "Graphics Interrupt mask: %08x\n",
++ I915_READ(GTIMR));
++ }
++ seq_printf(m, "Interrupts received: %d\n",
++ atomic_read(&dev_priv->irq_received));
++ if (dev_priv->hw_status_page != NULL) {
++ seq_printf(m, "Current sequence: %d\n",
++ i915_get_gem_seqno(dev));
++ } else {
++ seq_printf(m, "Current sequence: hws uninitialized\n");
++ }
++ seq_printf(m, "Waiter sequence: %d\n",
++ dev_priv->mm.waiting_gem_seqno);
++ seq_printf(m, "IRQ sequence: %d\n",
++ dev_priv->mm.irq_gem_seqno);
++ return 0;
++}
++
++static int i915_gem_fence_regs_info(struct seq_file *m, void *data)
++{
++ struct drm_info_node *node = (struct drm_info_node *) m->private;
++ struct drm_device *dev = node->minor->dev;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++ int i;
++
++ seq_printf(m, "Reserved fences = %d\n", dev_priv->fence_reg_start);
++ seq_printf(m, "Total fences = %d\n", dev_priv->num_fence_regs);
++ for (i = 0; i < dev_priv->num_fence_regs; i++) {
++ struct drm_gem_object *obj = dev_priv->fence_regs[i].obj;
++
++ if (obj == NULL) {
++ seq_printf(m, "Fenced object[%2d] = unused\n", i);
++ } else {
++ struct drm_i915_gem_object *obj_priv;
++
++ obj_priv = obj->driver_private;
++ seq_printf(m, "Fenced object[%2d] = %p: %s "
++ "%08x %08zx %08x %s %08x %08x %d",
++ i, obj, get_pin_flag(obj_priv),
++ obj_priv->gtt_offset,
++ obj->size, obj_priv->stride,
++ get_tiling_flag(obj_priv),
++ obj->read_domains, obj->write_domain,
++ obj_priv->last_rendering_seqno);
++ if (obj->name)
++ seq_printf(m, " (name: %d)", obj->name);
++ seq_printf(m, "\n");
++ }
++ }
++
++ return 0;
++}
++
++static int i915_hws_info(struct seq_file *m, void *data)
++{
++ struct drm_info_node *node = (struct drm_info_node *) m->private;
++ struct drm_device *dev = node->minor->dev;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++ int i;
++ volatile u32 *hws;
++
++ hws = (volatile u32 *)dev_priv->hw_status_page;
++ if (hws == NULL)
++ return 0;
++
++ for (i = 0; i < 4096 / sizeof(u32) / 4; i += 4) {
++ seq_printf(m, "0x%08x: 0x%08x 0x%08x 0x%08x 0x%08x\n",
++ i * 4,
++ hws[i], hws[i + 1], hws[i + 2], hws[i + 3]);
++ }
++ return 0;
++}
++
++static void i915_dump_pages(struct seq_file *m, struct page **pages, int page_count)
++{
++ int page, i;
++ uint32_t *mem;
++
++ for (page = 0; page < page_count; page++) {
++ mem = kmap(pages[page]);
++ for (i = 0; i < PAGE_SIZE; i += 4)
++ seq_printf(m, "%08x : %08x\n", i, mem[i / 4]);
++ kunmap(pages[page]);
++ }
++}
++
++static int i915_batchbuffer_info(struct seq_file *m, void *data)
++{
++ struct drm_info_node *node = (struct drm_info_node *) m->private;
++ struct drm_device *dev = node->minor->dev;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++ struct drm_gem_object *obj;
++ struct drm_i915_gem_object *obj_priv;
++ int ret;
++
++ spin_lock(&dev_priv->mm.active_list_lock);
++
++ list_for_each_entry(obj_priv, &dev_priv->mm.active_list, list) {
++ obj = obj_priv->obj;
++ if (obj->read_domains & I915_GEM_DOMAIN_COMMAND) {
++ ret = i915_gem_object_get_pages(obj);
++ if (ret) {
++ DRM_ERROR("Failed to get pages: %d\n", ret);
++ spin_unlock(&dev_priv->mm.active_list_lock);
++ return ret;
++ }
++
++ seq_printf(m, "--- gtt_offset = 0x%08x\n", obj_priv->gtt_offset);
++ i915_dump_pages(m, obj_priv->pages, obj->size / PAGE_SIZE);
++
++ i915_gem_object_put_pages(obj);
++ }
++ }
++
++ spin_unlock(&dev_priv->mm.active_list_lock);
++
++ return 0;
++}
++
++static int i915_ringbuffer_data(struct seq_file *m, void *data)
++{
++ struct drm_info_node *node = (struct drm_info_node *) m->private;
++ struct drm_device *dev = node->minor->dev;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++ u8 *virt;
++ uint32_t *ptr, off;
++
++ if (!dev_priv->ring.ring_obj) {
++ seq_printf(m, "No ringbuffer setup\n");
++ return 0;
++ }
++
++ virt = dev_priv->ring.virtual_start;
++
++ for (off = 0; off < dev_priv->ring.Size; off += 4) {
++ ptr = (uint32_t *)(virt + off);
++ seq_printf(m, "%08x : %08x\n", off, *ptr);
++ }
++
++ return 0;
++}
++
++static int i915_ringbuffer_info(struct seq_file *m, void *data)
++{
++ struct drm_info_node *node = (struct drm_info_node *) m->private;
++ struct drm_device *dev = node->minor->dev;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++ unsigned int head, tail;
++
++ head = I915_READ(PRB0_HEAD) & HEAD_ADDR;
++ tail = I915_READ(PRB0_TAIL) & TAIL_ADDR;
++
++ seq_printf(m, "RingHead : %08x\n", head);
++ seq_printf(m, "RingTail : %08x\n", tail);
++ seq_printf(m, "RingSize : %08lx\n", dev_priv->ring.Size);
++ seq_printf(m, "Acthd : %08x\n", I915_READ(IS_I965G(dev) ? ACTHD_I965 : ACTHD));
++
++ return 0;
++}
++
++static int i915_error_state(struct seq_file *m, void *unused)
++{
++ struct drm_info_node *node = (struct drm_info_node *) m->private;
++ struct drm_device *dev = node->minor->dev;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++ struct drm_i915_error_state *error;
++ unsigned long flags;
++
++ spin_lock_irqsave(&dev_priv->error_lock, flags);
++ if (!dev_priv->first_error) {
++ seq_printf(m, "no error state collected\n");
++ goto out;
++ }
++
++ error = dev_priv->first_error;
++
++ seq_printf(m, "Time: %ld s %ld us\n", error->time.tv_sec,
++ error->time.tv_usec);
++ seq_printf(m, "EIR: 0x%08x\n", error->eir);
++ seq_printf(m, " PGTBL_ER: 0x%08x\n", error->pgtbl_er);
++ seq_printf(m, " INSTPM: 0x%08x\n", error->instpm);
++ seq_printf(m, " IPEIR: 0x%08x\n", error->ipeir);
++ seq_printf(m, " IPEHR: 0x%08x\n", error->ipehr);
++ seq_printf(m, " INSTDONE: 0x%08x\n", error->instdone);
++ seq_printf(m, " ACTHD: 0x%08x\n", error->acthd);
++ if (IS_I965G(dev)) {
++ seq_printf(m, " INSTPS: 0x%08x\n", error->instps);
++ seq_printf(m, " INSTDONE1: 0x%08x\n", error->instdone1);
++ }
++
++out:
++ spin_unlock_irqrestore(&dev_priv->error_lock, flags);
++
++ return 0;
++}
++
++static int i915_registers_info(struct seq_file *m, void *data) {
++ struct drm_info_node *node = (struct drm_info_node *) m->private;
++ struct drm_device *dev = node->minor->dev;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++ uint32_t reg;
++
++#define DUMP_RANGE(start, end) \
++ for (reg=start; reg < end; reg += 4) \
++ seq_printf(m, "%08x\t%08x\n", reg, I915_READ(reg));
++
++ DUMP_RANGE(0x00000, 0x00fff); /* VGA registers */
++ DUMP_RANGE(0x02000, 0x02fff); /* instruction, memory, interrupt control registers */
++ DUMP_RANGE(0x03000, 0x031ff); /* FENCE and PPGTT control registers */
++ DUMP_RANGE(0x03200, 0x03fff); /* frame buffer compression registers */
++ DUMP_RANGE(0x05000, 0x05fff); /* I/O control registers */
++ DUMP_RANGE(0x06000, 0x06fff); /* clock control registers */
++ DUMP_RANGE(0x07000, 0x07fff); /* 3D internal debug registers */
++ DUMP_RANGE(0x07400, 0x088ff); /* GPE debug registers */
++ DUMP_RANGE(0x0a000, 0x0afff); /* display palette registers */
++ DUMP_RANGE(0x10000, 0x13fff); /* MMIO MCHBAR */
++ DUMP_RANGE(0x30000, 0x3ffff); /* overlay registers */
++ DUMP_RANGE(0x60000, 0x6ffff); /* display engine pipeline registers */
++ DUMP_RANGE(0x70000, 0x72fff); /* display and cursor registers */
++ DUMP_RANGE(0x73000, 0x73fff); /* performance counters */
++
++ return 0;
++}
++
++
++static struct drm_info_list i915_debugfs_list[] = {
++ {"i915_regs", i915_registers_info, 0},
++ {"i915_gem_active", i915_gem_object_list_info, 0, (void *) ACTIVE_LIST},
++ {"i915_gem_flushing", i915_gem_object_list_info, 0, (void *) FLUSHING_LIST},
++ {"i915_gem_inactive", i915_gem_object_list_info, 0, (void *) INACTIVE_LIST},
++ {"i915_gem_request", i915_gem_request_info, 0},
++ {"i915_gem_seqno", i915_gem_seqno_info, 0},
++ {"i915_gem_fence_regs", i915_gem_fence_regs_info, 0},
++ {"i915_gem_interrupt", i915_interrupt_info, 0},
++ {"i915_gem_hws", i915_hws_info, 0},
++ {"i915_ringbuffer_data", i915_ringbuffer_data, 0},
++ {"i915_ringbuffer_info", i915_ringbuffer_info, 0},
++ {"i915_batchbuffers", i915_batchbuffer_info, 0},
++ {"i915_error_state", i915_error_state, 0},
++};
++#define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list)
++
++int i915_debugfs_init(struct drm_minor *minor)
++{
++ return drm_debugfs_create_files(i915_debugfs_list,
++ I915_DEBUGFS_ENTRIES,
++ minor->debugfs_root, minor);
++}
++
++void i915_debugfs_cleanup(struct drm_minor *minor)
++{
++ drm_debugfs_remove_files(i915_debugfs_list,
++ I915_DEBUGFS_ENTRIES, minor);
++}
++
++#endif /* CONFIG_DEBUG_FS */
++
+diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
+index 50d1f78..9909505 100644
+--- a/drivers/gpu/drm/i915/i915_dma.c
++++ b/drivers/gpu/drm/i915/i915_dma.c
+@@ -29,12 +29,11 @@
+ #include "drmP.h"
+ #include "drm.h"
+ #include "drm_crtc_helper.h"
++#include "drm_fb_helper.h"
+ #include "intel_drv.h"
+ #include "i915_drm.h"
+ #include "i915_drv.h"
+
+-#define I915_DRV "i915_drv"
+-
+ /* Really want an OS-independent resettable timer. Would like to have
+ * this loop run for (eg) 3 sec, but have the timer reset every time
+ * the head pointer changes, so that EBUSY only happens if the ring
+@@ -80,6 +79,34 @@ int i915_wait_ring(struct drm_device * dev, int n, const char *caller)
+ return -EBUSY;
+ }
+
++/* As a ringbuffer is only allowed to wrap between instructions, fill
++ * the tail with NOOPs.
++ */
++int i915_wrap_ring(struct drm_device *dev)
++{
++ drm_i915_private_t *dev_priv = dev->dev_private;
++ volatile unsigned int *virt;
++ int rem;
++
++ rem = dev_priv->ring.Size - dev_priv->ring.tail;
++ if (dev_priv->ring.space < rem) {
++ int ret = i915_wait_ring(dev, rem, __func__);
++ if (ret)
++ return ret;
++ }
++ dev_priv->ring.space -= rem;
++
++ virt = (unsigned int *)
++ (dev_priv->ring.virtual_start + dev_priv->ring.tail);
++ rem /= 4;
++ while (rem--)
++ *virt++ = MI_NOOP;
++
++ dev_priv->ring.tail = 0;
++
++ return 0;
++}
++
+ /**
+ * Sets up the hardware status page for devices that need a physical address
+ * in the register.
+@@ -101,7 +128,7 @@ static int i915_init_phys_hws(struct drm_device *dev)
+ memset(dev_priv->hw_status_page, 0, PAGE_SIZE);
+
+ I915_WRITE(HWS_PGA, dev_priv->dma_status_page);
+- DRM_DEBUG_DRIVER(I915_DRV, "Enabled hardware status page\n");
++ DRM_DEBUG_DRIVER("Enabled hardware status page\n");
+ return 0;
+ }
+
+@@ -187,8 +214,7 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init)
+ master_priv->sarea_priv = (drm_i915_sarea_t *)
+ ((u8 *)master_priv->sarea->handle + init->sarea_priv_offset);
+ } else {
+- DRM_DEBUG_DRIVER(I915_DRV,
+- "sarea not found assuming DRI2 userspace\n");
++ DRM_DEBUG_DRIVER("sarea not found assuming DRI2 userspace\n");
+ }
+
+ if (init->ring_size != 0) {
+@@ -200,7 +226,6 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init)
+ }
+
+ dev_priv->ring.Size = init->ring_size;
+- dev_priv->ring.tail_mask = dev_priv->ring.Size - 1;
+
+ dev_priv->ring.map.offset = init->ring_start;
+ dev_priv->ring.map.size = init->ring_size;
+@@ -238,7 +263,7 @@ static int i915_dma_resume(struct drm_device * dev)
+ {
+ drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
+
+- DRM_DEBUG_DRIVER(I915_DRV, "%s\n", __func__);
++ DRM_DEBUG_DRIVER("%s\n", __func__);
+
+ if (dev_priv->ring.map.handle == NULL) {
+ DRM_ERROR("can not ioremap virtual address for"
+@@ -251,14 +276,14 @@ static int i915_dma_resume(struct drm_device * dev)
+ DRM_ERROR("Can not find hardware status page\n");
+ return -EINVAL;
+ }
+- DRM_DEBUG_DRIVER(I915_DRV, "hw status page @ %p\n",
++ DRM_DEBUG_DRIVER("hw status page @ %p\n",
+ dev_priv->hw_status_page);
+
+ if (dev_priv->status_gfx_addr != 0)
+ I915_WRITE(HWS_PGA, dev_priv->status_gfx_addr);
+ else
+ I915_WRITE(HWS_PGA, dev_priv->dma_status_page);
+- DRM_DEBUG_DRIVER(I915_DRV, "Enabled hardware status page\n");
++ DRM_DEBUG_DRIVER("Enabled hardware status page\n");
+
+ return 0;
+ }
+@@ -552,7 +577,7 @@ static int i915_dispatch_flip(struct drm_device * dev)
+ if (!master_priv->sarea_priv)
+ return -EINVAL;
+
+- DRM_DEBUG_DRIVER(I915_DRV, "%s: page=%d pfCurrentPage=%d\n",
++ DRM_DEBUG_DRIVER("%s: page=%d pfCurrentPage=%d\n",
+ __func__,
+ dev_priv->current_page,
+ master_priv->sarea_priv->pf_current_page);
+@@ -633,8 +658,7 @@ static int i915_batchbuffer(struct drm_device *dev, void *data,
+ return -EINVAL;
+ }
+
+- DRM_DEBUG_DRIVER(I915_DRV,
+- "i915 batchbuffer, start %x used %d cliprects %d\n",
++ DRM_DEBUG_DRIVER("i915 batchbuffer, start %x used %d cliprects %d\n",
+ batch->start, batch->used, batch->num_cliprects);
+
+ RING_LOCK_TEST_WITH_RETURN(dev, file_priv);
+@@ -681,8 +705,7 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data,
+ void *batch_data;
+ int ret;
+
+- DRM_DEBUG_DRIVER(I915_DRV,
+- "i915 cmdbuffer, buf %p sz %d cliprects %d\n",
++ DRM_DEBUG_DRIVER("i915 cmdbuffer, buf %p sz %d cliprects %d\n",
+ cmdbuf->buf, cmdbuf->sz, cmdbuf->num_cliprects);
+
+ RING_LOCK_TEST_WITH_RETURN(dev, file_priv);
+@@ -735,7 +758,7 @@ static int i915_flip_bufs(struct drm_device *dev, void *data,
+ {
+ int ret;
+
+- DRM_DEBUG_DRIVER(I915_DRV, "%s\n", __func__);
++ DRM_DEBUG_DRIVER("%s\n", __func__);
+
+ RING_LOCK_TEST_WITH_RETURN(dev, file_priv);
+
+@@ -778,7 +801,7 @@ static int i915_getparam(struct drm_device *dev, void *data,
+ value = dev_priv->num_fence_regs - dev_priv->fence_reg_start;
+ break;
+ default:
+- DRM_DEBUG_DRIVER(I915_DRV, "Unknown parameter %d\n",
++ DRM_DEBUG_DRIVER("Unknown parameter %d\n",
+ param->param);
+ return -EINVAL;
+ }
+@@ -819,7 +842,7 @@ static int i915_setparam(struct drm_device *dev, void *data,
+ dev_priv->fence_reg_start = param->value;
+ break;
+ default:
+- DRM_DEBUG_DRIVER(I915_DRV, "unknown parameter %d\n",
++ DRM_DEBUG_DRIVER("unknown parameter %d\n",
+ param->param);
+ return -EINVAL;
+ }
+@@ -846,7 +869,7 @@ static int i915_set_status_page(struct drm_device *dev, void *data,
+ return 0;
+ }
+
+- DRM_DEBUG("set status page addr 0x%08x\n", (u32)hws->addr);
++ DRM_DEBUG_DRIVER("set status page addr 0x%08x\n", (u32)hws->addr);
+
+ dev_priv->status_gfx_addr = hws->addr & (0x1ffff<<12);
+
+@@ -868,13 +891,25 @@ static int i915_set_status_page(struct drm_device *dev, void *data,
+
+ memset(dev_priv->hw_status_page, 0, PAGE_SIZE);
+ I915_WRITE(HWS_PGA, dev_priv->status_gfx_addr);
+- DRM_DEBUG_DRIVER(I915_DRV, "load hws HWS_PGA with gfx mem 0x%x\n",
++ DRM_DEBUG_DRIVER("load hws HWS_PGA with gfx mem 0x%x\n",
+ dev_priv->status_gfx_addr);
+- DRM_DEBUG_DRIVER(I915_DRV, "load hws at %p\n",
++ DRM_DEBUG_DRIVER("load hws at %p\n",
+ dev_priv->hw_status_page);
+ return 0;
+ }
+
++static int i915_get_bridge_dev(struct drm_device *dev)
++{
++ struct drm_i915_private *dev_priv = dev->dev_private;
++
++ dev_priv->bridge_dev = pci_get_bus_and_slot(0, PCI_DEVFN(0,0));
++ if (!dev_priv->bridge_dev) {
++ DRM_ERROR("bridge device not found\n");
++ return -1;
++ }
++ return 0;
++}
++
+ /**
+ * i915_probe_agp - get AGP bootup configuration
+ * @pdev: PCI device
+@@ -888,20 +923,13 @@ static int i915_set_status_page(struct drm_device *dev, void *data,
+ static int i915_probe_agp(struct drm_device *dev, uint32_t *aperture_size,
+ uint32_t *preallocated_size)
+ {
+- struct pci_dev *bridge_dev;
++ struct drm_i915_private *dev_priv = dev->dev_private;
+ u16 tmp = 0;
+ unsigned long overhead;
+ unsigned long stolen;
+
+- bridge_dev = pci_get_bus_and_slot(0, PCI_DEVFN(0,0));
+- if (!bridge_dev) {
+- DRM_ERROR("bridge device not found\n");
+- return -1;
+- }
+-
+ /* Get the fb aperture size and "stolen" memory amount. */
+- pci_read_config_word(bridge_dev, INTEL_GMCH_CTRL, &tmp);
+- pci_dev_put(bridge_dev);
++ pci_read_config_word(dev_priv->bridge_dev, INTEL_GMCH_CTRL, &tmp);
+
+ *aperture_size = 1024 * 1024;
+ *preallocated_size = 1024 * 1024;
+@@ -1153,11 +1181,16 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
+ base = drm_get_resource_start(dev, mmio_bar);
+ size = drm_get_resource_len(dev, mmio_bar);
+
++ if (i915_get_bridge_dev(dev)) {
++ ret = -EIO;
++ goto free_priv;
++ }
++
+ dev_priv->regs = ioremap(base, size);
+ if (!dev_priv->regs) {
+ DRM_ERROR("failed to map registers\n");
+ ret = -EIO;
+- goto free_priv;
++ goto put_bridge;
+ }
+
+ dev_priv->mm.gtt_mapping =
+@@ -1269,6 +1302,8 @@ out_iomapfree:
+ io_mapping_free(dev_priv->mm.gtt_mapping);
+ out_rmmap:
+ iounmap(dev_priv->regs);
++put_bridge:
++ pci_dev_put(dev_priv->bridge_dev);
+ free_priv:
+ kfree(dev_priv);
+ return ret;
+@@ -1312,6 +1347,7 @@ int i915_driver_unload(struct drm_device *dev)
+ i915_gem_lastclose(dev);
+ }
+
++ pci_dev_put(dev_priv->bridge_dev);
+ kfree(dev->dev_private);
+
+ return 0;
+@@ -1321,7 +1357,7 @@ int i915_driver_open(struct drm_device *dev, struct drm_file *file_priv)
+ {
+ struct drm_i915_file_private *i915_file_priv;
+
+- DRM_DEBUG_DRIVER(I915_DRV, "\n");
++ DRM_DEBUG_DRIVER("\n");
+ i915_file_priv = (struct drm_i915_file_private *)
+ kmalloc(sizeof(*i915_file_priv), GFP_KERNEL);
+
+@@ -1352,7 +1388,7 @@ void i915_driver_lastclose(struct drm_device * dev)
+ drm_i915_private_t *dev_priv = dev->dev_private;
+
+ if (!dev_priv || drm_core_check_feature(dev, DRIVER_MODESET)) {
+- intelfb_restore();
++ drm_fb_helper_restore();
+ return;
+ }
+
+diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
+index fc4b68a..dbe568c 100644
+--- a/drivers/gpu/drm/i915/i915_drv.c
++++ b/drivers/gpu/drm/i915/i915_drv.c
+@@ -37,12 +37,15 @@
+ #include <linux/console.h>
+ #include "drm_crtc_helper.h"
+
+-static unsigned int i915_modeset = -1;
++static int i915_modeset = -1;
+ module_param_named(modeset, i915_modeset, int, 0400);
+
+ unsigned int i915_fbpercrtc = 0;
+ module_param_named(fbpercrtc, i915_fbpercrtc, int, 0400);
+
++unsigned int i915_powersave = 1;
++module_param_named(powersave, i915_powersave, int, 0400);
++
+ static struct drm_driver driver;
+
+ static struct pci_device_id pciidlist[] = {
+@@ -188,8 +191,8 @@ static struct drm_driver driver = {
+ .master_create = i915_master_create,
+ .master_destroy = i915_master_destroy,
+ #if defined(CONFIG_DEBUG_FS)
+- .debugfs_init = i915_gem_debugfs_init,
+- .debugfs_cleanup = i915_gem_debugfs_cleanup,
++ .debugfs_init = i915_debugfs_init,
++ .debugfs_cleanup = i915_debugfs_cleanup,
+ #endif
+ .gem_init_object = i915_gem_init_object,
+ .gem_free_object = i915_gem_free_object,
+diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
+index 5b4f87e..77ed060 100644
+--- a/drivers/gpu/drm/i915/i915_drv.h
++++ b/drivers/gpu/drm/i915/i915_drv.h
+@@ -85,7 +85,6 @@ struct drm_i915_gem_phys_object {
+ };
+
+ typedef struct _drm_i915_ring_buffer {
+- int tail_mask;
+ unsigned long Size;
+ u8 *virtual_start;
+ int head;
+@@ -156,6 +155,7 @@ typedef struct drm_i915_private {
+
+ void __iomem *regs;
+
++ struct pci_dev *bridge_dev;
+ drm_i915_ring_buffer_t ring;
+
+ drm_dma_handle_t *status_page_dmah;
+@@ -311,7 +311,7 @@ typedef struct drm_i915_private {
+ u32 saveIMR;
+ u32 saveCACHE_MODE_0;
+ u32 saveD_STATE;
+- u32 saveCG_2D_DIS;
++ u32 saveDSPCLK_GATE_D;
+ u32 saveMI_ARB_STATE;
+ u32 saveSWF0[16];
+ u32 saveSWF1[16];
+@@ -443,6 +443,14 @@ typedef struct drm_i915_private {
+ struct drm_i915_gem_phys_object *phys_objs[I915_MAX_PHYS_OBJECT];
+ } mm;
+ struct sdvo_device_mapping sdvo_mappings[2];
++
++ /* Reclocking support */
++ bool render_reclock_avail;
++ bool lvds_downclock_avail;
++ struct work_struct idle_work;
++ struct timer_list idle_timer;
++ bool busy;
++ u16 orig_clock;
+ } drm_i915_private_t;
+
+ /** driver private structure attached to each drm_gem_object */
+@@ -575,6 +583,7 @@ enum intel_chip_family {
+ extern struct drm_ioctl_desc i915_ioctls[];
+ extern int i915_max_ioctl;
+ extern unsigned int i915_fbpercrtc;
++extern unsigned int i915_powersave;
+
+ extern int i915_master_create(struct drm_device *dev, struct drm_master *master);
+ extern void i915_master_destroy(struct drm_device *dev, struct drm_master *master);
+@@ -730,8 +739,8 @@ void i915_gem_dump_object(struct drm_gem_object *obj, int len,
+ void i915_dump_lru(struct drm_device *dev, const char *where);
+
+ /* i915_debugfs.c */
+-int i915_gem_debugfs_init(struct drm_minor *minor);
+-void i915_gem_debugfs_cleanup(struct drm_minor *minor);
++int i915_debugfs_init(struct drm_minor *minor);
++void i915_debugfs_cleanup(struct drm_minor *minor);
+
+ /* i915_suspend.c */
+ extern int i915_save_state(struct drm_device *dev);
+@@ -781,33 +790,32 @@ extern void intel_modeset_cleanup(struct drm_device *dev);
+
+ #define I915_VERBOSE 0
+
+-#define RING_LOCALS unsigned int outring, ringmask, outcount; \
+- volatile char *virt;
+-
+-#define BEGIN_LP_RING(n) do { \
+- if (I915_VERBOSE) \
+- DRM_DEBUG("BEGIN_LP_RING(%d)\n", (n)); \
+- if (dev_priv->ring.space < (n)*4) \
+- i915_wait_ring(dev, (n)*4, __func__); \
+- outcount = 0; \
+- outring = dev_priv->ring.tail; \
+- ringmask = dev_priv->ring.tail_mask; \
+- virt = dev_priv->ring.virtual_start; \
++#define RING_LOCALS volatile unsigned int *ring_virt__;
++
++#define BEGIN_LP_RING(n) do { \
++ int bytes__ = 4*(n); \
++ if (I915_VERBOSE) DRM_DEBUG("BEGIN_LP_RING(%d)\n", (n)); \
++ /* a wrap must occur between instructions so pad beforehand */ \
++ if (unlikely (dev_priv->ring.tail + bytes__ > dev_priv->ring.Size)) \
++ i915_wrap_ring(dev); \
++ if (unlikely (dev_priv->ring.space < bytes__)) \
++ i915_wait_ring(dev, bytes__, __func__); \
++ ring_virt__ = (unsigned int *) \
++ (dev_priv->ring.virtual_start + dev_priv->ring.tail); \
++ dev_priv->ring.tail += bytes__; \
++ dev_priv->ring.tail &= dev_priv->ring.Size - 1; \
++ dev_priv->ring.space -= bytes__; \
+ } while (0)
+
+-#define OUT_RING(n) do { \
++#define OUT_RING(n) do { \
+ if (I915_VERBOSE) DRM_DEBUG(" OUT_RING %x\n", (int)(n)); \
+- *(volatile unsigned int *)(virt + outring) = (n); \
+- outcount++; \
+- outring += 4; \
+- outring &= ringmask; \
++ *ring_virt__++ = (n); \
+ } while (0)
+
+ #define ADVANCE_LP_RING() do { \
+- if (I915_VERBOSE) DRM_DEBUG("ADVANCE_LP_RING %x\n", outring); \
+- dev_priv->ring.tail = outring; \
+- dev_priv->ring.space -= outcount * 4; \
+- I915_WRITE(PRB0_TAIL, outring); \
++ if (I915_VERBOSE) \
++ DRM_DEBUG("ADVANCE_LP_RING %x\n", dev_priv->ring.tail); \
++ I915_WRITE(PRB0_TAIL, dev_priv->ring.tail); \
+ } while(0)
+
+ /**
+@@ -830,6 +838,7 @@ extern void intel_modeset_cleanup(struct drm_device *dev);
+ #define I915_GEM_HWS_INDEX 0x20
+ #define I915_BREADCRUMB_INDEX 0x21
+
++extern int i915_wrap_ring(struct drm_device * dev);
+ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
+
+ #define IS_I830(dev) ((dev)->pci_device == 0x3577)
+@@ -903,6 +912,9 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
+ /* dsparb controlled by hw only */
+ #define DSPARB_HWCONTROL(dev) (IS_G4X(dev) || IS_IGDNG(dev))
+
++#define HAS_FW_BLC(dev) (IS_I9XX(dev) || IS_G4X(dev) || IS_IGDNG(dev))
++#define HAS_PIPE_CXSR(dev) (IS_G4X(dev) || IS_IGDNG(dev))
++
+ #define PRIMARY_RINGBUFFER_SIZE (128*1024)
+
+ #endif
+diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
+index 80e5ba4..c673171 100644
+--- a/drivers/gpu/drm/i915/i915_gem.c
++++ b/drivers/gpu/drm/i915/i915_gem.c
+@@ -29,6 +29,7 @@
+ #include "drm.h"
+ #include "i915_drm.h"
+ #include "i915_drv.h"
++#include "intel_drv.h"
+ #include <linux/swap.h>
+ #include <linux/pci.h>
+
+@@ -111,7 +112,8 @@ i915_gem_create_ioctl(struct drm_device *dev, void *data,
+ {
+ struct drm_i915_gem_create *args = data;
+ struct drm_gem_object *obj;
+- int handle, ret;
++ int ret;
++ u32 handle;
+
+ args->size = roundup(args->size, PAGE_SIZE);
+
+@@ -981,6 +983,7 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ struct drm_i915_gem_set_domain *args = data;
+ struct drm_gem_object *obj;
++ struct drm_i915_gem_object *obj_priv;
+ uint32_t read_domains = args->read_domains;
+ uint32_t write_domain = args->write_domain;
+ int ret;
+@@ -1004,15 +1007,17 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
+ obj = drm_gem_object_lookup(dev, file_priv, args->handle);
+ if (obj == NULL)
+ return -EBADF;
++ obj_priv = obj->driver_private;
+
+ mutex_lock(&dev->struct_mutex);
++
++ intel_mark_busy(dev, obj);
++
+ #if WATCH_BUF
+ DRM_INFO("set_domain_ioctl %p(%zd), %08x %08x\n",
+ obj, obj->size, read_domains, write_domain);
+ #endif
+ if (read_domains & I915_GEM_DOMAIN_GTT) {
+- struct drm_i915_gem_object *obj_priv = obj->driver_private;
+-
+ ret = i915_gem_object_set_to_gtt_domain(obj, write_domain != 0);
+
+ /* Update the LRU on the fence for the CPU access that's
+@@ -2776,6 +2781,8 @@ i915_gem_object_set_to_gpu_domain(struct drm_gem_object *obj)
+ BUG_ON(obj->pending_read_domains & I915_GEM_DOMAIN_CPU);
+ BUG_ON(obj->pending_write_domain == I915_GEM_DOMAIN_CPU);
+
++ intel_mark_busy(dev, obj);
++
+ #if WATCH_BUF
+ DRM_INFO("%s: object %p read %08x -> %08x write %08x -> %08x\n",
+ __func__, obj,
+@@ -4093,7 +4100,6 @@ i915_gem_init_ringbuffer(struct drm_device *dev)
+
+ /* Set up the kernel mapping for the ring. */
+ ring->Size = obj->size;
+- ring->tail_mask = obj->size - 1;
+
+ ring->map.offset = dev->agp->base + obj_priv->gtt_offset;
+ ring->map.size = obj->size;
+diff --git a/drivers/gpu/drm/i915/i915_gem_debugfs.c b/drivers/gpu/drm/i915/i915_gem_debugfs.c
+deleted file mode 100644
+index cb3b974..0000000
+--- a/drivers/gpu/drm/i915/i915_gem_debugfs.c
++++ /dev/null
+@@ -1,396 +0,0 @@
+-/*
+- * Copyright © 2008 Intel Corporation
+- *
+- * 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 (including the next
+- * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
+- *
+- * Authors:
+- * Eric Anholt <eric@anholt.net>
+- * Keith Packard <keithp@keithp.com>
+- *
+- */
+-
+-#include <linux/seq_file.h>
+-#include "drmP.h"
+-#include "drm.h"
+-#include "i915_drm.h"
+-#include "i915_drv.h"
+-
+-#define DRM_I915_RING_DEBUG 1
+-
+-
+-#if defined(CONFIG_DEBUG_FS)
+-
+-#define ACTIVE_LIST 1
+-#define FLUSHING_LIST 2
+-#define INACTIVE_LIST 3
+-
+-static const char *get_pin_flag(struct drm_i915_gem_object *obj_priv)
+-{
+- if (obj_priv->user_pin_count > 0)
+- return "P";
+- else if (obj_priv->pin_count > 0)
+- return "p";
+- else
+- return " ";
+-}
+-
+-static const char *get_tiling_flag(struct drm_i915_gem_object *obj_priv)
+-{
+- switch (obj_priv->tiling_mode) {
+- default:
+- case I915_TILING_NONE: return " ";
+- case I915_TILING_X: return "X";
+- case I915_TILING_Y: return "Y";
+- }
+-}
+-
+-static int i915_gem_object_list_info(struct seq_file *m, void *data)
+-{
+- struct drm_info_node *node = (struct drm_info_node *) m->private;
+- uintptr_t list = (uintptr_t) node->info_ent->data;
+- struct list_head *head;
+- struct drm_device *dev = node->minor->dev;
+- drm_i915_private_t *dev_priv = dev->dev_private;
+- struct drm_i915_gem_object *obj_priv;
+- spinlock_t *lock = NULL;
+-
+- switch (list) {
+- case ACTIVE_LIST:
+- seq_printf(m, "Active:\n");
+- lock = &dev_priv->mm.active_list_lock;
+- head = &dev_priv->mm.active_list;
+- break;
+- case INACTIVE_LIST:
+- seq_printf(m, "Inactive:\n");
+- head = &dev_priv->mm.inactive_list;
+- break;
+- case FLUSHING_LIST:
+- seq_printf(m, "Flushing:\n");
+- head = &dev_priv->mm.flushing_list;
+- break;
+- default:
+- DRM_INFO("Ooops, unexpected list\n");
+- return 0;
+- }
+-
+- if (lock)
+- spin_lock(lock);
+- list_for_each_entry(obj_priv, head, list)
+- {
+- struct drm_gem_object *obj = obj_priv->obj;
+-
+- seq_printf(m, " %p: %s %08x %08x %d",
+- obj,
+- get_pin_flag(obj_priv),
+- obj->read_domains, obj->write_domain,
+- obj_priv->last_rendering_seqno);
+-
+- if (obj->name)
+- seq_printf(m, " (name: %d)", obj->name);
+- if (obj_priv->fence_reg != I915_FENCE_REG_NONE)
+- seq_printf(m, " (fence: %d)", obj_priv->fence_reg);
+- if (obj_priv->gtt_space != NULL)
+- seq_printf(m, " (gtt_offset: %08x)", obj_priv->gtt_offset);
+-
+- seq_printf(m, "\n");
+- }
+-
+- if (lock)
+- spin_unlock(lock);
+- return 0;
+-}
+-
+-static int i915_gem_request_info(struct seq_file *m, void *data)
+-{
+- struct drm_info_node *node = (struct drm_info_node *) m->private;
+- struct drm_device *dev = node->minor->dev;
+- drm_i915_private_t *dev_priv = dev->dev_private;
+- struct drm_i915_gem_request *gem_request;
+-
+- seq_printf(m, "Request:\n");
+- list_for_each_entry(gem_request, &dev_priv->mm.request_list, list) {
+- seq_printf(m, " %d @ %d\n",
+- gem_request->seqno,
+- (int) (jiffies - gem_request->emitted_jiffies));
+- }
+- return 0;
+-}
+-
+-static int i915_gem_seqno_info(struct seq_file *m, void *data)
+-{
+- struct drm_info_node *node = (struct drm_info_node *) m->private;
+- struct drm_device *dev = node->minor->dev;
+- drm_i915_private_t *dev_priv = dev->dev_private;
+-
+- if (dev_priv->hw_status_page != NULL) {
+- seq_printf(m, "Current sequence: %d\n",
+- i915_get_gem_seqno(dev));
+- } else {
+- seq_printf(m, "Current sequence: hws uninitialized\n");
+- }
+- seq_printf(m, "Waiter sequence: %d\n",
+- dev_priv->mm.waiting_gem_seqno);
+- seq_printf(m, "IRQ sequence: %d\n", dev_priv->mm.irq_gem_seqno);
+- return 0;
+-}
+-
+-
+-static int i915_interrupt_info(struct seq_file *m, void *data)
+-{
+- struct drm_info_node *node = (struct drm_info_node *) m->private;
+- struct drm_device *dev = node->minor->dev;
+- drm_i915_private_t *dev_priv = dev->dev_private;
+-
+- seq_printf(m, "Interrupt enable: %08x\n",
+- I915_READ(IER));
+- seq_printf(m, "Interrupt identity: %08x\n",
+- I915_READ(IIR));
+- seq_printf(m, "Interrupt mask: %08x\n",
+- I915_READ(IMR));
+- seq_printf(m, "Pipe A stat: %08x\n",
+- I915_READ(PIPEASTAT));
+- seq_printf(m, "Pipe B stat: %08x\n",
+- I915_READ(PIPEBSTAT));
+- seq_printf(m, "Interrupts received: %d\n",
+- atomic_read(&dev_priv->irq_received));
+- if (dev_priv->hw_status_page != NULL) {
+- seq_printf(m, "Current sequence: %d\n",
+- i915_get_gem_seqno(dev));
+- } else {
+- seq_printf(m, "Current sequence: hws uninitialized\n");
+- }
+- seq_printf(m, "Waiter sequence: %d\n",
+- dev_priv->mm.waiting_gem_seqno);
+- seq_printf(m, "IRQ sequence: %d\n",
+- dev_priv->mm.irq_gem_seqno);
+- return 0;
+-}
+-
+-static int i915_gem_fence_regs_info(struct seq_file *m, void *data)
+-{
+- struct drm_info_node *node = (struct drm_info_node *) m->private;
+- struct drm_device *dev = node->minor->dev;
+- drm_i915_private_t *dev_priv = dev->dev_private;
+- int i;
+-
+- seq_printf(m, "Reserved fences = %d\n", dev_priv->fence_reg_start);
+- seq_printf(m, "Total fences = %d\n", dev_priv->num_fence_regs);
+- for (i = 0; i < dev_priv->num_fence_regs; i++) {
+- struct drm_gem_object *obj = dev_priv->fence_regs[i].obj;
+-
+- if (obj == NULL) {
+- seq_printf(m, "Fenced object[%2d] = unused\n", i);
+- } else {
+- struct drm_i915_gem_object *obj_priv;
+-
+- obj_priv = obj->driver_private;
+- seq_printf(m, "Fenced object[%2d] = %p: %s "
+- "%08x %08zx %08x %s %08x %08x %d",
+- i, obj, get_pin_flag(obj_priv),
+- obj_priv->gtt_offset,
+- obj->size, obj_priv->stride,
+- get_tiling_flag(obj_priv),
+- obj->read_domains, obj->write_domain,
+- obj_priv->last_rendering_seqno);
+- if (obj->name)
+- seq_printf(m, " (name: %d)", obj->name);
+- seq_printf(m, "\n");
+- }
+- }
+-
+- return 0;
+-}
+-
+-static int i915_hws_info(struct seq_file *m, void *data)
+-{
+- struct drm_info_node *node = (struct drm_info_node *) m->private;
+- struct drm_device *dev = node->minor->dev;
+- drm_i915_private_t *dev_priv = dev->dev_private;
+- int i;
+- volatile u32 *hws;
+-
+- hws = (volatile u32 *)dev_priv->hw_status_page;
+- if (hws == NULL)
+- return 0;
+-
+- for (i = 0; i < 4096 / sizeof(u32) / 4; i += 4) {
+- seq_printf(m, "0x%08x: 0x%08x 0x%08x 0x%08x 0x%08x\n",
+- i * 4,
+- hws[i], hws[i + 1], hws[i + 2], hws[i + 3]);
+- }
+- return 0;
+-}
+-
+-static void i915_dump_pages(struct seq_file *m, struct page **pages, int page_count)
+-{
+- int page, i;
+- uint32_t *mem;
+-
+- for (page = 0; page < page_count; page++) {
+- mem = kmap(pages[page]);
+- for (i = 0; i < PAGE_SIZE; i += 4)
+- seq_printf(m, "%08x : %08x\n", i, mem[i / 4]);
+- kunmap(pages[page]);
+- }
+-}
+-
+-static int i915_batchbuffer_info(struct seq_file *m, void *data)
+-{
+- struct drm_info_node *node = (struct drm_info_node *) m->private;
+- struct drm_device *dev = node->minor->dev;
+- drm_i915_private_t *dev_priv = dev->dev_private;
+- struct drm_gem_object *obj;
+- struct drm_i915_gem_object *obj_priv;
+- int ret;
+-
+- spin_lock(&dev_priv->mm.active_list_lock);
+-
+- list_for_each_entry(obj_priv, &dev_priv->mm.active_list, list) {
+- obj = obj_priv->obj;
+- if (obj->read_domains & I915_GEM_DOMAIN_COMMAND) {
+- ret = i915_gem_object_get_pages(obj);
+- if (ret) {
+- DRM_ERROR("Failed to get pages: %d\n", ret);
+- spin_unlock(&dev_priv->mm.active_list_lock);
+- return ret;
+- }
+-
+- seq_printf(m, "--- gtt_offset = 0x%08x\n", obj_priv->gtt_offset);
+- i915_dump_pages(m, obj_priv->pages, obj->size / PAGE_SIZE);
+-
+- i915_gem_object_put_pages(obj);
+- }
+- }
+-
+- spin_unlock(&dev_priv->mm.active_list_lock);
+-
+- return 0;
+-}
+-
+-static int i915_ringbuffer_data(struct seq_file *m, void *data)
+-{
+- struct drm_info_node *node = (struct drm_info_node *) m->private;
+- struct drm_device *dev = node->minor->dev;
+- drm_i915_private_t *dev_priv = dev->dev_private;
+- u8 *virt;
+- uint32_t *ptr, off;
+-
+- if (!dev_priv->ring.ring_obj) {
+- seq_printf(m, "No ringbuffer setup\n");
+- return 0;
+- }
+-
+- virt = dev_priv->ring.virtual_start;
+-
+- for (off = 0; off < dev_priv->ring.Size; off += 4) {
+- ptr = (uint32_t *)(virt + off);
+- seq_printf(m, "%08x : %08x\n", off, *ptr);
+- }
+-
+- return 0;
+-}
+-
+-static int i915_ringbuffer_info(struct seq_file *m, void *data)
+-{
+- struct drm_info_node *node = (struct drm_info_node *) m->private;
+- struct drm_device *dev = node->minor->dev;
+- drm_i915_private_t *dev_priv = dev->dev_private;
+- unsigned int head, tail, mask;
+-
+- head = I915_READ(PRB0_HEAD) & HEAD_ADDR;
+- tail = I915_READ(PRB0_TAIL) & TAIL_ADDR;
+- mask = dev_priv->ring.tail_mask;
+-
+- seq_printf(m, "RingHead : %08x\n", head);
+- seq_printf(m, "RingTail : %08x\n", tail);
+- seq_printf(m, "RingMask : %08x\n", mask);
+- seq_printf(m, "RingSize : %08lx\n", dev_priv->ring.Size);
+- seq_printf(m, "Acthd : %08x\n", I915_READ(IS_I965G(dev) ? ACTHD_I965 : ACTHD));
+-
+- return 0;
+-}
+-
+-static int i915_error_state(struct seq_file *m, void *unused)
+-{
+- struct drm_info_node *node = (struct drm_info_node *) m->private;
+- struct drm_device *dev = node->minor->dev;
+- drm_i915_private_t *dev_priv = dev->dev_private;
+- struct drm_i915_error_state *error;
+- unsigned long flags;
+-
+- spin_lock_irqsave(&dev_priv->error_lock, flags);
+- if (!dev_priv->first_error) {
+- seq_printf(m, "no error state collected\n");
+- goto out;
+- }
+-
+- error = dev_priv->first_error;
+-
+- seq_printf(m, "Time: %ld s %ld us\n", error->time.tv_sec,
+- error->time.tv_usec);
+- seq_printf(m, "EIR: 0x%08x\n", error->eir);
+- seq_printf(m, " PGTBL_ER: 0x%08x\n", error->pgtbl_er);
+- seq_printf(m, " INSTPM: 0x%08x\n", error->instpm);
+- seq_printf(m, " IPEIR: 0x%08x\n", error->ipeir);
+- seq_printf(m, " IPEHR: 0x%08x\n", error->ipehr);
+- seq_printf(m, " INSTDONE: 0x%08x\n", error->instdone);
+- seq_printf(m, " ACTHD: 0x%08x\n", error->acthd);
+- if (IS_I965G(dev)) {
+- seq_printf(m, " INSTPS: 0x%08x\n", error->instps);
+- seq_printf(m, " INSTDONE1: 0x%08x\n", error->instdone1);
+- }
+-
+-out:
+- spin_unlock_irqrestore(&dev_priv->error_lock, flags);
+-
+- return 0;
+-}
+-
+-static struct drm_info_list i915_gem_debugfs_list[] = {
+- {"i915_gem_active", i915_gem_object_list_info, 0, (void *) ACTIVE_LIST},
+- {"i915_gem_flushing", i915_gem_object_list_info, 0, (void *) FLUSHING_LIST},
+- {"i915_gem_inactive", i915_gem_object_list_info, 0, (void *) INACTIVE_LIST},
+- {"i915_gem_request", i915_gem_request_info, 0},
+- {"i915_gem_seqno", i915_gem_seqno_info, 0},
+- {"i915_gem_fence_regs", i915_gem_fence_regs_info, 0},
+- {"i915_gem_interrupt", i915_interrupt_info, 0},
+- {"i915_gem_hws", i915_hws_info, 0},
+- {"i915_ringbuffer_data", i915_ringbuffer_data, 0},
+- {"i915_ringbuffer_info", i915_ringbuffer_info, 0},
+- {"i915_batchbuffers", i915_batchbuffer_info, 0},
+- {"i915_error_state", i915_error_state, 0},
+-};
+-#define I915_GEM_DEBUGFS_ENTRIES ARRAY_SIZE(i915_gem_debugfs_list)
+-
+-int i915_gem_debugfs_init(struct drm_minor *minor)
+-{
+- return drm_debugfs_create_files(i915_gem_debugfs_list,
+- I915_GEM_DEBUGFS_ENTRIES,
+- minor->debugfs_root, minor);
+-}
+-
+-void i915_gem_debugfs_cleanup(struct drm_minor *minor)
+-{
+- drm_debugfs_remove_files(i915_gem_debugfs_list,
+- I915_GEM_DEBUGFS_ENTRIES, minor);
+-}
+-
+-#endif /* CONFIG_DEBUG_FS */
+-
+diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
+index a2d527b..200e398 100644
+--- a/drivers/gpu/drm/i915/i915_gem_tiling.c
++++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
+@@ -94,23 +94,15 @@
+ static int
+ intel_alloc_mchbar_resource(struct drm_device *dev)
+ {
+- struct pci_dev *bridge_dev;
+ drm_i915_private_t *dev_priv = dev->dev_private;
+ int reg = IS_I965G(dev) ? MCHBAR_I965 : MCHBAR_I915;
+ u32 temp_lo, temp_hi = 0;
+ u64 mchbar_addr;
+ int ret = 0;
+
+- bridge_dev = pci_get_bus_and_slot(0, PCI_DEVFN(0,0));
+- if (!bridge_dev) {
+- DRM_DEBUG("no bridge dev?!\n");
+- ret = -ENODEV;
+- goto out;
+- }
+-
+ if (IS_I965G(dev))
+- pci_read_config_dword(bridge_dev, reg + 4, &temp_hi);
+- pci_read_config_dword(bridge_dev, reg, &temp_lo);
++ pci_read_config_dword(dev_priv->bridge_dev, reg + 4, &temp_hi);
++ pci_read_config_dword(dev_priv->bridge_dev, reg, &temp_lo);
+ mchbar_addr = ((u64)temp_hi << 32) | temp_lo;
+
+ /* If ACPI doesn't have it, assume we need to allocate it ourselves */
+@@ -118,30 +110,28 @@ intel_alloc_mchbar_resource(struct drm_device *dev)
+ if (mchbar_addr &&
+ pnp_range_reserved(mchbar_addr, mchbar_addr + MCHBAR_SIZE)) {
+ ret = 0;
+- goto out_put;
++ goto out;
+ }
+ #endif
+
+ /* Get some space for it */
+- ret = pci_bus_alloc_resource(bridge_dev->bus, &dev_priv->mch_res,
++ ret = pci_bus_alloc_resource(dev_priv->bridge_dev->bus, &dev_priv->mch_res,
+ MCHBAR_SIZE, MCHBAR_SIZE,
+ PCIBIOS_MIN_MEM,
+ 0, pcibios_align_resource,
+- bridge_dev);
++ dev_priv->bridge_dev);
+ if (ret) {
+ DRM_DEBUG("failed bus alloc: %d\n", ret);
+ dev_priv->mch_res.start = 0;
+- goto out_put;
++ goto out;
+ }
+
+ if (IS_I965G(dev))
+- pci_write_config_dword(bridge_dev, reg + 4,
++ pci_write_config_dword(dev_priv->bridge_dev, reg + 4,
+ upper_32_bits(dev_priv->mch_res.start));
+
+- pci_write_config_dword(bridge_dev, reg,
++ pci_write_config_dword(dev_priv->bridge_dev, reg,
+ lower_32_bits(dev_priv->mch_res.start));
+-out_put:
+- pci_dev_put(bridge_dev);
+ out:
+ return ret;
+ }
+@@ -150,44 +140,36 @@ out:
+ static bool
+ intel_setup_mchbar(struct drm_device *dev)
+ {
+- struct pci_dev *bridge_dev;
++ drm_i915_private_t *dev_priv = dev->dev_private;
+ int mchbar_reg = IS_I965G(dev) ? MCHBAR_I965 : MCHBAR_I915;
+ u32 temp;
+ bool need_disable = false, enabled;
+
+- bridge_dev = pci_get_bus_and_slot(0, PCI_DEVFN(0,0));
+- if (!bridge_dev) {
+- DRM_DEBUG("no bridge dev?!\n");
+- goto out;
+- }
+-
+ if (IS_I915G(dev) || IS_I915GM(dev)) {
+- pci_read_config_dword(bridge_dev, DEVEN_REG, &temp);
++ pci_read_config_dword(dev_priv->bridge_dev, DEVEN_REG, &temp);
+ enabled = !!(temp & DEVEN_MCHBAR_EN);
+ } else {
+- pci_read_config_dword(bridge_dev, mchbar_reg, &temp);
++ pci_read_config_dword(dev_priv->bridge_dev, mchbar_reg, &temp);
+ enabled = temp & 1;
+ }
+
+ /* If it's already enabled, don't have to do anything */
+ if (enabled)
+- goto out_put;
++ goto out;
+
+ if (intel_alloc_mchbar_resource(dev))
+- goto out_put;
++ goto out;
+
+ need_disable = true;
+
+ /* Space is allocated or reserved, so enable it. */
+ if (IS_I915G(dev) || IS_I915GM(dev)) {
+- pci_write_config_dword(bridge_dev, DEVEN_REG,
++ pci_write_config_dword(dev_priv->bridge_dev, DEVEN_REG,
+ temp | DEVEN_MCHBAR_EN);
+ } else {
+- pci_read_config_dword(bridge_dev, mchbar_reg, &temp);
+- pci_write_config_dword(bridge_dev, mchbar_reg, temp | 1);
++ pci_read_config_dword(dev_priv->bridge_dev, mchbar_reg, &temp);
++ pci_write_config_dword(dev_priv->bridge_dev, mchbar_reg, temp | 1);
+ }
+-out_put:
+- pci_dev_put(bridge_dev);
+ out:
+ return need_disable;
+ }
+@@ -196,25 +178,18 @@ static void
+ intel_teardown_mchbar(struct drm_device *dev, bool disable)
+ {
+ drm_i915_private_t *dev_priv = dev->dev_private;
+- struct pci_dev *bridge_dev;
+ int mchbar_reg = IS_I965G(dev) ? MCHBAR_I965 : MCHBAR_I915;
+ u32 temp;
+
+- bridge_dev = pci_get_bus_and_slot(0, PCI_DEVFN(0,0));
+- if (!bridge_dev) {
+- DRM_DEBUG("no bridge dev?!\n");
+- return;
+- }
+-
+ if (disable) {
+ if (IS_I915G(dev) || IS_I915GM(dev)) {
+- pci_read_config_dword(bridge_dev, DEVEN_REG, &temp);
++ pci_read_config_dword(dev_priv->bridge_dev, DEVEN_REG, &temp);
+ temp &= ~DEVEN_MCHBAR_EN;
+- pci_write_config_dword(bridge_dev, DEVEN_REG, temp);
++ pci_write_config_dword(dev_priv->bridge_dev, DEVEN_REG, temp);
+ } else {
+- pci_read_config_dword(bridge_dev, mchbar_reg, &temp);
++ pci_read_config_dword(dev_priv->bridge_dev, mchbar_reg, &temp);
+ temp &= ~1;
+- pci_write_config_dword(bridge_dev, mchbar_reg, temp);
++ pci_write_config_dword(dev_priv->bridge_dev, mchbar_reg, temp);
+ }
+ }
+
+@@ -234,7 +209,13 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
+ uint32_t swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
+ bool need_disable;
+
+- if (!IS_I9XX(dev)) {
++ if (IS_IGDNG(dev)) {
++ /* On IGDNG whatever DRAM config, GPU always do
++ * same swizzling setup.
++ */
++ swizzle_x = I915_BIT_6_SWIZZLE_9_10;
++ swizzle_y = I915_BIT_6_SWIZZLE_9;
++ } else if (!IS_I9XX(dev)) {
+ /* As far as we know, the 865 doesn't have these bit 6
+ * swizzling issues.
+ */
+@@ -317,13 +298,6 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
+ }
+ }
+
+- /* FIXME: check with memory config on IGDNG */
+- if (IS_IGDNG(dev)) {
+- DRM_ERROR("disable tiling on IGDNG...\n");
+- swizzle_x = I915_BIT_6_SWIZZLE_UNKNOWN;
+- swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
+- }
+-
+ dev_priv->mm.bit_6_swizzle_x = swizzle_x;
+ dev_priv->mm.bit_6_swizzle_y = swizzle_y;
+ }
+diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
+index 7ebc84c..6c89f2f 100644
+--- a/drivers/gpu/drm/i915/i915_irq.c
++++ b/drivers/gpu/drm/i915/i915_irq.c
+@@ -565,6 +565,27 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
+
+ I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status);
+ I915_READ(PORT_HOTPLUG_STAT);
++
++ /* EOS interrupts occurs */
++ if (IS_IGD(dev) &&
++ (hotplug_status & CRT_EOS_INT_STATUS)) {
++ u32 temp;
++
++ DRM_DEBUG("EOS interrupt occurs\n");
++ /* status is already cleared */
++ temp = I915_READ(ADPA);
++ temp &= ~ADPA_DAC_ENABLE;
++ I915_WRITE(ADPA, temp);
++
++ temp = I915_READ(PORT_HOTPLUG_EN);
++ temp &= ~CRT_EOS_INT_EN;
++ I915_WRITE(PORT_HOTPLUG_EN, temp);
++
++ temp = I915_READ(PORT_HOTPLUG_STAT);
++ if (temp & CRT_EOS_INT_STATUS)
++ I915_WRITE(PORT_HOTPLUG_STAT,
++ CRT_EOS_INT_STATUS);
++ }
+ }
+
+ I915_WRITE(IIR, iir);
+diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
+index 2955083..e38cd21 100644
+--- a/drivers/gpu/drm/i915/i915_reg.h
++++ b/drivers/gpu/drm/i915/i915_reg.h
+@@ -55,7 +55,7 @@
+ /* PCI config space */
+
+ #define HPLLCC 0xc0 /* 855 only */
+-#define GC_CLOCK_CONTROL_MASK (3 << 0)
++#define GC_CLOCK_CONTROL_MASK (0xf << 0)
+ #define GC_CLOCK_133_200 (0 << 0)
+ #define GC_CLOCK_100_200 (1 << 0)
+ #define GC_CLOCK_100_133 (2 << 0)
+@@ -65,6 +65,25 @@
+ #define GC_DISPLAY_CLOCK_190_200_MHZ (0 << 4)
+ #define GC_DISPLAY_CLOCK_333_MHZ (4 << 4)
+ #define GC_DISPLAY_CLOCK_MASK (7 << 4)
++#define GM45_GC_RENDER_CLOCK_MASK (0xf << 0)
++#define GM45_GC_RENDER_CLOCK_266_MHZ (8 << 0)
++#define GM45_GC_RENDER_CLOCK_320_MHZ (9 << 0)
++#define GM45_GC_RENDER_CLOCK_400_MHZ (0xb << 0)
++#define GM45_GC_RENDER_CLOCK_533_MHZ (0xc << 0)
++#define I965_GC_RENDER_CLOCK_MASK (0xf << 0)
++#define I965_GC_RENDER_CLOCK_267_MHZ (2 << 0)
++#define I965_GC_RENDER_CLOCK_333_MHZ (3 << 0)
++#define I965_GC_RENDER_CLOCK_444_MHZ (4 << 0)
++#define I965_GC_RENDER_CLOCK_533_MHZ (5 << 0)
++#define I945_GC_RENDER_CLOCK_MASK (7 << 0)
++#define I945_GC_RENDER_CLOCK_166_MHZ (0 << 0)
++#define I945_GC_RENDER_CLOCK_200_MHZ (1 << 0)
++#define I945_GC_RENDER_CLOCK_250_MHZ (3 << 0)
++#define I945_GC_RENDER_CLOCK_400_MHZ (5 << 0)
++#define I915_GC_RENDER_CLOCK_MASK (7 << 0)
++#define I915_GC_RENDER_CLOCK_166_MHZ (0 << 0)
++#define I915_GC_RENDER_CLOCK_200_MHZ (1 << 0)
++#define I915_GC_RENDER_CLOCK_333_MHZ (4 << 0)
+ #define LBB 0xf4
+
+ /* VGA stuff */
+@@ -553,9 +572,118 @@
+ #define DPLLA_TEST_M_BYPASS (1 << 2)
+ #define DPLLA_INPUT_BUFFER_ENABLE (1 << 0)
+ #define D_STATE 0x6104
+-#define CG_2D_DIS 0x6200
+-#define DPCUNIT_CLOCK_GATE_DISABLE (1 << 24)
+-#define CG_3D_DIS 0x6204
++#define DSTATE_PLL_D3_OFF (1<<3)
++#define DSTATE_GFX_CLOCK_GATING (1<<1)
++#define DSTATE_DOT_CLOCK_GATING (1<<0)
++#define DSPCLK_GATE_D 0x6200
++# define DPUNIT_B_CLOCK_GATE_DISABLE (1 << 30) /* 965 */
++# define VSUNIT_CLOCK_GATE_DISABLE (1 << 29) /* 965 */
++# define VRHUNIT_CLOCK_GATE_DISABLE (1 << 28) /* 965 */
++# define VRDUNIT_CLOCK_GATE_DISABLE (1 << 27) /* 965 */
++# define AUDUNIT_CLOCK_GATE_DISABLE (1 << 26) /* 965 */
++# define DPUNIT_A_CLOCK_GATE_DISABLE (1 << 25) /* 965 */
++# define DPCUNIT_CLOCK_GATE_DISABLE (1 << 24) /* 965 */
++# define TVRUNIT_CLOCK_GATE_DISABLE (1 << 23) /* 915-945 */
++# define TVCUNIT_CLOCK_GATE_DISABLE (1 << 22) /* 915-945 */
++# define TVFUNIT_CLOCK_GATE_DISABLE (1 << 21) /* 915-945 */
++# define TVEUNIT_CLOCK_GATE_DISABLE (1 << 20) /* 915-945 */
++# define DVSUNIT_CLOCK_GATE_DISABLE (1 << 19) /* 915-945 */
++# define DSSUNIT_CLOCK_GATE_DISABLE (1 << 18) /* 915-945 */
++# define DDBUNIT_CLOCK_GATE_DISABLE (1 << 17) /* 915-945 */
++# define DPRUNIT_CLOCK_GATE_DISABLE (1 << 16) /* 915-945 */
++# define DPFUNIT_CLOCK_GATE_DISABLE (1 << 15) /* 915-945 */
++# define DPBMUNIT_CLOCK_GATE_DISABLE (1 << 14) /* 915-945 */
++# define DPLSUNIT_CLOCK_GATE_DISABLE (1 << 13) /* 915-945 */
++# define DPLUNIT_CLOCK_GATE_DISABLE (1 << 12) /* 915-945 */
++# define DPOUNIT_CLOCK_GATE_DISABLE (1 << 11)
++# define DPBUNIT_CLOCK_GATE_DISABLE (1 << 10)
++# define DCUNIT_CLOCK_GATE_DISABLE (1 << 9)
++# define DPUNIT_CLOCK_GATE_DISABLE (1 << 8)
++# define VRUNIT_CLOCK_GATE_DISABLE (1 << 7) /* 915+: reserved */
++# define OVHUNIT_CLOCK_GATE_DISABLE (1 << 6) /* 830-865 */
++# define DPIOUNIT_CLOCK_GATE_DISABLE (1 << 6) /* 915-945 */
++# define OVFUNIT_CLOCK_GATE_DISABLE (1 << 5)
++# define OVBUNIT_CLOCK_GATE_DISABLE (1 << 4)
++/**
++ * This bit must be set on the 830 to prevent hangs when turning off the
++ * overlay scaler.
++ */
++# define OVRUNIT_CLOCK_GATE_DISABLE (1 << 3)
++# define OVCUNIT_CLOCK_GATE_DISABLE (1 << 2)
++# define OVUUNIT_CLOCK_GATE_DISABLE (1 << 1)
++# define ZVUNIT_CLOCK_GATE_DISABLE (1 << 0) /* 830 */
++# define OVLUNIT_CLOCK_GATE_DISABLE (1 << 0) /* 845,865 */
++
++#define RENCLK_GATE_D1 0x6204
++# define BLITTER_CLOCK_GATE_DISABLE (1 << 13) /* 945GM only */
++# define MPEG_CLOCK_GATE_DISABLE (1 << 12) /* 945GM only */
++# define PC_FE_CLOCK_GATE_DISABLE (1 << 11)
++# define PC_BE_CLOCK_GATE_DISABLE (1 << 10)
++# define WINDOWER_CLOCK_GATE_DISABLE (1 << 9)
++# define INTERPOLATOR_CLOCK_GATE_DISABLE (1 << 8)
++# define COLOR_CALCULATOR_CLOCK_GATE_DISABLE (1 << 7)
++# define MOTION_COMP_CLOCK_GATE_DISABLE (1 << 6)
++# define MAG_CLOCK_GATE_DISABLE (1 << 5)
++/** This bit must be unset on 855,865 */
++# define MECI_CLOCK_GATE_DISABLE (1 << 4)
++# define DCMP_CLOCK_GATE_DISABLE (1 << 3)
++# define MEC_CLOCK_GATE_DISABLE (1 << 2)
++# define MECO_CLOCK_GATE_DISABLE (1 << 1)
++/** This bit must be set on 855,865. */
++# define SV_CLOCK_GATE_DISABLE (1 << 0)
++# define I915_MPEG_CLOCK_GATE_DISABLE (1 << 16)
++# define I915_VLD_IP_PR_CLOCK_GATE_DISABLE (1 << 15)
++# define I915_MOTION_COMP_CLOCK_GATE_DISABLE (1 << 14)
++# define I915_BD_BF_CLOCK_GATE_DISABLE (1 << 13)
++# define I915_SF_SE_CLOCK_GATE_DISABLE (1 << 12)
++# define I915_WM_CLOCK_GATE_DISABLE (1 << 11)
++# define I915_IZ_CLOCK_GATE_DISABLE (1 << 10)
++# define I915_PI_CLOCK_GATE_DISABLE (1 << 9)
++# define I915_DI_CLOCK_GATE_DISABLE (1 << 8)
++# define I915_SH_SV_CLOCK_GATE_DISABLE (1 << 7)
++# define I915_PL_DG_QC_FT_CLOCK_GATE_DISABLE (1 << 6)
++# define I915_SC_CLOCK_GATE_DISABLE (1 << 5)
++# define I915_FL_CLOCK_GATE_DISABLE (1 << 4)
++# define I915_DM_CLOCK_GATE_DISABLE (1 << 3)
++# define I915_PS_CLOCK_GATE_DISABLE (1 << 2)
++# define I915_CC_CLOCK_GATE_DISABLE (1 << 1)
++# define I915_BY_CLOCK_GATE_DISABLE (1 << 0)
++
++# define I965_RCZ_CLOCK_GATE_DISABLE (1 << 30)
++/** This bit must always be set on 965G/965GM */
++# define I965_RCC_CLOCK_GATE_DISABLE (1 << 29)
++# define I965_RCPB_CLOCK_GATE_DISABLE (1 << 28)
++# define I965_DAP_CLOCK_GATE_DISABLE (1 << 27)
++# define I965_ROC_CLOCK_GATE_DISABLE (1 << 26)
++# define I965_GW_CLOCK_GATE_DISABLE (1 << 25)
++# define I965_TD_CLOCK_GATE_DISABLE (1 << 24)
++/** This bit must always be set on 965G */
++# define I965_ISC_CLOCK_GATE_DISABLE (1 << 23)
++# define I965_IC_CLOCK_GATE_DISABLE (1 << 22)
++# define I965_EU_CLOCK_GATE_DISABLE (1 << 21)
++# define I965_IF_CLOCK_GATE_DISABLE (1 << 20)
++# define I965_TC_CLOCK_GATE_DISABLE (1 << 19)
++# define I965_SO_CLOCK_GATE_DISABLE (1 << 17)
++# define I965_FBC_CLOCK_GATE_DISABLE (1 << 16)
++# define I965_MARI_CLOCK_GATE_DISABLE (1 << 15)
++# define I965_MASF_CLOCK_GATE_DISABLE (1 << 14)
++# define I965_MAWB_CLOCK_GATE_DISABLE (1 << 13)
++# define I965_EM_CLOCK_GATE_DISABLE (1 << 12)
++# define I965_UC_CLOCK_GATE_DISABLE (1 << 11)
++# define I965_SI_CLOCK_GATE_DISABLE (1 << 6)
++# define I965_MT_CLOCK_GATE_DISABLE (1 << 5)
++# define I965_PL_CLOCK_GATE_DISABLE (1 << 4)
++# define I965_DG_CLOCK_GATE_DISABLE (1 << 3)
++# define I965_QC_CLOCK_GATE_DISABLE (1 << 2)
++# define I965_FT_CLOCK_GATE_DISABLE (1 << 1)
++# define I965_DM_CLOCK_GATE_DISABLE (1 << 0)
++
++#define RENCLK_GATE_D2 0x6208
++#define VF_UNIT_CLOCK_GATE_DISABLE (1 << 9)
++#define GS_UNIT_CLOCK_GATE_DISABLE (1 << 7)
++#define CL_UNIT_CLOCK_GATE_DISABLE (1 << 6)
++#define RAMCLK_GATE_D 0x6210 /* CRL only */
++#define DEUC 0x6214 /* CRL only */
+
+ /*
+ * Palette regs
+@@ -683,6 +811,7 @@
+ #define SDVOB_HOTPLUG_INT_EN (1 << 26)
+ #define SDVOC_HOTPLUG_INT_EN (1 << 25)
+ #define TV_HOTPLUG_INT_EN (1 << 18)
++#define CRT_EOS_INT_EN (1 << 10)
+ #define CRT_HOTPLUG_INT_EN (1 << 9)
+ #define CRT_HOTPLUG_FORCE_DETECT (1 << 3)
+ #define CRT_HOTPLUG_ACTIVATION_PERIOD_32 (0 << 8)
+@@ -717,6 +846,7 @@
+ #define DPC_HOTPLUG_INT_STATUS (1 << 28)
+ #define HDMID_HOTPLUG_INT_STATUS (1 << 27)
+ #define DPD_HOTPLUG_INT_STATUS (1 << 27)
++#define CRT_EOS_INT_STATUS (1 << 12)
+ #define CRT_HOTPLUG_INT_STATUS (1 << 11)
+ #define TV_HOTPLUG_INT_STATUS (1 << 10)
+ #define CRT_HOTPLUG_MONITOR_MASK (3 << 8)
+@@ -1586,6 +1716,7 @@
+ #define PIPECONF_PROGRESSIVE (0 << 21)
+ #define PIPECONF_INTERLACE_W_FIELD_INDICATION (6 << 21)
+ #define PIPECONF_INTERLACE_FIELD_0_ONLY (7 << 21)
++#define PIPECONF_CXSR_DOWNCLOCK (1<<16)
+ #define PIPEASTAT 0x70024
+ #define PIPE_FIFO_UNDERRUN_STATUS (1UL<<31)
+ #define PIPE_CRC_ERROR_ENABLE (1UL<<29)
+@@ -1733,6 +1864,7 @@
+ #define DISPPLANE_NO_LINE_DOUBLE 0
+ #define DISPPLANE_STEREO_POLARITY_FIRST 0
+ #define DISPPLANE_STEREO_POLARITY_SECOND (1<<18)
++#define DISPPLANE_TRICKLE_FEED_DISABLE (1<<14) /* IGDNG */
+ #define DISPPLANE_TILED (1<<10)
+ #define DSPAADDR 0x70184
+ #define DSPASTRIDE 0x70188
+@@ -1913,6 +2045,9 @@
+ #define GTIIR 0x44018
+ #define GTIER 0x4401c
+
++#define DISP_ARB_CTL 0x45000
++#define DISP_TILE_SURFACE_SWIZZLING (1<<13)
++
+ /* PCH */
+
+ /* south display engine interrupt */
+diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
+index 1d04e19..20d4d19 100644
+--- a/drivers/gpu/drm/i915/i915_suspend.c
++++ b/drivers/gpu/drm/i915/i915_suspend.c
+@@ -461,7 +461,7 @@ int i915_save_state(struct drm_device *dev)
+
+ /* Clock gating state */
+ dev_priv->saveD_STATE = I915_READ(D_STATE);
+- dev_priv->saveCG_2D_DIS = I915_READ(CG_2D_DIS);
++ dev_priv->saveDSPCLK_GATE_D = I915_READ(DSPCLK_GATE_D);
+
+ /* Cache mode state */
+ dev_priv->saveCACHE_MODE_0 = I915_READ(CACHE_MODE_0);
+@@ -588,7 +588,7 @@ int i915_restore_state(struct drm_device *dev)
+
+ /* Clock gating state */
+ I915_WRITE (D_STATE, dev_priv->saveD_STATE);
+- I915_WRITE (CG_2D_DIS, dev_priv->saveCG_2D_DIS);
++ I915_WRITE (DSPCLK_GATE_D, dev_priv->saveDSPCLK_GATE_D);
+
+ /* Cache mode state */
+ I915_WRITE (CACHE_MODE_0, dev_priv->saveCACHE_MODE_0 | 0xffff0000);
+diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
+index f806fcc..1e28c16 100644
+--- a/drivers/gpu/drm/i915/intel_bios.c
++++ b/drivers/gpu/drm/i915/intel_bios.c
+@@ -355,8 +355,14 @@ parse_driver_features(struct drm_i915_private *dev_priv,
+ }
+
+ driver = find_section(bdb, BDB_DRIVER_FEATURES);
+- if (driver && driver->lvds_config == BDB_DRIVER_FEATURE_EDP)
++ if (!driver)
++ return;
++
++ if (driver->lvds_config == BDB_DRIVER_FEATURE_EDP)
+ dev_priv->edp_support = 1;
++
++ if (driver->dual_frequency)
++ dev_priv->render_reclock_avail = true;
+ }
+
+ /**
+diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
+index 590f81c..88814fa 100644
+--- a/drivers/gpu/drm/i915/intel_crt.c
++++ b/drivers/gpu/drm/i915/intel_crt.c
+@@ -64,6 +64,34 @@ static void intel_crt_dpms(struct drm_encoder *encoder, int mode)
+ }
+
+ I915_WRITE(reg, temp);
++
++ if (IS_IGD(dev)) {
++ if (mode == DRM_MODE_DPMS_OFF) {
++ /* turn off DAC */
++ temp = I915_READ(PORT_HOTPLUG_EN);
++ temp &= ~CRT_EOS_INT_EN;
++ I915_WRITE(PORT_HOTPLUG_EN, temp);
++
++ temp = I915_READ(PORT_HOTPLUG_STAT);
++ if (temp & CRT_EOS_INT_STATUS)
++ I915_WRITE(PORT_HOTPLUG_STAT,
++ CRT_EOS_INT_STATUS);
++ } else {
++ /* turn on DAC. EOS interrupt must be enabled after DAC
++ * is enabled, so it sounds not good to enable it in
++ * i915_driver_irq_postinstall()
++ * wait 12.5ms after DAC is enabled
++ */
++ msleep(13);
++ temp = I915_READ(PORT_HOTPLUG_STAT);
++ if (temp & CRT_EOS_INT_STATUS)
++ I915_WRITE(PORT_HOTPLUG_STAT,
++ CRT_EOS_INT_STATUS);
++ temp = I915_READ(PORT_HOTPLUG_EN);
++ temp |= CRT_EOS_INT_EN;
++ I915_WRITE(PORT_HOTPLUG_EN, temp);
++ }
++ }
+ }
+
+ static int intel_crt_mode_valid(struct drm_connector *connector,
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+index 748ed50..155719f 100644
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -38,6 +38,7 @@
+
+ bool intel_pipe_has_type (struct drm_crtc *crtc, int type);
+ static void intel_update_watermarks(struct drm_device *dev);
++static void intel_increase_pllclock(struct drm_crtc *crtc, bool schedule);
+
+ typedef struct {
+ /* given values */
+@@ -67,6 +68,8 @@ struct intel_limit {
+ intel_p2_t p2;
+ bool (* find_pll)(const intel_limit_t *, struct drm_crtc *,
+ int, int, intel_clock_t *);
++ bool (* find_reduced_pll)(const intel_limit_t *, struct drm_crtc *,
++ int, int, intel_clock_t *);
+ };
+
+ #define I8XX_DOT_MIN 25000
+@@ -261,6 +264,9 @@ static bool
+ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
+ int target, int refclk, intel_clock_t *best_clock);
+ static bool
++intel_find_best_reduced_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
++ int target, int refclk, intel_clock_t *best_clock);
++static bool
+ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
+ int target, int refclk, intel_clock_t *best_clock);
+ static bool
+@@ -286,6 +292,7 @@ static const intel_limit_t intel_limits_i8xx_dvo = {
+ .p2 = { .dot_limit = I8XX_P2_SLOW_LIMIT,
+ .p2_slow = I8XX_P2_SLOW, .p2_fast = I8XX_P2_FAST },
+ .find_pll = intel_find_best_PLL,
++ .find_reduced_pll = intel_find_best_reduced_PLL,
+ };
+
+ static const intel_limit_t intel_limits_i8xx_lvds = {
+@@ -300,6 +307,7 @@ static const intel_limit_t intel_limits_i8xx_lvds = {
+ .p2 = { .dot_limit = I8XX_P2_SLOW_LIMIT,
+ .p2_slow = I8XX_P2_LVDS_SLOW, .p2_fast = I8XX_P2_LVDS_FAST },
+ .find_pll = intel_find_best_PLL,
++ .find_reduced_pll = intel_find_best_reduced_PLL,
+ };
+
+ static const intel_limit_t intel_limits_i9xx_sdvo = {
+@@ -314,6 +322,7 @@ static const intel_limit_t intel_limits_i9xx_sdvo = {
+ .p2 = { .dot_limit = I9XX_P2_SDVO_DAC_SLOW_LIMIT,
+ .p2_slow = I9XX_P2_SDVO_DAC_SLOW, .p2_fast = I9XX_P2_SDVO_DAC_FAST },
+ .find_pll = intel_find_best_PLL,
++ .find_reduced_pll = intel_find_best_reduced_PLL,
+ };
+
+ static const intel_limit_t intel_limits_i9xx_lvds = {
+@@ -331,6 +340,7 @@ static const intel_limit_t intel_limits_i9xx_lvds = {
+ .p2 = { .dot_limit = I9XX_P2_LVDS_SLOW_LIMIT,
+ .p2_slow = I9XX_P2_LVDS_SLOW, .p2_fast = I9XX_P2_LVDS_FAST },
+ .find_pll = intel_find_best_PLL,
++ .find_reduced_pll = intel_find_best_reduced_PLL,
+ };
+
+ /* below parameter and function is for G4X Chipset Family*/
+@@ -348,6 +358,7 @@ static const intel_limit_t intel_limits_g4x_sdvo = {
+ .p2_fast = G4X_P2_SDVO_FAST
+ },
+ .find_pll = intel_g4x_find_best_PLL,
++ .find_reduced_pll = intel_g4x_find_best_PLL,
+ };
+
+ static const intel_limit_t intel_limits_g4x_hdmi = {
+@@ -364,6 +375,7 @@ static const intel_limit_t intel_limits_g4x_hdmi = {
+ .p2_fast = G4X_P2_HDMI_DAC_FAST
+ },
+ .find_pll = intel_g4x_find_best_PLL,
++ .find_reduced_pll = intel_g4x_find_best_PLL,
+ };
+
+ static const intel_limit_t intel_limits_g4x_single_channel_lvds = {
+@@ -388,6 +400,7 @@ static const intel_limit_t intel_limits_g4x_single_channel_lvds = {
+ .p2_fast = G4X_P2_SINGLE_CHANNEL_LVDS_FAST
+ },
+ .find_pll = intel_g4x_find_best_PLL,
++ .find_reduced_pll = intel_g4x_find_best_PLL,
+ };
+
+ static const intel_limit_t intel_limits_g4x_dual_channel_lvds = {
+@@ -412,6 +425,7 @@ static const intel_limit_t intel_limits_g4x_dual_channel_lvds = {
+ .p2_fast = G4X_P2_DUAL_CHANNEL_LVDS_FAST
+ },
+ .find_pll = intel_g4x_find_best_PLL,
++ .find_reduced_pll = intel_g4x_find_best_PLL,
+ };
+
+ static const intel_limit_t intel_limits_g4x_display_port = {
+@@ -449,6 +463,7 @@ static const intel_limit_t intel_limits_igd_sdvo = {
+ .p2 = { .dot_limit = I9XX_P2_SDVO_DAC_SLOW_LIMIT,
+ .p2_slow = I9XX_P2_SDVO_DAC_SLOW, .p2_fast = I9XX_P2_SDVO_DAC_FAST },
+ .find_pll = intel_find_best_PLL,
++ .find_reduced_pll = intel_find_best_reduced_PLL,
+ };
+
+ static const intel_limit_t intel_limits_igd_lvds = {
+@@ -464,6 +479,7 @@ static const intel_limit_t intel_limits_igd_lvds = {
+ .p2 = { .dot_limit = I9XX_P2_LVDS_SLOW_LIMIT,
+ .p2_slow = I9XX_P2_LVDS_SLOW, .p2_fast = I9XX_P2_LVDS_SLOW },
+ .find_pll = intel_find_best_PLL,
++ .find_reduced_pll = intel_find_best_reduced_PLL,
+ };
+
+ static const intel_limit_t intel_limits_igdng_sdvo = {
+@@ -688,15 +704,16 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
+
+ memset (best_clock, 0, sizeof (*best_clock));
+
+- for (clock.m1 = limit->m1.min; clock.m1 <= limit->m1.max; clock.m1++) {
+- for (clock.m2 = limit->m2.min; clock.m2 <= limit->m2.max; clock.m2++) {
+- /* m1 is always 0 in IGD */
+- if (clock.m2 >= clock.m1 && !IS_IGD(dev))
+- break;
+- for (clock.n = limit->n.min; clock.n <= limit->n.max;
+- clock.n++) {
+- for (clock.p1 = limit->p1.min;
+- clock.p1 <= limit->p1.max; clock.p1++) {
++ for (clock.p1 = limit->p1.max; clock.p1 >= limit->p1.min; clock.p1--) {
++ for (clock.m1 = limit->m1.min; clock.m1 <= limit->m1.max;
++ clock.m1++) {
++ for (clock.m2 = limit->m2.min;
++ clock.m2 <= limit->m2.max; clock.m2++) {
++ /* m1 is always 0 in IGD */
++ if (clock.m2 >= clock.m1 && !IS_IGD(dev))
++ break;
++ for (clock.n = limit->n.min;
++ clock.n <= limit->n.max; clock.n++) {
+ int this_err;
+
+ intel_clock(dev, refclk, &clock);
+@@ -717,6 +734,46 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
+ return (err != target);
+ }
+
++
++static bool
++intel_find_best_reduced_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
++ int target, int refclk, intel_clock_t *best_clock)
++
++{
++ struct drm_device *dev = crtc->dev;
++ intel_clock_t clock;
++ int err = target;
++ bool found = false;
++
++ memcpy(&clock, best_clock, sizeof(intel_clock_t));
++
++ for (clock.m1 = limit->m1.min; clock.m1 <= limit->m1.max; clock.m1++) {
++ for (clock.m2 = limit->m2.min; clock.m2 <= limit->m2.max; clock.m2++) {
++ /* m1 is always 0 in IGD */
++ if (clock.m2 >= clock.m1 && !IS_IGD(dev))
++ break;
++ for (clock.n = limit->n.min; clock.n <= limit->n.max;
++ clock.n++) {
++ int this_err;
++
++ intel_clock(dev, refclk, &clock);
++
++ if (!intel_PLL_is_valid(crtc, &clock))
++ continue;
++
++ this_err = abs(clock.dot - target);
++ if (this_err < err) {
++ *best_clock = clock;
++ err = this_err;
++ found = true;
++ }
++ }
++ }
++ }
++
++ return found;
++}
++
+ static bool
+ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
+ int target, int refclk, intel_clock_t *best_clock)
+@@ -747,7 +804,7 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
+ max_n = limit->n.max;
+ /* based on hardware requriment prefer smaller n to precision */
+ for (clock.n = limit->n.min; clock.n <= max_n; clock.n++) {
+- /* based on hardware requirment prefere larger m1,m2, p1 */
++ /* based on hardware requirment prefere larger m1,m2 */
+ for (clock.m1 = limit->m1.max;
+ clock.m1 >= limit->m1.min; clock.m1--) {
+ for (clock.m2 = limit->m2.max;
+@@ -832,15 +889,14 @@ intel_igdng_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
+
+ memset(best_clock, 0, sizeof(*best_clock));
+ max_n = limit->n.max;
+- /* based on hardware requriment prefer smaller n to precision */
+- for (clock.n = limit->n.min; clock.n <= max_n; clock.n++) {
+- /* based on hardware requirment prefere larger m1,m2, p1 */
+- for (clock.m1 = limit->m1.max;
+- clock.m1 >= limit->m1.min; clock.m1--) {
+- for (clock.m2 = limit->m2.max;
+- clock.m2 >= limit->m2.min; clock.m2--) {
+- for (clock.p1 = limit->p1.max;
+- clock.p1 >= limit->p1.min; clock.p1--) {
++ for (clock.p1 = limit->p1.max; clock.p1 >= limit->p1.min; clock.p1--) {
++ /* based on hardware requriment prefer smaller n to precision */
++ for (clock.n = limit->n.min; clock.n <= max_n; clock.n++) {
++ /* based on hardware requirment prefere larger m1,m2 */
++ for (clock.m1 = limit->m1.max;
++ clock.m1 >= limit->m1.min; clock.m1--) {
++ for (clock.m2 = limit->m2.max;
++ clock.m2 >= limit->m2.min; clock.m2--) {
+ int this_err;
+
+ intel_clock(dev, refclk, &clock);
+@@ -1008,6 +1064,10 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
+ dspcntr &= ~DISPPLANE_TILED;
+ }
+
++ if (IS_IGDNG(dev))
++ /* must disable */
++ dspcntr |= DISPPLANE_TRICKLE_FEED_DISABLE;
++
+ I915_WRITE(dspcntr_reg, dspcntr);
+
+ Start = obj_priv->gtt_offset;
+@@ -1030,8 +1090,11 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
+
+ if (old_fb) {
+ intel_fb = to_intel_framebuffer(old_fb);
++ obj_priv = intel_fb->obj->driver_private;
+ i915_gem_object_unpin(intel_fb->obj);
+ }
++ intel_increase_pllclock(crtc, true);
++
+ mutex_unlock(&dev->struct_mutex);
+
+ if (!dev->primary->master)
+@@ -1581,6 +1644,8 @@ static void intel_crtc_dpms(struct drm_crtc *crtc, int mode)
+ else
+ i9xx_crtc_dpms(crtc, mode);
+
++ intel_crtc->dpms_mode = mode;
++
+ if (!dev->primary->master)
+ return;
+
+@@ -1603,8 +1668,6 @@ static void intel_crtc_dpms(struct drm_crtc *crtc, int mode)
+ DRM_ERROR("Can't update pipe %d in SAREA\n", pipe);
+ break;
+ }
+-
+- intel_crtc->dpms_mode = mode;
+ }
+
+ static void intel_crtc_prepare (struct drm_crtc *crtc)
+@@ -2054,6 +2117,18 @@ static int intel_get_fifo_size(struct drm_device *dev, int plane)
+ return size;
+ }
+
++static void g4x_update_wm(struct drm_device *dev)
++{
++ struct drm_i915_private *dev_priv = dev->dev_private;
++ u32 fw_blc_self = I915_READ(FW_BLC_SELF);
++
++ if (i915_powersave)
++ fw_blc_self |= FW_BLC_SELF_EN;
++ else
++ fw_blc_self &= ~FW_BLC_SELF_EN;
++ I915_WRITE(FW_BLC_SELF, fw_blc_self);
++}
++
+ static void i965_update_wm(struct drm_device *dev)
+ {
+ struct drm_i915_private *dev_priv = dev->dev_private;
+@@ -2105,7 +2180,8 @@ static void i9xx_update_wm(struct drm_device *dev, int planea_clock,
+ cwm = 2;
+
+ /* Calc sr entries for one plane configs */
+- if (sr_hdisplay && (!planea_clock || !planeb_clock)) {
++ if (HAS_FW_BLC(dev) && sr_hdisplay &&
++ (!planea_clock || !planeb_clock)) {
+ /* self-refresh has much higher latency */
+ const static int sr_latency_ns = 6000;
+
+@@ -2120,8 +2196,7 @@ static void i9xx_update_wm(struct drm_device *dev, int planea_clock,
+ srwm = total_size - sr_entries;
+ if (srwm < 0)
+ srwm = 1;
+- if (IS_I9XX(dev))
+- I915_WRITE(FW_BLC_SELF, (srwm & 0x3f));
++ I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN | (srwm & 0x3f));
+ }
+
+ DRM_DEBUG("Setting FIFO watermarks - A: %d, B: %d, C: %d, SR %d\n",
+@@ -2195,9 +2270,6 @@ static void intel_update_watermarks(struct drm_device *dev)
+ unsigned long planea_clock = 0, planeb_clock = 0, sr_clock = 0;
+ int enabled = 0, pixel_size = 0;
+
+- if (DSPARB_HWCONTROL(dev))
+- return;
+-
+ /* Get the clock config from both planes */
+ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+ intel_crtc = to_intel_crtc(crtc);
+@@ -2230,7 +2302,9 @@ static void intel_update_watermarks(struct drm_device *dev)
+ else if (IS_IGD(dev))
+ igd_disable_cxsr(dev);
+
+- if (IS_I965G(dev))
++ if (IS_G4X(dev))
++ g4x_update_wm(dev);
++ else if (IS_I965G(dev))
+ i965_update_wm(dev);
+ else if (IS_I9XX(dev) || IS_MOBILE(dev))
+ i9xx_update_wm(dev, planea_clock, planeb_clock, sr_hdisplay,
+@@ -2264,9 +2338,9 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
+ int dsppos_reg = (pipe == 0) ? DSPAPOS : DSPBPOS;
+ int pipesrc_reg = (pipe == 0) ? PIPEASRC : PIPEBSRC;
+ int refclk, num_outputs = 0;
+- intel_clock_t clock;
+- u32 dpll = 0, fp = 0, dspcntr, pipeconf;
+- bool ok, is_sdvo = false, is_dvo = false;
++ intel_clock_t clock, reduced_clock;
++ u32 dpll = 0, fp = 0, fp2 = 0, dspcntr, pipeconf;
++ bool ok, has_reduced_clock = false, is_sdvo = false, is_dvo = false;
+ bool is_crt = false, is_lvds = false, is_tv = false, is_dp = false;
+ bool is_edp = false;
+ struct drm_mode_config *mode_config = &dev->mode_config;
+@@ -2349,6 +2423,14 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
+ return -EINVAL;
+ }
+
++ if (limit->find_reduced_pll && dev_priv->lvds_downclock_avail) {
++ memcpy(&reduced_clock, &clock, sizeof(intel_clock_t));
++ has_reduced_clock = limit->find_reduced_pll(limit, crtc,
++ (adjusted_mode->clock*3/4),
++ refclk,
++ &reduced_clock);
++ }
++
+ /* SDVO TV has fixed PLL values depend on its clock range,
+ this mirrors vbios setting. */
+ if (is_sdvo && is_tv) {
+@@ -2394,10 +2476,17 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
+ link_bw, &m_n);
+ }
+
+- if (IS_IGD(dev))
++ if (IS_IGD(dev)) {
+ fp = (1 << clock.n) << 16 | clock.m1 << 8 | clock.m2;
+- else
++ if (has_reduced_clock)
++ fp2 = (1 << reduced_clock.n) << 16 |
++ reduced_clock.m1 << 8 | reduced_clock.m2;
++ } else {
+ fp = clock.n << 16 | clock.m1 << 8 | clock.m2;
++ if (has_reduced_clock)
++ fp2 = reduced_clock.n << 16 | reduced_clock.m1 << 8 |
++ reduced_clock.m2;
++ }
+
+ if (!IS_IGDNG(dev))
+ dpll = DPLL_VGA_MODE_DIS;
+@@ -2426,6 +2515,8 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
+ /* also FPA1 */
+ if (IS_IGDNG(dev))
+ dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA1_P1_POST_DIV_SHIFT;
++ if (IS_G4X(dev) && has_reduced_clock)
++ dpll |= (1 << (reduced_clock.p1 - 1)) << DPLL_FPA1_P1_POST_DIV_SHIFT;
+ }
+ switch (clock.p2) {
+ case 5:
+@@ -2573,6 +2664,22 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
+ udelay(150);
+ }
+
++ if (is_lvds && has_reduced_clock && i915_powersave) {
++ I915_WRITE(fp_reg + 4, fp2);
++ intel_crtc->lowfreq_avail = true;
++ if (HAS_PIPE_CXSR(dev)) {
++ DRM_DEBUG("enabling CxSR downclocking\n");
++ pipeconf |= PIPECONF_CXSR_DOWNCLOCK;
++ }
++ } else {
++ I915_WRITE(fp_reg + 4, fp);
++ intel_crtc->lowfreq_avail = false;
++ if (HAS_PIPE_CXSR(dev)) {
++ DRM_DEBUG("disabling CxSR downclocking\n");
++ pipeconf &= ~PIPECONF_CXSR_DOWNCLOCK;
++ }
++ }
++
+ I915_WRITE(htot_reg, (adjusted_mode->crtc_hdisplay - 1) |
+ ((adjusted_mode->crtc_htotal - 1) << 16));
+ I915_WRITE(hblank_reg, (adjusted_mode->crtc_hblank_start - 1) |
+@@ -2616,6 +2723,12 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
+
+ intel_wait_for_vblank(dev);
+
++ if (IS_IGDNG(dev)) {
++ /* enable address swizzle for tiling buffer */
++ temp = I915_READ(DISP_ARB_CTL);
++ I915_WRITE(DISP_ARB_CTL, temp | DISP_TILE_SURFACE_SWIZZLING);
++ }
++
+ I915_WRITE(dspcntr_reg, dspcntr);
+
+ /* Flush the plane changes */
+@@ -2769,10 +2882,16 @@ static int intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
+ struct drm_device *dev = crtc->dev;
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
++ struct intel_framebuffer *intel_fb;
+ int pipe = intel_crtc->pipe;
+ uint32_t temp = 0;
+ uint32_t adder;
+
++ if (crtc->fb) {
++ intel_fb = to_intel_framebuffer(crtc->fb);
++ intel_mark_busy(dev, intel_fb->obj);
++ }
++
+ if (x < 0) {
+ temp |= CURSOR_POS_SIGN << CURSOR_X_SHIFT;
+ x = -x;
+@@ -3070,12 +3189,319 @@ struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev,
+ return mode;
+ }
+
++#define GPU_IDLE_TIMEOUT 500 /* ms */
++
++/* When this timer fires, we've been idle for awhile */
++static void intel_gpu_idle_timer(unsigned long arg)
++{
++ struct drm_device *dev = (struct drm_device *)arg;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++
++ DRM_DEBUG("idle timer fired, downclocking\n");
++
++ dev_priv->busy = false;
++
++ queue_work(dev_priv->wq, &dev_priv->idle_work);
++}
++
++void intel_increase_renderclock(struct drm_device *dev, bool schedule)
++{
++ drm_i915_private_t *dev_priv = dev->dev_private;
++
++ if (IS_IGDNG(dev))
++ return;
++
++ if (!dev_priv->render_reclock_avail) {
++ DRM_DEBUG("not reclocking render clock\n");
++ return;
++ }
++
++ /* Restore render clock frequency to original value */
++ if (IS_G4X(dev) || IS_I9XX(dev))
++ pci_write_config_word(dev->pdev, GCFGC, dev_priv->orig_clock);
++ else if (IS_I85X(dev))
++ pci_write_config_word(dev->pdev, HPLLCC, dev_priv->orig_clock);
++ DRM_DEBUG("increasing render clock frequency\n");
++
++ /* Schedule downclock */
++ if (schedule)
++ mod_timer(&dev_priv->idle_timer, jiffies +
++ msecs_to_jiffies(GPU_IDLE_TIMEOUT));
++}
++
++void intel_decrease_renderclock(struct drm_device *dev)
++{
++ drm_i915_private_t *dev_priv = dev->dev_private;
++
++ if (IS_IGDNG(dev))
++ return;
++
++ if (!dev_priv->render_reclock_avail) {
++ DRM_DEBUG("not reclocking render clock\n");
++ return;
++ }
++
++ if (IS_G4X(dev)) {
++ u16 gcfgc;
++
++ /* Adjust render clock... */
++ pci_read_config_word(dev->pdev, GCFGC, &gcfgc);
++
++ /* Down to minimum... */
++ gcfgc &= ~GM45_GC_RENDER_CLOCK_MASK;
++ gcfgc |= GM45_GC_RENDER_CLOCK_266_MHZ;
++
++ pci_write_config_word(dev->pdev, GCFGC, gcfgc);
++ } else if (IS_I965G(dev)) {
++ u16 gcfgc;
++
++ /* Adjust render clock... */
++ pci_read_config_word(dev->pdev, GCFGC, &gcfgc);
++
++ /* Down to minimum... */
++ gcfgc &= ~I965_GC_RENDER_CLOCK_MASK;
++ gcfgc |= I965_GC_RENDER_CLOCK_267_MHZ;
++
++ pci_write_config_word(dev->pdev, GCFGC, gcfgc);
++ } else if (IS_I945G(dev) || IS_I945GM(dev)) {
++ u16 gcfgc;
++
++ /* Adjust render clock... */
++ pci_read_config_word(dev->pdev, GCFGC, &gcfgc);
++
++ /* Down to minimum... */
++ gcfgc &= ~I945_GC_RENDER_CLOCK_MASK;
++ gcfgc |= I945_GC_RENDER_CLOCK_166_MHZ;
++
++ pci_write_config_word(dev->pdev, GCFGC, gcfgc);
++ } else if (IS_I915G(dev)) {
++ u16 gcfgc;
++
++ /* Adjust render clock... */
++ pci_read_config_word(dev->pdev, GCFGC, &gcfgc);
++
++ /* Down to minimum... */
++ gcfgc &= ~I915_GC_RENDER_CLOCK_MASK;
++ gcfgc |= I915_GC_RENDER_CLOCK_166_MHZ;
++
++ pci_write_config_word(dev->pdev, GCFGC, gcfgc);
++ } else if (IS_I85X(dev)) {
++ u16 hpllcc;
++
++ /* Adjust render clock... */
++ pci_read_config_word(dev->pdev, HPLLCC, &hpllcc);
++
++ /* Up to maximum... */
++ hpllcc &= ~GC_CLOCK_CONTROL_MASK;
++ hpllcc |= GC_CLOCK_133_200;
++
++ pci_write_config_word(dev->pdev, HPLLCC, hpllcc);
++ }
++ DRM_DEBUG("decreasing render clock frequency\n");
++}
++
++/* Note that no increase function is needed for this - increase_renderclock()
++ * will also rewrite these bits
++ */
++void intel_decrease_displayclock(struct drm_device *dev)
++{
++ if (IS_IGDNG(dev))
++ return;
++
++ if (IS_I945G(dev) || IS_I945GM(dev) || IS_I915G(dev) ||
++ IS_I915GM(dev)) {
++ u16 gcfgc;
++
++ /* Adjust render clock... */
++ pci_read_config_word(dev->pdev, GCFGC, &gcfgc);
++
++ /* Down to minimum... */
++ gcfgc &= ~0xf0;
++ gcfgc |= 0x80;
++
++ pci_write_config_word(dev->pdev, GCFGC, gcfgc);
++ }
++}
++
++#define CRTC_IDLE_TIMEOUT 1000 /* ms */
++
++static void intel_crtc_idle_timer(unsigned long arg)
++{
++ struct intel_crtc *intel_crtc = (struct intel_crtc *)arg;
++ struct drm_crtc *crtc = &intel_crtc->base;
++ drm_i915_private_t *dev_priv = crtc->dev->dev_private;
++
++ DRM_DEBUG("idle timer fired, downclocking\n");
++
++ intel_crtc->busy = false;
++
++ queue_work(dev_priv->wq, &dev_priv->idle_work);
++}
++
++static void intel_increase_pllclock(struct drm_crtc *crtc, bool schedule)
++{
++ struct drm_device *dev = crtc->dev;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
++ int pipe = intel_crtc->pipe;
++ int dpll_reg = (pipe == 0) ? DPLL_A : DPLL_B;
++ int dpll = I915_READ(dpll_reg);
++
++ if (IS_IGDNG(dev))
++ return;
++
++ if (!dev_priv->lvds_downclock_avail)
++ return;
++
++ if (!HAS_PIPE_CXSR(dev) && (dpll & DISPLAY_RATE_SELECT_FPA1)) {
++ DRM_DEBUG("upclocking LVDS\n");
++
++ /* Unlock panel regs */
++ I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) | (0xabcd << 16));
++
++ dpll &= ~DISPLAY_RATE_SELECT_FPA1;
++ I915_WRITE(dpll_reg, dpll);
++ dpll = I915_READ(dpll_reg);
++ intel_wait_for_vblank(dev);
++ dpll = I915_READ(dpll_reg);
++ if (dpll & DISPLAY_RATE_SELECT_FPA1)
++ DRM_DEBUG("failed to upclock LVDS!\n");
++
++ /* ...and lock them again */
++ I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) & 0x3);
++ }
++
++ /* Schedule downclock */
++ if (schedule)
++ mod_timer(&intel_crtc->idle_timer, jiffies +
++ msecs_to_jiffies(CRTC_IDLE_TIMEOUT));
++}
++
++static void intel_decrease_pllclock(struct drm_crtc *crtc)
++{
++ struct drm_device *dev = crtc->dev;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
++ int pipe = intel_crtc->pipe;
++ int dpll_reg = (pipe == 0) ? DPLL_A : DPLL_B;
++ int dpll = I915_READ(dpll_reg);
++
++ if (IS_IGDNG(dev))
++ return;
++
++ if (!dev_priv->lvds_downclock_avail)
++ return;
++
++ /*
++ * Since this is called by a timer, we should never get here in
++ * the manual case.
++ */
++ if (!HAS_PIPE_CXSR(dev) && intel_crtc->lowfreq_avail) {
++ DRM_DEBUG("downclocking LVDS\n");
++
++ /* Unlock panel regs */
++ I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) | (0xabcd << 16));
++
++ dpll |= DISPLAY_RATE_SELECT_FPA1;
++ I915_WRITE(dpll_reg, dpll);
++ dpll = I915_READ(dpll_reg);
++ intel_wait_for_vblank(dev);
++ dpll = I915_READ(dpll_reg);
++ if (!(dpll & DISPLAY_RATE_SELECT_FPA1))
++ DRM_DEBUG("failed to downclock LVDS!\n");
++
++ /* ...and lock them again */
++ I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) & 0x3);
++ }
++
++}
++
++/**
++ * intel_idle_update - adjust clocks for idleness
++ * @work: work struct
++ *
++ * Either the GPU or display (or both) went idle. Check the busy status
++ * here and adjust the CRTC and GPU clocks as necessary.
++ */
++static void intel_idle_update(struct work_struct *work)
++{
++ drm_i915_private_t *dev_priv = container_of(work, drm_i915_private_t,
++ idle_work);
++ struct drm_device *dev = dev_priv->dev;
++ struct drm_crtc *crtc;
++ struct intel_crtc *intel_crtc;
++
++ if (!i915_powersave)
++ return;
++
++ mutex_lock(&dev->struct_mutex);
++
++ /* GPU isn't processing, downclock it. */
++ if (!dev_priv->busy) {
++ intel_decrease_renderclock(dev);
++ intel_decrease_displayclock(dev);
++ }
++
++ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
++ /* Skip inactive CRTCs */
++ if (!crtc->fb)
++ continue;
++
++ intel_crtc = to_intel_crtc(crtc);
++ if (!intel_crtc->busy)
++ intel_decrease_pllclock(crtc);
++ }
++
++ mutex_unlock(&dev->struct_mutex);
++}
++
++/**
++ * intel_mark_busy - mark the GPU and possibly the display busy
++ * @dev: drm device
++ * @obj: object we're operating on
++ *
++ * Callers can use this function to indicate that the GPU is busy processing
++ * commands. If @obj matches one of the CRTC objects (i.e. it's a scanout
++ * buffer), we'll also mark the display as busy, so we know to increase its
++ * clock frequency.
++ */
++void intel_mark_busy(struct drm_device *dev, struct drm_gem_object *obj)
++{
++ drm_i915_private_t *dev_priv = dev->dev_private;
++ struct drm_crtc *crtc = NULL;
++ struct intel_framebuffer *intel_fb;
++ struct intel_crtc *intel_crtc;
++
++ if (!drm_core_check_feature(dev, DRIVER_MODESET))
++ return;
++
++ dev_priv->busy = true;
++ intel_increase_renderclock(dev, true);
++
++ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
++ if (!crtc->fb)
++ continue;
++
++ intel_crtc = to_intel_crtc(crtc);
++ intel_fb = to_intel_framebuffer(crtc->fb);
++ if (intel_fb->obj == obj) {
++ if (!intel_crtc->busy) {
++ /* Non-busy -> busy, upclock */
++ intel_increase_pllclock(crtc, true);
++ intel_crtc->busy = true;
++ } else {
++ /* Busy -> busy, put off timer */
++ mod_timer(&intel_crtc->idle_timer, jiffies +
++ msecs_to_jiffies(CRTC_IDLE_TIMEOUT));
++ }
++ }
++ }
++}
++
+ static void intel_crtc_destroy(struct drm_crtc *crtc)
+ {
+ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+
+- if (intel_crtc->mode_set.mode)
+- drm_mode_destroy(crtc->dev, intel_crtc->mode_set.mode);
+ drm_crtc_cleanup(crtc);
+ kfree(intel_crtc);
+ }
+@@ -3122,15 +3548,10 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
+ intel_crtc->dpms_mode = DRM_MODE_DPMS_OFF;
+ drm_crtc_helper_add(&intel_crtc->base, &intel_helper_funcs);
+
+- intel_crtc->mode_set.crtc = &intel_crtc->base;
+- intel_crtc->mode_set.connectors = (struct drm_connector **)(intel_crtc + 1);
+- intel_crtc->mode_set.num_connectors = 0;
+-
+- if (i915_fbpercrtc) {
+-
++ intel_crtc->busy = false;
+
+-
+- }
++ setup_timer(&intel_crtc->idle_timer, intel_crtc_idle_timer,
++ (unsigned long)intel_crtc);
+ }
+
+ int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,
+@@ -3138,30 +3559,26 @@ int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,
+ {
+ drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_i915_get_pipe_from_crtc_id *pipe_from_crtc_id = data;
+- struct drm_crtc *crtc = NULL;
+- int pipe = -1;
++ struct drm_mode_object *drmmode_obj;
++ struct intel_crtc *crtc;
+
+ if (!dev_priv) {
+ DRM_ERROR("called with no initialization\n");
+ return -EINVAL;
+ }
+
+- list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+- struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+- if (crtc->base.id == pipe_from_crtc_id->crtc_id) {
+- pipe = intel_crtc->pipe;
+- break;
+- }
+- }
++ drmmode_obj = drm_mode_object_find(dev, pipe_from_crtc_id->crtc_id,
++ DRM_MODE_OBJECT_CRTC);
+
+- if (pipe == -1) {
++ if (!drmmode_obj) {
+ DRM_ERROR("no such CRTC id\n");
+ return -EINVAL;
+ }
+
+- pipe_from_crtc_id->pipe = pipe;
++ crtc = to_intel_crtc(obj_to_crtc(drmmode_obj));
++ pipe_from_crtc_id->pipe = crtc->pipe;
+
+- return 0;
++ return 0;
+ }
+
+ struct drm_crtc *intel_get_crtc_from_pipe(struct drm_device *dev, int pipe)
+@@ -3362,8 +3779,56 @@ static const struct drm_mode_config_funcs intel_mode_funcs = {
+ .fb_changed = intelfb_probe,
+ };
+
++void intel_init_clock_gating(struct drm_device *dev)
++{
++ struct drm_i915_private *dev_priv = dev->dev_private;
++
++ /*
++ * Disable clock gating reported to work incorrectly according to the
++ * specs, but enable as much else as we can.
++ */
++ if (IS_G4X(dev)) {
++ uint32_t dspclk_gate;
++ I915_WRITE(RENCLK_GATE_D1, 0);
++ I915_WRITE(RENCLK_GATE_D2, VF_UNIT_CLOCK_GATE_DISABLE |
++ GS_UNIT_CLOCK_GATE_DISABLE |
++ CL_UNIT_CLOCK_GATE_DISABLE);
++ I915_WRITE(RAMCLK_GATE_D, 0);
++ dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE |
++ OVRUNIT_CLOCK_GATE_DISABLE |
++ OVCUNIT_CLOCK_GATE_DISABLE;
++ if (IS_GM45(dev))
++ dspclk_gate |= DSSUNIT_CLOCK_GATE_DISABLE;
++ I915_WRITE(DSPCLK_GATE_D, dspclk_gate);
++ } else if (IS_I965GM(dev)) {
++ I915_WRITE(RENCLK_GATE_D1, I965_RCC_CLOCK_GATE_DISABLE);
++ I915_WRITE(RENCLK_GATE_D2, 0);
++ I915_WRITE(DSPCLK_GATE_D, 0);
++ I915_WRITE(RAMCLK_GATE_D, 0);
++ I915_WRITE16(DEUC, 0);
++ } else if (IS_I965G(dev)) {
++ I915_WRITE(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);
++ I915_WRITE(RENCLK_GATE_D2, 0);
++ } else if (IS_I9XX(dev)) {
++ u32 dstate = I915_READ(D_STATE);
++
++ dstate |= DSTATE_PLL_D3_OFF | DSTATE_GFX_CLOCK_GATING |
++ DSTATE_DOT_CLOCK_GATING;
++ I915_WRITE(D_STATE, dstate);
++ } else if (IS_I855(dev) || IS_I865G(dev)) {
++ I915_WRITE(RENCLK_GATE_D1, SV_CLOCK_GATE_DISABLE);
++ } else if (IS_I830(dev)) {
++ I915_WRITE(DSPCLK_GATE_D, OVRUNIT_CLOCK_GATE_DISABLE);
++ }
++}
++
+ void intel_modeset_init(struct drm_device *dev)
+ {
++ struct drm_i915_private *dev_priv = dev->dev_private;
+ int num_pipe;
+ int i;
+
+@@ -3398,15 +3863,47 @@ void intel_modeset_init(struct drm_device *dev)
+ DRM_DEBUG("%d display pipe%s available.\n",
+ num_pipe, num_pipe > 1 ? "s" : "");
+
++ if (IS_I85X(dev))
++ pci_read_config_word(dev->pdev, HPLLCC, &dev_priv->orig_clock);
++ else if (IS_I9XX(dev) || IS_G4X(dev))
++ pci_read_config_word(dev->pdev, GCFGC, &dev_priv->orig_clock);
++
+ for (i = 0; i < num_pipe; i++) {
+ intel_crtc_init(dev, i);
+ }
+
+ intel_setup_outputs(dev);
++
++ intel_init_clock_gating(dev);
++
++ INIT_WORK(&dev_priv->idle_work, intel_idle_update);
++ setup_timer(&dev_priv->idle_timer, intel_gpu_idle_timer,
++ (unsigned long)dev);
+ }
+
+ void intel_modeset_cleanup(struct drm_device *dev)
+ {
++ struct drm_i915_private *dev_priv = dev->dev_private;
++ struct drm_crtc *crtc;
++ struct intel_crtc *intel_crtc;
++
++ mutex_lock(&dev->struct_mutex);
++
++ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
++ /* Skip inactive CRTCs */
++ if (!crtc->fb)
++ continue;
++
++ intel_crtc = to_intel_crtc(crtc);
++ intel_increase_pllclock(crtc, false);
++ del_timer_sync(&intel_crtc->idle_timer);
++ }
++
++ intel_increase_renderclock(dev, false);
++ del_timer_sync(&dev_priv->idle_timer);
++
++ mutex_unlock(&dev->struct_mutex);
++
+ drm_mode_config_cleanup(dev);
+ }
+
+diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
+index 26a6227..51eec1b 100644
+--- a/drivers/gpu/drm/i915/intel_drv.h
++++ b/drivers/gpu/drm/i915/intel_drv.h
+@@ -117,9 +117,9 @@ struct intel_crtc {
+ uint32_t cursor_addr;
+ u8 lut_r[256], lut_g[256], lut_b[256];
+ int dpms_mode;
+- struct intel_framebuffer *fbdev_fb;
+- /* a mode_set for fbdev users on this crtc */
+- struct drm_mode_set mode_set;
++ bool busy; /* is scanout buffer being updated frequently? */
++ struct timer_list idle_timer;
++ bool lowfreq_avail;
+ };
+
+ #define to_intel_crtc(x) container_of(x, struct intel_crtc, base)
+@@ -138,6 +138,7 @@ extern void intel_hdmi_init(struct drm_device *dev, int sdvox_reg);
+ extern bool intel_sdvo_init(struct drm_device *dev, int output_device);
+ extern void intel_dvo_init(struct drm_device *dev);
+ extern void intel_tv_init(struct drm_device *dev);
++extern void intel_mark_busy(struct drm_device *dev, struct drm_gem_object *obj);
+ extern void intel_lvds_init(struct drm_device *dev);
+ extern void intel_dp_init(struct drm_device *dev, int dp_reg);
+ void
+diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
+index 1d30802..e85d7e9 100644
+--- a/drivers/gpu/drm/i915/intel_fb.c
++++ b/drivers/gpu/drm/i915/intel_fb.c
+@@ -39,339 +39,34 @@
+ #include "drmP.h"
+ #include "drm.h"
+ #include "drm_crtc.h"
++#include "drm_fb_helper.h"
+ #include "intel_drv.h"
+ #include "i915_drm.h"
+ #include "i915_drv.h"
+
+ struct intelfb_par {
+- struct drm_device *dev;
+- struct drm_display_mode *our_mode;
++ struct drm_fb_helper helper;
+ struct intel_framebuffer *intel_fb;
+- int crtc_count;
+- /* crtc currently bound to this */
+- uint32_t crtc_ids[2];
++ struct drm_display_mode *our_mode;
+ };
+
+-static int intelfb_setcolreg(unsigned regno, unsigned red, unsigned green,
+- unsigned blue, unsigned transp,
+- struct fb_info *info)
+-{
+- struct intelfb_par *par = info->par;
+- struct drm_device *dev = par->dev;
+- struct drm_crtc *crtc;
+- int i;
+-
+- list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+- struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+- struct drm_mode_set *modeset = &intel_crtc->mode_set;
+- struct drm_framebuffer *fb = modeset->fb;
+-
+- for (i = 0; i < par->crtc_count; i++)
+- if (crtc->base.id == par->crtc_ids[i])
+- break;
+-
+- if (i == par->crtc_count)
+- continue;
+-
+-
+- if (regno > 255)
+- return 1;
+-
+- if (fb->depth == 8) {
+- intel_crtc_fb_gamma_set(crtc, red, green, blue, regno);
+- return 0;
+- }
+-
+- if (regno < 16) {
+- switch (fb->depth) {
+- case 15:
+- fb->pseudo_palette[regno] = ((red & 0xf800) >> 1) |
+- ((green & 0xf800) >> 6) |
+- ((blue & 0xf800) >> 11);
+- break;
+- case 16:
+- fb->pseudo_palette[regno] = (red & 0xf800) |
+- ((green & 0xfc00) >> 5) |
+- ((blue & 0xf800) >> 11);
+- break;
+- case 24:
+- case 32:
+- fb->pseudo_palette[regno] = ((red & 0xff00) << 8) |
+- (green & 0xff00) |
+- ((blue & 0xff00) >> 8);
+- break;
+- }
+- }
+- }
+- return 0;
+-}
+-
+-static int intelfb_check_var(struct fb_var_screeninfo *var,
+- struct fb_info *info)
+-{
+- struct intelfb_par *par = info->par;
+- struct intel_framebuffer *intel_fb = par->intel_fb;
+- struct drm_framebuffer *fb = &intel_fb->base;
+- int depth;
+-
+- if (var->pixclock == -1 || !var->pixclock)
+- return -EINVAL;
+-
+- /* Need to resize the fb object !!! */
+- if (var->xres > fb->width || var->yres > fb->height) {
+- DRM_ERROR("Requested width/height is greater than current fb object %dx%d > %dx%d\n",var->xres,var->yres,fb->width,fb->height);
+- DRM_ERROR("Need resizing code.\n");
+- return -EINVAL;
+- }
+-
+- switch (var->bits_per_pixel) {
+- case 16:
+- depth = (var->green.length == 6) ? 16 : 15;
+- break;
+- case 32:
+- depth = (var->transp.length > 0) ? 32 : 24;
+- break;
+- default:
+- depth = var->bits_per_pixel;
+- break;
+- }
+-
+- switch (depth) {
+- case 8:
+- var->red.offset = 0;
+- var->green.offset = 0;
+- var->blue.offset = 0;
+- var->red.length = 8;
+- var->green.length = 8;
+- var->blue.length = 8;
+- var->transp.length = 0;
+- var->transp.offset = 0;
+- break;
+- case 15:
+- var->red.offset = 10;
+- var->green.offset = 5;
+- var->blue.offset = 0;
+- var->red.length = 5;
+- var->green.length = 5;
+- var->blue.length = 5;
+- var->transp.length = 1;
+- var->transp.offset = 15;
+- break;
+- case 16:
+- var->red.offset = 11;
+- var->green.offset = 5;
+- var->blue.offset = 0;
+- var->red.length = 5;
+- var->green.length = 6;
+- var->blue.length = 5;
+- var->transp.length = 0;
+- var->transp.offset = 0;
+- break;
+- case 24:
+- var->red.offset = 16;
+- var->green.offset = 8;
+- var->blue.offset = 0;
+- var->red.length = 8;
+- var->green.length = 8;
+- var->blue.length = 8;
+- var->transp.length = 0;
+- var->transp.offset = 0;
+- break;
+- case 32:
+- var->red.offset = 16;
+- var->green.offset = 8;
+- var->blue.offset = 0;
+- var->red.length = 8;
+- var->green.length = 8;
+- var->blue.length = 8;
+- var->transp.length = 8;
+- var->transp.offset = 24;
+- break;
+- default:
+- return -EINVAL;
+- }
+-
+- return 0;
+-}
+-
+-/* this will let fbcon do the mode init */
+-/* FIXME: take mode config lock? */
+-static int intelfb_set_par(struct fb_info *info)
+-{
+- struct intelfb_par *par = info->par;
+- struct drm_device *dev = par->dev;
+- struct fb_var_screeninfo *var = &info->var;
+- int i;
+-
+- DRM_DEBUG("%d %d\n", var->xres, var->pixclock);
+-
+- if (var->pixclock != -1) {
+-
+- DRM_ERROR("PIXEL CLOCK SET\n");
+- return -EINVAL;
+- } else {
+- struct drm_crtc *crtc;
+- int ret;
+-
+- list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+- struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+-
+- for (i = 0; i < par->crtc_count; i++)
+- if (crtc->base.id == par->crtc_ids[i])
+- break;
+-
+- if (i == par->crtc_count)
+- continue;
+-
+- if (crtc->fb == intel_crtc->mode_set.fb) {
+- mutex_lock(&dev->mode_config.mutex);
+- ret = crtc->funcs->set_config(&intel_crtc->mode_set);
+- mutex_unlock(&dev->mode_config.mutex);
+- if (ret)
+- return ret;
+- }
+- }
+- return 0;
+- }
+-}
+-
+-static int intelfb_pan_display(struct fb_var_screeninfo *var,
+- struct fb_info *info)
+-{
+- struct intelfb_par *par = info->par;
+- struct drm_device *dev = par->dev;
+- struct drm_mode_set *modeset;
+- struct drm_crtc *crtc;
+- struct intel_crtc *intel_crtc;
+- int ret = 0;
+- int i;
+-
+- list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+- for (i = 0; i < par->crtc_count; i++)
+- if (crtc->base.id == par->crtc_ids[i])
+- break;
+-
+- if (i == par->crtc_count)
+- continue;
+-
+- intel_crtc = to_intel_crtc(crtc);
+- modeset = &intel_crtc->mode_set;
+-
+- modeset->x = var->xoffset;
+- modeset->y = var->yoffset;
+-
+- if (modeset->num_connectors) {
+- mutex_lock(&dev->mode_config.mutex);
+- ret = crtc->funcs->set_config(modeset);
+- mutex_unlock(&dev->mode_config.mutex);
+- if (!ret) {
+- info->var.xoffset = var->xoffset;
+- info->var.yoffset = var->yoffset;
+- }
+- }
+- }
+-
+- return ret;
+-}
+-
+-static void intelfb_on(struct fb_info *info)
+-{
+- struct intelfb_par *par = info->par;
+- struct drm_device *dev = par->dev;
+- struct drm_crtc *crtc;
+- struct drm_encoder *encoder;
+- int i;
+-
+- /*
+- * For each CRTC in this fb, find all associated encoders
+- * and turn them off, then turn off the CRTC.
+- */
+- list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+- struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
+-
+- for (i = 0; i < par->crtc_count; i++)
+- if (crtc->base.id == par->crtc_ids[i])
+- break;
+-
+- crtc_funcs->dpms(crtc, DRM_MODE_DPMS_ON);
+-
+- /* Found a CRTC on this fb, now find encoders */
+- list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
+- if (encoder->crtc == crtc) {
+- struct drm_encoder_helper_funcs *encoder_funcs;
+- encoder_funcs = encoder->helper_private;
+- encoder_funcs->dpms(encoder, DRM_MODE_DPMS_ON);
+- }
+- }
+- }
+-}
+-
+-static void intelfb_off(struct fb_info *info, int dpms_mode)
+-{
+- struct intelfb_par *par = info->par;
+- struct drm_device *dev = par->dev;
+- struct drm_crtc *crtc;
+- struct drm_encoder *encoder;
+- int i;
+-
+- /*
+- * For each CRTC in this fb, find all associated encoders
+- * and turn them off, then turn off the CRTC.
+- */
+- list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+- struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
+-
+- for (i = 0; i < par->crtc_count; i++)
+- if (crtc->base.id == par->crtc_ids[i])
+- break;
+-
+- /* Found a CRTC on this fb, now find encoders */
+- list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
+- if (encoder->crtc == crtc) {
+- struct drm_encoder_helper_funcs *encoder_funcs;
+- encoder_funcs = encoder->helper_private;
+- encoder_funcs->dpms(encoder, dpms_mode);
+- }
+- }
+- if (dpms_mode == DRM_MODE_DPMS_OFF)
+- crtc_funcs->dpms(crtc, dpms_mode);
+- }
+-}
+-
+-static int intelfb_blank(int blank, struct fb_info *info)
+-{
+- switch (blank) {
+- case FB_BLANK_UNBLANK:
+- intelfb_on(info);
+- break;
+- case FB_BLANK_NORMAL:
+- intelfb_off(info, DRM_MODE_DPMS_STANDBY);
+- break;
+- case FB_BLANK_HSYNC_SUSPEND:
+- intelfb_off(info, DRM_MODE_DPMS_STANDBY);
+- break;
+- case FB_BLANK_VSYNC_SUSPEND:
+- intelfb_off(info, DRM_MODE_DPMS_SUSPEND);
+- break;
+- case FB_BLANK_POWERDOWN:
+- intelfb_off(info, DRM_MODE_DPMS_OFF);
+- break;
+- }
+- return 0;
+-}
+-
+ static struct fb_ops intelfb_ops = {
+ .owner = THIS_MODULE,
+- .fb_check_var = intelfb_check_var,
+- .fb_set_par = intelfb_set_par,
+- .fb_setcolreg = intelfb_setcolreg,
++ .fb_check_var = drm_fb_helper_check_var,
++ .fb_set_par = drm_fb_helper_set_par,
++ .fb_setcolreg = drm_fb_helper_setcolreg,
+ .fb_fillrect = cfb_fillrect,
+ .fb_copyarea = cfb_copyarea,
+ .fb_imageblit = cfb_imageblit,
+- .fb_pan_display = intelfb_pan_display,
+- .fb_blank = intelfb_blank,
++ .fb_pan_display = drm_fb_helper_pan_display,
++ .fb_blank = drm_fb_helper_blank,
+ };
+
++static struct drm_fb_helper_funcs intel_fb_helper_funcs = {
++ .gamma_set = intel_crtc_fb_gamma_set,
++};
++
++
+ /**
+ * Curretly it is assumed that the old framebuffer is reused.
+ *
+@@ -412,25 +107,11 @@ int intelfb_resize(struct drm_device *dev, struct drm_crtc *crtc)
+ }
+ EXPORT_SYMBOL(intelfb_resize);
+
+-static struct drm_mode_set kernelfb_mode;
+-
+-static int intelfb_panic(struct notifier_block *n, unsigned long ununsed,
+- void *panic_str)
+-{
+- DRM_ERROR("panic occurred, switching back to text console\n");
+-
+- intelfb_restore();
+- return 0;
+-}
+-
+-static struct notifier_block paniced = {
+- .notifier_call = intelfb_panic,
+-};
+-
+ static int intelfb_create(struct drm_device *dev, uint32_t fb_width,
+ uint32_t fb_height, uint32_t surface_width,
+ uint32_t surface_height,
+- struct intel_framebuffer **intel_fb_p)
++ uint32_t surface_depth, uint32_t surface_bpp,
++ struct drm_framebuffer **fb_p)
+ {
+ struct fb_info *info;
+ struct intelfb_par *par;
+@@ -445,9 +126,9 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width,
+ mode_cmd.width = surface_width;
+ mode_cmd.height = surface_height;
+
+- mode_cmd.bpp = 32;
++ mode_cmd.bpp = surface_bpp;
+ mode_cmd.pitch = ALIGN(mode_cmd.width * ((mode_cmd.bpp + 1) / 8), 64);
+- mode_cmd.depth = 24;
++ mode_cmd.depth = surface_depth;
+
+ size = mode_cmd.pitch * mode_cmd.height;
+ size = ALIGN(size, PAGE_SIZE);
+@@ -479,7 +160,7 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width,
+ list_add(&fb->filp_head, &dev->mode_config.fb_kernel_list);
+
+ intel_fb = to_intel_framebuffer(fb);
+- *intel_fb_p = intel_fb;
++ *fb_p = fb;
+
+ info = framebuffer_alloc(sizeof(struct intelfb_par), device);
+ if (!info) {
+@@ -489,21 +170,19 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width,
+
+ par = info->par;
+
++ par->helper.funcs = &intel_fb_helper_funcs;
++ par->helper.dev = dev;
++ ret = drm_fb_helper_init_crtc_count(&par->helper, 2,
++ INTELFB_CONN_LIMIT);
++ if (ret)
++ goto out_unref;
++
+ strcpy(info->fix.id, "inteldrmfb");
+- info->fix.type = FB_TYPE_PACKED_PIXELS;
+- info->fix.visual = FB_VISUAL_TRUECOLOR;
+- info->fix.type_aux = 0;
+- info->fix.xpanstep = 1; /* doing it in hw */
+- info->fix.ypanstep = 1; /* doing it in hw */
+- info->fix.ywrapstep = 0;
+- info->fix.accel = FB_ACCEL_I830;
+- info->fix.type_aux = 0;
+
+ info->flags = FBINFO_DEFAULT;
+
+ info->fbops = &intelfb_ops;
+
+- info->fix.line_length = fb->pitch;
+
+ /* setup aperture base/size for vesafb takeover */
+ info->aperture_base = dev->mode_config.fb_base;
+@@ -527,18 +206,8 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width,
+
+ // memset(info->screen_base, 0, size);
+
+- info->pseudo_palette = fb->pseudo_palette;
+- info->var.xres_virtual = fb->width;
+- info->var.yres_virtual = fb->height;
+- info->var.bits_per_pixel = fb->bits_per_pixel;
+- info->var.xoffset = 0;
+- info->var.yoffset = 0;
+- info->var.activate = FB_ACTIVATE_NOW;
+- info->var.height = -1;
+- info->var.width = -1;
+-
+- info->var.xres = fb_width;
+- info->var.yres = fb_height;
++ drm_fb_helper_fill_fix(info, fb->pitch);
++ drm_fb_helper_fill_var(info, fb, fb_width, fb_height);
+
+ /* FIXME: we really shouldn't expose mmio space at all */
+ info->fix.mmio_start = pci_resource_start(dev->pdev, mmio_bar);
+@@ -550,64 +219,9 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width,
+ info->pixmap.flags = FB_PIXMAP_SYSTEM;
+ info->pixmap.scan_align = 1;
+
+- switch(fb->depth) {
+- case 8:
+- info->var.red.offset = 0;
+- info->var.green.offset = 0;
+- info->var.blue.offset = 0;
+- info->var.red.length = 8; /* 8bit DAC */
+- info->var.green.length = 8;
+- info->var.blue.length = 8;
+- info->var.transp.offset = 0;
+- info->var.transp.length = 0;
+- break;
+- case 15:
+- info->var.red.offset = 10;
+- info->var.green.offset = 5;
+- info->var.blue.offset = 0;
+- info->var.red.length = 5;
+- info->var.green.length = 5;
+- info->var.blue.length = 5;
+- info->var.transp.offset = 15;
+- info->var.transp.length = 1;
+- break;
+- case 16:
+- info->var.red.offset = 11;
+- info->var.green.offset = 5;
+- info->var.blue.offset = 0;
+- info->var.red.length = 5;
+- info->var.green.length = 6;
+- info->var.blue.length = 5;
+- info->var.transp.offset = 0;
+- break;
+- case 24:
+- info->var.red.offset = 16;
+- info->var.green.offset = 8;
+- info->var.blue.offset = 0;
+- info->var.red.length = 8;
+- info->var.green.length = 8;
+- info->var.blue.length = 8;
+- info->var.transp.offset = 0;
+- info->var.transp.length = 0;
+- break;
+- case 32:
+- info->var.red.offset = 16;
+- info->var.green.offset = 8;
+- info->var.blue.offset = 0;
+- info->var.red.length = 8;
+- info->var.green.length = 8;
+- info->var.blue.length = 8;
+- info->var.transp.offset = 24;
+- info->var.transp.length = 8;
+- break;
+- default:
+- break;
+- }
+-
+ fb->fbdev = info;
+
+ par->intel_fb = intel_fb;
+- par->dev = dev;
+
+ /* To allow resizeing without swapping buffers */
+ DRM_DEBUG("allocated %dx%d fb: 0x%08x, bo %p\n", intel_fb->base.width,
+@@ -625,307 +239,12 @@ out:
+ return ret;
+ }
+
+-static int intelfb_multi_fb_probe_crtc(struct drm_device *dev, struct drm_crtc *crtc)
+-{
+- struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+- struct intel_framebuffer *intel_fb;
+- struct drm_framebuffer *fb;
+- struct drm_connector *connector;
+- struct fb_info *info;
+- struct intelfb_par *par;
+- struct drm_mode_set *modeset;
+- unsigned int width, height;
+- int new_fb = 0;
+- int ret, i, conn_count;
+-
+- if (!drm_helper_crtc_in_use(crtc))
+- return 0;
+-
+- if (!crtc->desired_mode)
+- return 0;
+-
+- width = crtc->desired_mode->hdisplay;
+- height = crtc->desired_mode->vdisplay;
+-
+- /* is there an fb bound to this crtc already */
+- if (!intel_crtc->mode_set.fb) {
+- ret = intelfb_create(dev, width, height, width, height, &intel_fb);
+- if (ret)
+- return -EINVAL;
+- new_fb = 1;
+- } else {
+- fb = intel_crtc->mode_set.fb;
+- intel_fb = to_intel_framebuffer(fb);
+- if ((intel_fb->base.width < width) || (intel_fb->base.height < height))
+- return -EINVAL;
+- }
+-
+- info = intel_fb->base.fbdev;
+- par = info->par;
+-
+- modeset = &intel_crtc->mode_set;
+- modeset->fb = &intel_fb->base;
+- conn_count = 0;
+- list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+- if (connector->encoder)
+- if (connector->encoder->crtc == modeset->crtc) {
+- modeset->connectors[conn_count] = connector;
+- conn_count++;
+- if (conn_count > INTELFB_CONN_LIMIT)
+- BUG();
+- }
+- }
+-
+- for (i = conn_count; i < INTELFB_CONN_LIMIT; i++)
+- modeset->connectors[i] = NULL;
+-
+- par->crtc_ids[0] = crtc->base.id;
+-
+- modeset->num_connectors = conn_count;
+- if (modeset->crtc->desired_mode) {
+- if (modeset->mode)
+- drm_mode_destroy(dev, modeset->mode);
+- modeset->mode = drm_mode_duplicate(dev,
+- modeset->crtc->desired_mode);
+- }
+-
+- par->crtc_count = 1;
+-
+- if (new_fb) {
+- info->var.pixclock = -1;
+- if (register_framebuffer(info) < 0)
+- return -EINVAL;
+- } else
+- intelfb_set_par(info);
+-
+- DRM_INFO("fb%d: %s frame buffer device\n", info->node,
+- info->fix.id);
+-
+- /* Switch back to kernel console on panic */
+- kernelfb_mode = *modeset;
+- atomic_notifier_chain_register(&panic_notifier_list, &paniced);
+- DRM_DEBUG("registered panic notifier\n");
+-
+- return 0;
+-}
+-
+-static int intelfb_multi_fb_probe(struct drm_device *dev)
+-{
+-
+- struct drm_crtc *crtc;
+- int ret = 0;
+-
+- list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+- ret = intelfb_multi_fb_probe_crtc(dev, crtc);
+- if (ret)
+- return ret;
+- }
+- return ret;
+-}
+-
+-static int intelfb_single_fb_probe(struct drm_device *dev)
+-{
+- struct drm_crtc *crtc;
+- struct drm_connector *connector;
+- unsigned int fb_width = (unsigned)-1, fb_height = (unsigned)-1;
+- unsigned int surface_width = 0, surface_height = 0;
+- int new_fb = 0;
+- int crtc_count = 0;
+- int ret, i, conn_count = 0;
+- struct intel_framebuffer *intel_fb;
+- struct fb_info *info;
+- struct intelfb_par *par;
+- struct drm_mode_set *modeset = NULL;
+-
+- DRM_DEBUG("\n");
+-
+- /* Get a count of crtcs now in use and new min/maxes width/heights */
+- list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+- if (!drm_helper_crtc_in_use(crtc))
+- continue;
+-
+- crtc_count++;
+- if (!crtc->desired_mode)
+- continue;
+-
+- /* Smallest mode determines console size... */
+- if (crtc->desired_mode->hdisplay < fb_width)
+- fb_width = crtc->desired_mode->hdisplay;
+-
+- if (crtc->desired_mode->vdisplay < fb_height)
+- fb_height = crtc->desired_mode->vdisplay;
+-
+- /* ... but largest for memory allocation dimensions */
+- if (crtc->desired_mode->hdisplay > surface_width)
+- surface_width = crtc->desired_mode->hdisplay;
+-
+- if (crtc->desired_mode->vdisplay > surface_height)
+- surface_height = crtc->desired_mode->vdisplay;
+- }
+-
+- if (crtc_count == 0 || fb_width == -1 || fb_height == -1) {
+- /* hmm everyone went away - assume VGA cable just fell out
+- and will come back later. */
+- DRM_DEBUG("no CRTCs available?\n");
+- return 0;
+- }
+-
+-//fail
+- /* Find the fb for our new config */
+- if (list_empty(&dev->mode_config.fb_kernel_list)) {
+- DRM_DEBUG("creating new fb (console size %dx%d, "
+- "buffer size %dx%d)\n", fb_width, fb_height,
+- surface_width, surface_height);
+- ret = intelfb_create(dev, fb_width, fb_height, surface_width,
+- surface_height, &intel_fb);
+- if (ret)
+- return -EINVAL;
+- new_fb = 1;
+- } else {
+- struct drm_framebuffer *fb;
+-
+- fb = list_first_entry(&dev->mode_config.fb_kernel_list,
+- struct drm_framebuffer, filp_head);
+- intel_fb = to_intel_framebuffer(fb);
+-
+- /* if someone hotplugs something bigger than we have already
+- * allocated, we are pwned. As really we can't resize an
+- * fbdev that is in the wild currently due to fbdev not really
+- * being designed for the lower layers moving stuff around
+- * under it.
+- * - so in the grand style of things - punt.
+- */
+- if ((fb->width < surface_width) ||
+- (fb->height < surface_height)) {
+- DRM_ERROR("fb not large enough for console\n");
+- return -EINVAL;
+- }
+- }
+-// fail
+-
+- info = intel_fb->base.fbdev;
+- par = info->par;
+-
+- crtc_count = 0;
+- /*
+- * For each CRTC, set up the connector list for the CRTC's mode
+- * set configuration.
+- */
+- list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+- struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+-
+- modeset = &intel_crtc->mode_set;
+- modeset->fb = &intel_fb->base;
+- conn_count = 0;
+- list_for_each_entry(connector, &dev->mode_config.connector_list,
+- head) {
+- if (!connector->encoder)
+- continue;
+-
+- if(connector->encoder->crtc == modeset->crtc) {
+- modeset->connectors[conn_count++] = connector;
+- if (conn_count > INTELFB_CONN_LIMIT)
+- BUG();
+- }
+- }
+-
+- /* Zero out remaining connector pointers */
+- for (i = conn_count; i < INTELFB_CONN_LIMIT; i++)
+- modeset->connectors[i] = NULL;
+-
+- par->crtc_ids[crtc_count++] = crtc->base.id;
+-
+- modeset->num_connectors = conn_count;
+- if (modeset->crtc->desired_mode) {
+- if (modeset->mode)
+- drm_mode_destroy(dev, modeset->mode);
+- modeset->mode = drm_mode_duplicate(dev,
+- modeset->crtc->desired_mode);
+- }
+- }
+- par->crtc_count = crtc_count;
+-
+- if (new_fb) {
+- info->var.pixclock = -1;
+- if (register_framebuffer(info) < 0)
+- return -EINVAL;
+- } else
+- intelfb_set_par(info);
+-
+- DRM_INFO("fb%d: %s frame buffer device\n", info->node,
+- info->fix.id);
+-
+- /* Switch back to kernel console on panic */
+- kernelfb_mode = *modeset;
+- atomic_notifier_chain_register(&panic_notifier_list, &paniced);
+- DRM_DEBUG("registered panic notifier\n");
+-
+- return 0;
+-}
+-
+-/**
+- * intelfb_restore - restore the framebuffer console (kernel) config
+- *
+- * Restore's the kernel's fbcon mode, used for lastclose & panic paths.
+- */
+-void intelfb_restore(void)
+-{
+- int ret;
+- if ((ret = drm_crtc_helper_set_config(&kernelfb_mode)) != 0) {
+- DRM_ERROR("Failed to restore crtc configuration: %d\n",
+- ret);
+- }
+-}
+-
+-static void intelfb_restore_work_fn(struct work_struct *ignored)
+-{
+- intelfb_restore();
+-}
+-static DECLARE_WORK(intelfb_restore_work, intelfb_restore_work_fn);
+-
+-static void intelfb_sysrq(int dummy1, struct tty_struct *dummy3)
+-{
+- schedule_work(&intelfb_restore_work);
+-}
+-
+-static struct sysrq_key_op sysrq_intelfb_restore_op = {
+- .handler = intelfb_sysrq,
+- .help_msg = "force-fb(V)",
+- .action_msg = "Restore framebuffer console",
+-};
+-
+ int intelfb_probe(struct drm_device *dev)
+ {
+ int ret;
+
+ DRM_DEBUG("\n");
+-
+- /* something has changed in the lower levels of hell - deal with it
+- here */
+-
+- /* two modes : a) 1 fb to rule all crtcs.
+- b) one fb per crtc.
+- two actions 1) new connected device
+- 2) device removed.
+- case a/1 : if the fb surface isn't big enough - resize the surface fb.
+- if the fb size isn't big enough - resize fb into surface.
+- if everything big enough configure the new crtc/etc.
+- case a/2 : undo the configuration
+- possibly resize down the fb to fit the new configuration.
+- case b/1 : see if it is on a new crtc - setup a new fb and add it.
+- case b/2 : teardown the new fb.
+- */
+-
+- /* mode a first */
+- /* search for an fb */
+- if (i915_fbpercrtc == 1) {
+- ret = intelfb_multi_fb_probe(dev);
+- } else {
+- ret = intelfb_single_fb_probe(dev);
+- }
+-
+- register_sysrq_key('v', &sysrq_intelfb_restore_op);
+-
++ ret = drm_fb_helper_single_fb_probe(dev, intelfb_create);
+ return ret;
+ }
+ EXPORT_SYMBOL(intelfb_probe);
+@@ -940,13 +259,14 @@ int intelfb_remove(struct drm_device *dev, struct drm_framebuffer *fb)
+ info = fb->fbdev;
+
+ if (info) {
++ struct intelfb_par *par = info->par;
+ unregister_framebuffer(info);
+ iounmap(info->screen_base);
++ if (info->par)
++ drm_fb_helper_free(&par->helper);
+ framebuffer_release(info);
+ }
+
+- atomic_notifier_chain_unregister(&panic_notifier_list, &paniced);
+- memset(&kernelfb_mode, 0, sizeof(struct drm_mode_set));
+ return 0;
+ }
+ EXPORT_SYMBOL(intelfb_remove);
+diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
+index 62b8bea..c7eab72 100644
+--- a/drivers/gpu/drm/i915/intel_i2c.c
++++ b/drivers/gpu/drm/i915/intel_i2c.c
+@@ -42,11 +42,11 @@ void intel_i2c_quirk_set(struct drm_device *dev, bool enable)
+ if (!IS_IGD(dev))
+ return;
+ if (enable)
+- I915_WRITE(CG_2D_DIS,
+- I915_READ(CG_2D_DIS) | DPCUNIT_CLOCK_GATE_DISABLE);
++ I915_WRITE(DSPCLK_GATE_D,
++ I915_READ(DSPCLK_GATE_D) | DPCUNIT_CLOCK_GATE_DISABLE);
+ else
+- I915_WRITE(CG_2D_DIS,
+- I915_READ(CG_2D_DIS) & (~DPCUNIT_CLOCK_GATE_DISABLE));
++ I915_WRITE(DSPCLK_GATE_D,
++ I915_READ(DSPCLK_GATE_D) & (~DPCUNIT_CLOCK_GATE_DISABLE));
+ }
+
+ /*
+diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
+index 8df02ef..dafc0da 100644
+--- a/drivers/gpu/drm/i915/intel_lvds.c
++++ b/drivers/gpu/drm/i915/intel_lvds.c
+@@ -38,16 +38,6 @@
+ #include "i915_drv.h"
+ #include <linux/acpi.h>
+
+-#define I915_LVDS "i915_lvds"
+-
+-/*
+- * the following four scaling options are defined.
+- * #define DRM_MODE_SCALE_NON_GPU 0
+- * #define DRM_MODE_SCALE_FULLSCREEN 1
+- * #define DRM_MODE_SCALE_NO_SCALE 2
+- * #define DRM_MODE_SCALE_ASPECT 3
+- */
+-
+ /* Private structure for the integrated LVDS support */
+ struct intel_lvds_priv {
+ int fitting_mode;
+@@ -336,7 +326,7 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
+ I915_WRITE(BCLRPAT_B, 0);
+
+ switch (lvds_priv->fitting_mode) {
+- case DRM_MODE_SCALE_NO_SCALE:
++ case DRM_MODE_SCALE_CENTER:
+ /*
+ * For centered modes, we have to calculate border widths &
+ * heights and modify the values programmed into the CRTC.
+@@ -672,9 +662,8 @@ static int intel_lvds_set_property(struct drm_connector *connector,
+ connector->encoder) {
+ struct drm_crtc *crtc = connector->encoder->crtc;
+ struct intel_lvds_priv *lvds_priv = intel_output->dev_priv;
+- if (value == DRM_MODE_SCALE_NON_GPU) {
+- DRM_DEBUG_KMS(I915_LVDS,
+- "non_GPU property is unsupported\n");
++ if (value == DRM_MODE_SCALE_NONE) {
++ DRM_DEBUG_KMS("no scaling not supported\n");
+ return 0;
+ }
+ if (lvds_priv->fitting_mode == value) {
+@@ -731,8 +720,7 @@ static const struct drm_encoder_funcs intel_lvds_enc_funcs = {
+
+ static int __init intel_no_lvds_dmi_callback(const struct dmi_system_id *id)
+ {
+- DRM_DEBUG_KMS(I915_LVDS,
+- "Skipping LVDS initialization for %s\n", id->ident);
++ DRM_DEBUG_KMS("Skipping LVDS initialization for %s\n", id->ident);
+ return 1;
+ }
+
+@@ -1027,7 +1015,7 @@ out:
+ return;
+
+ failed:
+- DRM_DEBUG_KMS(I915_LVDS, "No LVDS modes found, disabling.\n");
++ DRM_DEBUG_KMS("No LVDS modes found, disabling.\n");
+ if (intel_output->ddc_bus)
+ intel_i2c_destroy(intel_output->ddc_bus);
+ drm_connector_cleanup(connector);
+diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
+index d3b74ba..0bf28ef 100644
+--- a/drivers/gpu/drm/i915/intel_sdvo.c
++++ b/drivers/gpu/drm/i915/intel_sdvo.c
+@@ -37,7 +37,19 @@
+ #include "intel_sdvo_regs.h"
+
+ #undef SDVO_DEBUG
+-#define I915_SDVO "i915_sdvo"
++
++static char *tv_format_names[] = {
++ "NTSC_M" , "NTSC_J" , "NTSC_443",
++ "PAL_B" , "PAL_D" , "PAL_G" ,
++ "PAL_H" , "PAL_I" , "PAL_M" ,
++ "PAL_N" , "PAL_NC" , "PAL_60" ,
++ "SECAM_B" , "SECAM_D" , "SECAM_G" ,
++ "SECAM_K" , "SECAM_K1", "SECAM_L" ,
++ "SECAM_60"
++};
++
++#define TV_FORMAT_NUM (sizeof(tv_format_names) / sizeof(*tv_format_names))
++
+ struct intel_sdvo_priv {
+ u8 slave_addr;
+
+@@ -71,6 +83,15 @@ struct intel_sdvo_priv {
+ */
+ bool is_tv;
+
++ /* This is for current tv format name */
++ char *tv_format_name;
++
++ /* This contains all current supported TV format */
++ char *tv_format_supported[TV_FORMAT_NUM];
++ int format_supported_num;
++ struct drm_property *tv_format_property;
++ struct drm_property *tv_format_name_property[TV_FORMAT_NUM];
++
+ /**
+ * This is set if we treat the device as HDMI, instead of DVI.
+ */
+@@ -97,14 +118,6 @@ struct intel_sdvo_priv {
+ */
+ struct intel_sdvo_sdtv_resolution_reply sdtv_resolutions;
+
+- /**
+- * Current selected TV format.
+- *
+- * This is stored in the same structure that's passed to the device, for
+- * convenience.
+- */
+- struct intel_sdvo_tv_format tv_format;
+-
+ /*
+ * supported encoding mode, used to determine whether HDMI is
+ * supported
+@@ -114,6 +127,9 @@ struct intel_sdvo_priv {
+ /* DDC bus used by this SDVO output */
+ uint8_t ddc_bus;
+
++ /* Mac mini hack -- use the same DDC as the analog connector */
++ struct i2c_adapter *analog_ddc_bus;
++
+ int save_sdvo_mult;
+ u16 save_active_outputs;
+ struct intel_sdvo_dtd save_input_dtd_1, save_input_dtd_2;
+@@ -188,7 +204,7 @@ static bool intel_sdvo_read_byte(struct intel_output *intel_output, u8 addr,
+ return true;
+ }
+
+- DRM_DEBUG("i2c transfer returned %d\n", ret);
++ DRM_DEBUG_KMS("i2c transfer returned %d\n", ret);
+ return false;
+ }
+
+@@ -298,7 +314,7 @@ static void intel_sdvo_debug_write(struct intel_output *intel_output, u8 cmd,
+ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
+ int i;
+
+- DRM_DEBUG_KMS(I915_SDVO, "%s: W: %02X ",
++ DRM_DEBUG_KMS("%s: W: %02X ",
+ SDVO_NAME(sdvo_priv), cmd);
+ for (i = 0; i < args_len; i++)
+ DRM_LOG_KMS("%02X ", ((u8 *)args)[i]);
+@@ -351,7 +367,7 @@ static void intel_sdvo_debug_response(struct intel_output *intel_output,
+ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
+ int i;
+
+- DRM_DEBUG_KMS(I915_SDVO, "%s: R: ", SDVO_NAME(sdvo_priv));
++ DRM_DEBUG_KMS("%s: R: ", SDVO_NAME(sdvo_priv));
+ for (i = 0; i < response_len; i++)
+ DRM_LOG_KMS("%02X ", ((u8 *)response)[i]);
+ for (; i < 8; i++)
+@@ -668,10 +684,10 @@ static int intel_sdvo_get_clock_rate_mult(struct intel_output *intel_output)
+ status = intel_sdvo_read_response(intel_output, &response, 1);
+
+ if (status != SDVO_CMD_STATUS_SUCCESS) {
+- DRM_DEBUG("Couldn't get SDVO clock rate multiplier\n");
++ DRM_DEBUG_KMS("Couldn't get SDVO clock rate multiplier\n");
+ return SDVO_CLOCK_RATE_MULT_1X;
+ } else {
+- DRM_DEBUG("Current clock rate multiplier: %d\n", response);
++ DRM_DEBUG_KMS("Current clock rate multiplier: %d\n", response);
+ }
+
+ return response;
+@@ -945,23 +961,28 @@ static void intel_sdvo_set_avi_infoframe(struct intel_output *output,
+
+ static void intel_sdvo_set_tv_format(struct intel_output *output)
+ {
++
++ struct intel_sdvo_tv_format format;
+ struct intel_sdvo_priv *sdvo_priv = output->dev_priv;
+- struct intel_sdvo_tv_format *format, unset;
+- u8 status;
++ uint32_t format_map, i;
++ uint8_t status;
+
+- format = &sdvo_priv->tv_format;
+- memset(&unset, 0, sizeof(unset));
+- if (memcmp(format, &unset, sizeof(*format))) {
+- DRM_DEBUG("%s: Choosing default TV format of NTSC-M\n",
+- SDVO_NAME(sdvo_priv));
+- format->ntsc_m = 1;
+- intel_sdvo_write_cmd(output, SDVO_CMD_SET_TV_FORMAT, format,
+- sizeof(*format));
+- status = intel_sdvo_read_response(output, NULL, 0);
+- if (status != SDVO_CMD_STATUS_SUCCESS)
+- DRM_DEBUG("%s: Failed to set TV format\n",
+- SDVO_NAME(sdvo_priv));
+- }
++ for (i = 0; i < TV_FORMAT_NUM; i++)
++ if (tv_format_names[i] == sdvo_priv->tv_format_name)
++ break;
++
++ format_map = 1 << i;
++ memset(&format, 0, sizeof(format));
++ memcpy(&format, &format_map, sizeof(format_map) > sizeof(format) ?
++ sizeof(format) : sizeof(format_map));
++
++ intel_sdvo_write_cmd(output, SDVO_CMD_SET_TV_FORMAT, &format_map,
++ sizeof(format));
++
++ status = intel_sdvo_read_response(output, NULL, 0);
++ if (status != SDVO_CMD_STATUS_SUCCESS)
++ DRM_DEBUG("%s: Failed to set TV format\n",
++ SDVO_NAME(sdvo_priv));
+ }
+
+ static bool intel_sdvo_mode_fixup(struct drm_encoder *encoder,
+@@ -1230,8 +1251,8 @@ static void intel_sdvo_dpms(struct drm_encoder *encoder, int mode)
+ * a given it the status is a success, we succeeded.
+ */
+ if (status == SDVO_CMD_STATUS_SUCCESS && !input1) {
+- DRM_DEBUG("First %s output reported failure to sync\n",
+- SDVO_NAME(sdvo_priv));
++ DRM_DEBUG_KMS("First %s output reported failure to "
++ "sync\n", SDVO_NAME(sdvo_priv));
+ }
+
+ if (0)
+@@ -1326,8 +1347,8 @@ static void intel_sdvo_restore(struct drm_connector *connector)
+ intel_wait_for_vblank(dev);
+ status = intel_sdvo_get_trained_inputs(intel_output, &input1, &input2);
+ if (status == SDVO_CMD_STATUS_SUCCESS && !input1)
+- DRM_DEBUG("First %s output reported failure to sync\n",
+- SDVO_NAME(sdvo_priv));
++ DRM_DEBUG_KMS("First %s output reported failure to "
++ "sync\n", SDVO_NAME(sdvo_priv));
+ }
+
+ intel_sdvo_set_active_outputs(intel_output, sdvo_priv->save_active_outputs);
+@@ -1405,7 +1426,7 @@ int intel_sdvo_supports_hotplug(struct drm_connector *connector)
+ u8 response[2];
+ u8 status;
+ struct intel_output *intel_output;
+- DRM_DEBUG("\n");
++ DRM_DEBUG_KMS("\n");
+
+ if (!connector)
+ return 0;
+@@ -1478,6 +1499,36 @@ intel_sdvo_multifunc_encoder(struct intel_output *intel_output)
+ return (caps > 1);
+ }
+
++static struct drm_connector *
++intel_find_analog_connector(struct drm_device *dev)
++{
++ struct drm_connector *connector;
++ struct intel_output *intel_output;
++
++ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
++ intel_output = to_intel_output(connector);
++ if (intel_output->type == INTEL_OUTPUT_ANALOG)
++ return connector;
++ }
++ return NULL;
++}
++
++static int
++intel_analog_is_connected(struct drm_device *dev)
++{
++ struct drm_connector *analog_connector;
++ analog_connector = intel_find_analog_connector(dev);
++
++ if (!analog_connector)
++ return false;
++
++ if (analog_connector->funcs->detect(analog_connector) ==
++ connector_status_disconnected)
++ return false;
++
++ return true;
++}
++
+ enum drm_connector_status
+ intel_sdvo_hdmi_sink_detect(struct drm_connector *connector, u16 response)
+ {
+@@ -1488,6 +1539,15 @@ intel_sdvo_hdmi_sink_detect(struct drm_connector *connector, u16 response)
+
+ edid = drm_get_edid(&intel_output->base,
+ intel_output->ddc_bus);
++
++ /* when there is no edid and no monitor is connected with VGA
++ * port, try to use the CRT ddc to read the EDID for DVI-connector
++ */
++ if (edid == NULL &&
++ sdvo_priv->analog_ddc_bus &&
++ !intel_analog_is_connected(intel_output->base.dev))
++ edid = drm_get_edid(&intel_output->base,
++ sdvo_priv->analog_ddc_bus);
+ if (edid != NULL) {
+ /* Don't report the output as connected if it's a DVI-I
+ * connector with a non-digital EDID coming out.
+@@ -1516,10 +1576,11 @@ static enum drm_connector_status intel_sdvo_detect(struct drm_connector *connect
+ struct intel_output *intel_output = to_intel_output(connector);
+ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
+
+- intel_sdvo_write_cmd(intel_output, SDVO_CMD_GET_ATTACHED_DISPLAYS, NULL, 0);
++ intel_sdvo_write_cmd(intel_output,
++ SDVO_CMD_GET_ATTACHED_DISPLAYS, NULL, 0);
+ status = intel_sdvo_read_response(intel_output, &response, 2);
+
+- DRM_DEBUG("SDVO response %d %d\n", response & 0xff, response >> 8);
++ DRM_DEBUG_KMS("SDVO response %d %d\n", response & 0xff, response >> 8);
+
+ if (status != SDVO_CMD_STATUS_SUCCESS)
+ return connector_status_unknown;
+@@ -1540,50 +1601,32 @@ static enum drm_connector_status intel_sdvo_detect(struct drm_connector *connect
+ static void intel_sdvo_get_ddc_modes(struct drm_connector *connector)
+ {
+ struct intel_output *intel_output = to_intel_output(connector);
++ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
++ int num_modes;
+
+ /* set the bus switch and get the modes */
+- intel_ddc_get_modes(intel_output);
++ num_modes = intel_ddc_get_modes(intel_output);
+
+-#if 0
+- struct drm_device *dev = encoder->dev;
+- struct drm_i915_private *dev_priv = dev->dev_private;
+- /* Mac mini hack. On this device, I get DDC through the analog, which
+- * load-detects as disconnected. I fail to DDC through the SDVO DDC,
+- * but it does load-detect as connected. So, just steal the DDC bits
+- * from analog when we fail at finding it the right way.
++ /*
++ * Mac mini hack. On this device, the DVI-I connector shares one DDC
++ * link between analog and digital outputs. So, if the regular SDVO
++ * DDC fails, check to see if the analog output is disconnected, in
++ * which case we'll look there for the digital DDC data.
+ */
+- crt = xf86_config->output[0];
+- intel_output = crt->driver_private;
+- if (intel_output->type == I830_OUTPUT_ANALOG &&
+- crt->funcs->detect(crt) == XF86OutputStatusDisconnected) {
+- I830I2CInit(pScrn, &intel_output->pDDCBus, GPIOA, "CRTDDC_A");
+- edid_mon = xf86OutputGetEDID(crt, intel_output->pDDCBus);
+- xf86DestroyI2CBusRec(intel_output->pDDCBus, true, true);
+- }
+- if (edid_mon) {
+- xf86OutputSetEDID(output, edid_mon);
+- modes = xf86OutputGetEDIDModes(output);
+- }
+-#endif
+-}
++ if (num_modes == 0 &&
++ sdvo_priv->analog_ddc_bus &&
++ !intel_analog_is_connected(intel_output->base.dev)) {
++ struct i2c_adapter *digital_ddc_bus;
+
+-/**
+- * This function checks the current TV format, and chooses a default if
+- * it hasn't been set.
+- */
+-static void
+-intel_sdvo_check_tv_format(struct intel_output *output)
+-{
+- struct intel_sdvo_priv *dev_priv = output->dev_priv;
+- struct intel_sdvo_tv_format format;
+- uint8_t status;
++ /* Switch to the analog ddc bus and try that
++ */
++ digital_ddc_bus = intel_output->ddc_bus;
++ intel_output->ddc_bus = sdvo_priv->analog_ddc_bus;
+
+- intel_sdvo_write_cmd(output, SDVO_CMD_GET_TV_FORMAT, NULL, 0);
+- status = intel_sdvo_read_response(output, &format, sizeof(format));
+- if (status != SDVO_CMD_STATUS_SUCCESS)
+- return;
++ (void) intel_ddc_get_modes(intel_output);
+
+- memcpy(&dev_priv->tv_format, &format, sizeof(format));
++ intel_output->ddc_bus = digital_ddc_bus;
++ }
+ }
+
+ /*
+@@ -1656,17 +1699,26 @@ static void intel_sdvo_get_tv_modes(struct drm_connector *connector)
+ struct intel_output *output = to_intel_output(connector);
+ struct intel_sdvo_priv *sdvo_priv = output->dev_priv;
+ struct intel_sdvo_sdtv_resolution_request tv_res;
+- uint32_t reply = 0;
++ uint32_t reply = 0, format_map = 0;
++ int i;
+ uint8_t status;
+- int i = 0;
+
+- intel_sdvo_check_tv_format(output);
+
+ /* Read the list of supported input resolutions for the selected TV
+ * format.
+ */
+- memset(&tv_res, 0, sizeof(tv_res));
+- memcpy(&tv_res, &sdvo_priv->tv_format, sizeof(tv_res));
++ for (i = 0; i < TV_FORMAT_NUM; i++)
++ if (tv_format_names[i] == sdvo_priv->tv_format_name)
++ break;
++
++ format_map = (1 << i);
++ memcpy(&tv_res, &format_map,
++ sizeof(struct intel_sdvo_sdtv_resolution_request) >
++ sizeof(format_map) ? sizeof(format_map) :
++ sizeof(struct intel_sdvo_sdtv_resolution_request));
++
++ intel_sdvo_set_target_output(output, sdvo_priv->controlled_output);
++
+ intel_sdvo_write_cmd(output, SDVO_CMD_GET_SDTV_RESOLUTION_SUPPORT,
+ &tv_res, sizeof(tv_res));
+ status = intel_sdvo_read_response(output, &reply, 3);
+@@ -1681,6 +1733,7 @@ static void intel_sdvo_get_tv_modes(struct drm_connector *connector)
+ if (nmode)
+ drm_mode_probed_add(connector, nmode);
+ }
++
+ }
+
+ static void intel_sdvo_get_lvds_modes(struct drm_connector *connector)
+@@ -1748,17 +1801,62 @@ static void intel_sdvo_destroy(struct drm_connector *connector)
+ intel_i2c_destroy(intel_output->i2c_bus);
+ if (intel_output->ddc_bus)
+ intel_i2c_destroy(intel_output->ddc_bus);
++ if (sdvo_priv->analog_ddc_bus)
++ intel_i2c_destroy(sdvo_priv->analog_ddc_bus);
+
+ if (sdvo_priv->sdvo_lvds_fixed_mode != NULL)
+ drm_mode_destroy(connector->dev,
+ sdvo_priv->sdvo_lvds_fixed_mode);
+
++ if (sdvo_priv->tv_format_property)
++ drm_property_destroy(connector->dev,
++ sdvo_priv->tv_format_property);
++
+ drm_sysfs_connector_remove(connector);
+ drm_connector_cleanup(connector);
+
+ kfree(intel_output);
+ }
+
++static int
++intel_sdvo_set_property(struct drm_connector *connector,
++ struct drm_property *property,
++ uint64_t val)
++{
++ struct intel_output *intel_output = to_intel_output(connector);
++ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
++ struct drm_encoder *encoder = &intel_output->enc;
++ struct drm_crtc *crtc = encoder->crtc;
++ int ret = 0;
++ bool changed = false;
++
++ ret = drm_connector_property_set_value(connector, property, val);
++ if (ret < 0)
++ goto out;
++
++ if (property == sdvo_priv->tv_format_property) {
++ if (val >= TV_FORMAT_NUM) {
++ ret = -EINVAL;
++ goto out;
++ }
++ if (sdvo_priv->tv_format_name ==
++ sdvo_priv->tv_format_supported[val])
++ goto out;
++
++ sdvo_priv->tv_format_name = sdvo_priv->tv_format_supported[val];
++ changed = true;
++ } else {
++ ret = -EINVAL;
++ goto out;
++ }
++
++ if (changed && crtc)
++ drm_crtc_helper_set_mode(crtc, &crtc->mode, crtc->x,
++ crtc->y, crtc->fb);
++out:
++ return ret;
++}
++
+ static const struct drm_encoder_helper_funcs intel_sdvo_helper_funcs = {
+ .dpms = intel_sdvo_dpms,
+ .mode_fixup = intel_sdvo_mode_fixup,
+@@ -1773,6 +1871,7 @@ static const struct drm_connector_funcs intel_sdvo_connector_funcs = {
+ .restore = intel_sdvo_restore,
+ .detect = intel_sdvo_detect,
+ .fill_modes = drm_helper_probe_single_connector_modes,
++ .set_property = intel_sdvo_set_property,
+ .destroy = intel_sdvo_destroy,
+ };
+
+@@ -2013,10 +2112,9 @@ intel_sdvo_output_setup(struct intel_output *intel_output, uint16_t flags)
+
+ sdvo_priv->controlled_output = 0;
+ memcpy(bytes, &sdvo_priv->caps.output_flags, 2);
+- DRM_DEBUG_KMS(I915_SDVO,
+- "%s: Unknown SDVO output type (0x%02x%02x)\n",
+- SDVO_NAME(sdvo_priv),
+- bytes[0], bytes[1]);
++ DRM_DEBUG_KMS("%s: Unknown SDVO output type (0x%02x%02x)\n",
++ SDVO_NAME(sdvo_priv),
++ bytes[0], bytes[1]);
+ ret = false;
+ }
+ intel_output->crtc_mask = (1 << 0) | (1 << 1);
+@@ -2029,6 +2127,55 @@ intel_sdvo_output_setup(struct intel_output *intel_output, uint16_t flags)
+
+ }
+
++static void intel_sdvo_tv_create_property(struct drm_connector *connector)
++{
++ struct intel_output *intel_output = to_intel_output(connector);
++ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
++ struct intel_sdvo_tv_format format;
++ uint32_t format_map, i;
++ uint8_t status;
++
++ intel_sdvo_set_target_output(intel_output,
++ sdvo_priv->controlled_output);
++
++ intel_sdvo_write_cmd(intel_output,
++ SDVO_CMD_GET_SUPPORTED_TV_FORMATS, NULL, 0);
++ status = intel_sdvo_read_response(intel_output,
++ &format, sizeof(format));
++ if (status != SDVO_CMD_STATUS_SUCCESS)
++ return;
++
++ memcpy(&format_map, &format, sizeof(format) > sizeof(format_map) ?
++ sizeof(format_map) : sizeof(format));
++
++ if (format_map == 0)
++ return;
++
++ sdvo_priv->format_supported_num = 0;
++ for (i = 0 ; i < TV_FORMAT_NUM; i++)
++ if (format_map & (1 << i)) {
++ sdvo_priv->tv_format_supported
++ [sdvo_priv->format_supported_num++] =
++ tv_format_names[i];
++ }
++
++
++ sdvo_priv->tv_format_property =
++ drm_property_create(
++ connector->dev, DRM_MODE_PROP_ENUM,
++ "mode", sdvo_priv->format_supported_num);
++
++ for (i = 0; i < sdvo_priv->format_supported_num; i++)
++ drm_property_add_enum(
++ sdvo_priv->tv_format_property, i,
++ i, sdvo_priv->tv_format_supported[i]);
++
++ sdvo_priv->tv_format_name = sdvo_priv->tv_format_supported[0];
++ drm_connector_attach_property(
++ connector, sdvo_priv->tv_format_property, 0);
++
++}
++
+ bool intel_sdvo_init(struct drm_device *dev, int output_device)
+ {
+ struct drm_connector *connector;
+@@ -2066,18 +2213,22 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
+ /* Read the regs to test if we can talk to the device */
+ for (i = 0; i < 0x40; i++) {
+ if (!intel_sdvo_read_byte(intel_output, i, &ch[i])) {
+- DRM_DEBUG_KMS(I915_SDVO,
+- "No SDVO device found on SDVO%c\n",
++ DRM_DEBUG_KMS("No SDVO device found on SDVO%c\n",
+ output_device == SDVOB ? 'B' : 'C');
+ goto err_i2c;
+ }
+ }
+
+ /* setup the DDC bus. */
+- if (output_device == SDVOB)
++ if (output_device == SDVOB) {
+ intel_output->ddc_bus = intel_i2c_create(dev, GPIOE, "SDVOB DDC BUS");
+- else
++ sdvo_priv->analog_ddc_bus = intel_i2c_create(dev, GPIOA,
++ "SDVOB/VGA DDC BUS");
++ } else {
+ intel_output->ddc_bus = intel_i2c_create(dev, GPIOE, "SDVOC DDC BUS");
++ sdvo_priv->analog_ddc_bus = intel_i2c_create(dev, GPIOA,
++ "SDVOC/VGA DDC BUS");
++ }
+
+ if (intel_output->ddc_bus == NULL)
+ goto err_i2c;
+@@ -2090,7 +2241,7 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
+
+ if (intel_sdvo_output_setup(intel_output,
+ sdvo_priv->caps.output_flags) != true) {
+- DRM_DEBUG("SDVO output failed to setup on SDVO%c\n",
++ DRM_DEBUG_KMS("SDVO output failed to setup on SDVO%c\n",
+ output_device == SDVOB ? 'B' : 'C');
+ goto err_i2c;
+ }
+@@ -2111,6 +2262,8 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
+ drm_encoder_helper_add(&intel_output->enc, &intel_sdvo_helper_funcs);
+
+ drm_mode_connector_attach_encoder(&intel_output->base, &intel_output->enc);
++ if (sdvo_priv->is_tv)
++ intel_sdvo_tv_create_property(connector);
+ drm_sysfs_connector_add(connector);
+
+ intel_sdvo_select_ddc_bus(sdvo_priv);
+@@ -2123,7 +2276,7 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
+ &sdvo_priv->pixel_clock_max);
+
+
+- DRM_DEBUG_KMS(I915_SDVO, "%s device VID/DID: %02X:%02X.%02X, "
++ DRM_DEBUG_KMS("%s device VID/DID: %02X:%02X.%02X, "
+ "clock range %dMHz - %dMHz, "
+ "input 1: %c, input 2: %c, "
+ "output 1: %c, output 2: %c\n",
+@@ -2143,6 +2296,8 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
+ return true;
+
+ err_i2c:
++ if (sdvo_priv->analog_ddc_bus != NULL)
++ intel_i2c_destroy(sdvo_priv->analog_ddc_bus);
+ if (intel_output->ddc_bus != NULL)
+ intel_i2c_destroy(intel_output->ddc_bus);
+ if (intel_output->i2c_bus != NULL)
+diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
+index 5b1c9e9..c64eab4 100644
+--- a/drivers/gpu/drm/i915/intel_tv.c
++++ b/drivers/gpu/drm/i915/intel_tv.c
+@@ -1437,6 +1437,35 @@ intel_tv_detect_type (struct drm_crtc *crtc, struct intel_output *intel_output)
+ return type;
+ }
+
++/*
++ * Here we set accurate tv format according to connector type
++ * i.e Component TV should not be assigned by NTSC or PAL
++ */
++static void intel_tv_find_better_format(struct drm_connector *connector)
++{
++ struct intel_output *intel_output = to_intel_output(connector);
++ struct intel_tv_priv *tv_priv = intel_output->dev_priv;
++ const struct tv_mode *tv_mode = intel_tv_mode_find(intel_output);
++ int i;
++
++ if ((tv_priv->type == DRM_MODE_CONNECTOR_Component) ==
++ tv_mode->component_only)
++ return;
++
++
++ for (i = 0; i < sizeof(tv_modes) / sizeof(*tv_modes); i++) {
++ tv_mode = tv_modes + i;
++
++ if ((tv_priv->type == DRM_MODE_CONNECTOR_Component) ==
++ tv_mode->component_only)
++ break;
++ }
++
++ tv_priv->tv_format = tv_mode->name;
++ drm_connector_property_set_value(connector,
++ connector->dev->mode_config.tv_mode_property, i);
++}
++
+ /**
+ * Detect the TV connection.
+ *
+@@ -1473,6 +1502,7 @@ intel_tv_detect(struct drm_connector *connector)
+ if (type < 0)
+ return connector_status_disconnected;
+
++ intel_tv_find_better_format(connector);
+ return connector_status_connected;
+ }
+
+diff --git a/drivers/gpu/drm/mga/mga_dma.c b/drivers/gpu/drm/mga/mga_dma.c
+index 6c67a02..3c917fb 100644
+--- a/drivers/gpu/drm/mga/mga_dma.c
++++ b/drivers/gpu/drm/mga/mga_dma.c
+@@ -444,7 +444,7 @@ static int mga_do_agp_dma_bootstrap(struct drm_device * dev,
+ {
+ drm_mga_private_t *const dev_priv =
+ (drm_mga_private_t *) dev->dev_private;
+- unsigned int warp_size = mga_warp_microcode_size(dev_priv);
++ unsigned int warp_size = MGA_WARP_UCODE_SIZE;
+ int err;
+ unsigned offset;
+ const unsigned secondary_size = dma_bs->secondary_bin_count
+@@ -619,7 +619,7 @@ static int mga_do_pci_dma_bootstrap(struct drm_device * dev,
+ {
+ drm_mga_private_t *const dev_priv =
+ (drm_mga_private_t *) dev->dev_private;
+- unsigned int warp_size = mga_warp_microcode_size(dev_priv);
++ unsigned int warp_size = MGA_WARP_UCODE_SIZE;
+ unsigned int primary_size;
+ unsigned int bin_count;
+ int err;
+diff --git a/drivers/gpu/drm/mga/mga_drv.h b/drivers/gpu/drm/mga/mga_drv.h
+index 3d264f2..be6c6b9 100644
+--- a/drivers/gpu/drm/mga/mga_drv.h
++++ b/drivers/gpu/drm/mga/mga_drv.h
+@@ -177,7 +177,6 @@ extern void mga_do_dma_wrap_end(drm_mga_private_t * dev_priv);
+ extern int mga_freelist_put(struct drm_device * dev, struct drm_buf * buf);
+
+ /* mga_warp.c */
+-extern unsigned int mga_warp_microcode_size(const drm_mga_private_t * dev_priv);
+ extern int mga_warp_install_microcode(drm_mga_private_t * dev_priv);
+ extern int mga_warp_init(drm_mga_private_t * dev_priv);
+
+diff --git a/drivers/gpu/drm/mga/mga_ucode.h b/drivers/gpu/drm/mga/mga_ucode.h
+deleted file mode 100644
+index b611e27..0000000
+--- a/drivers/gpu/drm/mga/mga_ucode.h
++++ /dev/null
+@@ -1,11645 +0,0 @@
+-/* mga_ucode.h -- Matrox G200/G400 WARP engine microcode -*- linux-c -*-
+- * Created: Thu Jan 11 21:20:43 2001 by gareth@valinux.com
+- *
+- * Copyright 1999 Matrox Graphics Inc.
+- * 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
+- * MATROX GRAPHICS INC., OR ANY OTHER CONTRIBUTORS 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.
+- *
+- * Kernel-based WARP engine management:
+- * Gareth Hughes <gareth@valinux.com>
+- */
+-
+-/*
+- * WARP pipes are named according to the functions they perform, where:
+- *
+- * - T stands for computation of texture stage 0
+- * - T2 stands for computation of both texture stage 0 and texture stage 1
+- * - G stands for computation of triangle intensity (Gouraud interpolation)
+- * - Z stands for computation of Z buffer interpolation
+- * - S stands for computation of specular highlight
+- * - A stands for computation of the alpha channel
+- * - F stands for computation of vertex fog interpolation
+- */
+-
+-static unsigned char warp_g200_tgz[] = {
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00,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00, 0xE8,
+-
+- 0x25, 0x41, 0x49, 0xBD,
+- 0x2D, 0x41, 0x51, 0xBD,
+-
+- 0x0D, 0x80, 0x07, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x35, 0x40, 0x48, 0xBD,
+- 0x3D, 0x40, 0x50, 0xBD,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x25, 0x30,
+- 0x2D, 0x30,
+-
+- 0x35, 0x30,
+- 0xB5, 0x30,
+- 0xBD, 0x30,
+- 0x3D, 0x30,
+-
+- 0x9C, 0xA7, 0x5B, 0x9F,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x84, 0xFF, 0x0A, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0xC9, 0x41, 0xC8, 0xEC,
+- 0x42, 0xE1,
+- 0x00, 0xE0,
+-
+- 0x82, 0xFF, 0x20, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0xC8, 0x40, 0xC0, 0xEC,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x7F, 0xFF, 0x20, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+-};
+-
+-static unsigned char warp_g200_tgza[] = {
+-
+- 0x00, 0x98, 0xA0, 0xE9,
+- 0x40, 0x40, 0xD8, 0xEC,
+-
+- 0xFF, 0x80, 0xC0, 0xE9,
+- 0x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 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0xC8, 0x40, 0xC0, 0xEC,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x74, 0xFF, 0x20, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+-};
+-
+-static unsigned char warp_g200_tgzaf[] = {
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x98, 0xA0, 0xE9,
+- 0x40, 0x40, 0xD8, 0xEC,
+-
+- 0xFF, 0x80, 0xC0, 0xE9,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x1F, 0xD7, 0x18, 0xBD,
+- 0x3F, 0xD7, 0x22, 0xBD,
+-
+- 0x81, 0x04,
+- 0x89, 0x04,
+- 0x01, 0x04,
+- 0x09, 0x04,
+-
+- 0xC9, 0x41, 0xC0, 0xEC,
+- 0x11, 0x04,
+- 0x00, 0xE0,
+-
+- 0x41, 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, 0x00, 0xE8,
+-
+- 0xC9, 0x41, 0xC8, 0xEC,
+- 0x42, 0xE1,
+- 0x00, 0xE0,
+-
+- 0x71, 0xFF, 0x20, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0xC8, 0x40, 0xC0, 0xEC,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x6E, 0xFF, 0x20, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+-};
+-
+-static unsigned char warp_g200_tgzf[] = {
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x98, 0xA0, 0xE9,
+- 0x40, 0x40, 0xD8, 0xEC,
+-
+- 0xFF, 0x80, 0xC0, 0xE9,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x1F, 0xD7, 0x18, 0xBD,
+- 0x3F, 0xD7, 0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- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0xC8, 0x40, 0xC0, 0xEC,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x72, 0xFF, 0x20, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+-};
+-
+-static unsigned char warp_g200_tgzs[] = {
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x98, 0xA0, 0xE9,
+- 0x40, 0x40, 0xD8, 0xEC,
+-
+- 0xFF, 0x80, 0xC0, 0xE9,
+- 0x00, 0x80, 0x00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0xBD,
+-
+- 0x9F, 0x41, 0x49, 0xBD,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x25, 0x41, 0x49, 0xBD,
+- 0x2D, 0x41, 0x51, 0xBD,
+-
+- 0x0D, 0x80, 0x07, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x35, 0x40, 0x48, 0xBD,
+- 0x3D, 0x40, 0x50, 0xBD,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x25, 0x30,
+- 0x2D, 0x30,
+-
+- 0x35, 0x30,
+- 0xB5, 0x30,
+- 0xBD, 0x30,
+- 0x3D, 0x30,
+-
+- 0x9C, 0xA7, 0x5B, 0x9F,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x6B, 0xFF, 0x0A, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0xC9, 0x41, 0xC8, 0xEC,
+- 0x42, 0xE1,
+- 0x00, 0xE0,
+-
+- 0x69, 0xFF, 0x20, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0xC8, 0x40, 0xC0, 0xEC,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x66, 0xFF, 0x20, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+-};
+-
+-static unsigned char warp_g200_tgzsa[] = {
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x98, 0xA0, 0xE9,
+- 0x40, 0x40, 0xD8, 0xEC,
+-
+- 0xFF, 0x80, 0xC0, 0xE9,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x1F, 0xD7, 0x18, 0xBD,
+- 0x3F, 0xD7, 0x22, 0xBD,
+-
+- 0x81, 0x04,
+- 0x89, 0x04,
+- 0x01, 0x04,
+- 0x09, 0x04,
+-
+- 0xC9, 0x41, 0xC0, 0xEC,
+- 0x11, 0x04,
+- 0x00, 0xE0,
+-
+- 0x41, 0xCC, 0x41, 0xCD,
+- 0x49, 0xCC, 0x49, 0xCD,
+-
+- 0xD1, 0x41, 0xC0, 0xEC,
+- 0x51, 0xCC, 0x51, 0xCD,
+-
+- 0x80, 0x04,
+-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0x49, 0xBD,
+- 0x2D, 0x41, 0x51, 0xBD,
+-
+- 0x0D, 0x80, 0x07, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x35, 0x40, 0x48, 0xBD,
+- 0x3D, 0x40, 0x50, 0xBD,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x25, 0x30,
+- 0x2D, 0x30,
+-
+- 0x35, 0x30,
+- 0xB5, 0x30,
+- 0xBD, 0x30,
+- 0x3D, 0x30,
+-
+- 0x9C, 0xA7, 0x5B, 0x9F,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x67, 0xFF, 0x0A, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0xC9, 0x41, 0xC8, 0xEC,
+- 0x42, 0xE1,
+- 0x00, 0xE0,
+-
+- 0x65, 0xFF, 0x20, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0xC8, 0x40, 0xC0, 0xEC,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x62, 0xFF, 0x20, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+-};
+-
+-static unsigned char warp_g200_tgzsaf[] = {
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x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+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x62, 0xFF, 0x0A, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0xC9, 0x41, 0xC8, 0xEC,
+- 0x42, 0xE1,
+- 0x00, 0xE0,
+-
+- 0x60, 0xFF, 0x20, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0xC8, 0x40, 0xC0, 0xEC,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x5D, 0xFF, 0x20, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+-};
+-
+-static unsigned char warp_g200_tgzsf[] = {
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 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 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x67, 0xFF, 0x0A, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0xC9, 0x41, 0xC8, 0xEC,
+- 0x42, 0xE1,
+- 0x00, 0xE0,
+-
+- 0x65, 0xFF, 0x20, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0xC8, 0x40, 0xC0, 0xEC,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x62, 0xFF, 0x20, 0xEA,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0x00, 0xE8,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+-};
+-
+-static unsigned char warp_g400_t2gz[] = {
+-
+- 0x00, 0x8A, 0x98, 0xE9,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0xA0, 0xE9,
+- 0x00, 0x00, 0xD8, 0xEC,
+-
+- 0xFF, 0x80, 0xC0, 0xE9,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x0A, 0x40, 0x50, 0xBF,
+- 0x2A, 0x40, 0x60, 0xBF,
+-
+- 0x32, 0x41, 0x51, 0xBF,
+- 0x3A, 0x41, 0x61, 0xBF,
+-
+- 0xC3, 0x6B,
+- 0xD3, 0x6B,
+- 0x00, 0x8A, 0x98, 0xE9,
+-
+- 0x73, 0x7B, 0xC8, 0xEC,
+- 0x96, 0xE2,
+- 0x41, 0x04,
+-
+- 0x7B, 0x43, 0xA0, 0xE8,
+- 0x73, 0x53, 0xA0, 0xE8,
+-
+- 0xAD, 0xEE, 0x23, 0x9F,
+- 0x00, 0xE0,
+- 0x51, 0x04,
+-
+- 0x90, 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+- 0x98, 0xFF, 0x20, 0xEA,
+- 0x57, 0xC0, 0xBF, 0xEA,
+-
+- 0x00, 0x80, 0xA0, 0xE9,
+- 0x00, 0x00, 0xD8, 0xEC,
+-
+-};
+-
+-static unsigned char warp_g400_tgzs[] = {
+-
+- 0x00, 0x88, 0x98, 0xE9,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x00, 0x80, 0xA0, 0xE9,
+- 0x00, 0x00, 0xD8, 0xEC,
+-
+- 0xFF, 0x80, 0xC0, 0xE9,
+- 0x00, 0x80, 0x00, 0xE8,
+-
+- 0x22, 0x40, 0x48, 0xBF,
+- 0x2A, 0x40, 0x50, 0xBF,
+-
+- 0x32, 0x41, 0x49, 0xBF,
+- 0x3A, 0x41, 0x51, 0xBF,
+-
+- 0xC3, 0x6B,
+- 0xCB, 0x6B,
+- 0x00, 0x88, 0x98, 0xE9,
+-
+- 0x73, 0x7B, 0xC8, 0xEC,
+- 0x96, 0xE2,
+- 0x41, 0x04,
+-
+- 0x7B, 0x43, 0xA0, 0xE8,
+- 0x73, 0x4B, 0xA0, 0xE8,
+-
+- 0xAD, 0xEE, 0x29, 0x9F,
+- 0x00, 0xE0,
+- 0x49, 0x04,
+-
+- 0x90, 0xE2,
+- 0x51, 0x04,
+- 0x31, 0x46, 0xB1, 0xE8,
+-
+- 0x49, 0x41, 0xC0, 0xEC,
+- 0x39, 0x57, 0xB1, 0xE8,
+-
+- 0x00, 0x04,
+- 0x46, 0xE2,
+- 0x73, 0x53, 0xA0, 0xE8,
+-
+- 0x51, 0x41, 0xC0, 0xEC,
+- 0x31, 0x00,
+- 0x39, 0x00,
+-
+- 0x65, 0x80, 0x15, 0xEA,
+- 0x08, 0x04,
+- 0x10, 0x04,
+-
+- 0x51, 0x49, 0xC0, 0xEC,
+- 0x2F, 0x41, 0x60, 0xEA,
+-
+- 0x31, 0x20,
+- 0x39, 0x20,
+- 0x1F, 0x42, 0xA0, 0xE8,
+-
+- 0x2A, 0x42, 0x4A, 0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