--- fglrx-installer-8.620.orig/debian/amdcccle.desktop +++ fglrx-installer-8.620/debian/amdcccle.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=ATI Catalyst Control Center +Comment=ATI graphics adapter settings +Name[de]=ATI Catalyst Control Center +Comment[de]=ATI grafics adapter settings +Icon=ccc_large.xpm +Exec=amdcccle +Path=/usr/bin +Type=Application +Terminal=0 +Categories=Application;Utility --- fglrx-installer-8.620.orig/debian/copyright +++ fglrx-installer-8.620/debian/copyright @@ -0,0 +1,223 @@ +This package was debianized by Mario Limonciello on +Tue, 27 May 2008 10:22:21 -0600. + +The latest Linux graphics driver was downloaded from the +AMD website (www.amd.com), and then this package was generated using: + + sh $VERSION.run --buildpkg Ubuntu/source + +---------------------------------------------------------------------------- + +Driver License: + +Copyright 2008 AMD Inc. + +ATI Software End User License Agreement + +PLEASE READ THIS LICENSE CAREFULLY BEFORE USING THE SOFTWARE. BY +DOWNLOADING, INSTALLING, COPYING OR USING THE SOFTWARE, YOU ARE AGREEING TO +BE BOUND BY THE TERMS OF THIS LICENSE. IF YOU ARE ACCESSING THE SOFTWARE +ELECTRONICALLY, SIGNIFY YOUR AGREEMENT BY CLICKING THE "AGREE/ACCEPT" +BUTTON. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE, PROMPTLY RETURN +THE SOFTWARE TO THE PLACE WHERE YOU OBTAINED IT AND (IF APPLICABLE) YOUR +MONEY WILL BE REFUNDED OR IF THE SOFTWARE WAS ACCESSED ELECTRONICALLY CLICK +"DISAGREE/DECLINE". + +1. License. ATI Technologies Inc., on behalf of itself, its subsidiaries +and licensors (referred collectively as "ATI") grants to you the following +non-exclusive, right to use the software accompanying this License +(hereinafter "Software") subject to the following terms and limitations: + +(a) Regardless of the media upon which it is distributed, the Software is +licensed to you for use solely in conjunction with ATI hardware products to +which the Software relates ("ATI Hardware"). + +(b) You own the medium on which the Software is recorded, but ATI and, if +applicable, its licensors retain title to the Software and related +documentation. + +(c) You may: + + i) use the Software solely in connection with the ATI Hardware on a + single computer; + + ii) make one copy of the Software in machine-readable form for backup + purposes only. You must reproduce on such copy ATI's copyright notice and + any other proprietary legends that were on the original copy of the + Software; + + iii) transfer all your license rights in the Software provided you must + also transfer a copy of this License, the backup copy of the Software, + the ATI Hardware and the related documentation and provided the other + party reads and agrees to accept the terms and conditions of this + License. Upon such transfer your license rights are then terminated. + +(d) In addition to the license terms above, with respect to portions of +the Software in source code or binary form designed exclusively for use +with the Linux operating system ("ATI Linux Code"), you may use, display, +modify, copy, distribute, allow others to re-distribute, package and re- +package such ATI Linux Code for commercial and non-commercial purposes, +provided that: + + i) all binary components of the ATI Linux Code are not modified in any + way; + + ii) the ATI Linux Code is only used as part of the Software and in + connection with ATI Hardware; + + iii) all copyright notices of ATI are reproduced and you refer to these + license terms; + + iv) you may not offer or impose any terms on the use of ATI Linux + Code that alter or restrict this License; and + + v) if you have modified the ATI Linux Code, such modifications will be + made publicly available and are licensed under the same terms provided + herein to ATI or any other third party without further restriction, + royalty or any other license requirement; + + vi) to the extent there is any ATI sample or control panel source + code included in the ATI Linux Code, no rights are granted to modify such + code except for portions thereof that may be subject to third party + license terms that grant such rights; and + + vii) ATI is not obligated to provide any maintenance or technical support + for any code resulting from ATI Linux Code. + +2. Restrictions. The Software contains copyrighted and patented material, +trade secrets and other proprietary material. In order to protect them, +and except as permitted by this license or applicable legislation, you may +not: + + a) decompile, reverse engineer, disassemble or otherwise reduce the + Software to a human-perceivable form; + + b) modify, network, rent, lend, loan, distribute or create derivative + works based upon the Software in whole or in part; or + + c) electronically transmit the Software from one computer to another or + over a network or otherwise transfer the Software except as permitted by + this License. + +3. Termination. This License is effective until terminated. You may +terminate this License at any time by destroying the Software, related +documentation and all copies thereof. This License will terminate +immediately without notice from ATI if you fail to comply with any +provision of this License. Upon termination you must destroy the Software, +related documentation and all copies thereof. + +4. Government End Users. If you are acquiring the Software on behalf of +any unit or agency of the United States Government, the following +provisions apply. The Government agrees the Software and documentation +were developed at private expense and are provided with "RESTRICTED +RIGHTS". Use, duplication, or disclosure by the Government is subject to +restrictions as set forth in DFARS 227.7202-1(a) and 227.7202-3(a) (1995), +DFARS 252.227-7013(c)(1)(ii) (Oct 1988), FAR 12.212(a)(1995), FAR 52.227- +19, (June 1987) or FAR 52.227-14(ALT III) (June 1987),as amended from time +to time. In the event that this License, or any part thereof, is deemed +inconsistent with the minimum rights identified in the Restricted Rights +provisions, the minimum rights shall prevail. + +5. No Other License. No rights or licenses are granted by ATI under this +License, expressly or by implication, with respect to any proprietary +information or patent, copyright, trade secret or other intellectual +property right owned or controlled by ATI, except as expressly provided in +this License. + +6. Additional Licenses. DISTRIBUTION OR USE OF THE SOFTWARE WITH AN +OPERATING SYSTEM MAY REQUIRE ADDITIONAL LICENSES FROM THE OPERATING SYSTEM +VENDOR. + +7. Disclaimer of Warranty on Software. You expressly acknowledge and +agree that use of the Software is at your sole risk. The Software and +related documentation are provided "AS IS" and without warranty of any kind +and ATI EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FORA PARTICULAR PURPOSE, OF QUALITY, OF QUIET ENJOYMENT AND OF NON- +INFRINGEMENT OF THIRD PARTY RIGHTS. ATI DOES NOT WARRANT THAT THE +FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET YOUR REQUIREMENTS, OR THAT +THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT +DEFECTS IN THE SOFTWARE WILL BE CORRECTED. THE ENTIRE RISK AS TO THE +RESULTS AND PERFORMANCE OF THE SOFTWARE IS ASSUMED BY YOU. FURTHERMORE, +ATI DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE ORTHE +RESULTS OF THE USE OF THE SOFTWARE OR RELATED DOCUMENTATION IN TERMS OF +THEIR CORRECTNESS, ACCURACY, RELIABILITY, CURRENTNESS, OR OTHERWISE. NO +ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY ATI OR ATI'S AUTHORIZED +REPRESENTATIVE SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE SCOPE OF +THIS WARRANTY. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU (AND NOT ATI OR +ATI'S AUTHORIZED REPRESENTATIVE) ASSUME THE ENTIRE COST OF ALL NECESSARY +SERVICING, REPAIR OR CORRECTION. THE SOFTWARE IS NOT INTENDED FOR USE IN +MEDICAL, LIFE SAVING OR LIFE SUSTAINING APPLICATIONS. SOME JURISDICTIONS +DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION +MAY NOT APPLY TO YOU. + +8. Limitation of Liability. TO THE MAXIMUM EXTENT PERMITTED BY LAW, UNDER +NO CIRCUMSTANCES INCLUDING NEGLIGENCE, SHALL ATI, OR ITS DIRECTORS, +OFFICERS, EMPLOYEES OR AGENTS, BE LIABLE TO YOU FOR ANY INCIDENTAL, +INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES (INCLUDING DAMAGES FOR LOSS OF +BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESSINFORMATION, AND +THE LIKE) ARISING OUT OF THE USE, MISUSE OR INABILITY TO USE THE SOFTWARE +OR RELATED DOCUMENTATION, BREACH OR DEFAULT, INCLUDING THOSE ARISING FROM +INFRINGEMENT OR ALLEGED INFRINGEMENT OF ANY PATENT, TRADEMARK, COPYRIGHT OR +OTHER INTELLECTUAL PROPERTY RIGHT, BY ATI, EVEN IF ATI OR ATI'S AUTHORIZED +REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME +JURISDICTIONS DO NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY FOR +INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION OR EXCLUSION +MAY NOT APPLY TO YOU. ATI will not be liable for 1) loss of, or damage to, +your records or data or 2) any damages claimed by you based on any third +party claim. In no event shall ATI's total liability to you for all +damages, losses, and causes of action (whether in contract, tort (including +negligence) or otherwise) exceed the amount paid by you for the Software. +The foregoing limitations will apply even if the above stated limitation +fails of its essential purpose. + +9. Controlling Law and Severability. This License shall be governed by +and construed under the laws of the Province of Ontario, Canada without +reference to its conflict of law principles. Any dispute related hereto +will be brought only in the courts in Toronto, Ontario, Canada and such +courts are agreed to be the convenient forum. In the event of any +conflicts between foreign law, rules, and regulations, and Canadian law, +rules, and regulations, Canadian law, rules and regulations shall prevail +and govern. The United Nations Convention on Contracts for the +International Sale of Goods shall not apply to this License. If for any +reason a court of competent jurisdiction finds any provision of this +License or portion thereof, to be unenforceable, that provision of the +License shall be enforced to the maximum extent permissible so as to effect +the intent of the parties, and the remainder of this License shall continue +in full force and effect. + +10. Complete Agreement. This License constitutes the entire agreement +between the parties with respect to the use of the Software and the related +documentation, and supersedes all prior or contemporaneous understandings +or agreements, written or oral, regarding such subject matter. No +amendment to or modification of this License will be binding unless in +writing and signed by a duly authorized representative of ATI. + +---------------------------------------------------------------------------- +Packaging scripts: + Copyright (C) 2002-2005 Flavio Stanchina + Copyright (C) 2005-2006 Aric Cyr + Copyright (C) 2007-2009 Mario Limonciello + +The packaging scripts are copyrighted under the MIT license. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE 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. --- fglrx-installer-8.620.orig/debian/compat +++ fglrx-installer-8.620/debian/compat @@ -0,0 +1 @@ +5 --- fglrx-installer-8.620.orig/debian/libamdxvba1.postinst +++ fglrx-installer-8.620/debian/libamdxvba1.postinst @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ]; then + ldconfig +fi + +#DEBHELPER# --- fglrx-installer-8.620.orig/debian/xorg-driver-fglrx-dev.install.in +++ fglrx-installer-8.620/debian/xorg-driver-fglrx-dev.install.in @@ -0,0 +1,7 @@ +debian/overrides/xorg-driver-fglrx-dev usr/share/lintian/overrides + +usr/include/* usr/include +usr/X11R6/include/* usr/include + +#XARCH#/usr/X11R6/#LIBDIR#/modules/*.a usr/lib +arch/#ARCH#/usr/X11R6/#LIBDIR#/*.a usr/lib --- fglrx-installer-8.620.orig/debian/changelog +++ fglrx-installer-8.620/debian/changelog @@ -0,0 +1,362 @@ +fglrx-installer (2:8.620-0ubuntu3) karmic; urgency=low + + * debian/dkms/patches/missing-flush_tlb.patch (LP: #394176) + - Borrow this patch from debian to fix missing symbol. + * debian/dkms.conf.in: + - Apply patches on 2.6.30 and 2.6.31. + + -- Mario Limonciello Thu, 02 Jul 2009 12:05:20 -0500 + +fglrx-installer (2:8.620-0ubuntu2) karmic; urgency=low + + * Issues resolved since 9.4 (No package changes; Mario just beat me to the upload): + + With desktop effects enabled, transparent desktop no longer causes desktop icons and + application windows to disappear + + Video playback no longer exhibits corruption when desktop effects are enabled and + Composite is not explicitly disabled + + [Ubuntu 8.10] System now functions properly when starting X on surround view + systems + + Resizing DVD playback window on Mplayer no longer causes blank video + + System instability no longer occurring when switching to full screen DVD playback + with Totem Player + + Terminal window no longer displays error message when launching Catalyst Control + Center in MultiView + + [Ubuntu 9.04] Xserver now starts properly with ATI Radeon HD 4870 GPU + configurations + + [Ubuntu 9.04] When xrandr --prop is evoked, Xserver failure no longer occurs under + various system configurations + + The engine clock and memory clock values are now reported properly by ATI CAL + + Catalyst Control Center, the primary display is now identified when using the + Identify Displays button + + Error message no longer occurs while setting the TV geometry + + Game corruption does not happen in full screen when 2 monitors are connected and + RandR 1.2 is enabled + + TV screen corruption is no longer visible while starting the X-server on some ASICs + + Executing the following command : aticonfig --initial -f does not cause the following + message "No supported adapters detected" on some display adapters + + Detecting second display using amdccle "Detect Display" button no longer results in + error and will require a relaunch to detect both displays properly + (LP: #348400) + + Mplayer does not fail to render video when resizing DVD playback window + + Fixed: Some system may become unresponsive after starting and killing X-server + (LP: #355821) + + System no longer fail to respond when executing multiple server + generations + + Memory leak on RV630 (LP: #368271) + + dpms switches off backlight on laptop screen properly (LP: #363059) + + Display Preferences no longer causes 100% CPU usage and failure (LP: #366757) + + -- Bryce Harrington Fri, 26 Jun 2009 22:07:19 -0700 + +fglrx-installer (2:8.620-0ubuntu1) karmic; urgency=low + + * New upstream release (9-6) + * Add a series of patches to get this compiling on 2.6.30. (LP: #387773) + - Note: these are NOT in the upstream package, so be cognizant when + upgrading to a new version of the package in Ubuntu. + - config_x86_32-gentoo.patch: From Gentoo bug tracker + - fglrx-2.6.29-debian.patch: From Debian SVN + - fglrx-2.6.30-irqreturn_t.patch: From Gentoo bug tracker + - fglrx-missing-pci_enable_msi.patch: From Gentoo bug tracker + + -- Mario Limonciello Wed, 24 Jun 2009 12:26:42 -0500 + +fglrx-installer (2:8.600-0ubuntu2) jaunty; urgency=low + + * Update fglrx-rt-compat.patch. Thanks Alessio Igor Bogani (LP: #328856) + * Update location of fglrx-rt-compat.patch from debian/dkms/patches/patches + to debian/dkms/patches + + -- Mario Limonciello Tue, 31 Mar 2009 12:12:37 -0500 + +fglrx-installer (2:8.600-0ubuntu1) jaunty; urgency=low + + * New upstream release. (Closes LP: #313027, #314600) + - Fixes LP: #253988, #179042, #241176, #284408, #287229, #296497, + #288620, #289628 + * README.Debian: Update the update procedure a bit + + -- Bryce Harrington Tue, 17 Mar 2009 15:40:42 -0700 + +fglrx-installer (2:8.573-0ubuntu4) jaunty; urgency=low + + * debian/xorg-driver-fglrx.postinst: + - Transition start of atieventsd with priority 31. It needs to start after + GDM and oem-config to ensure there aren't any lockups. (LP: #330188) + * debian/rules: + - Start atieventsd at 31. + + -- Mario Limonciello Mon, 16 Feb 2009 16:52:25 -0600 + +fglrx-installer (2:8.573-0ubuntu3) jaunty; urgency=low + + * debian/10fglrx.in: + - Check if LD_LIBRARY_PATH is empty when we append to it. (LP: #323327) + + -- Mario Limonciello Mon, 09 Feb 2009 18:50:46 -0600 + +fglrx-installer (2:8.573-0ubuntu2) jaunty; urgency=low + + * debian/control: + - Add libxinerama1 to build depends. + * debian/xorg-driver-fglrx.preinst: + - Move user modifications out of the way for files that are stored in + /etc/ati when upgrading package. Unfortunately, although these files + are stored in /etc, AMD has indicated that they should not be treated + as conf files. (LP: 307643) + * debian/fglrx-kernel-source.prerm: + - Add in a check for old versions of fglrx that might have DKMS directories + sitting around. If any are found, they are removed so as to prevent possible + conflicts. (LP: #303148) + + -- Mario Limonciello Mon, 02 Feb 2009 14:31:34 -0600 + +fglrx-installer (2:8.573-0ubuntu1) jaunty; urgency=low + + * New upstream release. (9-1). + - This release still does *not* meet the Xorg server 1.6 ABI. + It is being uploaded to ensure that there are no other integration + related issues that come up. + + -- Mario Limonciello Thu, 29 Jan 2009 20:37:38 -0600 + +fglrx-installer (2:8.552-0ubuntu1) jaunty; urgency=low + + * New upstream release. + * debian/control: + - Don't list the graphics cards supported, this is a moving target + that is difficult to keep up with. (LP: #292436) + * Move replacements for kernel source into debian/dkms + * Add patch for RT support to debian/dkms (LP: #286961) + * debian/dkms.conf.in: + - Use RT patch. + + -- Mario Limonciello Thu, 13 Nov 2008 10:30:20 -0600 + +fglrx-installer (2:8.543-0ubuntu4) intrepid; urgency=low + + [ Mario Limonciello ] + * debian/rules: + - Don't copy the libAMDXvBA.so* into multiple packages + on AMD64 (LP: #287159) + * debian/control: + - xorg-driver-fglrx: Drop libamdxvba1 to suggests so that fglrx can be put + onto DVDs. + * Replace authatieventsd.sh with our own variation that works with KDM. + (LP: #38915) + + [ Matthias Klose ] + * debian/control: + - xorg-driver-fglrx: Drop dependency on ia32-libs [amd64], add dependencies + on lib32gcc1 [amd64], libc6-i386 [amd64]. + - libamdxvba1: Add dependency on ia32-libs [amd64]. + + -- Mario Limonciello Wed, 22 Oct 2008 11:55:59 -0500 + +fglrx-installer (2:8.543-0ubuntu3) intrepid; urgency=low + + * debian/control: + - Drop build-depends on libstdc++5. (LP: #271794) + - Drop build-depends on ia32-libs + - Install libAMDXvBA.so* into it's own package. + * debian/rules: + - Work around missing libstdc++5 at build-depends time. + * Add the following files to support this new binary package: + - debian/libamdxvba.postinst + - debian/libamdxvba.install.in + + -- Mario Limonciello Thu, 16 Oct 2008 15:04:46 -0500 + +fglrx-installer (2:8.543-0ubuntu2) intrepid; urgency=low + + * debian/control: + - Depends on linux-headers-generic | linux-headers to help + cover more of the 90 percent case that people are using the + generic kernel (LP: #284091) + + -- Mario Limonciello Thu, 16 Oct 2008 08:52:34 -0500 + +fglrx-installer (2:8.543-0ubuntu1) intrepid; urgency=low + + * New upstream release. (Closes lp: #247376) + * control: Re-enabled provides of xserver-xorg-video-2 since + this upload works with the current xserver. + * README.Debian: Itemize update procedure + + -- Bryce Harrington Tue, 14 Oct 2008 14:12:06 -0700 + +fglrx-installer (2:8.532-0ubuntu5) intrepid; urgency=low + + * control: xorg-driver-fglrx Provides: xserver-xorg-video-2. The + driver doesn't work with the current xserver, so no reason to + pretend that it would. This prevents breaking upgrades from hardy + where the driver would be updated and on reboot X would fail. + + -- Timo Aaltonen Thu, 25 Sep 2008 11:46:28 +0300 + +fglrx-installer (2:8.532-0ubuntu4) intrepid; urgency=low + + * Update 2.6.27 patch again. (LP: #266956) + + -- Mario Limonciello Sun, 21 Sep 2008 15:32:19 -0500 + +fglrx-installer (2:8.532-0ubuntu3) intrepid; urgency=low + + [ Alberto Milone (tseliot) ] + * debian/modaliases/fglrx_supported: + - Add "xorg-driver-fglrx" to the strings printed to + fglrx-modules.alias.override so that Jockey can + detect the name of the package to install (LP: #258641) + + [ Mario Limonciello ] + * debian/kernel-source-patches/fglrx_8.9_2.6.27.patch: + - Update to compile on x86_64 for 2.6.27 (LP: #266956) + + -- Mario Limonciello Sun, 21 Sep 2008 12:29:18 -0500 + +fglrx-installer (2:8.532-0ubuntu2) intrepid; urgency=low + + * debian/fglrx-kernel-source.patches: + - Install to DKMS patches directory (LP: #266956) + + -- Mario Limonciello Fri, 19 Sep 2008 08:49:21 -0500 + +fglrx-installer (2:8.532-0ubuntu1) intrepid; urgency=low + + * Add debian/kernel-source-patches/fglrx_8.9_2.6.27.patch + to allow compiling against 2.6.27. (LP: #266956) + * debian/dkms.conf.in: + - Use 2.6.27 patch when building against 2.6.27 + * debian/fglrx-kernel-source.install.in: + - Install patches in kernel-source-patches. + + -- Mario Limonciello Thu, 18 Sep 2008 12:08:46 -0500 + +fglrx-installer (2:8.522-0ubuntu4) intrepid; urgency=low + + * Rebuild against the new xserver-xorg-dev. + + -- Bryce Harrington Fri, 12 Sep 2008 00:54:13 +0000 + +fglrx-installer (2:8.522-0ubuntu3) intrepid; urgency=low + + "3rd time's a charm" + * Don't divert extensions either. Causes big breakage when starting X. + + -- Mario Limonciello Wed, 20 Aug 2008 12:47:26 -0500 + +fglrx-installer (2:8.522-0ubuntu2) intrepid; urgency=low + + * Don't install extensions directory as no additional + extensions are included in this version. + + -- Mario Limonciello Wed, 20 Aug 2008 12:38:10 -0500 + +fglrx-installer (2:8.522-0ubuntu1) intrepid; urgency=low + + * New upstream release. + * Drop 02_2.6.26_support.dpatch as 2.6.26 support is available now. + * debian/control: + - Conflict w/ pentium-builder (LP: #180831) + - Update nvidia conflicts (LP: #254969) + * Correct LIBGL_DRIVERS_PATH (LP: #250944) + * Cleanup diversion prerm scripts (LP: #257003) + + -- Mario Limonciello Wed, 20 Aug 2008 12:34:16 -0500 + +fglrx-installer (2:8.512-0ubuntu1) intrepid; urgency=low + + * New upstream release. + * Update 02_2.6.26_support.dpatch for changes in firegl_public.c. + * debian/control: + - Depend upon libstdc++5. + * debian/xorg-driver-fglrx.postrm: + - Clean up AMD64 diversions properly. + + -- Mario Limonciello Mon, 21 Jul 2008 13:58:26 -0500 + +fglrx-installer (2:8.501-0ubuntu3) intrepid; urgency=low + + * drop debian/patches/01_2.6.25.patch: + - Causes regressions on RadeonHD 3670 hardware. + + -- Mario Limonciello Mon, 07 Jul 2008 14:37:55 -0500 + +fglrx-installer (2:8.501-0ubuntu2) intrepid; urgency=low + + [ Mario Limonciello ] + * debian/fglrx-modaliases.install: + - Install to /usr/share/jockey/modaliases instead + * debian/control: + - Bump standards version to 3.8.0. + - Add fglrx-amdcccle to xorg-driver-fglrx Recommends + * debian/rules: + - Don't start atieventsd on package install as it steals X permissions + until the next reboot. + - Add support to apply patches to the development release. This is + determined by querying distro target in the changelog. + -- Don't use packages not intended for your distro! -- + * debian/README.Debian: + - Add a small blurb explaining kernel patches. + + [ Žilvinas Valinskas ] + * debian/patches/01_2.6.25.patch: + - Adds 2.6.25 support (valid for AMD's 8-5 release), at least until + AMD formally adds it. + * debian/patches/02_2.6.26.patch: + - Adds 2.6.26 support (valid for AMD's 8-6 release), at least until + AMD formally adds it. (LP: #239967) + + -- Mario Limonciello Mon, 07 Jul 2008 12:06:05 -0500 + +fglrx-installer (2:8.501-0ubuntu1) intrepid; urgency=low + + * New upstream release. + + -- Mario Limonciello Thu, 19 Jun 2008 01:46:54 -0500 + +fglrx-installer (2:8.493.1-0ubuntu5) intrepid; urgency=low + + * debian/replacements/* + - Include Makefile and make.sh that support passing kernel version + as a parameter until upstream resolves issues. + * debian/dkms.conf.in: + - Explicitly use kernel version as parameter to make scripts. + * debian/fglrx-kernel-source.in: + - Include our variants of make scripts since upstream hasn't fixed + there's yet. + + -- Mario Limonciello Thu, 12 Jun 2008 15:34:14 -0500 + +fglrx-installer (2:8.493.1-0ubuntu4) intrepid; urgency=low + + * debian/control: + - Force the Section to be restricted/misc instead of just restricted. + + -- Mario Limonciello Tue, 27 May 2008 15:26:38 -0500 + +fglrx-installer (2:8.493.1-0ubuntu3) intrepid; urgency=low + + * debian/control: + - Explicitly only indicate i386 and amd64 for ALL binary packages. We don't want + sparc, hppa, or lpia showing up. + + -- Mario Limonciello Tue, 27 May 2008 14:34:13 -0500 + +fglrx-installer (2:8.493.1-0ubuntu2) intrepid; urgency=low + + * debian/rules: + - Specify $(LIBDIR) for calculating modaliases. + Fixes transient failure on AMD64 boxes. + + -- Mario Limonciello Tue, 27 May 2008 14:23:21 -0500 + +fglrx-installer (2:8.493.1-0ubuntu1) intrepid; urgency=low + + * Initial release. + - This package was directly generated from the upstream AMD driver's built-in + scripts. By generating this way, the driver will always be in sync without + integration problems. + + -- Mario Limonciello Tue, 27 May 2008 10:50:16 -0500 + --- fglrx-installer-8.620.orig/debian/xorg-driver-fglrx.manpages +++ fglrx-installer-8.620/debian/xorg-driver-fglrx.manpages @@ -0,0 +1 @@ +usr/share/man/man8/atieventsd.8 --- fglrx-installer-8.620.orig/debian/xorg-driver-fglrx.postinst +++ fglrx-installer-8.620/debian/xorg-driver-fglrx.postinst @@ -0,0 +1,26 @@ +#!/bin/sh + +set -e + +cleanup_init() { + update-rc.d -f atieventsd remove + update-rc.d atieventsd defaults 31 +} + +case "$1" in + configure) + [ -L /etc/rc5.d/S20atieventsd ] && cleanup_init + + #check whether libglx.so got installed. some releases earlier than x740 + #will not actually have this libglx.so + if [ ! -f /usr/lib/xorg/modules/extensions/libglx.so ]; then + dpkg-divert --remove --rename --package xorg-driver-fglrx --divert /usr/lib/fglrx/libglx.so.xlibmesa /usr/lib/xorg/modules/extensions/libglx.so > /dev/null + fi + +esac + +if [ "$1" = "configure" ]; then + ldconfig +fi + +#DEBHELPER# --- fglrx-installer-8.620.orig/debian/xorg-driver-fglrx.dirs +++ fglrx-installer-8.620/debian/xorg-driver-fglrx.dirs @@ -0,0 +1 @@ +usr/lib/fglrx --- fglrx-installer-8.620.orig/debian/xorg-driver-fglrx.default +++ fglrx-installer-8.620/debian/xorg-driver-fglrx.default @@ -0,0 +1,3 @@ +# Powerstate switching on ACPI events for +# lid open/close and AC adapter on/off +FGLRX_ACPI_SWITCH_POWERSTATES=false --- fglrx-installer-8.620.orig/debian/xorg-driver-fglrx.links +++ fglrx-installer-8.620/debian/xorg-driver-fglrx.links @@ -0,0 +1,4 @@ +usr/lib/libfglrx_gamma.so.1.0 usr/lib/libfglrx_gamma.so.1 +usr/lib/libfglrx_pp.so.1.0 usr/lib/libfglrx_pp.so.1 +usr/lib/libfglrx_dm.so.1.0 usr/lib/libfglrx_dm.so.1 +usr/lib/libfglrx_tvout.so.1.0 usr/lib/libfglrx_tvout.so.1 --- fglrx-installer-8.620.orig/debian/libamdxvba1.install.in +++ fglrx-installer-8.620/debian/libamdxvba1.install.in @@ -0,0 +1,3 @@ +#DRI stuff +arch/#ARCH#/usr/X11R6/#LIBDIR#/libAMD* usr/lib + --- fglrx-installer-8.620.orig/debian/README.Debian +++ fglrx-installer-8.620/debian/README.Debian @@ -0,0 +1,82 @@ +ATI video drivers for Ubuntu +============================ + +Further information can be found at http://www.ati.com/ -- look for +the "Drivers & Software" page and follow links to the Linux drivers. + +This package is generated automatically via the official ATI driver +installer that is available from the above homepage. + +DKMS +------------------------- + Ubuntu includes support to build modules using a utility + developed by Dell, called DKMS. It will automatically + build your kernel module for you when you first boot into + the kernel (or as necessary) + + See the DKMS man page for more information. + +Source building +------------------------- +Starting with Intrepid, an extra target has been added to allow +--buildpkg Ubuntu/source. This target should be adequate for +sending up to the Ubuntu archive. By keeping the same source package +in both places, there should be fewer conflicts for people. + +On a semiregular basis, the debian/changelog should be merged +into this package, but people adding to the Ubuntu archive should +be sure to update these sorts of things otherewise. + +Kernel patches +------------------------- +If you need to provide a kernel patch (say for a kernel not formally +supported yet by AMD), you can add this patch in the debian/patches +directory. It will only be used for the current development release, +as indicated in debian/rules. When upgrading from current development +release to next development release, this codename in debian/rules should +be bumped too. + +Update procedure +------------------------- +When a new -fglrx is available, do the following to update +fglrx-installer: + +0. On your build system, make sure you have the prerequisites + installed: + + $ sudo apt-get build-dep fglrx-installer + +1. Download the archive file and unpack it to get the .run file + +2. Do a --buildpkg Ubuntu/source, which will build a diff.gz, + orig.tar.gz and an unsigned dsc. For example: + + $ bash ./ati-driver-installer-*.run --buildpkg Ubuntu/source + + This might prompt for your password for sudo privs. It may + install things to your system it needs for constructing the + source packages, such as cdbs, libstdc++, etc. (As of 8.600 + it seems to no longer do this for source pkgs.) + +3. dpkg-source -x that dsc to unpack it into a directory, then + cd into the resultant directory. + +4. dch -e to update the new changelog entry. + Make sure to mark out any bugs that get closed with it. + + Also doublecheck that it includes debian/ changes up to the current + Ubuntu version; if not, some merging may be required. + +5. debuild -S to produce a new .dsc + +6. Verify the new .dsc produces valid .debs by running it through + pbuilder, sbuild, etc. as usual. + +7. Install and test the .debs, and then dput the .changes file + +If any changes to files in debian/ are needed, make sure to let the +maintainer (Mario aka superm1) know, so he can sync them into the git +tree AMD pulls from. + + + -- Bryce Harrington , Tue, 14 Oct 2008 13:27:15 -0700 --- fglrx-installer-8.620.orig/debian/fglrx-kernel-source.prerm +++ fglrx-installer-8.620/debian/fglrx-kernel-source.prerm @@ -0,0 +1,33 @@ +#!/bin/sh +# Copyright (C) 2002-2005 Flavio Stanchina +# Copyright (C) 2005-2006 Aric Cyr +# Copyright (C) 2007-2008 Mario Limonciello + +#DEBHELPER# + +CVERSION=`dpkg-query -W -f='${Version}' fglrx-kernel-source | awk -F "-" '{print $1}' | cut -d\: -f2` +SOURCES=/var/lib/dkms/fglrx/ + +case "$1" in + remove|upgrade) + if [ -d $SOURCES ]; then + for directory in $(ls $SOURCES); do + kind=$(echo "$directory" | awk '$1 ~ /.*[a-z].*$/ { print "alpha"; next } { print "num" }') + # the names of the directories containing the version of the driver are digits (e.g. 8.573) + if [ "$kind" = "num" ]; then + comparison=$(echo "$directory" | awk -v Version="$CVERSION" '($1 != Version) { print "yes"; next } { print "no" }') + # if the version is less than $VERSION + if [ "$comparison" = "yes" ]; then + echo "Removing old untracked DKMS directory: $SOURCES$directory" + rm -rf $SOURCES$directory 2>/dev/null + fi + fi + done + fi + echo "Removing all DKMS Modules" + dkms remove -m fglrx -v $CVERSION --all > /dev/null + echo "Done." + ;; +esac + + --- fglrx-installer-8.620.orig/debian/xorg-driver-fglrx-dev.links +++ fglrx-installer-8.620/debian/xorg-driver-fglrx-dev.links @@ -0,0 +1,4 @@ +usr/lib/libfglrx_gamma.so.1 usr/lib/libfglrx_gamma.so +usr/lib/libfglrx_pp.so.1 usr/lib/libfglrx_pp.so +usr/lib/libfglrx_dm.so.1 usr/lib/libfglrx_dm.so +usr/lib/libfglrx_tvout.so.1 usr/lib/libfglrx_tvout.so --- fglrx-installer-8.620.orig/debian/fglrx-modaliases.install +++ fglrx-installer-8.620/debian/fglrx-modaliases.install @@ -0,0 +1 @@ +debian/modaliases/fglrx-modules.alias.override usr/share/jockey/modaliases --- fglrx-installer-8.620.orig/debian/xorg-driver-fglrx.preinst +++ fglrx-installer-8.620/debian/xorg-driver-fglrx.preinst @@ -0,0 +1,126 @@ +#! /bin/sh +# preinst script for xorg-driver-fglrx +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# +# For details see /usr/share/doc/packaging-manual/ + +PKGNAME=xorg-driver-fglrx + +if [ `dpkg --print-installation-architecture` = "amd64" ]; then + HAS_LIB32="yes" +fi + +# Snippet from http://www.dpkg.org/dpkg/ConffileHandling +mv_conffile() { + CONFFILE="$1" + + if [ -e "$CONFFILE" ]; then + md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" + old_md5sum="`sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' $CONFFILE'{s/.* //;p}}\" /var/lib/dpkg/status`" + if [ "$md5sum" != "$old_md5sum" ]; then + echo "Conffile $CONFFILE has been modified by you." + echo "AMD graphics driver requires $CONFFILE to be updated when driver is updated." + echo "Saving as $CONFFILE.dpkg-bak ..." + mv -f "$CONFFILE" "$CONFFILE".dpkg-bak + fi + fi +} + + +fix_diversions() +{ + # Remove very old style diversions + if [ -d /usr/share/fglrx/diversions ]; then + if [ -n "$HAS_LIB32" ]; then + dpkg-divert --remove --package $PKGNAME \ + --divert /usr/share/fglrx/diversions/libGL.so.1.2_32bit \ + --rename /usr/lib32/libGL.so.1.2 + fi + + dpkg-divert --remove --package $PKGNAME \ + --divert /usr/share/fglrx/diversions/libGL.so.1.2 \ + --rename /usr/lib/libGL.so.1.2 + + rmdir /usr/share/fglrx/diversions || true + fi + + #remove old and unnecessary libGL.so.1 symlinks + if [ -L /usr/lib/fglrx/libGL.so.1.xlibmesa ]; then + rm /usr/lib/fglrx/libGL.so.1.xlibmesa + fi + + if [ -L /usr/lib32/fglrx/libGL.so.1.xlibmesa ]; then + rm /usr/lib32/fglrx/libGL.so.1.xlibmesa + fi + #remove unnecessary X11R6 symlinks that may not have + #been cleaned up in earlier releases + for i in /usr/lib/libGL.so.1 \ + /usr/lib32/libGL.so.1 \ + /usr/X11R6/lib/libGL.so.1 \ + /usr/X11R6/lib/libGL.so.1.2 \ + /usr/X11R6/lib32/libGL.so.1 \ + /usr/X11R6/lib32/libGL.so.1.2 ; do \ + dpkg-divert --remove --package $PKGNAME $i > /dev/null; \ + done +} + +case "$1" in + install|upgrade) + + ### remove old fglrx diversions ### + fix_diversions + + ### make new diversions ### + if [ ! -d /usr/lib/fglrx ]; then ### + mkdir -p /usr/lib/fglrx + fi + dpkg-divert --add --rename --package $PKGNAME --divert /usr/lib/fglrx/libGL.so.1.2.xlibmesa /usr/lib/libGL.so.1.2 > /dev/null + dpkg-divert --add --rename --package $PKGNAME --divert /usr/lib/fglrx/libdri.so.xlibmesa /usr/lib/xorg/modules/extensions/libdri.so > /dev/null + dpkg-divert --add --rename --package $PKGNAME --divert /usr/lib/fglrx/libglx.so.xlibmesa /usr/lib/xorg/modules/extensions/libglx.so > /dev/null + + if [ -n "$HAS_LIB32" ]; then + if [ ! -d /usr/lib32/fglrx ]; then + mkdir -p /usr/lib32/fglrx + fi + dpkg-divert --add --rename --package $PKGNAME --divert /usr/lib32/fglrx/libGL.so.1.2.xlibmesa /usr/lib32/libGL.so.1.2 > /dev/null + fi + + ### Remove user changes to "conffiles"" ### + ### These files are stored in /etc but shouldn't be treated ### + ### as conf files because updated drivers may stop working ### + ### if they are modified. ### + mv_conffile "/etc/ati/amdpcsdb.default" + mv_conffile "/etc/ati/atiogl.xml" + mv_conffile "/etc/ati/authatieventsd.sh" + mv_conffile "/etc/ati/control" + mv_conffile "/etc/ati/logo_mask.xbm.example" + mv_conffile "/etc/ati/signature" + mv_conffile "/etc/ati/logo.xbm.example" + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + + + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- fglrx-installer-8.620.orig/debian/fglrx-kernel-source.install.in +++ fglrx-installer-8.620/debian/fglrx-kernel-source.install.in @@ -0,0 +1,8 @@ +#Lintian overrides +debian/overrides/fglrx-kernel-source usr/share/lintian/overrides + +#Actual kernel modules +lib/modules/fglrx/build_mod/* usr/src/fglrx-#CVERSION# +debian/dkms/* usr/src/fglrx-#CVERSION# +arch/#ARCH#/lib/modules/fglrx/build_mod/lib* usr/src/fglrx-#CVERSION# +debian/dkms.conf usr/src/fglrx-#CVERSION# --- fglrx-installer-8.620.orig/debian/fglrx-kernel-source.postinst +++ fglrx-installer-8.620/debian/fglrx-kernel-source.postinst @@ -0,0 +1,22 @@ +#!/bin/sh +# Copyright (C) 2002-2005 Flavio Stanchina +# Copyright (C) 2005-2006 Aric Cyr +# Copyright (C) 2007 Mario Limonciello + +CVERSION=`dpkg-query -W -f='${Version}' fglrx-kernel-source | awk -F "-" '{print $1}' | cut -d\: -f2` + +#DEBHELPER# + +case "$1" in + configure) + echo "Adding Module to DKMS build system" + dkms add -m fglrx -v $CVERSION > /dev/null + echo "Doing initial module build" + dkms build -m fglrx -v $CVERSION > /dev/null + echo "Installing initial module" + dkms install -m fglrx -v $CVERSION --force > /dev/null + echo "Done." + ;; +esac + + --- fglrx-installer-8.620.orig/debian/xorg-driver-fglrx.install.in +++ fglrx-installer-8.620/debian/xorg-driver-fglrx.install.in @@ -0,0 +1,28 @@ +debian/overrides/xorg-driver-fglrx usr/share/lintian/overrides +debian/acpi/fglrx-*-aticonfig etc/acpi/events +debian/acpi/fglrx-powermode.sh etc/acpi +debian/10fglrx etc/X11/Xsession.d +etc/ati etc +debian/replacements/authatieventsd.sh etc/ati + +#binaries +arch/#ARCH#/usr/sbin/* usr/sbin +arch/#ARCH#/usr/X11R6/bin/ati* usr/bin +arch/#ARCH#/usr/X11R6/bin/fgl* usr/bin +usr/sbin/*sh usr/share/fglrx + +#DRI stuff +arch/#ARCH#/usr/X11R6/#LIBDIR#/liba*.so* usr/lib +arch/#ARCH#/usr/X11R6/#LIBDIR#/libf*.so* usr/lib +arch/#ARCH#/usr/X11R6/#LIBDIR#/libX*.so* usr/lib +arch/#ARCH#/usr/X11R6/#LIBDIR#/libG*.so* usr/lib +arch/#ARCH#/usr/X11R6/#LIBDIR#/modules/dri #DRIDIR# + +#Xorg stuff +#XARCH#/usr/X11R6/#LIBDIR#/modules/*.so #XMODDIR# +#XARCH#/usr/X11R6/#LIBDIR#/modules/drivers #XMODDIR# +#XARCH#/usr/X11R6/#LIBDIR#/modules/linux #XMODDIR# +#XARCH#/usr/X11R6/#LIBDIR#/modules/extensions #XMODDIR# + +#CAL stuff +arch/#ARCH#/usr/#LIBDIR#/* usr/lib --- fglrx-installer-8.620.orig/debian/dkms.conf.in +++ fglrx-installer-8.620/debian/dkms.conf.in @@ -0,0 +1,19 @@ +PACKAGE_NAME="fglrx" +PACKAGE_VERSION="#CVERSION#" +CLEAN="rm -f *.*o" +BUILT_MODULE_NAME[0]="fglrx" +MAKE[0]="pushd ${dkms_tree}/fglrx/#CVERSION#/build; sh make.sh --nohints --uname_r=$kernelver; popd" +DEST_MODULE_LOCATION[0]="/kernel/drivers/char/drm" +AUTOINSTALL="yes" +PATCH[0]="fglrx-rt-compat.patch" +PATCH_MATCH[0]="rt" +PATCH[1]="fglrx-2.6.30-irqreturn_t.patch" +PATCH_MATCH[1]="2.6.3[01]" +PATCH[2]="fglrx-missing-pci_enable_msi.patch" +PATCH_MATCH[2]="2.6.3[01]" +PATCH[3]="fglrx-2.6.29-debian.patch" +PATCH_MATCH[3]="2.6.3[01]" +PATCH[4]="config_x86_32-gentoo.patch" +PATCH_MATCH[4]="2.6.3[01]" +PATCH[5]="missing-flush_tlb.patch" +PATCH_MATCH[5]="2.6.3[01]" --- fglrx-installer-8.620.orig/debian/xorg-driver-fglrx.postrm +++ fglrx-installer-8.620/debian/xorg-driver-fglrx.postrm @@ -0,0 +1,41 @@ +#! /bin/sh +# postrm script for xorg-driver-fglrx +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see /usr/share/doc/packaging-manual/ + +PKGNAME=xorg-driver-fglrx + +case "$1" in + remove|purge) + dpkg-divert --remove --rename --package $PKGNAME --divert /usr/lib/fglrx/libGL.so.1.2.xlibmesa /usr/lib/libGL.so.1.2 > /dev/null + dpkg-divert --remove --rename --package $PKGNAME --divert /usr/lib32/fglrx/libGL.so.1.2.xlibmesa /usr/lib32/libGL.so.1.2 > /dev/null + dpkg-divert --remove --rename --package $PKGNAME --divert /usr/lib/fglrx/libdri.so.xlibmesa /usr/lib/xorg/modules/extensions/libdri.so > /dev/null + dpkg-divert --remove --rename --package $PKGNAME --divert /usr/lib/fglrx/libglx.so.xlibmesa /usr/lib/xorg/modules/extensions/libglx.so > /dev/null + ;; + + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 0 + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# --- fglrx-installer-8.620.orig/debian/xorg-driver-fglrx.atieventsd.init +++ fglrx-installer-8.620/debian/xorg-driver-fglrx.atieventsd.init @@ -0,0 +1,56 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: atieventsd +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO + +# Original design: +# Copyright (c) 2006, ATI Technologies Inc. All rights reserved. + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +DAEMONPATH=/usr/sbin/atieventsd +DAEMONNAME=atieventsd +DAEMONOPTS="" + +[ -f $DAEMONPATH ] || exit 0 + +. /lib/lsb/init-functions + +case "$1" in + start) + log_daemon_msg "Starting $DAEMONNAME" + start-stop-daemon --start --quiet --oknodo --exec $DAEMONPATH -- $DAEMONOPTS + log_end_msg $? + ;; + + stop) + log_daemon_msg "Stopping $DAEMONNAME" + start-stop-daemon --stop --quiet --exec $DAEMONPATH --oknodo + log_end_msg $? + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + reload|force-reload) log_daemon_msg "Reloading isn't supported by $DAEMONNAME" + log_end_msg 0 + ;; + + *) + echo "$0 {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 + --- fglrx-installer-8.620.orig/debian/rules +++ fglrx-installer-8.620/debian/rules @@ -0,0 +1,127 @@ +#!/usr/bin/make -f +# Copyright (C) 2002-2005 Flavio Stanchina +# Copyright (C) 2005-2006 Aric Cyr +# Copyright (C) 2007-2008 Mario Limonciello + +include /usr/share/cdbs/1/rules/debhelper.mk + +# Figure out some magic versioning +CVERSION := $(shell dpkg-parsechangelog | grep '^Version:' | cut -d' ' -f2 | cut -d- -f1 | cut -d\: -f2) +DVERSION := $(shell dpkg-parsechangelog | grep '^Version:' | cut -d' ' -f2 | cut -d\: -f2) +DISTRO := $(shell dpkg-parsechangelog | grep '^Distribution:' | cut -d' ' -f2 | cut -d\: -f2) + +#Kernel patches for newer development release kernel +#In case these break stuff, don't apply to stable +ifeq ($(DISTRO),intrepid) + include /usr/share/cdbs/1/rules/simple-patchsys.mk +endif + +#Directory naming schemes +DRIDIR := usr/lib +DRIDIR32 := usr/lib32 +XMODDIR := $(DRIDIR)/xorg/modules +LIBDIR := lib +ARCH := x86 +XARCH := x740 + +ifeq ($(DISTRO),hardy) + XARCH := x710 +endif + +ifeq ($(DISTRO),gutsy) + XARCH := x710 +endif + +ifeq ($(DEB_BUILD_ARCH),amd64) + LIBDIR := lib64 + ARCH := x86_64 + XARCH := $(XARCH)_64a +endif + +# Package names +PKG_driver := xorg-driver-fglrx +PKG_driver_dev := xorg-driver-fglrx-dev +PKG_kernel_src := fglrx-kernel-source +PKG_control := fglrx-amdcccle +PKG_UVD_library := libamdxvba1 + + +# Unfortunately, we won't have libstdc++5 at build time +# Also, we can't go and use debian/shlibs.local. It requires +# that you have the library installed, and that library +# just forgot to ship a shlibs file. +# See (LP: #271794) for more information +DEB_DH_SHLIBDEPS_ARGS_ALL="-Xlib32" +DEB_DH_SHLIBDEPS_ARGS_$(PKG_UVD_library)="-XlibAMD" + +configure/$(PKG_driver):: + + #Create important strings + for i in 10fglrx \ + dkms.conf \ + $(PKG_driver).install \ + $(PKG_driver_dev).install \ + $(PKG_kernel_src).install \ + $(PKG_control).install \ + $(PKG_UVD_library).install \ + overrides/$(PKG_kernel_src); do \ + sed -e "s|#XMODDIR#|$(XMODDIR)|" \ + -e "s|#XMODDIR32#|$(XMODDIR32)|" \ + -e "s|#DRIDIR32#|$(DRIDIR32)|" \ + -e "s|#LIBDIR#|$(LIBDIR)|" \ + -e "s|#DRIDIR#|$(DRIDIR)|" \ + -e "s|#CVERSION#|$(CVERSION)|" \ + -e "s|#XARCH#|$(XARCH)|" \ + -e "s|#ARCH#|$(ARCH)|" \ + debian/$$i.in > debian/$$i; \ + done + + # remove exec bit on everything + find arch \ + etc \ + lib \ + module \ + usr \ + $(XARCH) -type f | xargs chmod -x + + # set executable on user apps + find arch/$(ARCH)/usr/sbin \ + arch/$(ARCH)/usr/X11R6/bin \ + usr/sbin/ -type f | xargs chmod a+x + + # set exec bit on scripts + find lib etc debian -name "*.sh" -type f | xargs chmod +x + + # Generate modaliases + sh -e debian/modaliases/fglrx_supported \ + $(XARCH)/usr/X11R6/$(LIBDIR)/modules/drivers/fglrx_drv.so > \ + debian/modaliases/fglrx-modules.alias.override + +clean:: + rm -f debian/{10fglrx, \ + dkms.conf, \ + $(PKG_driver).install, \ + $(PKG_driver_dev).install, \ + $(PKG_kernel_src).install, \ + $(PKG_control).install, \ + $(PKG_UVD_library).install \ + overrides/$(PKG_kernel_src), \ + modaliases/fglrx-modules.alias.override} + +binary-install/$(PKG_UVD_library):: +ifeq ($(DEB_BUILD_ARCH),amd64) + dh_install -p$(PKG_UVD_library) "arch/x86/usr/X11R6/lib/libAMD*.so*" "usr/lib32" +endif + +binary-install/$(PKG_driver):: +ifeq ($(DEB_BUILD_ARCH),amd64) + #driver package + dh_install -XlibAMD -p$(PKG_driver) "arch/x86/usr/X11R6/lib/*.so*" "usr/lib32" + dh_install -p$(PKG_driver) "arch/x86/usr/X11R6/lib/modules/dri" "$(DRIDIR32)" + dh_install -p$(PKG_driver) "arch/x86/usr/lib/*" "usr/lib32" + dh_installdirs -p$(PKG_driver) "usr/lib32/fglrx" + +endif + + dh_installdocs -p$(PKG_driver) usr/share/doc/fglrx/* --exclude ATI_LICENSE.TXT + dh_installinit -p$(PKG_driver) --name="atieventsd" --no-start --update-rcd-params="defaults 31" --- fglrx-installer-8.620.orig/debian/fglrx-amdcccle.install.in +++ fglrx-installer-8.620/debian/fglrx-amdcccle.install.in @@ -0,0 +1,7 @@ +debian/overrides/fglrx-amdcccle usr/share/lintian/overrides +usr/share/icons/*.xpm usr/share/pixmaps +usr/share/gnome/apps/*.desktop usr/share/applications +usr/share/applnk/* usr/share/applnk +usr/share/ati usr/share +arch/#ARCH#/usr/X11R6/bin/amdcccle usr/bin + --- fglrx-installer-8.620.orig/debian/amdcccle.kdelnk +++ fglrx-installer-8.620/debian/amdcccle.kdelnk @@ -0,0 +1,18 @@ +# KDE Config File +[KDE Desktop Entry] +Name=ATI Catalyst Control Center +Comment=ATI graphics adapter settings +Name[de]=ATI Catalyst Control Center +Comment[de]=ATI grafics adapter settings +SwallowExec= +BinaryPattern= +Icon=ccc_large.xpm +MiniIcon=ccc_small.xpm +Protocols= +MimeType= +Exec=amdcccle +TerminalOptions= +Path=/usr/bin +DocPath= +Type=Application +Terminal=0 --- fglrx-installer-8.620.orig/debian/control +++ fglrx-installer-8.620/debian/control @@ -0,0 +1,84 @@ +Source: fglrx-installer +Section: restricted/misc +Priority: extra +Maintainer: Mario Limonciello +Uploaders: Mario Limonciello , Aric Cyr +Build-Depends: debhelper (>= 5), + cdbs, + libxext6, + libxrandr2, + libice6, + libsm6, + libfontconfig1, + libxi6, + libxcursor1, + fakeroot, + libdrm2, + libgl1-mesa-glx, + libxinerama1 +Standards-Version: 3.8.0 +Homepage: http://ati.amd.com/support/driver.html + +Package: xorg-driver-fglrx +Architecture: amd64 i386 +Recommends: fglrx-amdcccle +Suggests: libamdxvba1 +Depends: ${shlibs:Depends}, xserver-xorg-core, fglrx-kernel-source, lib32gcc1 [amd64], libc6-i386 [amd64] +Conflicts: fglrx-driver, xfree86-driver-fglrx, nvidia-glx, nvidia-glx-legacy, nvidia-glx-new, nvidia-glx-71, nvidia-glx-96, nvidia-glx-173, nvidia-glx-177, nvidia-glx-180 +Replaces: fglrx-driver, xfree86-driver-fglrx +Description: Video driver for the ATI graphics accelerators + Video driver for the ATI Radeon and FireGL graphics accelerators. + . + This package provides 2D display drivers + and hardware accelerated OpenGL. + +Package: xorg-driver-fglrx-dev +Architecture: amd64 i386 +Depends: xorg-driver-fglrx +Conflicts: fglrx-driver-dev, xfree86-driver-fglrx-dev +Replaces: fglrx-driver-dev, xfree86-driver-fglrx-dev +Description: Video driver for the ATI graphics accelerators (devel files) + Video driver for the ATI Radeon and FireGL graphics accelerators. + . + This package provides definitions for the GL and GLX extensions + and the FGLRXGAMMA extension interface library. + +Package: fglrx-kernel-source +Architecture: amd64 i386 +Depends: make, dkms, linux-libc-dev, linux-headers-generic | linux-headers +Suggests: xorg-driver-fglrx +Conflicts: pentium-builder +Description: Kernel module source for the ATI graphics accelerators + Video driver for the ATI Radeon and FireGL graphics accelerators. + . + This package provides the kernel module build environment. + +Package: fglrx-amdcccle +Architecture: amd64 i386 +Depends: xorg-driver-fglrx, ${shlibs:Depends} +Conflicts: fglrx-control-qt2, fglrx-control +Replaces: fglrx-control +Description: Catalyst Control Center for the ATI graphics accelerators + Catalyst Control Center for the ATI Radeon and FireGL graphics accelerators. + . + This package provides the Catalyst Control Center, Linux Edition + +Package: fglrx-modaliases +Architecture: amd64 i386 +Description: Identifiers supported by the ATI graphics driver + In order to identify what hardware is supported by Jockey, + there must be a static list of what the current driver in the Ubuntu + archive supports. + . + This package provides that list. + +Package: libamdxvba1 +Architecture: amd64 i386 +Depends: ${shlibs:Depends}, libc6, libstdc++5, ia32-libs [amd64] +Replaces: xorg-driver-fglrx (<= 2:8.543-0ubuntu2) +Description: AMD Unified Video Decoder library + This package provides the support for the AMD unified video + decoder library. This can be used for accelerated XvMC output. + . + Unfortunately, this package requires an unsupported library, + so it is not installed by default. --- fglrx-installer-8.620.orig/debian/10fglrx.in +++ fglrx-installer-8.620/debian/10fglrx.in @@ -0,0 +1,12 @@ +LIBGL_DRIVERS_PATH=/#DRIDIR#/dri +if [ `uname -m` = 'x86_64' ]; then + if [ -d /#DRIDIR32#/dri ]; then + LIBGL_DRIVERS_PATH=${LIBGL_DRIVERS_PATH}:/#DRIDIR32#/dri + if [ ! -z $LD_LIBRARY_PATH ]; then + LD_LIBRARY_PATH=$LD_LIBRARY_PATH: + fi + LD_LIBRARY_PATH=${LD_LIBRARY_PATH}/usr/lib32 + export LD_LIBRARY_PATH + fi +fi +export LIBGL_DRIVERS_PATH --- fglrx-installer-8.620.orig/debian/changelog.in +++ fglrx-installer-8.620/debian/changelog.in @@ -0,0 +1,299 @@ +fglrx-installer (2:8.600-0ubuntu2) jaunty; urgency=low + + * Update fglrx-rt-compat.patch. Thanks Alessio Igor Bogani (LP: #328856) + * Update location of fglrx-rt-compat.patch from debian/dkms/patches/patches + to debian/dkms/patches + + -- Mario Limonciello Tue, 31 Mar 2009 12:12:37 -0500 + +fglrx-installer (2:8.600-0ubuntu1) jaunty; urgency=low + + * New upstream release. (Closes LP: #313027, #314600) + - Fixes LP: #253988, #179042, #241176, #284408, #287229, #296497, + #288620, #289628 + * README.Debian: Update the update procedure a bit + + -- Bryce Harrington Tue, 17 Mar 2009 15:40:42 -0700 + +fglrx-installer (2:8.573-0ubuntu4) jaunty; urgency=low + + * debian/xorg-driver-fglrx.postinst: + - Transition start of atieventsd with priority 31. It needs to start after + GDM and oem-config to ensure there aren't any lockups. (LP: #330188) + * debian/rules: + - Start atieventsd at 31. + + -- Mario Limonciello Mon, 16 Feb 2009 16:52:25 -0600 + +fglrx-installer (2:8.573-0ubuntu3) jaunty; urgency=low + + * debian/10fglrx.in: + - Check if LD_LIBRARY_PATH is empty when we append to it. (LP: #323327) + + -- Mario Limonciello Mon, 09 Feb 2009 18:50:46 -0600 + +fglrx-installer (2:8.573-0ubuntu2) jaunty; urgency=low + + * debian/control: + - Add libxinerama1 to build depends. + * debian/xorg-driver-fglrx.preinst: + - Move user modifications out of the way for files that are stored in + /etc/ati when upgrading package. Unfortunately, although these files + are stored in /etc, AMD has indicated that they should not be treated + as conf files. (LP: 307643) + * debian/fglrx-kernel-source.prerm: + - Add in a check for old versions of fglrx that might have DKMS directories + sitting around. If any are found, they are removed so as to prevent possible + conflicts. (LP: #303148) + + -- Mario Limonciello Mon, 02 Feb 2009 14:31:34 -0600 + +fglrx-installer (2:8.573-0ubuntu1) jaunty; urgency=low + + * New upstream release. (9-1). + - This release still does *not* meet the Xorg server 1.6 ABI. + It is being uploaded to ensure that there are no other integration + related issues that come up. + + -- Mario Limonciello Thu, 29 Jan 2009 20:37:38 -0600 + +fglrx-installer (2:8.552-0ubuntu1) jaunty; urgency=low + + * New upstream release. + * debian/control: + - Don't list the graphics cards supported, this is a moving target + that is difficult to keep up with. (LP: #292436) + * Move replacements for kernel source into debian/dkms + * Add patch for RT support to debian/dkms (LP: #286961) + * debian/dkms.conf.in: + - Use RT patch. + + -- Mario Limonciello Thu, 13 Nov 2008 10:30:20 -0600 + +fglrx-installer (2:8.543-0ubuntu4) intrepid; urgency=low + + [ Mario Limonciello ] + * debian/rules: + - Don't copy the libAMDXvBA.so* into multiple packages + on AMD64 (LP: #287159) + * debian/control: + - xorg-driver-fglrx: Drop libamdxvba1 to suggests so that fglrx can be put + onto DVDs. + * Replace authatieventsd.sh with our own variation that works with KDM. + (LP: #38915) + + [ Matthias Klose ] + * debian/control: + - xorg-driver-fglrx: Drop dependency on ia32-libs [amd64], add dependencies + on lib32gcc1 [amd64], libc6-i386 [amd64]. + - libamdxvba1: Add dependency on ia32-libs [amd64]. + + -- Mario Limonciello Wed, 22 Oct 2008 11:55:59 -0500 + +fglrx-installer (2:8.543-0ubuntu3) intrepid; urgency=low + + * debian/control: + - Drop build-depends on libstdc++5. (LP: #271794) + - Drop build-depends on ia32-libs + - Install libAMDXvBA.so* into it's own package. + * debian/rules: + - Work around missing libstdc++5 at build-depends time. + * Add the following files to support this new binary package: + - debian/libamdxvba.postinst + - debian/libamdxvba.install.in + + -- Mario Limonciello Thu, 16 Oct 2008 15:04:46 -0500 + +fglrx-installer (2:8.543-0ubuntu2) intrepid; urgency=low + + * debian/control: + - Depends on linux-headers-generic | linux-headers to help + cover more of the 90 percent case that people are using the + generic kernel (LP: #284091) + + -- Mario Limonciello Thu, 16 Oct 2008 08:52:34 -0500 + +fglrx-installer (2:8.543-0ubuntu1) intrepid; urgency=low + + * New upstream release. (Closes lp: #247376) + * control: Re-enabled provides of xserver-xorg-video-2 since + this upload works with the current xserver. + * README.Debian: Itemize update procedure + + -- Bryce Harrington Tue, 14 Oct 2008 14:12:06 -0700 + +fglrx-installer (2:8.532-0ubuntu5) intrepid; urgency=low + + * control: xorg-driver-fglrx Provides: xserver-xorg-video-2. The + driver doesn't work with the current xserver, so no reason to + pretend that it would. This prevents breaking upgrades from hardy + where the driver would be updated and on reboot X would fail. + + -- Timo Aaltonen Thu, 25 Sep 2008 11:46:28 +0300 + +fglrx-installer (2:8.532-0ubuntu4) intrepid; urgency=low + + * Update 2.6.27 patch again. (LP: #266956) + + -- Mario Limonciello Sun, 21 Sep 2008 15:32:19 -0500 + +fglrx-installer (2:8.532-0ubuntu3) intrepid; urgency=low + + [ Alberto Milone (tseliot) ] + * debian/modaliases/fglrx_supported: + - Add "xorg-driver-fglrx" to the strings printed to + fglrx-modules.alias.override so that Jockey can + detect the name of the package to install (LP: #258641) + + [ Mario Limonciello ] + * debian/kernel-source-patches/fglrx_8.9_2.6.27.patch: + - Update to compile on x86_64 for 2.6.27 (LP: #266956) + + -- Mario Limonciello Sun, 21 Sep 2008 12:29:18 -0500 + +fglrx-installer (2:8.532-0ubuntu2) intrepid; urgency=low + + * debian/fglrx-kernel-source.patches: + - Install to DKMS patches directory (LP: #266956) + + -- Mario Limonciello Fri, 19 Sep 2008 08:49:21 -0500 + +fglrx-installer (2:8.532-0ubuntu1) intrepid; urgency=low + + * Add debian/kernel-source-patches/fglrx_8.9_2.6.27.patch + to allow compiling against 2.6.27. (LP: #266956) + * debian/dkms.conf.in: + - Use 2.6.27 patch when building against 2.6.27 + * debian/fglrx-kernel-source.install.in: + - Install patches in kernel-source-patches. + + -- Mario Limonciello Thu, 18 Sep 2008 12:08:46 -0500 + +fglrx-installer (2:8.522-0ubuntu4) intrepid; urgency=low + + * Rebuild against the new xserver-xorg-dev. + + -- Bryce Harrington Fri, 12 Sep 2008 00:54:13 +0000 + +fglrx-installer (2:8.522-0ubuntu3) intrepid; urgency=low + + "3rd time's a charm" + * Don't divert extensions either. Causes big breakage when starting X. + + -- Mario Limonciello Wed, 20 Aug 2008 12:47:26 -0500 + +fglrx-installer (2:8.522-0ubuntu2) intrepid; urgency=low + + * Don't install extensions directory as no additional + extensions are included in this version. + + -- Mario Limonciello Wed, 20 Aug 2008 12:38:10 -0500 + +fglrx-installer (2:8.522-0ubuntu1) intrepid; urgency=low + + * New upstream release. + * Drop 02_2.6.26_support.dpatch as 2.6.26 support is available now. + * debian/control: + - Conflict w/ pentium-builder (LP: #180831) + - Update nvidia conflicts (LP: #254969) + * Correct LIBGL_DRIVERS_PATH (LP: #250944) + * Cleanup diversion prerm scripts (LP: #257003) + + -- Mario Limonciello Wed, 20 Aug 2008 12:34:16 -0500 + +fglrx-installer (2:8.512-0ubuntu1) intrepid; urgency=low + + * New upstream release. + * Update 02_2.6.26_support.dpatch for changes in firegl_public.c. + * debian/control: + - Depend upon libstdc++5. + * debian/xorg-driver-fglrx.postrm: + - Clean up AMD64 diversions properly. + + -- Mario Limonciello Mon, 21 Jul 2008 13:58:26 -0500 + +fglrx-installer (2:8.501-0ubuntu3) intrepid; urgency=low + + * drop debian/patches/01_2.6.25.patch: + - Causes regressions on RadeonHD 3670 hardware. + + -- Mario Limonciello Mon, 07 Jul 2008 14:37:55 -0500 + +fglrx-installer (2:8.501-0ubuntu2) intrepid; urgency=low + + [ Mario Limonciello ] + * debian/fglrx-modaliases.install: + - Install to /usr/share/jockey/modaliases instead + * debian/control: + - Bump standards version to 3.8.0. + - Add fglrx-amdcccle to xorg-driver-fglrx Recommends + * debian/rules: + - Don't start atieventsd on package install as it steals X permissions + until the next reboot. + - Add support to apply patches to the development release. This is + determined by querying distro target in the changelog. + -- Don't use packages not intended for your distro! -- + * debian/README.Debian: + - Add a small blurb explaining kernel patches. + + [ Žilvinas Valinskas ] + * debian/patches/01_2.6.25.patch: + - Adds 2.6.25 support (valid for AMD's 8-5 release), at least until + AMD formally adds it. + * debian/patches/02_2.6.26.patch: + - Adds 2.6.26 support (valid for AMD's 8-6 release), at least until + AMD formally adds it. (LP: #239967) + + -- Mario Limonciello Mon, 07 Jul 2008 12:06:05 -0500 + +fglrx-installer (2:8.501-0ubuntu1) intrepid; urgency=low + + * New upstream release. + + -- Mario Limonciello Thu, 19 Jun 2008 01:46:54 -0500 + +fglrx-installer (2:8.493.1-0ubuntu5) intrepid; urgency=low + + * debian/replacements/* + - Include Makefile and make.sh that support passing kernel version + as a parameter until upstream resolves issues. + * debian/dkms.conf.in: + - Explicitly use kernel version as parameter to make scripts. + * debian/fglrx-kernel-source.in: + - Include our variants of make scripts since upstream hasn't fixed + there's yet. + + -- Mario Limonciello Thu, 12 Jun 2008 15:34:14 -0500 + +fglrx-installer (2:8.493.1-0ubuntu4) intrepid; urgency=low + + * debian/control: + - Force the Section to be restricted/misc instead of just restricted. + + -- Mario Limonciello Tue, 27 May 2008 15:26:38 -0500 + +fglrx-installer (2:8.493.1-0ubuntu3) intrepid; urgency=low + + * debian/control: + - Explicitly only indicate i386 and amd64 for ALL binary packages. We don't want + sparc, hppa, or lpia showing up. + + -- Mario Limonciello Tue, 27 May 2008 14:34:13 -0500 + +fglrx-installer (2:8.493.1-0ubuntu2) intrepid; urgency=low + + * debian/rules: + - Specify $(LIBDIR) for calculating modaliases. + Fixes transient failure on AMD64 boxes. + + -- Mario Limonciello Tue, 27 May 2008 14:23:21 -0500 + +fglrx-installer (2:8.493.1-0ubuntu1) intrepid; urgency=low + + * Initial release. + - This package was directly generated from the upstream AMD driver's built-in + scripts. By generating this way, the driver will always be in sync without + integration problems. + + -- Mario Limonciello Tue, 27 May 2008 10:50:16 -0500 + --- fglrx-installer-8.620.orig/debian/dkms/patches/missing-flush_tlb.patch +++ fglrx-installer-8.620/debian/dkms/patches/missing-flush_tlb.patch @@ -0,0 +1,12 @@ +--- a/firegl_public.c 2009-06-30 20:18:48.000000000 +0200 ++++ b/firegl_public.c 2009-06-30 20:19:51.000000000 +0200 +@@ -2318,7 +2318,7 @@ + * kernel < 2.6.27, on_each_cpu has 4 parameters. + * kernel >= 2.6.27, on_each_cpu has 3 parameters (removed the "retry" parameter) + */ +-#if defined(__x86_64__) && (defined(__SMP__) || defined(CONFIG_SMP)) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) ++#if defined(CONFIG_SMP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) + # if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) + on_each_cpu(KCL_flush_tlb_one, &va, 1, 1); + # else + --- fglrx-installer-8.620.orig/debian/dkms/patches/fglrx-2.6.29-debian.patch +++ fglrx-installer-8.620/debian/dkms/patches/fglrx-2.6.29-debian.patch @@ -0,0 +1,1755 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 02-2.6.29-support.dpatch by Patrick Matthäi +## +## DP: Support for Linux 2.6.29. +## Disable this patch if you want to use this fglrx version with another +## Linux version as 2.6.29, because this patch let it FTBFS with any other +## Kernel version. + +@DPATCH@ + +diff -Naur a/2.6.x/Makefile b/2.6.x/Makefile +--- a/2.6.x/Makefile 2009-04-18 09:15:54.000000000 +0200 ++++ b/2.6.x/Makefile 2009-04-18 09:19:08.000000000 +0200 +@@ -55,7 +55,10 @@ + kcl_pci.h \ + kcl_str.h \ + kcl_type.h \ +- kcl_wait.h ++ kcl_wait.h \ ++ acpica-acconfig.h \ ++ acpica-aclocal.h \ ++ acpica-acobject.h + + drm-hdrs += drm.h drmP.h drm_os_linux.h drm_proc.h drm_compat.h + +diff -Naur a/acpica-acconfig.h b/acpica-acconfig.h +--- a/acpica-acconfig.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/acpica-acconfig.h 2009-04-18 09:19:08.000000000 +0200 +@@ -0,0 +1,217 @@ ++/****************************************************************************** ++ * ++ * Name: acconfig.h - Global configuration constants ++ * ++ *****************************************************************************/ ++ ++/* ++ * Copyright (C) 2000 - 2008, Intel Corp. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions, and the following disclaimer, ++ * without modification. ++ * 2. Redistributions in binary form must reproduce at minimum a disclaimer ++ * substantially similar to the "NO WARRANTY" disclaimer below ++ * ("Disclaimer") and any redistribution must be conditioned upon ++ * including a substantially similar Disclaimer requirement for further ++ * binary redistribution. ++ * 3. Neither the names of the above-listed copyright holders nor the names ++ * of any contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * Alternatively, this software may be distributed under the terms of the ++ * GNU General Public License ("GPL") version 2 as published by the Free ++ * Software Foundation. ++ * ++ * NO WARRANTY ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR ++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, ++ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ++ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGES. ++ */ ++ ++#ifndef _ACCONFIG_H ++#define _ACCONFIG_H ++ ++/****************************************************************************** ++ * ++ * Configuration options ++ * ++ *****************************************************************************/ ++ ++/* ++ * ACPI_DEBUG_OUTPUT - This switch enables all the debug facilities of the ++ * ACPI subsystem. This includes the DEBUG_PRINT output ++ * statements. When disabled, all DEBUG_PRINT ++ * statements are compiled out. ++ * ++ * ACPI_APPLICATION - Use this switch if the subsystem is going to be run ++ * at the application level. ++ * ++ */ ++ ++/* ++ * OS name, used for the _OS object. The _OS object is essentially obsolete, ++ * but there is a large base of ASL/AML code in existing machines that check ++ * for the string below. The use of this string usually guarantees that ++ * the ASL will execute down the most tested code path. Also, there is some ++ * code that will not execute the _OSI method unless _OS matches the string ++ * below. Therefore, change this string at your own risk. ++ */ ++#define ACPI_OS_NAME "Microsoft Windows NT" ++ ++/* Maximum objects in the various object caches */ ++ ++#define ACPI_MAX_STATE_CACHE_DEPTH 96 /* State objects */ ++#define ACPI_MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */ ++#define ACPI_MAX_EXTPARSE_CACHE_DEPTH 96 /* Parse tree objects */ ++#define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ ++#define ACPI_MAX_NAMESPACE_CACHE_DEPTH 96 /* Namespace objects */ ++ ++/* ++ * Should the subsystem abort the loading of an ACPI table if the ++ * table checksum is incorrect? ++ */ ++#define ACPI_CHECKSUM_ABORT FALSE ++ ++/****************************************************************************** ++ * ++ * Subsystem Constants ++ * ++ *****************************************************************************/ ++ ++/* Version of ACPI supported */ ++ ++#define ACPI_CA_SUPPORT_LEVEL 3 ++ ++/* Maximum count for a semaphore object */ ++ ++#define ACPI_MAX_SEMAPHORE_COUNT 256 ++ ++/* Maximum object reference count (detects object deletion issues) */ ++ ++#define ACPI_MAX_REFERENCE_COUNT 0x1000 ++ ++/* Size of cached memory mapping for system memory operation region */ ++ ++#define ACPI_SYSMEM_REGION_WINDOW_SIZE 4096 ++ ++/* owner_id tracking. 8 entries allows for 255 owner_ids */ ++ ++#define ACPI_NUM_OWNERID_MASKS 8 ++ ++/* Size of the root table array is increased by this increment */ ++ ++#define ACPI_ROOT_TABLE_SIZE_INCREMENT 4 ++ ++/* Maximum number of While() loop iterations before forced abort */ ++ ++#define ACPI_MAX_LOOP_ITERATIONS 0xFFFF ++ ++/****************************************************************************** ++ * ++ * ACPI Specification constants (Do not change unless the specification changes) ++ * ++ *****************************************************************************/ ++ ++/* Number of distinct GPE register blocks and register width */ ++ ++#define ACPI_MAX_GPE_BLOCKS 2 ++#define ACPI_GPE_REGISTER_WIDTH 8 ++ ++/* Method info (in WALK_STATE), containing local variables and argumetns */ ++ ++#define ACPI_METHOD_NUM_LOCALS 8 ++#define ACPI_METHOD_MAX_LOCAL 7 ++ ++#define ACPI_METHOD_NUM_ARGS 7 ++#define ACPI_METHOD_MAX_ARG 6 ++ ++/* Length of _HID, _UID, _CID, and UUID values */ ++ ++#define ACPI_DEVICE_ID_LENGTH 0x09 ++#define ACPI_MAX_CID_LENGTH 48 ++#define ACPI_UUID_LENGTH 16 ++ ++/* ++ * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG ++ */ ++#define ACPI_OBJ_NUM_OPERANDS 8 ++#define ACPI_OBJ_MAX_OPERAND 7 ++ ++/* Number of elements in the Result Stack frame, can be an arbitrary value */ ++ ++#define ACPI_RESULTS_FRAME_OBJ_NUM 8 ++ ++/* ++ * Maximal number of elements the Result Stack can contain, ++ * it may be an arbitray value not exceeding the types of ++ * result_size and result_count (now u8). ++ */ ++#define ACPI_RESULTS_OBJ_NUM_MAX 255 ++ ++/* Names within the namespace are 4 bytes long */ ++ ++#define ACPI_NAME_SIZE 4 ++#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */ ++#define ACPI_PATH_SEPARATOR '.' ++ ++/* Sizes for ACPI table headers */ ++ ++#define ACPI_OEM_ID_SIZE 6 ++#define ACPI_OEM_TABLE_ID_SIZE 8 ++ ++/* Constants used in searching for the RSDP in low memory */ ++ ++#define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */ ++#define ACPI_EBDA_PTR_LENGTH 2 ++#define ACPI_EBDA_WINDOW_SIZE 1024 ++#define ACPI_HI_RSDP_WINDOW_BASE 0x000E0000 /* Physical Address */ ++#define ACPI_HI_RSDP_WINDOW_SIZE 0x00020000 ++#define ACPI_RSDP_SCAN_STEP 16 ++ ++/* Operation regions */ ++ ++#define ACPI_NUM_PREDEFINED_REGIONS 8 ++#define ACPI_USER_REGION_BEGIN 0x80 ++ ++/* Maximum space_ids for Operation Regions */ ++ ++#define ACPI_MAX_ADDRESS_SPACE 255 ++ ++/* Array sizes. Used for range checking also */ ++ ++#define ACPI_MAX_MATCH_OPCODE 5 ++ ++/* RSDP checksums */ ++ ++#define ACPI_RSDP_CHECKSUM_LENGTH 20 ++#define ACPI_RSDP_XCHECKSUM_LENGTH 36 ++ ++/* SMBus bidirectional buffer size */ ++ ++#define ACPI_SMBUS_BUFFER_SIZE 34 ++ ++/****************************************************************************** ++ * ++ * ACPI AML Debugger ++ * ++ *****************************************************************************/ ++ ++#define ACPI_DEBUGGER_MAX_ARGS 8 /* Must be max method args + 1 */ ++ ++#define ACPI_DEBUGGER_COMMAND_PROMPT '-' ++#define ACPI_DEBUGGER_EXECUTE_PROMPT '%' ++ ++#endif /* _ACCONFIG_H */ +diff -Naur a/acpica-aclocal.h b/acpica-aclocal.h +--- a/acpica-aclocal.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/acpica-aclocal.h 2009-04-18 09:19:08.000000000 +0200 +@@ -0,0 +1,990 @@ ++/****************************************************************************** ++ * ++ * Name: aclocal.h - Internal data types used across the ACPI subsystem ++ * ++ *****************************************************************************/ ++ ++/* ++ * Copyright (C) 2000 - 2008, Intel Corp. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions, and the following disclaimer, ++ * without modification. ++ * 2. Redistributions in binary form must reproduce at minimum a disclaimer ++ * substantially similar to the "NO WARRANTY" disclaimer below ++ * ("Disclaimer") and any redistribution must be conditioned upon ++ * including a substantially similar Disclaimer requirement for further ++ * binary redistribution. ++ * 3. Neither the names of the above-listed copyright holders nor the names ++ * of any contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * Alternatively, this software may be distributed under the terms of the ++ * GNU General Public License ("GPL") version 2 as published by the Free ++ * Software Foundation. ++ * ++ * NO WARRANTY ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR ++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, ++ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ++ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGES. ++ */ ++ ++#ifndef __ACLOCAL_H__ ++#define __ACLOCAL_H__ ++ ++/* acpisrc:struct_defs -- for acpisrc conversion */ ++ ++#define ACPI_SERIALIZED 0xFF ++ ++typedef u32 acpi_mutex_handle; ++#define ACPI_GLOBAL_LOCK (acpi_semaphore) (-1) ++ ++/* Total number of aml opcodes defined */ ++ ++#define AML_NUM_OPCODES 0x7F ++ ++/* Forward declarations */ ++ ++struct acpi_walk_state; ++struct acpi_obj_mutex; ++union acpi_parse_object; ++ ++/***************************************************************************** ++ * ++ * Mutex typedefs and structs ++ * ++ ****************************************************************************/ ++ ++/* ++ * Predefined handles for the mutex objects used within the subsystem ++ * All mutex objects are automatically created by acpi_ut_mutex_initialize. ++ * ++ * The acquire/release ordering protocol is implied via this list. Mutexes ++ * with a lower value must be acquired before mutexes with a higher value. ++ * ++ * NOTE: any changes here must be reflected in the acpi_gbl_mutex_names ++ * table below also! ++ */ ++#define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */ ++#define ACPI_MTX_NAMESPACE 1 /* ACPI Namespace */ ++#define ACPI_MTX_TABLES 2 /* Data for ACPI tables */ ++#define ACPI_MTX_EVENTS 3 /* Data for ACPI events */ ++#define ACPI_MTX_CACHES 4 /* Internal caches, general purposes */ ++#define ACPI_MTX_MEMORY 5 /* Debug memory tracking lists */ ++#define ACPI_MTX_DEBUG_CMD_COMPLETE 6 /* AML debugger */ ++#define ACPI_MTX_DEBUG_CMD_READY 7 /* AML debugger */ ++ ++#define ACPI_MAX_MUTEX 7 ++#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1 ++ ++#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) ++#ifdef DEFINE_ACPI_GLOBALS ++ ++/* Debug names for the mutexes above */ ++ ++static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = { ++ "ACPI_MTX_Interpreter", ++ "ACPI_MTX_Namespace", ++ "ACPI_MTX_Tables", ++ "ACPI_MTX_Events", ++ "ACPI_MTX_Caches", ++ "ACPI_MTX_Memory", ++ "ACPI_MTX_CommandComplete", ++ "ACPI_MTX_CommandReady" ++}; ++ ++#endif ++#endif ++ ++/* ++ * Predefined handles for spinlocks used within the subsystem. ++ * These spinlocks are created by acpi_ut_mutex_initialize ++ */ ++#define ACPI_LOCK_GPES 0 ++#define ACPI_LOCK_HARDWARE 1 ++ ++#define ACPI_MAX_LOCK 1 ++#define ACPI_NUM_LOCK ACPI_MAX_LOCK+1 ++ ++/* This Thread ID means that the mutex is not in use (unlocked) */ ++ ++#define ACPI_MUTEX_NOT_ACQUIRED (acpi_thread_id) 0 ++ ++/* Table for the global mutexes */ ++ ++struct acpi_mutex_info { ++ acpi_mutex mutex; ++ u32 use_count; ++ acpi_thread_id thread_id; ++}; ++ ++/* Lock flag parameter for various interfaces */ ++ ++#define ACPI_MTX_DO_NOT_LOCK 0 ++#define ACPI_MTX_LOCK 1 ++ ++/* Field access granularities */ ++ ++#define ACPI_FIELD_BYTE_GRANULARITY 1 ++#define ACPI_FIELD_WORD_GRANULARITY 2 ++#define ACPI_FIELD_DWORD_GRANULARITY 4 ++#define ACPI_FIELD_QWORD_GRANULARITY 8 ++ ++#define ACPI_ENTRY_NOT_FOUND NULL ++ ++/***************************************************************************** ++ * ++ * Namespace typedefs and structs ++ * ++ ****************************************************************************/ ++ ++/* Operational modes of the AML interpreter/scanner */ ++ ++typedef enum { ++ ACPI_IMODE_LOAD_PASS1 = 0x01, ++ ACPI_IMODE_LOAD_PASS2 = 0x02, ++ ACPI_IMODE_EXECUTE = 0x03 ++} acpi_interpreter_mode; ++ ++/* ++ * The Namespace Node describes a named object that appears in the AML. ++ * descriptor_type is used to differentiate between internal descriptors. ++ * ++ * The node is optimized for both 32-bit and 64-bit platforms: ++ * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case. ++ * ++ * Note: The descriptor_type and Type fields must appear in the identical ++ * position in both the struct acpi_namespace_node and union acpi_operand_object ++ * structures. ++ */ ++struct acpi_namespace_node { ++ union acpi_operand_object *object; /* Interpreter object */ ++ u8 descriptor_type; /* Differentiate object descriptor types */ ++ u8 type; /* ACPI Type associated with this name */ ++ u8 flags; /* Miscellaneous flags */ ++ acpi_owner_id owner_id; /* Node creator */ ++ union acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */ ++ struct acpi_namespace_node *child; /* First child */ ++ struct acpi_namespace_node *peer; /* Peer. Parent if ANOBJ_END_OF_PEER_LIST set */ ++ ++ /* ++ * The following fields are used by the ASL compiler and disassembler only ++ */ ++#ifdef ACPI_LARGE_NAMESPACE_NODE ++ union acpi_parse_object *op; ++ u32 value; ++ u32 length; ++#endif ++}; ++ ++/* Namespace Node flags */ ++ ++#define ANOBJ_END_OF_PEER_LIST 0x01 /* End-of-list, Peer field points to parent */ ++#define ANOBJ_TEMPORARY 0x02 /* Node is create by a method and is temporary */ ++#define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */ ++#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */ ++#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */ ++#define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */ ++ ++#define ANOBJ_IS_EXTERNAL 0x08 /* i_aSL only: This object created via External() */ ++#define ANOBJ_METHOD_NO_RETVAL 0x10 /* i_aSL only: Method has no return value */ ++#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* i_aSL only: Method has at least one return value */ ++#define ANOBJ_IS_BIT_OFFSET 0x40 /* i_aSL only: Reference is a bit offset */ ++#define ANOBJ_IS_REFERENCED 0x80 /* i_aSL only: Object was referenced */ ++ ++/* One internal RSDT for table management */ ++ ++struct acpi_internal_rsdt { ++ struct acpi_table_desc *tables; ++ u32 count; ++ u32 size; ++ u8 flags; ++}; ++ ++/* Flags for above */ ++ ++#define ACPI_ROOT_ORIGIN_UNKNOWN (0) /* ~ORIGIN_ALLOCATED */ ++#define ACPI_ROOT_ORIGIN_ALLOCATED (1) ++#define ACPI_ROOT_ALLOW_RESIZE (2) ++ ++/* Predefined (fixed) table indexes */ ++ ++#define ACPI_TABLE_INDEX_DSDT (0) ++#define ACPI_TABLE_INDEX_FACS (1) ++ ++struct acpi_find_context { ++ char *search_for; ++ acpi_handle *list; ++ u32 *count; ++}; ++ ++struct acpi_ns_search_data { ++ struct acpi_namespace_node *node; ++}; ++ ++/* Object types used during package copies */ ++ ++#define ACPI_COPY_TYPE_SIMPLE 0 ++#define ACPI_COPY_TYPE_PACKAGE 1 ++ ++/* Info structure used to convert external<->internal namestrings */ ++ ++struct acpi_namestring_info { ++ const char *external_name; ++ const char *next_external_char; ++ char *internal_name; ++ u32 length; ++ u32 num_segments; ++ u32 num_carats; ++ u8 fully_qualified; ++}; ++ ++/* Field creation info */ ++ ++struct acpi_create_field_info { ++ struct acpi_namespace_node *region_node; ++ struct acpi_namespace_node *field_node; ++ struct acpi_namespace_node *register_node; ++ struct acpi_namespace_node *data_register_node; ++ u32 bank_value; ++ u32 field_bit_position; ++ u32 field_bit_length; ++ u8 field_flags; ++ u8 attribute; ++ u8 field_type; ++}; ++ ++typedef ++acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state); ++ ++/* ++ * Bitmapped ACPI types. Used internally only ++ */ ++#define ACPI_BTYPE_ANY 0x00000000 ++#define ACPI_BTYPE_INTEGER 0x00000001 ++#define ACPI_BTYPE_STRING 0x00000002 ++#define ACPI_BTYPE_BUFFER 0x00000004 ++#define ACPI_BTYPE_PACKAGE 0x00000008 ++#define ACPI_BTYPE_FIELD_UNIT 0x00000010 ++#define ACPI_BTYPE_DEVICE 0x00000020 ++#define ACPI_BTYPE_EVENT 0x00000040 ++#define ACPI_BTYPE_METHOD 0x00000080 ++#define ACPI_BTYPE_MUTEX 0x00000100 ++#define ACPI_BTYPE_REGION 0x00000200 ++#define ACPI_BTYPE_POWER 0x00000400 ++#define ACPI_BTYPE_PROCESSOR 0x00000800 ++#define ACPI_BTYPE_THERMAL 0x00001000 ++#define ACPI_BTYPE_BUFFER_FIELD 0x00002000 ++#define ACPI_BTYPE_DDB_HANDLE 0x00004000 ++#define ACPI_BTYPE_DEBUG_OBJECT 0x00008000 ++#define ACPI_BTYPE_REFERENCE 0x00010000 ++#define ACPI_BTYPE_RESOURCE 0x00020000 ++ ++#define ACPI_BTYPE_COMPUTE_DATA (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER) ++ ++#define ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_PACKAGE) ++#define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE) ++#define ACPI_BTYPE_DEVICE_OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR) ++#define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */ ++#define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF ++ ++/* ++ * Information structure for ACPI predefined names. ++ * Each entry in the table contains the following items: ++ * ++ * Name - The ACPI reserved name ++ * param_count - Number of arguments to the method ++ * expected_return_btypes - Allowed type(s) for the return value ++ */ ++struct acpi_name_info { ++ char name[ACPI_NAME_SIZE]; ++ u8 param_count; ++ u8 expected_btypes; ++}; ++ ++/* ++ * Secondary information structures for ACPI predefined objects that return ++ * package objects. This structure appears as the next entry in the table ++ * after the NAME_INFO structure above. ++ * ++ * The reason for this is to minimize the size of the predefined name table. ++ */ ++ ++/* ++ * Used for ACPI_PTYPE1_FIXED, ACPI_PTYPE1_VAR, ACPI_PTYPE2, ++ * ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT ++ */ ++struct acpi_package_info { ++ u8 type; ++ u8 object_type1; ++ u8 count1; ++ u8 object_type2; ++ u8 count2; ++ u8 reserved; ++}; ++ ++/* Used for ACPI_PTYPE2_FIXED */ ++ ++struct acpi_package_info2 { ++ u8 type; ++ u8 count; ++ u8 object_type[4]; ++}; ++ ++/* Used for ACPI_PTYPE1_OPTION */ ++ ++struct acpi_package_info3 { ++ u8 type; ++ u8 count; ++ u8 object_type[2]; ++ u8 tail_object_type; ++ u8 reserved; ++}; ++ ++union acpi_predefined_info { ++ struct acpi_name_info info; ++ struct acpi_package_info ret_info; ++ struct acpi_package_info2 ret_info2; ++ struct acpi_package_info3 ret_info3; ++}; ++ ++/* ++ * Bitmapped return value types ++ * Note: the actual data types must be contiguous, a loop in nspredef.c ++ * depends on this. ++ */ ++#define ACPI_RTYPE_ANY 0x00 ++#define ACPI_RTYPE_NONE 0x01 ++#define ACPI_RTYPE_INTEGER 0x02 ++#define ACPI_RTYPE_STRING 0x04 ++#define ACPI_RTYPE_BUFFER 0x08 ++#define ACPI_RTYPE_PACKAGE 0x10 ++#define ACPI_RTYPE_REFERENCE 0x20 ++#define ACPI_RTYPE_ALL 0x3F ++ ++#define ACPI_NUM_RTYPES 5 /* Number of actual object types */ ++ ++/***************************************************************************** ++ * ++ * Event typedefs and structs ++ * ++ ****************************************************************************/ ++ ++/* Dispatch info for each GPE -- either a method or handler, cannot be both */ ++ ++struct acpi_handler_info { ++ acpi_event_handler address; /* Address of handler, if any */ ++ void *context; /* Context to be passed to handler */ ++ struct acpi_namespace_node *method_node; /* Method node for this GPE level (saved) */ ++}; ++ ++union acpi_gpe_dispatch_info { ++ struct acpi_namespace_node *method_node; /* Method node for this GPE level */ ++ struct acpi_handler_info *handler; ++}; ++ ++/* ++ * Information about a GPE, one per each GPE in an array. ++ * NOTE: Important to keep this struct as small as possible. ++ */ ++struct acpi_gpe_event_info { ++ union acpi_gpe_dispatch_info dispatch; /* Either Method or Handler */ ++ struct acpi_gpe_register_info *register_info; /* Backpointer to register info */ ++ u8 flags; /* Misc info about this GPE */ ++ u8 gpe_number; /* This GPE */ ++}; ++ ++/* Information about a GPE register pair, one per each status/enable pair in an array */ ++ ++struct acpi_gpe_register_info { ++ struct acpi_generic_address status_address; /* Address of status reg */ ++ struct acpi_generic_address enable_address; /* Address of enable reg */ ++ u8 enable_for_wake; /* GPEs to keep enabled when sleeping */ ++ u8 enable_for_run; /* GPEs to keep enabled when running */ ++ u8 base_gpe_number; /* Base GPE number for this register */ ++}; ++ ++/* ++ * Information about a GPE register block, one per each installed block -- ++ * GPE0, GPE1, and one per each installed GPE Block Device. ++ */ ++struct acpi_gpe_block_info { ++ struct acpi_namespace_node *node; ++ struct acpi_gpe_block_info *previous; ++ struct acpi_gpe_block_info *next; ++ struct acpi_gpe_xrupt_info *xrupt_block; /* Backpointer to interrupt block */ ++ struct acpi_gpe_register_info *register_info; /* One per GPE register pair */ ++ struct acpi_gpe_event_info *event_info; /* One for each GPE */ ++ struct acpi_generic_address block_address; /* Base address of the block */ ++ u32 register_count; /* Number of register pairs in block */ ++ u8 block_base_number; /* Base GPE number for this block */ ++}; ++ ++/* Information about GPE interrupt handlers, one per each interrupt level used for GPEs */ ++ ++struct acpi_gpe_xrupt_info { ++ struct acpi_gpe_xrupt_info *previous; ++ struct acpi_gpe_xrupt_info *next; ++ struct acpi_gpe_block_info *gpe_block_list_head; /* List of GPE blocks for this xrupt */ ++ u32 interrupt_number; /* System interrupt number */ ++}; ++ ++struct acpi_gpe_walk_info { ++ struct acpi_namespace_node *gpe_device; ++ struct acpi_gpe_block_info *gpe_block; ++}; ++ ++struct acpi_gpe_device_info { ++ u32 index; ++ u32 next_block_base_index; ++ acpi_status status; ++ struct acpi_namespace_node *gpe_device; ++}; ++ ++typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *gpe_xrupt_info, ++ struct acpi_gpe_block_info *gpe_block, void *context); ++ ++/* Information about each particular fixed event */ ++ ++struct acpi_fixed_event_handler { ++ acpi_event_handler handler; /* Address of handler. */ ++ void *context; /* Context to be passed to handler */ ++}; ++ ++struct acpi_fixed_event_info { ++ u8 status_register_id; ++ u8 enable_register_id; ++ u16 status_bit_mask; ++ u16 enable_bit_mask; ++}; ++ ++/* Information used during field processing */ ++ ++struct acpi_field_info { ++ u8 skip_field; ++ u8 field_flag; ++ u32 pkg_length; ++}; ++ ++/***************************************************************************** ++ * ++ * Generic "state" object for stacks ++ * ++ ****************************************************************************/ ++ ++#define ACPI_CONTROL_NORMAL 0xC0 ++#define ACPI_CONTROL_CONDITIONAL_EXECUTING 0xC1 ++#define ACPI_CONTROL_PREDICATE_EXECUTING 0xC2 ++#define ACPI_CONTROL_PREDICATE_FALSE 0xC3 ++#define ACPI_CONTROL_PREDICATE_TRUE 0xC4 ++ ++#define ACPI_STATE_COMMON \ ++ void *next; \ ++ u8 descriptor_type; /* To differentiate various internal objs */\ ++ u8 flags; \ ++ u16 value; \ ++ u16 state; ++ ++ /* There are 2 bytes available here until the next natural alignment boundary */ ++ ++struct acpi_common_state { ++ACPI_STATE_COMMON}; ++ ++/* ++ * Update state - used to traverse complex objects such as packages ++ */ ++struct acpi_update_state { ++ ACPI_STATE_COMMON union acpi_operand_object *object; ++}; ++ ++/* ++ * Pkg state - used to traverse nested package structures ++ */ ++struct acpi_pkg_state { ++ ACPI_STATE_COMMON u16 index; ++ union acpi_operand_object *source_object; ++ union acpi_operand_object *dest_object; ++ struct acpi_walk_state *walk_state; ++ void *this_target_obj; ++ u32 num_packages; ++}; ++ ++/* ++ * Control state - one per if/else and while constructs. ++ * Allows nesting of these constructs ++ */ ++struct acpi_control_state { ++ ACPI_STATE_COMMON u16 opcode; ++ union acpi_parse_object *predicate_op; ++ u8 *aml_predicate_start; /* Start of if/while predicate */ ++ u8 *package_end; /* End of if/while block */ ++ u32 loop_count; /* While() loop counter */ ++}; ++ ++/* ++ * Scope state - current scope during namespace lookups ++ */ ++struct acpi_scope_state { ++ ACPI_STATE_COMMON struct acpi_namespace_node *node; ++}; ++ ++struct acpi_pscope_state { ++ ACPI_STATE_COMMON u32 arg_count; /* Number of fixed arguments */ ++ union acpi_parse_object *op; /* Current op being parsed */ ++ u8 *arg_end; /* Current argument end */ ++ u8 *pkg_end; /* Current package end */ ++ u32 arg_list; /* Next argument to parse */ ++}; ++ ++/* ++ * Thread state - one per thread across multiple walk states. Multiple walk ++ * states are created when there are nested control methods executing. ++ */ ++struct acpi_thread_state { ++ ACPI_STATE_COMMON u8 current_sync_level; /* Mutex Sync (nested acquire) level */ ++ struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */ ++ union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */ ++ acpi_thread_id thread_id; /* Running thread ID */ ++}; ++ ++/* ++ * Result values - used to accumulate the results of nested ++ * AML arguments ++ */ ++struct acpi_result_values { ++ ACPI_STATE_COMMON ++ union acpi_operand_object *obj_desc[ACPI_RESULTS_FRAME_OBJ_NUM]; ++}; ++ ++typedef ++acpi_status(*acpi_parse_downwards) (struct acpi_walk_state * walk_state, ++ union acpi_parse_object ** out_op); ++ ++typedef acpi_status(*acpi_parse_upwards) (struct acpi_walk_state * walk_state); ++ ++/* ++ * Notify info - used to pass info to the deferred notify ++ * handler/dispatcher. ++ */ ++struct acpi_notify_info { ++ ACPI_STATE_COMMON struct acpi_namespace_node *node; ++ union acpi_operand_object *handler_obj; ++}; ++ ++/* Generic state is union of structs above */ ++ ++union acpi_generic_state { ++ struct acpi_common_state common; ++ struct acpi_control_state control; ++ struct acpi_update_state update; ++ struct acpi_scope_state scope; ++ struct acpi_pscope_state parse_scope; ++ struct acpi_pkg_state pkg; ++ struct acpi_thread_state thread; ++ struct acpi_result_values results; ++ struct acpi_notify_info notify; ++}; ++ ++/***************************************************************************** ++ * ++ * Interpreter typedefs and structs ++ * ++ ****************************************************************************/ ++ ++typedef acpi_status(*ACPI_EXECUTE_OP) (struct acpi_walk_state * walk_state); ++ ++/***************************************************************************** ++ * ++ * Parser typedefs and structs ++ * ++ ****************************************************************************/ ++ ++/* ++ * AML opcode, name, and argument layout ++ */ ++struct acpi_opcode_info { ++#if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT) ++ char *name; /* Opcode name (disassembler/debug only) */ ++#endif ++ u32 parse_args; /* Grammar/Parse time arguments */ ++ u32 runtime_args; /* Interpret time arguments */ ++ u16 flags; /* Misc flags */ ++ u8 object_type; /* Corresponding internal object type */ ++ u8 class; /* Opcode class */ ++ u8 type; /* Opcode type */ ++}; ++ ++union acpi_parse_value { ++ acpi_integer integer; /* Integer constant (Up to 64 bits) */ ++ struct uint64_struct integer64; /* Structure overlay for 2 32-bit Dwords */ ++ u32 size; /* bytelist or field size */ ++ char *string; /* NULL terminated string */ ++ u8 *buffer; /* buffer or string */ ++ char *name; /* NULL terminated string */ ++ union acpi_parse_object *arg; /* arguments and contained ops */ ++}; ++ ++#ifdef ACPI_DISASSEMBLER ++#define ACPI_DISASM_ONLY_MEMBERS(a) a; ++#else ++#define ACPI_DISASM_ONLY_MEMBERS(a) ++#endif ++ ++#define ACPI_PARSE_COMMON \ ++ union acpi_parse_object *parent; /* Parent op */\ ++ u8 descriptor_type; /* To differentiate various internal objs */\ ++ u8 flags; /* Type of Op */\ ++ u16 aml_opcode; /* AML opcode */\ ++ u32 aml_offset; /* Offset of declaration in AML */\ ++ union acpi_parse_object *next; /* Next op */\ ++ struct acpi_namespace_node *node; /* For use by interpreter */\ ++ union acpi_parse_value value; /* Value or args associated with the opcode */\ ++ u8 arg_list_length; /* Number of elements in the arg list */\ ++ ACPI_DISASM_ONLY_MEMBERS (\ ++ u8 disasm_flags; /* Used during AML disassembly */\ ++ u8 disasm_opcode; /* Subtype used for disassembly */\ ++ char aml_op_name[16]) /* Op name (debug only) */ ++ ++#define ACPI_DASM_BUFFER 0x00 ++#define ACPI_DASM_RESOURCE 0x01 ++#define ACPI_DASM_STRING 0x02 ++#define ACPI_DASM_UNICODE 0x03 ++#define ACPI_DASM_EISAID 0x04 ++#define ACPI_DASM_MATCHOP 0x05 ++#define ACPI_DASM_LNOT_PREFIX 0x06 ++#define ACPI_DASM_LNOT_SUFFIX 0x07 ++#define ACPI_DASM_IGNORE 0x08 ++ ++/* ++ * Generic operation (for example: If, While, Store) ++ */ ++struct acpi_parse_obj_common { ++ACPI_PARSE_COMMON}; ++ ++/* ++ * Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and op_regions), ++ * and bytelists. ++ */ ++struct acpi_parse_obj_named { ++ ACPI_PARSE_COMMON u8 *path; ++ u8 *data; /* AML body or bytelist data */ ++ u32 length; /* AML length */ ++ u32 name; /* 4-byte name or zero if no name */ ++}; ++ ++/* This version is used by the i_aSL compiler only */ ++ ++#define ACPI_MAX_PARSEOP_NAME 20 ++ ++struct acpi_parse_obj_asl { ++ ACPI_PARSE_COMMON union acpi_parse_object *child; ++ union acpi_parse_object *parent_method; ++ char *filename; ++ char *external_name; ++ char *namepath; ++ char name_seg[4]; ++ u32 extra_value; ++ u32 column; ++ u32 line_number; ++ u32 logical_line_number; ++ u32 logical_byte_offset; ++ u32 end_line; ++ u32 end_logical_line; ++ u32 acpi_btype; ++ u32 aml_length; ++ u32 aml_subtree_length; ++ u32 final_aml_length; ++ u32 final_aml_offset; ++ u32 compile_flags; ++ u16 parse_opcode; ++ u8 aml_opcode_length; ++ u8 aml_pkg_len_bytes; ++ u8 extra; ++ char parse_op_name[ACPI_MAX_PARSEOP_NAME]; ++}; ++ ++union acpi_parse_object { ++ struct acpi_parse_obj_common common; ++ struct acpi_parse_obj_named named; ++ struct acpi_parse_obj_asl asl; ++}; ++ ++/* ++ * Parse state - one state per parser invocation and each control ++ * method. ++ */ ++struct acpi_parse_state { ++ u8 *aml_start; /* First AML byte */ ++ u8 *aml; /* Next AML byte */ ++ u8 *aml_end; /* (last + 1) AML byte */ ++ u8 *pkg_start; /* Current package begin */ ++ u8 *pkg_end; /* Current package end */ ++ union acpi_parse_object *start_op; /* Root of parse tree */ ++ struct acpi_namespace_node *start_node; ++ union acpi_generic_state *scope; /* Current scope */ ++ union acpi_parse_object *start_scope; ++ u32 aml_size; ++}; ++ ++/* Parse object flags */ ++ ++#define ACPI_PARSEOP_GENERIC 0x01 ++#define ACPI_PARSEOP_NAMED 0x02 ++#define ACPI_PARSEOP_DEFERRED 0x04 ++#define ACPI_PARSEOP_BYTELIST 0x08 ++#define ACPI_PARSEOP_IN_STACK 0x10 ++#define ACPI_PARSEOP_TARGET 0x20 ++#define ACPI_PARSEOP_IN_CACHE 0x80 ++ ++/* Parse object disasm_flags */ ++ ++#define ACPI_PARSEOP_IGNORE 0x01 ++#define ACPI_PARSEOP_PARAMLIST 0x02 ++#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 ++#define ACPI_PARSEOP_SPECIAL 0x10 ++ ++/***************************************************************************** ++ * ++ * Hardware (ACPI registers) and PNP ++ * ++ ****************************************************************************/ ++ ++struct acpi_bit_register_info { ++ u8 parent_register; ++ u8 bit_position; ++ u16 access_bit_mask; ++}; ++ ++/* ++ * Some ACPI registers have bits that must be ignored -- meaning that they ++ * must be preserved. ++ */ ++#define ACPI_PM1_STATUS_PRESERVED_BITS 0x0800 /* Bit 11 */ ++#define ACPI_PM1_CONTROL_PRESERVED_BITS 0x0200 /* Bit 9 (whatever) */ ++ ++/* ++ * Register IDs ++ * These are the full ACPI registers ++ */ ++#define ACPI_REGISTER_PM1_STATUS 0x01 ++#define ACPI_REGISTER_PM1_ENABLE 0x02 ++#define ACPI_REGISTER_PM1_CONTROL 0x03 ++#define ACPI_REGISTER_PM1A_CONTROL 0x04 ++#define ACPI_REGISTER_PM1B_CONTROL 0x05 ++#define ACPI_REGISTER_PM2_CONTROL 0x06 ++#define ACPI_REGISTER_PM_TIMER 0x07 ++#define ACPI_REGISTER_PROCESSOR_BLOCK 0x08 ++#define ACPI_REGISTER_SMI_COMMAND_BLOCK 0x09 ++ ++/* Masks used to access the bit_registers */ ++ ++#define ACPI_BITMASK_TIMER_STATUS 0x0001 ++#define ACPI_BITMASK_BUS_MASTER_STATUS 0x0010 ++#define ACPI_BITMASK_GLOBAL_LOCK_STATUS 0x0020 ++#define ACPI_BITMASK_POWER_BUTTON_STATUS 0x0100 ++#define ACPI_BITMASK_SLEEP_BUTTON_STATUS 0x0200 ++#define ACPI_BITMASK_RT_CLOCK_STATUS 0x0400 ++#define ACPI_BITMASK_PCIEXP_WAKE_STATUS 0x4000 /* ACPI 3.0 */ ++#define ACPI_BITMASK_WAKE_STATUS 0x8000 ++ ++#define ACPI_BITMASK_ALL_FIXED_STATUS (\ ++ ACPI_BITMASK_TIMER_STATUS | \ ++ ACPI_BITMASK_BUS_MASTER_STATUS | \ ++ ACPI_BITMASK_GLOBAL_LOCK_STATUS | \ ++ ACPI_BITMASK_POWER_BUTTON_STATUS | \ ++ ACPI_BITMASK_SLEEP_BUTTON_STATUS | \ ++ ACPI_BITMASK_RT_CLOCK_STATUS | \ ++ ACPI_BITMASK_WAKE_STATUS) ++ ++#define ACPI_BITMASK_TIMER_ENABLE 0x0001 ++#define ACPI_BITMASK_GLOBAL_LOCK_ENABLE 0x0020 ++#define ACPI_BITMASK_POWER_BUTTON_ENABLE 0x0100 ++#define ACPI_BITMASK_SLEEP_BUTTON_ENABLE 0x0200 ++#define ACPI_BITMASK_RT_CLOCK_ENABLE 0x0400 ++#define ACPI_BITMASK_PCIEXP_WAKE_DISABLE 0x4000 /* ACPI 3.0 */ ++ ++#define ACPI_BITMASK_SCI_ENABLE 0x0001 ++#define ACPI_BITMASK_BUS_MASTER_RLD 0x0002 ++#define ACPI_BITMASK_GLOBAL_LOCK_RELEASE 0x0004 ++#define ACPI_BITMASK_SLEEP_TYPE_X 0x1C00 ++#define ACPI_BITMASK_SLEEP_ENABLE 0x2000 ++ ++#define ACPI_BITMASK_ARB_DISABLE 0x0001 ++ ++/* Raw bit position of each bit_register */ ++ ++#define ACPI_BITPOSITION_TIMER_STATUS 0x00 ++#define ACPI_BITPOSITION_BUS_MASTER_STATUS 0x04 ++#define ACPI_BITPOSITION_GLOBAL_LOCK_STATUS 0x05 ++#define ACPI_BITPOSITION_POWER_BUTTON_STATUS 0x08 ++#define ACPI_BITPOSITION_SLEEP_BUTTON_STATUS 0x09 ++#define ACPI_BITPOSITION_RT_CLOCK_STATUS 0x0A ++#define ACPI_BITPOSITION_PCIEXP_WAKE_STATUS 0x0E /* ACPI 3.0 */ ++#define ACPI_BITPOSITION_WAKE_STATUS 0x0F ++ ++#define ACPI_BITPOSITION_TIMER_ENABLE 0x00 ++#define ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE 0x05 ++#define ACPI_BITPOSITION_POWER_BUTTON_ENABLE 0x08 ++#define ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE 0x09 ++#define ACPI_BITPOSITION_RT_CLOCK_ENABLE 0x0A ++#define ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE 0x0E /* ACPI 3.0 */ ++ ++#define ACPI_BITPOSITION_SCI_ENABLE 0x00 ++#define ACPI_BITPOSITION_BUS_MASTER_RLD 0x01 ++#define ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE 0x02 ++#define ACPI_BITPOSITION_SLEEP_TYPE_X 0x0A ++#define ACPI_BITPOSITION_SLEEP_ENABLE 0x0D ++ ++#define ACPI_BITPOSITION_ARB_DISABLE 0x00 ++ ++/***************************************************************************** ++ * ++ * Resource descriptors ++ * ++ ****************************************************************************/ ++ ++/* resource_type values */ ++ ++#define ACPI_ADDRESS_TYPE_MEMORY_RANGE 0 ++#define ACPI_ADDRESS_TYPE_IO_RANGE 1 ++#define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE 2 ++ ++/* Resource descriptor types and masks */ ++ ++#define ACPI_RESOURCE_NAME_LARGE 0x80 ++#define ACPI_RESOURCE_NAME_SMALL 0x00 ++ ++#define ACPI_RESOURCE_NAME_SMALL_MASK 0x78 /* Bits 6:3 contain the type */ ++#define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK 0x07 /* Bits 2:0 contain the length */ ++#define ACPI_RESOURCE_NAME_LARGE_MASK 0x7F /* Bits 6:0 contain the type */ ++ ++/* ++ * Small resource descriptor "names" as defined by the ACPI specification. ++ * Note: Bits 2:0 are used for the descriptor length ++ */ ++#define ACPI_RESOURCE_NAME_IRQ 0x20 ++#define ACPI_RESOURCE_NAME_DMA 0x28 ++#define ACPI_RESOURCE_NAME_START_DEPENDENT 0x30 ++#define ACPI_RESOURCE_NAME_END_DEPENDENT 0x38 ++#define ACPI_RESOURCE_NAME_IO 0x40 ++#define ACPI_RESOURCE_NAME_FIXED_IO 0x48 ++#define ACPI_RESOURCE_NAME_RESERVED_S1 0x50 ++#define ACPI_RESOURCE_NAME_RESERVED_S2 0x58 ++#define ACPI_RESOURCE_NAME_RESERVED_S3 0x60 ++#define ACPI_RESOURCE_NAME_RESERVED_S4 0x68 ++#define ACPI_RESOURCE_NAME_VENDOR_SMALL 0x70 ++#define ACPI_RESOURCE_NAME_END_TAG 0x78 ++ ++/* ++ * Large resource descriptor "names" as defined by the ACPI specification. ++ * Note: includes the Large Descriptor bit in bit[7] ++ */ ++#define ACPI_RESOURCE_NAME_MEMORY24 0x81 ++#define ACPI_RESOURCE_NAME_GENERIC_REGISTER 0x82 ++#define ACPI_RESOURCE_NAME_RESERVED_L1 0x83 ++#define ACPI_RESOURCE_NAME_VENDOR_LARGE 0x84 ++#define ACPI_RESOURCE_NAME_MEMORY32 0x85 ++#define ACPI_RESOURCE_NAME_FIXED_MEMORY32 0x86 ++#define ACPI_RESOURCE_NAME_ADDRESS32 0x87 ++#define ACPI_RESOURCE_NAME_ADDRESS16 0x88 ++#define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89 ++#define ACPI_RESOURCE_NAME_ADDRESS64 0x8A ++#define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B ++#define ACPI_RESOURCE_NAME_LARGE_MAX 0x8B ++ ++/***************************************************************************** ++ * ++ * Miscellaneous ++ * ++ ****************************************************************************/ ++ ++#define ACPI_ASCII_ZERO 0x30 ++ ++/***************************************************************************** ++ * ++ * Debugger ++ * ++ ****************************************************************************/ ++ ++struct acpi_db_method_info { ++ acpi_handle main_thread_gate; ++ acpi_handle thread_complete_gate; ++ u32 *threads; ++ u32 num_threads; ++ u32 num_created; ++ u32 num_completed; ++ ++ char *name; ++ u32 flags; ++ u32 num_loops; ++ char pathname[128]; ++ char **args; ++ ++ /* ++ * Arguments to be passed to method for the command ++ * Threads - ++ * the Number of threads, ID of current thread and ++ * Index of current thread inside all them created. ++ */ ++ char init_args; ++ char *arguments[4]; ++ char num_threads_str[11]; ++ char id_of_thread_str[11]; ++ char index_of_thread_str[11]; ++}; ++ ++struct acpi_integrity_info { ++ u32 nodes; ++ u32 objects; ++}; ++ ++#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01 ++#define ACPI_DB_CONSOLE_OUTPUT 0x02 ++#define ACPI_DB_DUPLICATE_OUTPUT 0x03 ++ ++/***************************************************************************** ++ * ++ * Debug ++ * ++ ****************************************************************************/ ++ ++/* Entry for a memory allocation (debug only) */ ++ ++#define ACPI_MEM_MALLOC 0 ++#define ACPI_MEM_CALLOC 1 ++#define ACPI_MAX_MODULE_NAME 16 ++ ++#define ACPI_COMMON_DEBUG_MEM_HEADER \ ++ struct acpi_debug_mem_block *previous; \ ++ struct acpi_debug_mem_block *next; \ ++ u32 size; \ ++ u32 component; \ ++ u32 line; \ ++ char module[ACPI_MAX_MODULE_NAME]; \ ++ u8 alloc_type; ++ ++struct acpi_debug_mem_header { ++ACPI_COMMON_DEBUG_MEM_HEADER}; ++ ++struct acpi_debug_mem_block { ++ ACPI_COMMON_DEBUG_MEM_HEADER u64 user_space; ++}; ++ ++#define ACPI_MEM_LIST_GLOBAL 0 ++#define ACPI_MEM_LIST_NSNODE 1 ++#define ACPI_MEM_LIST_MAX 1 ++#define ACPI_NUM_MEM_LISTS 2 ++ ++#endif /* __ACLOCAL_H__ */ +diff -Naur a/acpica-acobject.h b/acpica-acobject.h +--- a/acpica-acobject.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/acpica-acobject.h 2009-04-18 09:19:08.000000000 +0200 +@@ -0,0 +1,446 @@ ++ ++/****************************************************************************** ++ * ++ * Name: acobject.h - Definition of union acpi_operand_object (Internal object only) ++ * ++ *****************************************************************************/ ++ ++/* ++ * Copyright (C) 2000 - 2008, Intel Corp. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions, and the following disclaimer, ++ * without modification. ++ * 2. Redistributions in binary form must reproduce at minimum a disclaimer ++ * substantially similar to the "NO WARRANTY" disclaimer below ++ * ("Disclaimer") and any redistribution must be conditioned upon ++ * including a substantially similar Disclaimer requirement for further ++ * binary redistribution. ++ * 3. Neither the names of the above-listed copyright holders nor the names ++ * of any contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * Alternatively, this software may be distributed under the terms of the ++ * GNU General Public License ("GPL") version 2 as published by the Free ++ * Software Foundation. ++ * ++ * NO WARRANTY ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR ++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, ++ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ++ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGES. ++ */ ++ ++#ifndef _ACOBJECT_H ++#define _ACOBJECT_H ++ ++/* acpisrc:struct_defs -- for acpisrc conversion */ ++ ++/* ++ * The union acpi_operand_object is used to pass AML operands from the dispatcher ++ * to the interpreter, and to keep track of the various handlers such as ++ * address space handlers and notify handlers. The object is a constant ++ * size in order to allow it to be cached and reused. ++ * ++ * Note: The object is optimized to be aligned and will not work if it is ++ * byte-packed. ++ */ ++#if ACPI_MACHINE_WIDTH == 64 ++#pragma pack(8) ++#else ++#pragma pack(4) ++#endif ++ ++/******************************************************************************* ++ * ++ * Common Descriptors ++ * ++ ******************************************************************************/ ++ ++/* ++ * Common area for all objects. ++ * ++ * descriptor_type is used to differentiate between internal descriptors, and ++ * must be in the same place across all descriptors ++ * ++ * Note: The descriptor_type and Type fields must appear in the identical ++ * position in both the struct acpi_namespace_node and union acpi_operand_object ++ * structures. ++ */ ++#define ACPI_OBJECT_COMMON_HEADER \ ++ union acpi_operand_object *next_object; /* Objects linked to parent NS node */\ ++ u8 descriptor_type; /* To differentiate various internal objs */\ ++ u8 type; /* acpi_object_type */\ ++ u16 reference_count; /* For object deletion management */\ ++ u8 flags; ++ /* ++ * Note: There are 3 bytes available here before the ++ * next natural alignment boundary (for both 32/64 cases) ++ */ ++ ++/* Values for Flag byte above */ ++ ++#define AOPOBJ_AML_CONSTANT 0x01 ++#define AOPOBJ_STATIC_POINTER 0x02 ++#define AOPOBJ_DATA_VALID 0x04 ++#define AOPOBJ_OBJECT_INITIALIZED 0x08 ++#define AOPOBJ_SETUP_COMPLETE 0x10 ++#define AOPOBJ_SINGLE_DATUM 0x20 ++#define AOPOBJ_INVALID 0x40 /* Used if host OS won't allow an op_region address */ ++ ++/****************************************************************************** ++ * ++ * Basic data types ++ * ++ *****************************************************************************/ ++ ++struct acpi_object_common { ++ACPI_OBJECT_COMMON_HEADER}; ++ ++struct acpi_object_integer { ++ ACPI_OBJECT_COMMON_HEADER u8 fill[3]; /* Prevent warning on some compilers */ ++ acpi_integer value; ++}; ++ ++/* ++ * Note: The String and Buffer object must be identical through the Pointer ++ * and length elements. There is code that depends on this. ++ * ++ * Fields common to both Strings and Buffers ++ */ ++#define ACPI_COMMON_BUFFER_INFO(_type) \ ++ _type *pointer; \ ++ u32 length; ++ ++struct acpi_object_string { /* Null terminated, ASCII characters only */ ++ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(char) /* String in AML stream or allocated string */ ++}; ++ ++struct acpi_object_buffer { ++ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(u8) /* Buffer in AML stream or allocated buffer */ ++ u32 aml_length; ++ u8 *aml_start; ++ struct acpi_namespace_node *node; /* Link back to parent node */ ++}; ++ ++struct acpi_object_package { ++ ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* Link back to parent node */ ++ union acpi_operand_object **elements; /* Array of pointers to acpi_objects */ ++ u8 *aml_start; ++ u32 aml_length; ++ u32 count; /* # of elements in package */ ++}; ++ ++/****************************************************************************** ++ * ++ * Complex data types ++ * ++ *****************************************************************************/ ++ ++struct acpi_object_event { ++ ACPI_OBJECT_COMMON_HEADER acpi_semaphore os_semaphore; /* Actual OS synchronization object */ ++}; ++ ++struct acpi_object_mutex { ++ ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */ ++ u16 acquisition_depth; /* Allow multiple Acquires, same thread */ ++ acpi_mutex os_mutex; /* Actual OS synchronization object */ ++ acpi_thread_id thread_id; /* Current owner of the mutex */ ++ struct acpi_thread_state *owner_thread; /* Current owner of the mutex */ ++ union acpi_operand_object *prev; /* Link for list of acquired mutexes */ ++ union acpi_operand_object *next; /* Link for list of acquired mutexes */ ++ struct acpi_namespace_node *node; /* Containing namespace node */ ++ u8 original_sync_level; /* Owner's original sync level (0-15) */ ++}; ++ ++struct acpi_object_region { ++ ACPI_OBJECT_COMMON_HEADER u8 space_id; ++ struct acpi_namespace_node *node; /* Containing namespace node */ ++ union acpi_operand_object *handler; /* Handler for region access */ ++ union acpi_operand_object *next; ++ acpi_physical_address address; ++ u32 length; ++}; ++ ++struct acpi_object_method { ++ ACPI_OBJECT_COMMON_HEADER u8 method_flags; ++ u8 param_count; ++ u8 sync_level; ++ union acpi_operand_object *mutex; ++ u8 *aml_start; ++ ACPI_INTERNAL_METHOD implementation; ++ u32 aml_length; ++ u8 thread_count; ++ acpi_owner_id owner_id; ++}; ++ ++/****************************************************************************** ++ * ++ * Objects that can be notified. All share a common notify_info area. ++ * ++ *****************************************************************************/ ++ ++/* ++ * Common fields for objects that support ASL notifications ++ */ ++#define ACPI_COMMON_NOTIFY_INFO \ ++ union acpi_operand_object *system_notify; /* Handler for system notifies */\ ++ union acpi_operand_object *device_notify; /* Handler for driver notifies */\ ++ union acpi_operand_object *handler; /* Handler for Address space */ ++ ++struct acpi_object_notify_common { /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */ ++ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO}; ++ ++struct acpi_object_device { ++ ACPI_OBJECT_COMMON_HEADER ++ ACPI_COMMON_NOTIFY_INFO struct acpi_gpe_block_info *gpe_block; ++}; ++ ++struct acpi_object_power_resource { ++ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO u32 system_level; ++ u32 resource_order; ++}; ++ ++struct acpi_object_processor { ++ ACPI_OBJECT_COMMON_HEADER ++ /* The next two fields take advantage of the 3-byte space before NOTIFY_INFO */ ++ u8 proc_id; ++ u8 length; ++ ACPI_COMMON_NOTIFY_INFO acpi_io_address address; ++}; ++ ++struct acpi_object_thermal_zone { ++ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO}; ++ ++/****************************************************************************** ++ * ++ * Fields. All share a common header/info field. ++ * ++ *****************************************************************************/ ++ ++/* ++ * Common bitfield for the field objects ++ * "Field Datum" -- a datum from the actual field object ++ * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field ++ */ ++#define ACPI_COMMON_FIELD_INFO \ ++ u8 field_flags; /* Access, update, and lock bits */\ ++ u8 attribute; /* From access_as keyword */\ ++ u8 access_byte_width; /* Read/Write size in bytes */\ ++ struct acpi_namespace_node *node; /* Link back to parent node */\ ++ u32 bit_length; /* Length of field in bits */\ ++ u32 base_byte_offset; /* Byte offset within containing object */\ ++ u32 value; /* Value to store into the Bank or Index register */\ ++ u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\ ++ u8 access_bit_width; /* Read/Write size in bits (8-64) */ ++ ++struct acpi_object_field_common { /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */ ++ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Parent Operation Region object (REGION/BANK fields only) */ ++}; ++ ++struct acpi_object_region_field { ++ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing op_region object */ ++}; ++ ++struct acpi_object_bank_field { ++ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing op_region object */ ++ union acpi_operand_object *bank_obj; /* bank_select Register object */ ++}; ++ ++struct acpi_object_index_field { ++ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO ++ /* ++ * No "RegionObj" pointer needed since the Index and Data registers ++ * are each field definitions unto themselves. ++ */ ++ union acpi_operand_object *index_obj; /* Index register */ ++ union acpi_operand_object *data_obj; /* Data register */ ++}; ++ ++/* The buffer_field is different in that it is part of a Buffer, not an op_region */ ++ ++struct acpi_object_buffer_field { ++ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *buffer_obj; /* Containing Buffer object */ ++}; ++ ++/****************************************************************************** ++ * ++ * Objects for handlers ++ * ++ *****************************************************************************/ ++ ++struct acpi_object_notify_handler { ++ ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* Parent device */ ++ acpi_notify_handler handler; ++ void *context; ++}; ++ ++struct acpi_object_addr_handler { ++ ACPI_OBJECT_COMMON_HEADER u8 space_id; ++ u8 handler_flags; ++ acpi_adr_space_handler handler; ++ struct acpi_namespace_node *node; /* Parent device */ ++ void *context; ++ acpi_adr_space_setup setup; ++ union acpi_operand_object *region_list; /* regions using this handler */ ++ union acpi_operand_object *next; ++}; ++ ++/* Flags for address handler (handler_flags) */ ++ ++#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x01 ++ ++/****************************************************************************** ++ * ++ * Special internal objects ++ * ++ *****************************************************************************/ ++ ++/* ++ * The Reference object is used for these opcodes: ++ * Arg[0-6], Local[0-7], index_op, name_op, ref_of_op, load_op, load_table_op, debug_op ++ * The Reference.Class differentiates these types. ++ */ ++struct acpi_object_reference { ++ ACPI_OBJECT_COMMON_HEADER u8 class; /* Reference Class */ ++ u8 target_type; /* Used for Index Op */ ++ u8 reserved; ++ void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */ ++ struct acpi_namespace_node *node; /* ref_of or Namepath */ ++ union acpi_operand_object **where; /* Target of Index */ ++ u32 value; /* Used for Local/Arg/Index/ddb_handle */ ++}; ++ ++/* Values for Reference.Class above */ ++ ++typedef enum { ++ ACPI_REFCLASS_LOCAL = 0, /* Method local */ ++ ACPI_REFCLASS_ARG = 1, /* Method argument */ ++ ACPI_REFCLASS_REFOF = 2, /* Result of ref_of() TBD: Split to Ref/Node and Ref/operand_obj? */ ++ ACPI_REFCLASS_INDEX = 3, /* Result of Index() */ ++ ACPI_REFCLASS_TABLE = 4, /* ddb_handle - Load(), load_table() */ ++ ACPI_REFCLASS_NAME = 5, /* Reference to a named object */ ++ ACPI_REFCLASS_DEBUG = 6, /* Debug object */ ++ ++ ACPI_REFCLASS_MAX = 6 ++} ACPI_REFERENCE_CLASSES; ++ ++/* ++ * Extra object is used as additional storage for types that ++ * have AML code in their declarations (term_args) that must be ++ * evaluated at run time. ++ * ++ * Currently: Region and field_unit types ++ */ ++struct acpi_object_extra { ++ ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */ ++ void *region_context; /* Region-specific data */ ++ u8 *aml_start; ++ u32 aml_length; ++}; ++ ++/* Additional data that can be attached to namespace nodes */ ++ ++struct acpi_object_data { ++ ACPI_OBJECT_COMMON_HEADER acpi_object_handler handler; ++ void *pointer; ++}; ++ ++/* Structure used when objects are cached for reuse */ ++ ++struct acpi_object_cache_list { ++ ACPI_OBJECT_COMMON_HEADER union acpi_operand_object *next; /* Link for object cache and internal lists */ ++}; ++ ++/****************************************************************************** ++ * ++ * union acpi_operand_object Descriptor - a giant union of all of the above ++ * ++ *****************************************************************************/ ++ ++union acpi_operand_object { ++ struct acpi_object_common common; ++ struct acpi_object_integer integer; ++ struct acpi_object_string string; ++ struct acpi_object_buffer buffer; ++ struct acpi_object_package package; ++ struct acpi_object_event event; ++ struct acpi_object_method method; ++ struct acpi_object_mutex mutex; ++ struct acpi_object_region region; ++ struct acpi_object_notify_common common_notify; ++ struct acpi_object_device device; ++ struct acpi_object_power_resource power_resource; ++ struct acpi_object_processor processor; ++ struct acpi_object_thermal_zone thermal_zone; ++ struct acpi_object_field_common common_field; ++ struct acpi_object_region_field field; ++ struct acpi_object_buffer_field buffer_field; ++ struct acpi_object_bank_field bank_field; ++ struct acpi_object_index_field index_field; ++ struct acpi_object_notify_handler notify; ++ struct acpi_object_addr_handler address_space; ++ struct acpi_object_reference reference; ++ struct acpi_object_extra extra; ++ struct acpi_object_data data; ++ struct acpi_object_cache_list cache; ++ ++ /* ++ * Add namespace node to union in order to simplify code that accepts both ++ * ACPI_OPERAND_OBJECTs and ACPI_NAMESPACE_NODEs. The structures share ++ * a common descriptor_type field in order to differentiate them. ++ */ ++ struct acpi_namespace_node node; ++}; ++ ++/****************************************************************************** ++ * ++ * union acpi_descriptor - objects that share a common descriptor identifier ++ * ++ *****************************************************************************/ ++ ++/* Object descriptor types */ ++ ++#define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */ ++#define ACPI_DESC_TYPE_STATE 0x02 ++#define ACPI_DESC_TYPE_STATE_UPDATE 0x03 ++#define ACPI_DESC_TYPE_STATE_PACKAGE 0x04 ++#define ACPI_DESC_TYPE_STATE_CONTROL 0x05 ++#define ACPI_DESC_TYPE_STATE_RPSCOPE 0x06 ++#define ACPI_DESC_TYPE_STATE_PSCOPE 0x07 ++#define ACPI_DESC_TYPE_STATE_WSCOPE 0x08 ++#define ACPI_DESC_TYPE_STATE_RESULT 0x09 ++#define ACPI_DESC_TYPE_STATE_NOTIFY 0x0A ++#define ACPI_DESC_TYPE_STATE_THREAD 0x0B ++#define ACPI_DESC_TYPE_WALK 0x0C ++#define ACPI_DESC_TYPE_PARSER 0x0D ++#define ACPI_DESC_TYPE_OPERAND 0x0E ++#define ACPI_DESC_TYPE_NAMED 0x0F ++#define ACPI_DESC_TYPE_MAX 0x0F ++ ++struct acpi_common_descriptor { ++ void *common_pointer; ++ u8 descriptor_type; /* To differentiate various internal objs */ ++}; ++ ++union acpi_descriptor { ++ struct acpi_common_descriptor common; ++ union acpi_operand_object object; ++ struct acpi_namespace_node node; ++ union acpi_parse_object op; ++}; ++ ++#pragma pack() ++ ++#endif /* _ACOBJECT_H */ +diff -Naur a/firegl_public.c b/firegl_public.c +--- a/firegl_public.c 2009-04-18 09:15:54.000000000 +0200 ++++ b/firegl_public.c 2009-04-18 09:19:08.000000000 +0200 +@@ -1441,7 +1441,7 @@ + */ + KCL_TYPE_Uid ATI_API_CALL KCL_GetEffectiveUid(void) + { +- return current->euid; ++ return current->cred->euid; + } + + /** /brief Delay execution for the specified number of microseconds +@@ -1813,14 +1813,15 @@ + */ + void ATI_API_CALL KCL_PosixSecurityCapSetIPCLock(unsigned int lock) + { ++ struct cred* currentCred = (struct cred*)get_current_cred(); + if (lock == 0 ) + { +- cap_lower(current->cap_effective, CAP_IPC_LOCK); ++ cap_lower(currentCred->cap_effective, CAP_IPC_LOCK); + } + else + { +- cap_raise(current->cap_effective, CAP_IPC_LOCK); +- } ++ cap_raise(currentCred->cap_effective, CAP_IPC_LOCK); ++ } + return; + } + +diff -Naur a/firegl_public.h b/firegl_public.h +--- a/firegl_public.h 2009-04-18 09:15:54.000000000 +0200 ++++ b/firegl_public.h 2009-04-18 09:19:08.000000000 +0200 +@@ -593,13 +593,13 @@ + #define cpu_has_pge test_bit(X86_FEATURE_PGE, &boot_cpu_data.x86_capability) + #endif + +-#ifndef pgprot_writecombine ++/* #ifndef pgprot_writecombine */ + #define pgprot_writecombine(prot) __pgprot((pgprot_val(prot) & ~(_PAGE_PCD)) | _PAGE_PWT) +-#endif ++/* #endif */ + +-#ifndef pgprot_noncached ++/* #ifndef pgprot_noncached */ + #define pgprot_noncached(prot) __pgprot(pgprot_val(prot) | _PAGE_PCD | _PAGE_PWT) +-#endif ++/* #endif */ + + #endif //FIREGL_USWC_SUPPORT + +diff -Naur a/kcl_acpi.c b/kcl_acpi.c +--- a/kcl_acpi.c 2009-04-18 09:15:54.000000000 +0200 ++++ b/kcl_acpi.c 2009-04-18 09:19:08.000000000 +0200 +@@ -17,6 +17,9 @@ + #include + #include + #include ++#include "acpica-acconfig.h" ++#include "acpica-aclocal.h" ++#include "acpica-acobject.h" + + #include "kcl_config.h" + #include "kcl_type.h" --- fglrx-installer-8.620.orig/debian/dkms/patches/fglrx-rt-compat.patch +++ fglrx-installer-8.620/debian/dkms/patches/fglrx-rt-compat.patch @@ -0,0 +1,26 @@ +--- a/firegl_public.c ++++ b/firegl_public.c +@@ -1352,7 +1352,11 @@ + int process_terminated = 1; + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) ++#if !defined(CONFIG_PREEMPT_RT) + rcu_read_lock(); ++#else ++ preempt_disable(); ++#endif + #else + read_lock(&tasklist_lock); + #endif +@@ -1373,7 +1377,11 @@ + } + } + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) ++#if !defined(CONFIG_PREEMPT_RT) + rcu_read_unlock(); ++#else ++ preempt_enable(); ++#endif + #else + read_unlock(&tasklist_lock); + #endif --- fglrx-installer-8.620.orig/debian/dkms/patches/fglrx-missing-pci_enable_msi.patch +++ fglrx-installer-8.620/debian/dkms/patches/fglrx-missing-pci_enable_msi.patch @@ -0,0 +1,13 @@ +diff -Naur a/kcl_pci.c b/kcl_pci.c +--- a/kcl_pci.c 2009-05-31 12:05:01.115508741 -0500 ++++ b/kcl_pci.c 2009-05-31 12:06:15.871506492 -0500 +@@ -310,3 +310,8 @@ + } + #endif //__x86_64__ + ++#undef pci_enable_msi ++int pci_enable_msi(struct pci_dev *pdev) ++{ ++return pci_enable_msi_block(pdev, 1); ++} + --- fglrx-installer-8.620.orig/debian/dkms/patches/fglrx-2.6.30-irqreturn_t.patch +++ fglrx-installer-8.620/debian/dkms/patches/fglrx-2.6.30-irqreturn_t.patch @@ -0,0 +1,17 @@ +diff -Naur a/drm_os_linux.h b/drm_os_linux.h +--- a/drm_os_linux.h 2009-05-27 19:24:11.944421623 -0500 ++++ b/drm_os_linux.h 2009-05-27 19:28:12.424780164 -0500 +@@ -42,10 +42,12 @@ + #define DRM_IRQ_ARGS int irq, void *arg, struct pt_regs *regs + /** backwards compatibility with old irq return values */ + #ifndef IRQ_HANDLED ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) + typedef void irqreturn_t; + #define IRQ_HANDLED /* nothing */ + #define IRQ_NONE /* nothing */ + #endif ++#endif + + /** AGP types */ + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,70) + --- fglrx-installer-8.620.orig/debian/dkms/patches/config_x86_32-gentoo.patch +++ fglrx-installer-8.620/debian/dkms/patches/config_x86_32-gentoo.patch @@ -0,0 +1,18 @@ +--- a/firegl_public.c ++++ b/firegl_public.c +@@ -41,6 +41,7 @@ + #if !defined(CONFIG_X86_BIGSMP) + #if !defined(CONFIG_X86_VISWS) + #if !defined(CONFIG_X86_GENERICARCH) ++#if !defined(CONFIG_X86_32) + #error unknown or undefined architecture configured + #endif + #endif +@@ -53,6 +54,7 @@ + #endif + #endif + #endif ++#endif + + /* The dirty-page-tracking patch included in NLD 9 SMP kernels defines + * a static inline function that uses a GPL-only symbol in a header --- fglrx-installer-8.620.orig/debian/acpi/fglrx-ac-aticonfig +++ fglrx-installer-8.620/debian/acpi/fglrx-ac-aticonfig @@ -0,0 +1,6 @@ +# /etc/acpi/events/fglrx-ac-aticonfig +# Called when the user connects/disconnects ac power +# + +event=ac_adapter +action=/etc/acpi/fglrx-powermode.sh --- fglrx-installer-8.620.orig/debian/acpi/fglrx-powermode.sh +++ fglrx-installer-8.620/debian/acpi/fglrx-powermode.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +. /etc/default/xorg-driver-fglrx +if [ x$FGLRX_ACPI_SWITCH_POWERSTATES != xtrue ]; then + exit; +fi + +getXuser() { + user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'` + if [ x"$user" = x"" ]; then + user=`finger| grep -m1 ":$displaynum" | awk '{print $1}'` + fi + if [ x"$user" != x"" ]; then + userhome=`getent passwd $user | cut -d: -f6` + export XAUTHORITY=$userhome/.Xauthority + else + export XAUTHORITY="" + fi +} + +grep -q closed /proc/acpi/button/lid/*/state +if [ $? = 0 ]; then + lid_closed=1 +else + lid_closed=0 +fi + +grep -q off-line /proc/acpi/ac_adapter/*/state +if [ $? = 0 ]; then + on_dc=1 +else + on_dc=0 +fi + + + +if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then + echo "fglrx: setting low power" + for x in /tmp/.X11-unix/*; do + displaynum=`echo $x | sed s#/tmp/.X11-unix/X##` + getXuser; + if [ x"$XAUTHORITY" != x"" ]; then + export DISPLAY=":$displaynum" + powermode=`/usr/bin/aticonfig --lsp | grep -m1 low | cut -b 3-3` + if [ x"$powermode" != x"" ]; then + su $user -c "/usr/bin/aticonfig --set-powerstate=$powermode --effective=now" &>/dev/null + fi + fi + done +else + echo "fglrx: setting default powermode" + for x in /tmp/.X11-unix/*; do + displaynum=`echo $x | sed s#/tmp/.X11-unix/X##` + getXuser; + if [ x"$XAUTHORITY" != x"" ]; then + export DISPLAY=":$displaynum" + powermode=`/usr/bin/aticonfig --lsp | grep -m1 default | cut -b 3-3` + if [ x"$powermode" != x"" ]; then + su $user -c "/usr/bin/aticonfig --set-powerstate=$powermode --effective=now" &>/dev/null + fi + fi + done +fi --- fglrx-installer-8.620.orig/debian/acpi/fglrx-lid-aticonfig +++ fglrx-installer-8.620/debian/acpi/fglrx-lid-aticonfig @@ -0,0 +1,6 @@ +# /etc/acpi/events/fglrx-lid-aticonfig +# Called when the user opens or closes the laptop lid +# + +event=button[ /]lid +action=/etc/acpi/fglrx-powermode.sh --- fglrx-installer-8.620.orig/debian/overrides/fglrx-kernel-source.in +++ fglrx-installer-8.620/debian/overrides/fglrx-kernel-source.in @@ -0,0 +1,8 @@ +#We are in restricted, whether lintian has ever heard of it or not +fglrx-kernel-source: unknown-section restricted + +#These unfortunately are needed if we really want to be able to link? +fglrx-kernel-source: arch-independent-package-contains-binary-or-object ./usr/src/fglrx-#CVERSION#/libfglrx_ip.a.GCC3 +fglrx-kernel-source: unstripped-binary-or-object ./usr/src/fglrx-#CVERSION#/libfglrx_ip.a.GCC3 +fglrx-kernel-source: arch-independent-package-contains-binary-or-object ./usr/src/fglrx-#CVERSION#/libfglrx_ip.a.GCC4 +fglrx-kernel-source: unstripped-binary-or-object ./usr/src/fglrx-#CVERSION#/libfglrx_ip.a.GCC4 --- fglrx-installer-8.620.orig/debian/overrides/xorg-driver-fglrx-dev +++ fglrx-installer-8.620/debian/overrides/xorg-driver-fglrx-dev @@ -0,0 +1,3 @@ +#We are in restricted, whether lintian has ever heard of it or not +xorg-driver-fglrx-dev: unknown-section restricted + --- fglrx-installer-8.620.orig/debian/overrides/fglrx-amdcccle +++ fglrx-installer-8.620/debian/overrides/fglrx-amdcccle @@ -0,0 +1,5 @@ +#We are in restricted, whether lintian has ever heard of it or not +fglrx-amdcccle: unknown-section restricted + +#AMD doesn't appear to document these binaries +fglrx-amdcccle: binary-without-manpage usr/bin/amdcccle --- fglrx-installer-8.620.orig/debian/overrides/xorg-driver-fglrx +++ fglrx-installer-8.620/debian/overrides/xorg-driver-fglrx @@ -0,0 +1,19 @@ +#We are in restricted, whether lintian has ever heard of it or not +xorg-driver-fglrx: unknown-section restricted + +#AMD doesn't appear to document these binaries +xorg-driver-fglrx: binary-without-manpage usr/bin/aticonfig +xorg-driver-fglrx: binary-without-manpage usr/bin/atiodcli +xorg-driver-fglrx: binary-without-manpage usr/bin/atiode +xorg-driver-fglrx: binary-without-manpage usr/bin/fgl_glxgears +xorg-driver-fglrx: binary-without-manpage usr/bin/fglrx_xgamma +xorg-driver-fglrx: binary-without-manpage usr/bin/fglrxinfo +xorg-driver-fglrx: binary-without-manpage usr/sbin/atieventsd +xorg-driver-fglrx: binary-without-manpage usr/sbin/amdnotifyui + +#We have NO control of AMD's build process +xorg-driver-fglrx: sharedobject-in-library-directory-missing-soname usr/lib/libatiadlxx.so +xorg-driver-fglrx: shlib-with-non-pic-code usr/lib/libGL.so.1.2 + +#It's awfully silly to break these out as they are only ever installed with fglrx +xorg-driver-fglrx: package-name-doesnt-match-sonames libGL1 libfglrx-dm1.0 libfglrx-gamma1 libfglrx-pp1.0 libfglrx-tvout1 --- fglrx-installer-8.620.orig/debian/replacements/authatieventsd.sh +++ fglrx-installer-8.620/debian/replacements/authatieventsd.sh @@ -0,0 +1,111 @@ +#!/bin/sh + +# +# Control script grant/revoke access to X for the ATI External Events Daemon +# +# Distro maintainers may modify this reference script as necessary to conform +# to their distribution policies. +# +# Copyright (c) 2006, ATI Technologies Inc. All rights reserved. +# + +# +# Parameters: +# $1 is a keyword, either "grant" or "revoke" +# $2 is the display name +# $3 is the X authorization file to be authorized +# +# Returns: +# 0 if authorization was successfully granted/revoked +# nonzero on failure +# +# Note: +# The third parameter only makes sense if xauth is being used. If another +# mechanism such as xhost is being used it can be ignored. For setups that +# do not do any form of authentication(!) this script can be trimmed down +# to just "exit 0" and the daemon will assume that it is always authorized. +# + +GetServerAuthFile() +{ + # Determine where the authorization key may be hiding. The location will + # vary depending upon whether X was started via xdm/kdm, gdm or startx, so + # check each one in turn. + + # Check xdm + + XDM_AUTH_MASK=/var/lib/xdm/authdir/authfiles/A$1* + XDM_AUTH_FILE=`ls -t $XDM_AUTH_MASK 2>/dev/null | head -n 1` # Choose the newest file + if [ -n "$XDM_AUTH_FILE" ]; then + SERVER_AUTH_FILE=$XDM_AUTH_FILE + DISP_SEARCH_STRING="#ffff#" + return 0 + fi + + # Check kdm + KDM_AUTH_MASK=/var/run/xauth/A$1* + KDM_AUTH_FILE=`ls -t $KDM_AUTH_MASK 2>/dev/null | head -n 1` # Choose the newest file + if [ -n "$KDM_AUTH_FILE" ]; then + SERVER_AUTH_FILE=$KDM_AUTH_FILE + DISP_SEARCH_STRING="#ffff#" + return 0 + fi + + # Check gdm + + GDM_AUTH_FILE=/var/lib/gdm/$1.Xauth + if [ -e $GDM_AUTH_FILE ]; then + SERVER_AUTH_FILE=$GDM_AUTH_FILE + DISP_SEARCH_STRING="$1" + return 0 + fi + + # Finally, check for startx + + for XPID in `pidof X`; do + TRIAL_XAUTH_FILE=`tr '\0' '\n' < /proc/$XPID/environ | grep -e "^XAUTHORITY=" | cut -d= -f2` + TRIAL_XAUTH_KEY=`xauth -f $TRIAL_XAUTH_FILE list | grep "unix$1"` + if [ -n "$TRIAL_XAUTH_KEY" ]; then + SERVER_AUTH_FILE=$TRIAL_XAUTH_FILE + DISP_SEARCH_STRING="unix$1" + return 0 + fi + done + + # Couldn't find the key + + return -1 +} + +# Main part of script + +# +# Since the daemon is usually started during init time before X comes up, +# $PATH may not yet contain the paths to the X binaries, particularly xauth. +# Add the usual location for where xauth may live and fail out if we still +# can't find it. +# + +PATH=$PATH:/usr/bin:/usr/X11R6/bin +which xauth > /dev/null || exit -1 + +case "$1" in + grant) + GetServerAuthFile $2 || exit -1 + DISP_AUTH_KEY=`xauth -f $SERVER_AUTH_FILE list | grep $DISP_SEARCH_STRING | awk '{ print $3 }'` + if [ -n "$DISP_AUTH_KEY" ]; then + xauth -f $3 add $2 . $DISP_AUTH_KEY || exit -1 + else + exit -1 + fi + ;; + + revoke) + xauth -f $3 remove $2 || exit -1 + ;; + + *) + exit -1 + ;; +esac +exit 0 --- fglrx-installer-8.620.orig/debian/modaliases/fglrx_supported +++ fglrx-installer-8.620/debian/modaliases/fglrx_supported @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +filename="$1" + +[ -e "$filename" ] || { + echo "USAGE: $0 path/to/fglrx_drv.so" >&2 + exit 1 +} + +echo "# Listing generated by fglrx_supported. Do not edit manually." + +strings "$filename" | \ + sed -n 's/^0x\([0-9A-F]\{4\}\)$/alias pci:v00001002d0000\1sv*sd*bc03sc*i* fglrx xorg-driver-fglrx/p' | \ + sort | uniq