diff options
author | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2013-05-20 17:41:12 +0000 |
---|---|---|
committer | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2013-05-20 17:41:12 +0000 |
commit | 1a20d21946fcce61dfae7b24327e39a071fe63af (patch) | |
tree | 4b84e360ef54f8c2f777f15edb04ea2aa5993277 /x11-drivers/ati-drivers | |
parent | Restore ~arm (diff) | |
download | historical-1a20d21946fcce61dfae7b24327e39a071fe63af.tar.gz historical-1a20d21946fcce61dfae7b24327e39a071fe63af.tar.bz2 historical-1a20d21946fcce61dfae7b24327e39a071fe63af.zip |
Import latest ebuild from the x11 overlay, by Emil Karlson.
Package-Manager: portage-2.1.11.62/cvs/Linux x86_64
Diffstat (limited to 'x11-drivers/ati-drivers')
-rw-r--r-- | x11-drivers/ati-drivers/ChangeLog | 7 | ||||
-rw-r--r-- | x11-drivers/ati-drivers/Manifest | 26 | ||||
-rw-r--r-- | x11-drivers/ati-drivers/ati-drivers-13.4.ebuild | 24 | ||||
-rw-r--r-- | x11-drivers/ati-drivers/files/linux-3.10-proc.diff | 293 | ||||
-rw-r--r-- | x11-drivers/ati-drivers/files/linux-3.9-kuid.diff | 33 |
5 files changed, 357 insertions, 26 deletions
diff --git a/x11-drivers/ati-drivers/ChangeLog b/x11-drivers/ati-drivers/ChangeLog index 9cec649e6176..7ce522d91fd3 100644 --- a/x11-drivers/ati-drivers/ChangeLog +++ b/x11-drivers/ati-drivers/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for x11-drivers/ati-drivers # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.328 2013/04/26 08:51:56 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.329 2013/05/20 17:41:02 chithanh Exp $ + + 20 May 2013; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> + +files/linux-3.10-proc.diff, +files/linux-3.9-kuid.diff, + ati-drivers-13.4.ebuild: + Import latest ebuild from the x11 overlay, by Emil Karlson. *ati-drivers-13.4 (26 Apr 2013) diff --git a/x11-drivers/ati-drivers/Manifest b/x11-drivers/ati-drivers/Manifest index 875178c00dfb..404a2f76e77d 100644 --- a/x11-drivers/ati-drivers/Manifest +++ b/x11-drivers/ati-drivers/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - AUX ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch 799 SHA256 0001fa7f2c3e15ec315f6c963dd428b682778c129250941a849577b8b3293e36 SHA512 a7ae5e7017c9b5a68d112d9a77df40ada722b06aff0cc31147713bfbce2419f9ca8c22b40398ab8b80c86427ff086a5617fb6de93d540af54365c7039cdcfe0f WHIRLPOOL 809c5bf8f0b0381af6a8549c36fcd00e75ff2f571f21cef3f2dec9ea823c65c29db28373b7145f39b9ed2cad234ec3c063407fb7a12260cfe1fe62eb67b5780d AUX ati-drivers-do_mmap.patch 1405 SHA256 3fc9bae50d25d3bfe76a3a1e89c8d025674a4cb9afd16d3a5d8b3c25a66f536d SHA512 1a2f8fe7f2506037d6d158e5c2efffa39c503566284d8f516cb2d84db546eced24df5dcb8d74ac84911589efb4547d7f8610d78ad29703f9ed0a9890576c51b7 WHIRLPOOL 86daa957d7569b26fdf92929e5b04a32379af067a208628eab1a4541fdebfb51fa4bfedeec63f4685c6258adcba2ddc4223b69dca329ecbebd4ba13167f66f82 AUX ati-drivers-kernel-3.8-acpihandle.patch 717 SHA256 f7012bbc1d27a4d9207f8ba78256684a74b917311f525d3b061c11caefad2846 SHA512 a064ad1ebbb1010349c22d6fd6a4a3715df3d7087353a70199957b5c1c325b533b21c3f004567362a834faa0d8f169296ef996765d47439fdad4109a0d01f85c WHIRLPOOL e0eb93cd367f9e6e1848c3c3301c914f783865eb5d6c11a27a334624ee84cf7ee99073a6a2ff69014c8b920a51933573bf1224f53ea64c2666968f93ca922003 @@ -10,6 +7,8 @@ AUX ati-drivers-x32_something_something.patch 486 SHA256 9eb114a797089fca3693420 AUX ati-powermode-opt-path-3.patch 1471 SHA256 35e73fef3d8e39714e8d6e73afaa7b205505db3bdd65c364e7ea02fdc0cb3055 SHA512 0e17026847062117993ba6115942d16421f6b9943afd57913c96e7550b0e49f3ed10e06bc98f9db1a5ba4af7c42dae6b55a332a97e73d48dba7f61ed0ad35ad4 WHIRLPOOL 39861d10d307e537549ed0c7967e18ad3ef658af66396f5491d1f2e13ab13e8b8e252d4c14b5ab616ff5aad69a599cf3b32accedd51438021d50cc074fa296a8 AUX atieventsd.init 533 SHA256 20010ebc5cb286149f3c4c9c099b6470463ccdb8fd47cea054b783dc2ad1fff3 SHA512 9f8990bb5619f99524e0759a1c4b41b0b2c081c6eecb3916ab60df8e6b59d99e3615af61e0ba5b71d003ccaaf41e2143237b26f36f64f00a47e0fe94f83473dd WHIRLPOOL 21979818a19bc27e3527958c66bf45654df4a307862897530bc02be6616f45ee210590a9d1bcab84336c6061482034010efbb251770bfaf023f20ffae8212ecd AUX const-notifier-block.patch 878 SHA256 cd73f5e15d9521a989d8cd9b7e3b252406e7b89fdfc129fd2d470f0bc86e8457 SHA512 1b84cb85ce903d80ad50a0e2d53509016625d1ede070e18b800408d486dc89d5283d801d6449eb81ee25a7adffbd0094b57a301842364e1fb58cc6bf9623e5b4 WHIRLPOOL ee9785d250632cd8843a5995f36442ff6abec2d5a7158f3604a6bc147c7db251608b9484c3ac95376c4cc6b6a15f6682675bd011eb6a193a073ba873e17a9872 +AUX linux-3.10-proc.diff 9796 SHA256 a4201674067445369d5f1ed6f855a13481edfffcdce951b58c3bc23ef318ccc5 SHA512 8771604dda5a4ae77867bf5dfe966fc4c930ee7d6429d70ee30ab3a765b0fbb12f0201ab9a6049310a232d1314dc71578ae47d06af56d5b96c4454d427753e4e WHIRLPOOL 687f2275ddb61d39d70e3164bf042afe301c11c8e6baa03a211da07abad665cd91c1e023646c96aba435c9c5fdac19dc4c15be907af4c64ceaaaf025c72fa5cf +AUX linux-3.9-kuid.diff 922 SHA256 f22ccbfe03b31fa4e70adb0e8203ec2c8bc334ce9a31fb2ebfa6cbdc36632ec4 SHA512 fa988613b41b0a9dc8e4189956c1393dfcfb1a4086fc156d4b790c7745f7491d3a8b05c8bb4f0a5824edf73428008376cd2752528e7abe5e4a7de6be030ba00b WHIRLPOOL dadadf0b1c45ef2ad00de1989052d8bfa47e2fafbd9ba27d29c79de64c9389d9d4b8a94eb3227d8476df97e8a38f3ef806e82d21fb416f77342dcb94a737857a AUX switchlibGL 1349 SHA256 a4aa2107fdb903da77fea432bc809a1155e213db460fdec72fd1c3c7cc0d13a0 SHA512 51d2912aa6ec2002b096c0483be69650d682feec54486ed5226b91988bc1516f718c71d9f58a2b28e0dbc512c0300ea271f9a97885776dd045fe324f1549b85d WHIRLPOOL d335ea9c57a28f8450423089bbf798da77cc72fff6bad1221989412808abcd6bcb7afa41aa2b04231feff3dac6eaaff58a7595173e53b6cf0f5d3d591997b43d DIST amd-catalyst-13.4-linux-x86.x86_64.zip 122588023 SHA256 ebec78c7f78db3601d1c97116a6823076a7765318e16d88b619ebc80d4c6d1d5 SHA512 ce012f46527ee0073f658e97dd793954930b934b96be9e1c6cd1d344e7734ef81949b484701d5e7e1ebb221f46b5a617f4efb4445e42c06ac0a8b4eca76463fc WHIRLPOOL cb0f7af6d0474c3d521c5785bab49d76da7e09e1ddd02dc0e72b70b5afdb2bd1e07d4a4115a755f213718e7c32c816697d993b73706d58be68fa043aef1ad551 DIST amd-driver-installer-catalyst-13.1-legacy-linux-x86.x86_64.zip 106908508 SHA256 3a992fb7564dba17a696217dc32043dabc21743c82116a6657817ee8a3a1d55f SHA512 96b34045dca3ad70156500b37d3f06008728ff81878a3e1432060d08e668d8cbd9bfe172440bcb818f01d731d39e3eeccc25396417993d2b9b8985b3b7dc7357 WHIRLPOOL f0e34ccb1a9dfe3cfd9e9c640c3d6ed97a4a3e892b65325a78045653b40d29a78427dc9092d8e14bee1a8ba603405ed9e8cd60188d5bc5e8c5eee03d66a8f25c @@ -17,23 +16,6 @@ DIST amd-driver-installer-catalyst-13.1-linux-x86.x86_64.zip 114850263 SHA256 67 DIST xvba-sdk-0.74-404001.tar.gz 583847 SHA256 731a2c489f2fb5d7318c1976061b26c1057a696f46d09dcf55fbada97fed17eb SHA512 aa1dd52b59eeeabd026d8b76e3b75eaf02587ef286438ba28884afeef5a5efaf50283b5ee4f5b81b12cf79cb4ec77c9a235a886b29fb7cdf850c9779f4b07b35 WHIRLPOOL 69917b746d353a884512e97b9d9a9b89e6f51add3119e69ddd119d51c0c3f2820b93a449fe42bd76d671dc505f92bf25b7f2c5868b33768fc68a19596e460951 EBUILD ati-drivers-13.1.ebuild 19758 SHA256 ddf468e9cf1cda7faf536b34b635c4619e37314064b081a941bbb6a37064396e SHA512 9cf16a5822e6695285c6ff747918ed16a87e03059fc91404ad8b157d9f9ed1d653adf6c47fe9cb13dd1f2dfa167464abb0ac670b89d39c23896b2ac6ef80fb82 WHIRLPOOL 03c7b4d8db05543a1cf6d21b20e7a81be0bb21e206a368108cc7f74f380aa22208ec3c6161ad6bfa96e57534f7a338e2a1ae0e1b85722e75fbbe16c4fec910be EBUILD ati-drivers-13.1_pre897.ebuild 19841 SHA256 08f69e8cb27be654d8bf45172836182d9fea6c9d38ce142b6c98d8a103545620 SHA512 f6b7822a1d954b85fbf4f76db67131f72bc1cae78ce92bf055866a04ef0202bfb1577b3499ed79c78b535b1758bfac92c033a8d80fe427fe80dbc43c48f06ec3 WHIRLPOOL a27b8feb3ddd45e048761ff19866c7a6276f2e0628ceb3ff29d52601ea43405761e644d01b9554bf3bf0835dca75f7da0b07238daa9861297fb9ff77f27a5340 -EBUILD ati-drivers-13.4.ebuild 20489 SHA256 2b008c46a65226e4533bcb110360cc800100e468df27c0f90ebbfc24d9f30c40 SHA512 784810a7fccae3fe4295cff90ed425376d2af857c0b3966a377f0854d3ea57a169d3a7876536fca0d00f869a0def454cdaf79ed5a4cf77a298efdd29f9565470 WHIRLPOOL 0bca14372af1666192d70ac971af9769d629af38c1485ec3890265c6d3dd14af359a21df012b100e9e376b2790ea272c33a14969c32df9d05e8ba44691451818 -MISC ChangeLog 86690 SHA256 7435b8db25ecba304f84c3b0f5b2ef8ef0d8f25d1aedea4be146e332986233e4 SHA512 b2470ff7f796854121666d1e96cf2212435d05572714dfb58768454b7657a6c3560e8fb877ec8b935eb6bc5945d564edb7817c3e80b461c129a607a508fd5df6 WHIRLPOOL eca0f833d31359ebf35a8c1c6a0fda3542321c5a35f25999a8c3e6c420afcf22ec409d8df2c3f55137e8670e115825cc06decc3ada8f8f82a0a1efc30c83e4e0 +EBUILD ati-drivers-13.4.ebuild 20936 SHA256 584ad93af2bdd956d1c9e59e0dbbf49a3a6dad5b898b136483647de8b49edf86 SHA512 67f51e0e5e7628177cd8a8dbfc111f7aa04d239c2e1fab104fe123d0cd228dd50bdc016fe44a07236c1fda3fc2596bfab64687e6912b1cfc6a8328b672578518 WHIRLPOOL 8bc6cbab7ad807c22f90617d2f5dbd234bc4882566a3aa9c9645b6a1ac9aabe23118a95942f2e538d4c32fc3960c91425aef4fafdf119f24cc3a3f6d5f46ff06 +MISC ChangeLog 86907 SHA256 c887af1c6d3982635101e9175a86b0cdf6593b2df7486ab7850611688afa1540 SHA512 7a7577790c190cda950a9b971791574cce5542335fb455a9c8ee27a9353df7da9dceee3a5ea1cea552d03c26ad6cea8e939cd2747e84956c1ee9350895200227 WHIRLPOOL 317766f804e470386d34892fcc061fd76e9865b290dcbb2da47b3e7e1df0837e3d30366bf22b7127bc4e6642ae5b34f1d535a06dd180b911ead1c349dbd15e84 MISC metadata.xml 731 SHA256 4eb1b53d7a0484614a57c7907c5f5411961bd8aae1d71fda50e21cf587f77b46 SHA512 89a2efca45077eed7151fc712b1e14be152559a33f186a0cb9dca7f678c45260be038e41a2e74a6bb5c780e0b37ea12d42a3a4889c29c92f312dc8be8711d54c WHIRLPOOL 24ef38f432b632e2957ad084e9e0ba5ab227ca52c612a108bc9d14c474922f1a979bda614ab984d94e8879c582b580bc25bee4cabefa21308529600bb5776e19 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.19 (GNU/Linux) - -iQIcBAEBCAAGBQJRekA0AAoJEOSiRoyO7jvo49QP/0cqh14qUaxx5opL6RHgemFL -XTWLhxsdot0GtB/QG8gWqd61S4y6KesxUN+wUZLCmQO7yeEbsqUDDCPpcrwDnKxk -/jr/Kd+L3F7wsHy3uP9wOF2kCOyZQ8i5if7Chx7vjCHiwKTv0CKvO9PJIgOFIdwI -K44IGZbLGVAY4smOLWfSM6LxTDYLDQXqOrdwzOML+GuL5kfiP8Lt9t71Ykz3rreZ -k7wtvkRLPGwwKcPFbtvVoWYDhmGhmY2sXoFiXeHHIndiv9CC4L9xgojg/pv0SFCs -DBwMRo2le/CcLRHdaaAjVyF4HY7Dz3pcyStAR2x5XAvI0lT5wBjzCR9qcJq/h0B7 -KHXnh/9bLO9DpBXWgDoz63F2LsC/Wz9+smR2u5ghX8ISnyHgdtUfbEaamHGc5luY -NYAuqxGGC9+36xXgWKaeh1q8SEydMfbqhCUxzNmxx7AGUb98PMty7WoNtqhae1BW -LM9A3/em4Q5wbFcqsiAtOPnMrc977lIXCJ6zbushkBhvmFai/XYSfrP/HrkU4Jea -mkCuJ0MW3lYMLWo/g6cYIBTLzw75M+DktJ+VTHNxxxPA2SAcftbZ7q5eIOoomLOx -bjCgjQAMDWVzDJLxyoD2IGFjS50Z3tH5B/LOBYlehm0IsUgGGZM4kKoDO6LADsHR -wWrwR5tWEk0CgXvyE5Xd -=mULN ------END PGP SIGNATURE----- diff --git a/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild index f93c0d487042..c6d861e19bdb 100644 --- a/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild +++ b/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild,v 1.1 2013/04/26 08:51:56 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild,v 1.2 2013/05/20 17:41:02 chithanh Exp $ EAPI=5 @@ -11,7 +11,11 @@ HOMEPAGE="http://www.amd.com" MY_V=( $(get_version_components) ) #RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run" SLOT="1" -[[ "${MY_V[2]}" =~ beta.* ]] && BETADIR="beta/" || BETADIR="linux/" +if [[ "${MY_V[2]}" =~ beta.* ]]; then + BETADIR="beta/" +else + BETADIR="linux/" +fi if [[ legacy != ${SLOT} ]]; then DRIVERS_URI="http://www2.ati.com/drivers/${BETADIR}amd-catalyst-${PV/_beta/-beta}-linux-x86.x86_64.zip" else @@ -155,7 +159,6 @@ QA_DT_HASH=" " CONFIG_CHECK="~MTRR ~!DRM ACPI PCI_MSI !LOCKDEP !PAX_KERNEXEC_PLUGIN_METHOD_OR" -use amd64 && CONFIG_CHECK="${CONFIG_CHECK} COMPAT" ERROR_MTRR="CONFIG_MTRR required for direct rendering." ERROR_DRM="CONFIG_DRM must be disabled or compiled as a module and not loaded for direct rendering to work." @@ -177,6 +180,10 @@ _check_kernel_config() { kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then die "CONFIG_BKL must be enabled for kernels 2.6.37-2.6.38." fi + + if use amd64 && ! linux_chkconfig_present COMPAT; then + die "CONFIG_COMPAT must be enabled for amd64 kernels." + fi } pkg_pretend() { @@ -193,6 +200,12 @@ pkg_pretend() { die "USE pax_kernel enabled for a non-hardened kernel" fi fi + + if ! has XT ${PAX_MARKINGS} && use pax_kernel; then + ewarn "You have disabled xattr pax markings for portage." + ewarn "This will likely cause programs using ati-drivers provided" + ewarn "libraries to be killed kernel." + fi } pkg_setup() { @@ -299,6 +312,11 @@ src_prepare() { # compile fix for AGP-less kernel, bug #435322 epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch + # Compile fix for kernel typesafe uid types #469160 + epatch "${FILESDIR}/linux-3.9-kuid.diff" + + epatch "${FILESDIR}/linux-3.10-proc.diff" + # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870 use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch" diff --git a/x11-drivers/ati-drivers/files/linux-3.10-proc.diff b/x11-drivers/ati-drivers/files/linux-3.10-proc.diff new file mode 100644 index 000000000000..ce4871c0658b --- /dev/null +++ b/x11-drivers/ati-drivers/files/linux-3.10-proc.diff @@ -0,0 +1,293 @@ +diff -Nur common/lib/modules/fglrx/build_mod/drmP.h common-r1/lib/modules/fglrx/build_mod/drmP.h +--- common/lib/modules/fglrx/build_mod/drmP.h 2013-05-15 09:26:23.555752577 +0300 ++++ common-r1/lib/modules/fglrx/build_mod/drmP.h 2013-05-16 10:39:17.496212055 +0300 +@@ -901,10 +901,6 @@ + int DRM(stub_unregister)(int minor); + + /* Proc support (drm_proc.h) */ +-extern struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev, +- int minor, +- struct proc_dir_entry *root, +- struct proc_dir_entry **dev_root); + extern int DRM(proc_cleanup)(int minor, + struct proc_dir_entry *root, + struct proc_dir_entry *dev_root); +diff -Nur common/lib/modules/fglrx/build_mod/drm_proc.h common-r1/lib/modules/fglrx/build_mod/drm_proc.h +--- common/lib/modules/fglrx/build_mod/drm_proc.h 2013-05-15 09:26:23.555752577 +0300 ++++ common-r1/lib/modules/fglrx/build_mod/drm_proc.h 2013-05-19 02:16:16.584406160 +0300 +@@ -75,61 +75,6 @@ + #define DRM_PROC_ENTRIES (sizeof(DRM(proc_list))/sizeof(DRM(proc_list)[0])) + + /** +- * Initialize the DRI proc filesystem for a device. +- * +- * \param dev DRM device. +- * \param minor device minor number. +- * \param root DRI proc dir entry. +- * \param dev_root resulting DRI device proc dir entry. +- * \return root entry pointer on success, or NULL on failure. +- * +- * Create the DRI proc root entry "/proc/ati", the device proc root entry +- * "/proc/ati/%minor%/", and each entry in proc_list as +- * "/proc/ati/%minor%/%name%". +- */ +-struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev, int minor, +- struct proc_dir_entry *root, +- struct proc_dir_entry **dev_root) +-{ +- struct proc_dir_entry *ent; +- int i, j; +- char name[64]; +- +- if (!minor) root = create_proc_entry("dri", S_IFDIR, NULL); +- if (!root) { +- DRM_ERROR("Cannot create /proc/ati\n"); +- return NULL; +- } +- +- sprintf(name, "%d", minor); +- *dev_root = create_proc_entry(name, S_IFDIR, root); +- if (!*dev_root) { +- DRM_ERROR("Cannot create /proc/ati/%s\n", name); +- return NULL; +- } +- +- for (i = 0; i < DRM_PROC_ENTRIES; i++) { +- ent = create_proc_entry(DRM(proc_list)[i].name, +- S_IFREG|S_IRUGO, *dev_root); +- if (!ent) { +- DRM_ERROR("Cannot create /proc/ati/%s/%s\n", +- name, DRM(proc_list)[i].name); +- for (j = 0; j < i; j++) +- remove_proc_entry(DRM(proc_list)[i].name, +- *dev_root); +- remove_proc_entry(name, root); +- if (!minor) remove_proc_entry("dri", NULL); +- return NULL; +- } +- ent->read_proc = DRM(proc_list)[i].f; +- ent->data = dev; +- } +- +- return root; +-} +- +- +-/** + * Cleanup the proc filesystem resources. + * + * \param minor device minor number. +diff -Nur common/lib/modules/fglrx/build_mod/firegl_public.c common-r1/lib/modules/fglrx/build_mod/firegl_public.c +--- common/lib/modules/fglrx/build_mod/firegl_public.c 2013-05-15 09:26:23.545752925 +0300 ++++ common-r1/lib/modules/fglrx/build_mod/firegl_public.c 2013-05-19 03:07:10.236552522 +0300 +@@ -583,6 +583,202 @@ + { "NULL", NULL, NULL} // Terminate List!!! + }; + ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) ++typedef int (read_proc_t)(char *page, char **start, off_t off, int count, int *eof, void *data); ++typedef int (write_proc_t)(struct file *file, const char __user *buffer, unsigned long count, void *data); ++#else ++#define PDE_DATA(inode) (PDE((inode))->data) ++#endif ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) ++typedef struct { ++ read_proc_t *read_func; ++ write_proc_t *write_func; ++ void *data; ++} gentoo_proc_wrapper_t; ++ ++#define GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC 939750305 ++ ++static ssize_t gentoo_proc_wrapper_read (struct file *myfile, char __user *buffer, size_t count, loff_t *offset) { ++ int is_eof=0, retval; ++ char *start, *usebuffer=NULL; ++ gentoo_proc_wrapper_t* wrapper_data=(gentoo_proc_wrapper_t*)(myfile->private_data); ++ if (PAGE_SIZE<*offset) { ++ printk(KERN_ERR "Trying to read beyond 4k on proc\n"); ++ return -EIO; ++ } ++ //printk(KERN_NOTICE " call with: dev %p, func %p\n", wrapper_data->data, wrapper_data->read_func); ++ ++ usebuffer=kmalloc(2*PAGE_SIZE, GFP_KERNEL); ++ if (!usebuffer) ++ return -ENOMEM; ++ ((u32*)usebuffer)[1024]=GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC; ++ ++ retval=wrapper_data->read_func(usebuffer, &start, *offset, count, &is_eof, wrapper_data->data); ++ ++ BUG_ON(GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC != ((u32*)usebuffer)[1024]); ++ ++ if (0 > retval) ++ { ++ printk(KERN_ERR "Proc read failed with %d", retval); ++ goto out; ++ } ++ ++ if (copy_to_user(buffer, start, retval)) { ++ printk(KERN_NOTICE "copy to user failed in amd drivers proc code\n"); ++ retval=-EFAULT; ++ goto out; ++ } ++ *offset+=retval; ++ ++out: ++ if (usebuffer) ++ kfree(usebuffer); ++ return retval; ++} ++static ssize_t gentoo_proc_wrapper_write (struct file *myfile, const char __user *buffer, size_t count, loff_t *offset) { ++ gentoo_proc_wrapper_t* wrapper_data=(gentoo_proc_wrapper_t*)(myfile->private_data); ++ int retval=0; ++ void *usebuffer=NULL; ++ ++ BUG_ON(*offset); ++ if (!wrapper_data->write_func) ++ return -EPERM; ++ ++ usebuffer=kmalloc(count, GFP_KERNEL); ++ if (!usebuffer) ++ return -ENOMEM; ++ if (copy_from_user(usebuffer, buffer, count)) { ++ printk(KERN_NOTICE "copy from user failed in amd drivers proc code\n"); ++ retval=-EFAULT; ++ goto out; ++ } ++ ++ retval=wrapper_data->write_func(myfile, buffer, count, wrapper_data->data); ++ *offset+=retval; ++out: ++ if (usebuffer) ++ kfree(usebuffer); ++ return retval; ++} ++static int gentoo_proc_wrapper_open(struct inode *myinode, struct file *myfile) { ++ myfile->private_data=PDE_DATA(myinode); ++ return generic_file_open(myinode, myfile); ++} ++struct file_operations gentoo_proc_fops = { ++ .read=gentoo_proc_wrapper_read, ++ .write=gentoo_proc_wrapper_write, ++ .open=gentoo_proc_wrapper_open, ++}; ++ ++static void *gentoo_proc_wrapper_data(read_proc_t *reader, write_proc_t *writer, void *mydata) { ++ gentoo_proc_wrapper_t *retval=kmalloc(sizeof(gentoo_proc_wrapper_t), GFP_KERNEL); ++ if (!retval) ++ return retval; ++ retval->read_func=reader; ++ retval->write_func=writer; ++ retval->data=mydata; ++ return retval; ++} ++ ++static struct proc_dir_entry *firegl_proc_init( device_t *dev, ++ int minor, ++ struct proc_dir_entry *root, ++ struct proc_dir_entry **dev_root, ++ kcl_proc_list_t *proc_list ) // proc_list must be terminated! ++{ ++ struct proc_dir_entry *ent; ++ char name[64]; ++ kcl_proc_list_t *list = proc_list; ++ void *tempdata; ++ KCL_DEBUG1(FN_FIREGL_PROC, "minor %d, proc_list 0x%08lx\n", minor, (unsigned long)proc_list); ++ if (!minor) ++ { ++ root = proc_mkdir("ati", NULL); ++ } ++ ++ if (!root) ++ { ++ KCL_DEBUG_ERROR("Cannot create /proc/ati\n"); ++ return NULL; ++ } ++ ++ if (minor == 0) ++ { ++ // Global major debice number entry ++ tempdata=gentoo_proc_wrapper_data((read_proc_t*)firegl_major_proc_read, NULL, NULL); ++ if (!tempdata) ++ return NULL; ++ ent = proc_create_data("major", S_IFREG|S_IRUGO, root, &gentoo_proc_fops, tempdata); ++ if (!ent) ++ { ++ remove_proc_entry("ati", NULL); ++ KCL_DEBUG_ERROR("Cannot create /proc/ati/major\n"); ++ return NULL; ++ } ++ } ++ ++ sprintf(name, "%d", minor); ++ *dev_root = proc_mkdir(name, root); ++ if (!*dev_root) { ++ remove_proc_entry("major", root); ++ remove_proc_entry("ati", NULL); ++ KCL_DEBUG_ERROR("Cannot create /proc/ati/%s\n", name); ++ return NULL; ++ } ++ ++ while (list->f || list->fops) ++ { ++ struct file_operations *my_fops = &gentoo_proc_fops; ++ if (list->fops) ++ { ++ my_fops = (struct file_operations*)list->fops; ++ tempdata=(dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev); ++ } ++ else { ++ BUG_ON(!list->f); ++ tempdata=gentoo_proc_wrapper_data((read_proc_t*)list->f, NULL, (dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev) ); ++ if (!tempdata) ++ return NULL; ++ } ++ //printk(KERN_NOTICE "name %s, dev %p, func %p, data %p\n", list->name, (dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev), list->f, tempdata); ++ ent = proc_create_data(list->name, S_IFREG|S_IRUGO, *dev_root, my_fops, tempdata); ++ ++ if (!ent) ++ { ++ KCL_DEBUG_ERROR("Cannot create /proc/ati/%s/%s\n", name, list->name); ++ while (proc_list != list) ++ { ++ remove_proc_entry(proc_list->name, *dev_root); ++ proc_list++; ++ } ++ remove_proc_entry(name, root); ++ if (!minor) ++ { ++ remove_proc_entry("major", root); ++ remove_proc_entry("ati", NULL); ++ } ++ return NULL; ++ } ++ ++ list++; ++ } ++ ++ if (minor == 0) ++ { ++ // Global debug entry, only create it once ++ tempdata=gentoo_proc_wrapper_data((read_proc_t*)firegl_debug_proc_read_wrap, (write_proc_t*)firegl_debug_proc_write_wrap, dev); ++ if (!tempdata) ++ return NULL; ++ ent=proc_create_data("debug", S_IFREG|S_IRUGO, root, &gentoo_proc_fops, tempdata); ++ if (!ent) ++ return NULL; ++ } ++ ++ return root; ++} ++#else + static struct proc_dir_entry *firegl_proc_init( device_t *dev, + int minor, + struct proc_dir_entry *root, +@@ -677,6 +873,7 @@ + + return root; + } ++#endif + + static int firegl_proc_cleanup( int minor, + struct proc_dir_entry *root, diff --git a/x11-drivers/ati-drivers/files/linux-3.9-kuid.diff b/x11-drivers/ati-drivers/files/linux-3.9-kuid.diff new file mode 100644 index 000000000000..7e910d9269c6 --- /dev/null +++ b/x11-drivers/ati-drivers/files/linux-3.9-kuid.diff @@ -0,0 +1,33 @@ +diff -Nur common/lib/modules/fglrx/build_mod/firegl_public.c common-r1/lib/modules/fglrx/build_mod/firegl_public.c +--- common/lib/modules/fglrx/build_mod/firegl_public.c 2013-04-17 00:29:55.000000000 +0300 ++++ common-r1/lib/modules/fglrx/build_mod/firegl_public.c 2013-05-11 00:37:44.653966585 +0300 +@@ -34,6 +34,11 @@ + #include <linux/autoconf.h> + #endif + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0) ++#include <linux/uidgid.h> ++#endif ++ ++ + #if !defined(CONFIG_X86) + #if !defined(CONFIG_X86_PC) + #if !defined(CONFIG_X86_XEN) +@@ -1543,9 +1548,17 @@ + KCL_TYPE_Uid ATI_API_CALL KCL_GetEffectiveUid(void) + { + #ifdef current_euid ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0) ++ return __kuid_val(current_euid()); ++# else + return current_euid(); ++# endif + #else ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0) ++ return __kuid_val(current->euid); ++# else + return current->euid; ++# endif + #endif + } + |