public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2011-10-15 14:39 Enrico Tagliavini
  0 siblings, 0 replies; 26+ messages in thread
From: Enrico Tagliavini @ 2011-10-15 14:39 UTC (permalink / raw
  To: gentoo-commits

commit:     7cd6566fe9f639a760409a2a331d53b5343247ff
Author:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
AuthorDate: Sat Oct 15 14:39:01 2011 +0000
Commit:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
CommitDate: Sat Oct 15 14:39:01 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=7cd6566f

[ati-drivers] revision bump, fix comment #9 and #10 in bug #366397

---
 ...vers-11.9.ebuild => ati-drivers-11.9-r1.ebuild} |    6 +-
 x11-drivers/ati-drivers/files/switchlibGL          |   43 ++++++++++---------
 2 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-11.9.ebuild b/x11-drivers/ati-drivers/ati-drivers-11.9-r1.ebuild
similarity index 99%
rename from x11-drivers/ati-drivers/ati-drivers-11.9.ebuild
rename to x11-drivers/ati-drivers/ati-drivers-11.9-r1.ebuild
index ec6093e..fef0878 100644
--- a/x11-drivers/ati-drivers/ati-drivers-11.9.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-11.9-r1.ebuild
@@ -474,9 +474,9 @@ src_install() {
 
 	# PowerXpress stuff
 	exeinto /usr/$(get_libdir)/fglrx
-	doexe "${FILESDIR}"/switchlibGL || die "newexe switchlibGL failed"
-	dosym ./switchlibGL /usr/$(get_libdir)/fglrx/switchlibglx || die \
-	"dosym switchlibglx failed"
+	doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed"
+	cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx
+	doexe "${T}"/switchlibglx || die "doexe switchlibglx failed"
 }
 
 src_install-libs() {

diff --git a/x11-drivers/ati-drivers/files/switchlibGL b/x11-drivers/ati-drivers/files/switchlibGL
index e8fac1e..a6aa4fc 100644
--- a/x11-drivers/ati-drivers/files/switchlibGL
+++ b/x11-drivers/ati-drivers/files/switchlibGL
@@ -30,28 +30,31 @@ if [ $# -ne 1 ]; then
   exit $E_ERR
 fi
 
-
+current=$(eselect opengl show)
 # Switch to right mode
 case "$1" in
-  "amd" )
-        eselect opengl set ati
-  ;;
-  "intel" )
-        eselect opengl set xorg-x11
-  ;;
-  "query" )
-        current=`eselect opengl show`
-        case "$current" in
-          "ati" )
-             echo "amd"
-          ;;
-          "xorg-x11" )
-             echo "intel"
-          ;;
-        esac
-  ;;
-  * ) echo "Usage: `basename $0` amd|intel|query" 1>&2; exit $E_ERR;;
-  # other than amd|intel|query parameter report an error
+	"amd" )
+		if [ $current != ati ] ; then
+			eselect opengl set ati || return 1
+		fi
+	;;
+	"intel" )
+		if [ $current != xorg-x11 ] ; then
+			eselect opengl set xorg-x11 || return 1
+		fi
+	;;
+	"query" )
+		case "$current" in
+			"ati" )
+				echo "amd"
+			;;
+			"xorg-x11" )
+				echo "intel"
+			;;
+		esac
+	;;
+	* ) echo "Usage: `basename $0` amd|intel|query" 1>&2; exit $E_ERR;;
+	# other than amd|intel|query parameter report an error
 esac
 
 #  A zero return value from the script upon exit indicates success.



^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2015-12-08 11:19 Emil Karlson
  0 siblings, 0 replies; 26+ messages in thread
From: Emil Karlson @ 2015-12-08 11:19 UTC (permalink / raw
  To: gentoo-commits

commit:     8dd557ff4303226a49aecb544c8e8d0594b91c99
Author:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
AuthorDate: Tue Dec  8 11:13:50 2015 +0000
Commit:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
CommitDate: Tue Dec  8 11:13:50 2015 +0000
URL:        https://gitweb.gentoo.org/proj/x11.git/commit/?id=8dd557ff

x11-drivers/ati-drivers: version bump

Thanks to Rion for comtributed patch

 ...s-14.2_beta.ebuild => ati-drivers-15.11.ebuild} | 109 +++++++++++----------
 .../ati-drivers-15.11-remove-gpl-symbols.patch     |  48 +++++++++
 x11-drivers/ati-drivers/files/atieventsd.service   |   9 ++
 3 files changed, 112 insertions(+), 54 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-14.2_beta.ebuild b/x11-drivers/ati-drivers/ati-drivers-15.11.ebuild
similarity index 90%
rename from x11-drivers/ati-drivers/ati-drivers-14.2_beta.ebuild
rename to x11-drivers/ati-drivers/ati-drivers-15.11.ebuild
index bfd9728..e38c540 100644
--- a/x11-drivers/ati-drivers/ati-drivers-14.2_beta.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-15.11.ebuild
@@ -4,19 +4,20 @@
 
 EAPI=5
 
-inherit eutils multilib linux-info linux-mod toolchain-funcs versionator pax-utils
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+inherit eutils multilib-build linux-info linux-mod systemd toolchain-funcs versionator pax-utils
 
 DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets"
 HOMEPAGE="http://www.amd.com"
-RUN="${WORKDIR}/amd-driver-installer-13.35.1005-x86.x86_64.run"
+RUN="${WORKDIR}/fglrx-15.30.1025/amd-driver-installer-15.30.1025-x86.x86_64.run"
 SLOT="1"
 # Uses javascript for download YESSSS
 #DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-catalyst-13.12-linux-x86.x86_64.zip"
-DRIVERS_URI="http://dev.gentooexperimental.org/~scarabeus/amd-catalyst-14.2-betav1.3-linux-x86.x86_64.zip"
+DRIVERS_URI="mirror://gentoo/radeon-crimson-15.11-15.30.1025.zip"
 XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz"
 SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}"
 FOLDER_PREFIX="common/"
-IUSE="debug +modules multilib qt4 static-libs pax_kernel"
+IUSE="debug +modules qt4 static-libs pax_kernel gdm-hack"
 
 LICENSE="AMD GPL-2 QPL-1.0"
 KEYWORDS="-* ~amd64 ~x86"
@@ -24,30 +25,18 @@ KEYWORDS="-* ~amd64 ~x86"
 RESTRICT="bindist test"
 
 RDEPEND="
-	<=x11-base/xorg-server-1.15.49[-minimal]
+	<=x11-base/xorg-server-1.17.49[-minimal]
 	>=app-eselect/eselect-opengl-1.0.7
 	app-eselect/eselect-opencl
 	sys-power/acpid
 	x11-apps/xauth
-	x11-libs/libX11
-	x11-libs/libXext
-	x11-libs/libXinerama
-	x11-libs/libXrandr
-	x11-libs/libXrender
-	virtual/glu
-	multilib? (
-			app-emulation/emul-linux-x86-opengl
-			|| (
-				(
-					x11-libs/libX11[abi_x86_32]
-					x11-libs/libXext[abi_x86_32]
-					x11-libs/libXinerama[abi_x86_32]
-					x11-libs/libXrandr[abi_x86_32]
-					x11-libs/libXrender[abi_x86_32]
-				)
-				app-emulation/emul-linux-x86-xlibs
-			)
-	)
+	!x11-libs/xvba-video
+	virtual/glu[${MULTILIB_USEDEP}]
+	x11-libs/libX11[${MULTILIB_USEDEP}]
+	x11-libs/libXext[${MULTILIB_USEDEP}]
+	x11-libs/libXinerama[${MULTILIB_USEDEP}]
+	x11-libs/libXrandr[${MULTILIB_USEDEP}]
+	x11-libs/libXrender[${MULTILIB_USEDEP}]
 	qt4? (
 			x11-libs/libICE
 			x11-libs/libSM
@@ -57,6 +46,9 @@ RDEPEND="
 			dev-qt/qtcore:4
 			dev-qt/qtgui:4[accessibility]
 	)
+	gdm-hack? (
+		x11-base/xorg-server:=
+	)
 "
 if [[ legacy != ${SLOT} ]]; then
 	RDEPEND="${RDEPEND}
@@ -120,6 +112,7 @@ QA_SONAME="
 	usr/lib\(32\|64\)\?/libaticaldd.so
 	usr/lib\(32\|64\)\?/libaticalrt.so
 	usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so
+	usr/lib\(32\|64\)\?/libamdhsasc\(32\|64\)\?.so
 "
 
 QA_DT_HASH="
@@ -152,6 +145,14 @@ QA_DT_HASH="
 	usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
 "
 
+pkg_nofetch() {
+	einfo "The driver packages"
+	einfo ${A}
+	einfo "need to be downloaded manually from"
+	einfo "http://support.amd.com/en-us/download/desktop?os=Linux%20x86_64"
+	einfo "and ${XVBA_SDK_URI}"
+}
+
 pkg_pretend() {
 	local CONFIG_CHECK="~MTRR ~!DRM ACPI PCI_MSI !LOCKDEP !PAX_KERNEXEC_PLUGIN_METHOD_OR"
 	use amd64 && CONFIG_CHECK+=" COMPAT"
@@ -193,7 +194,7 @@ pkg_setup() {
 		MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod/2.6.x)"
 		BUILD_TARGETS="kmod_build"
 		linux-mod_pkg_setup
-		BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
+		BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_OUT_DIR}"
 		BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\""
 		if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then
 			BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space"
@@ -224,7 +225,7 @@ pkg_setup() {
 	elog
 	elog "If your card is older then use ${CATEGORY}/xf86-video-ati"
 	elog "For migration informations please refer to:"
-	elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
+	elog "https://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
 	einfo
 }
 
@@ -235,6 +236,8 @@ src_unpack() {
 
 	if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then
 		unpack ${DRIVERS_DISTFILE}
+		mkdir -p common
+		mv etc lib usr common || die "Assumed to find etc lib and usr for common"
 	else
 		#please note, RUN may be insanely assigned at top near SRC_URI
 		if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then
@@ -296,25 +299,18 @@ 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}/typesafe-kuid.diff"
-
 	epatch "${FILESDIR}/ati-drivers-13.8-beta-include-seq_file.patch"
 
-	epatch "${FILESDIR}/check-for-iommu-only-if-iommu-is-supported.patch"
-
 	# Fix #483400
 	epatch "${FILESDIR}/fgl_glxgears-do-not-include-glATI.patch"
 
-	# Fix build on new kernels
-	#epatch "${FILESDIR}/ati-drivers-13.12-acpi.patch"
-
-	# Add support for linux-3.13. See #498766
-	#epatch "${FILESDIR}/ati-drivers-linux-3.13-acpi-handle.patch"
+	epatch "${FILESDIR}/ati-drivers-15.11-remove-gpl-symbols.patch"
 
 	# Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
 	use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
 
+	epatch_user
+
 	cd "${MODULE_DIR}"
 
 	# bugged fglrx build system, this file should be copied by hand
@@ -382,21 +378,7 @@ src_install() {
 	# amd64 are installed in src_install-libs. Everything else
 	# (including libraries only available in native 64bit on amd64)
 	# goes in here.
-
-	# There used to be some code here that tried to detect running
-	# under a "native multilib" portage ((precursor of)
-	# http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it
-	# should just work (only doing some duplicate work). --marienz
-	if has_multilib_profile; then
-		local OABI=${ABI}
-		for ABI in $(get_install_abis); do
-			src_install-libs
-		done
-		ABI=${OABI}
-		unset OABI
-	else
-		src_install-libs
-	fi
+	multilib_foreach_abi src_install-libs
 
 	# This is sorted by the order the files occur in the source tree.
 
@@ -408,6 +390,11 @@ src_install() {
 	exeinto /usr/$(get_libdir)/xorg/modules
 	doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so}
 
+	#516816
+	if use gdm-hack; then
+		sed -i 's#/proc/%i/fd/0#/etc/ati/xvrn#g' "${D}/usr/$(get_libdir)/xorg/modules/drivers/fglrx_drv.so" || die "Applying gdm-hack failed"
+	fi
+
 	# Arch-specific files.
 	# (s)bin.
 	into /opt
@@ -466,12 +453,16 @@ src_install() {
 	newinitd "${FILESDIR}"/atieventsd.init atieventsd
 	echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
 	newconfd "${T}"/atieventsd.conf atieventsd
+	systemd_dounit "${FILESDIR}/atieventsd.service"
 
 	# PowerXpress stuff
 	exeinto /usr/$(get_libdir)/fglrx
 	doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed"
 	cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx
 	doexe "${T}"/switchlibglx || die "doexe switchlibglx failed"
+
+	#516816
+	use gdm-hack && Xorg -version > "${D}/etc/ati/xvrn" 2>&1
 }
 
 src_install-libs() {
@@ -501,9 +492,16 @@ src_install-libs() {
 	dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
 	dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
 
-	exeinto ${ATI_ROOT}/extensions
-	doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so
-	mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so
+	if multilib_is_native_abi; then
+		exeinto ${ATI_ROOT}/extensions
+		doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so
+		mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so
+
+		#516816
+		if use gdm-hack; then
+			sed -i 's#/proc/%i/fd/0#/etc/ati/xvrn#g' "${D}/${ATI_ROOT}/extensions/libglx.so" || die "Applying gdm-hack failed"
+		fi
+	fi
 
 	# other libs
 	exeinto /usr/$(get_libdir)
@@ -560,6 +558,9 @@ src_install-libs() {
 	#install xvba sdk headers
 	doheader xvba_sdk/include/amdxvba.h
 
+	# VA-API internal wrapper
+	dosym /usr/$(get_libdir)/libXvBAW.so.1.0 /usr/$(get_libdir)/va/drivers/fglrx_drv_video.so
+
 	if use pax_kernel; then
 		pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed"
 	fi

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-15.11-remove-gpl-symbols.patch b/x11-drivers/ati-drivers/files/ati-drivers-15.11-remove-gpl-symbols.patch
new file mode 100644
index 0000000..5cea796
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-15.11-remove-gpl-symbols.patch
@@ -0,0 +1,48 @@
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-09-18 23:57:02.000000000 -0400
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-09-18 23:57:11.000000000 -0400
+@@ -136,7 +136,6 @@
+ #include <asm/mman.h>
+ #include <asm/uaccess.h>
+ #include <asm/processor.h>
+-#include <asm/tlbflush.h> // for flush_tlb_page
+ #include <asm/cpufeature.h>
+ #ifdef CONFIG_MTRR
+ #include <asm/mtrr.h>
+@@ -251,6 +250,26 @@
+ #define WRITE_CR4(x)    write_cr4(x)
+ #endif
+ 
++#define __flush_tlb_one(addr) asm volatile("invlpg (%0)" ::"r" (addr) : "memory")
++#define __flush_tlb() native_write_cr3(native_read_cr3())
++
++static inline void __flush_tlb_all(void)
++{
++        if (cpu_has_pge)
++        {
++                unsigned long flags, cr4;
++                raw_local_irq_save(flags);
++                cr4 = native_read_cr4();
++                native_write_cr4(cr4 & ~X86_CR4_PGE);
++                native_write_cr4(cr4);
++                raw_local_irq_restore(flags);
++        }
++        else
++        {
++                __flush_tlb();
++        }
++}
++
+ // ============================================================
+ /* globals */
+ 
+--- a/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2015-09-19 00:43:35.000000000 -0400
++++ b/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2015-09-19 00:43:48.000000000 -0400
+@@ -868,7 +868,7 @@ void ATI_API_CALL KCL_ACPI_No_Hotplug(vo
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
+     if(pdev)
+     {
+-#if (UTS_UBUNTU_RELEASE_ABI < 0 && LINUX_VERSION_CODE < KERNEL_VERSION(4,1,3)) || (UTS_UBUNTU_RELEASE_ABI >= 0 && UTS_UBUNTU_RELEASE_ABI < 26 && LINUX_VERSION_CODE <= KERNEL_VERSION(3,19,8))
++#if 0 && (UTS_UBUNTU_RELEASE_ABI < 0 && LINUX_VERSION_CODE < KERNEL_VERSION(4,1,3)) || (UTS_UBUNTU_RELEASE_ABI >= 0 && UTS_UBUNTU_RELEASE_ABI < 26 && LINUX_VERSION_CODE <= KERNEL_VERSION(3,19,8))
+        pci_ignore_hotplug(pdev);
+ #else
+        pdev->ignore_hotplug = 1;

diff --git a/x11-drivers/ati-drivers/files/atieventsd.service b/x11-drivers/ati-drivers/files/atieventsd.service
new file mode 100644
index 0000000..72df6c4
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/atieventsd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Catalyst event Daemon
+Requires=acpid.socket
+
+[Service]
+ExecStart=/opt/sbin/atieventsd --nodaemon
+
+[Install]
+WantedBy=multi-user.target


^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2015-02-12 20:03 Emil Karlson
  0 siblings, 0 replies; 26+ messages in thread
From: Emil Karlson @ 2015-02-12 20:03 UTC (permalink / raw
  To: gentoo-commits

commit:     5c7604800fef9c0b99674970467fb9feec9ec723
Author:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
AuthorDate: Thu Feb 12 20:03:26 2015 +0000
Commit:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
CommitDate: Thu Feb 12 20:03:26 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=5c760480

x11-drivers/ati-drivers: fix compile on linux-3.19

---
 .../ati-drivers/ati-drivers-14.12-r3.ebuild        |  2 +
 .../get-percpu-without-preempt-on-linux-3.19.patch | 45 ++++++++++++++++++++++
 2 files changed, 47 insertions(+)

diff --git a/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild b/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild
index b4aa191..a792e68 100644
--- a/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild
@@ -327,6 +327,8 @@ src_prepare() {
 	# Compile fix, #526602
 	epatch "${FILESDIR}/use-kernel_fpu_begin.patch"
 
+	epatch "${FILESDIR}/get-percpu-without-preempt-on-linux-3.19.patch"
+
 	cd "${MODULE_DIR}"
 
 	# bugged fglrx build system, this file should be copied by hand

diff --git a/x11-drivers/ati-drivers/files/get-percpu-without-preempt-on-linux-3.19.patch b/x11-drivers/ati-drivers/files/get-percpu-without-preempt-on-linux-3.19.patch
new file mode 100644
index 0000000..d2c6f70
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/get-percpu-without-preempt-on-linux-3.19.patch
@@ -0,0 +1,45 @@
+From 56ca74832b1f97c8e89329a313c7ca2405cd26cb Mon Sep 17 00:00:00 2001
+From: Emil Karlson <jekarlson@gmail.com>
+Date: Thu, 12 Feb 2015 21:59:46 +0200
+Subject: [PATCH] get percpu without preempton linux-3.19
+
+---
+ common/lib/modules/fglrx/build_mod/firegl_public.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
+index 360b6ac..3cba36e 100755
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -4816,8 +4816,13 @@ static unsigned long kasSetExecutionLevel(unsigned long level)
+ {
+     unsigned long orig_level;
+ 
+-    orig_level = __get_cpu_var(kasExecutionLevel);
+-    __get_cpu_var(kasExecutionLevel) = level;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++	orig_level = __get_cpu_var(kasExecutionLevel);
++	__get_cpu_var(kasExecutionLevel) = level;
++#else
++    orig_level = (*this_cpu_ptr(&(kasExecutionLevel)));
++    (*this_cpu_ptr(&(kasExecutionLevel))) = level;
++#endif
+ 
+     return orig_level;
+ }
+@@ -4829,7 +4834,11 @@ static unsigned long kasSetExecutionLevel(unsigned long level)
+  */
+ static unsigned long kas_GetExecutionLevel(void)
+ {
+-    return __get_cpu_var(kasExecutionLevel);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++	return __get_cpu_var(kasExecutionLevel);
++#else
++	return (*this_cpu_ptr(&(kasExecutionLevel)));
++#endif
+ }
+ 
+ /** \brief Type definition for kas_spin_lock() parameter */
+-- 
+2.0.5
+


^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2014-11-10 20:07 Emil Karlson
  0 siblings, 0 replies; 26+ messages in thread
From: Emil Karlson @ 2014-11-10 20:07 UTC (permalink / raw
  To: gentoo-commits

commit:     9589ab069aa08fe9787e02107860128a40940d48
Author:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
AuthorDate: Mon Nov 10 20:06:33 2014 +0000
Commit:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
CommitDate: Mon Nov 10 20:06:33 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=9589ab06

x11-drivers/ati-drivers: fix x86-32 build failure on linux-3.17

fixes #526602

---
 x11-drivers/ati-drivers/ati-drivers-14.9-r1.ebuild       |  3 +++
 x11-drivers/ati-drivers/ati-drivers-14.9.ebuild          |  3 +++
 x11-drivers/ati-drivers/files/use-kernel_fpu_begin.patch | 12 ++++++++++++
 3 files changed, 18 insertions(+)

diff --git a/x11-drivers/ati-drivers/ati-drivers-14.9-r1.ebuild b/x11-drivers/ati-drivers/ati-drivers-14.9-r1.ebuild
index 2ebb926..267b375 100644
--- a/x11-drivers/ati-drivers/ati-drivers-14.9-r1.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-14.9-r1.ebuild
@@ -318,6 +318,9 @@ src_prepare() {
 	# Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
 	use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
 
+	# Compile fix, #526602
+	epatch "${FILESDIR}/use-kernel_fpu_begin.patch"
+
 	cd "${MODULE_DIR}"
 
 	# bugged fglrx build system, this file should be copied by hand

diff --git a/x11-drivers/ati-drivers/ati-drivers-14.9.ebuild b/x11-drivers/ati-drivers/ati-drivers-14.9.ebuild
index fae8fb3..378153e 100644
--- a/x11-drivers/ati-drivers/ati-drivers-14.9.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-14.9.ebuild
@@ -318,6 +318,9 @@ src_prepare() {
 	# Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
 	use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
 
+	# Compile fix, #526602
+	epatch "${FILESDIR}/use-kernel_fpu_begin.patch"
+
 	cd "${MODULE_DIR}"
 
 	# bugged fglrx build system, this file should be copied by hand

diff --git a/x11-drivers/ati-drivers/files/use-kernel_fpu_begin.patch b/x11-drivers/ati-drivers/files/use-kernel_fpu_begin.patch
new file mode 100644
index 0000000..f0ba278
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/use-kernel_fpu_begin.patch
@@ -0,0 +1,12 @@
+diff -Naur a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c	2014-10-27 23:30:58.630304842 +0200
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c	2014-10-27 23:32:57.300306011 +0200
+@@ -6389,7 +6389,7 @@
+  */
+ void ATI_API_CALL KCL_fpu_begin(void)
+ {
+-#ifdef CONFIG_X86_64
++#if defined(CONFIG_X86_64) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
+     kernel_fpu_begin();
+ #else
+ #ifdef TS_USEDFPU


^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2014-01-22 21:48 Emil Karlson
  0 siblings, 0 replies; 26+ messages in thread
From: Emil Karlson @ 2014-01-22 21:48 UTC (permalink / raw
  To: gentoo-commits

commit:     f23dc6abf1ac65b9bdc7d5d10534af1e9f9111bf
Author:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
AuthorDate: Wed Jan 22 21:30:42 2014 +0000
Commit:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
CommitDate: Wed Jan 22 21:30:42 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=f23dc6ab

x11-drivers/ati-drivers: patch support for linux-3.13

Thanks to Helmut Jarausch for providing the patch.

---
 .../ati-drivers/ati-drivers-13.12-r1.ebuild        |   3 +
 ...2.11_beta11.ebuild => ati-drivers-13.12.ebuild} | 237 +++++++++------------
 .../ati-drivers/files/ati-drivers-13.12-acpi.patch |  16 ++
 .../files/ati-drivers-linux-3.13-acpi-handle.patch |  27 +++
 4 files changed, 143 insertions(+), 140 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-13.12-r1.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.12-r1.ebuild
index e7f16b9..3f1e1f3 100644
--- a/x11-drivers/ati-drivers/ati-drivers-13.12-r1.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-13.12-r1.ebuild
@@ -288,6 +288,9 @@ src_prepare() {
 	# Fix build on new kernels
 	epatch "${FILESDIR}/ati-drivers-13.12-acpi.patch"
 
+	# Add support for linux-3.13. See #498766
+	epatch "${FILESDIR}/ati-drivers-linux-3.13-acpi-handle.patch"
+
 	# 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/ati-drivers-12.11_beta11.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.12.ebuild
similarity index 76%
rename from x11-drivers/ati-drivers/ati-drivers-12.11_beta11.ebuild
rename to x11-drivers/ati-drivers/ati-drivers-13.12.ebuild
index e76f832..448be0b 100644
--- a/x11-drivers/ati-drivers/ati-drivers-12.11_beta11.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-13.12.ebuild
@@ -4,26 +4,27 @@
 
 EAPI=5
 
-inherit eutils multilib linux-info linux-mod toolchain-funcs versionator
+inherit eutils multilib linux-info linux-mod toolchain-funcs versionator pax-utils
 
 DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets"
 HOMEPAGE="http://www.amd.com"
-MY_V=( $(get_version_components) )
-#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run"
-DRIVERS_URI="http://www2.ati.com/drivers/beta/amd-driver-installer-catalyst-12.11-beta11-x86.x86_64.zip"
+#RUN="${WORKDIR}/amd-catalyst-13.11-beta1-linux-x86.x86_64.run"
+SLOT="1"
+# Uses javascript for download YESSSS
+#DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-catalyst-13.12-linux-x86.x86_64.zip"
+DRIVERS_URI="http://dev.gentooexperimental.org/~scarabeus/amd-catalyst-13.12-linux-x86.x86_64.zip"
 XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz"
 SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}"
 FOLDER_PREFIX="common/"
-IUSE="debug +modules multilib qt4 static-libs disable-watermark"
+IUSE="debug +modules multilib qt4 static-libs pax_kernel"
 
 LICENSE="AMD GPL-2 QPL-1.0"
 KEYWORDS="-* ~amd64 ~x86"
-SLOT="1"
 
-RESTRICT="bindist"
+RESTRICT="bindist test"
 
 RDEPEND="
-	<=x11-base/xorg-server-1.13.49[-minimal]
+	<=x11-base/xorg-server-1.14.49[-minimal]
 	>=app-admin/eselect-opengl-1.0.7
 	app-admin/eselect-opencl
 	sys-power/acpid
@@ -36,7 +37,16 @@ RDEPEND="
 	virtual/glu
 	multilib? (
 			app-emulation/emul-linux-x86-opengl
-			app-emulation/emul-linux-x86-xlibs
+			|| (
+				(
+					x11-libs/libX11[abi_x86_32]
+					x11-libs/libXext[abi_x86_32]
+					x11-libs/libXinerama[abi_x86_32]
+					x11-libs/libXrandr[abi_x86_32]
+					x11-libs/libXrender[abi_x86_32]
+				)
+				app-emulation/emul-linux-x86-xlibs
+			)
 	)
 	qt4? (
 			x11-libs/libICE
@@ -48,6 +58,13 @@ RDEPEND="
 			dev-qt/qtgui:4[accessibility]
 	)
 "
+if [[ legacy != ${SLOT} ]]; then
+	RDEPEND="${RDEPEND}
+		!x11-drivers/ati-drivers:legacy"
+else
+	RDEPEND="${RDEPEND}
+		!x11-drivers/ati-drivers:1"
+fi
 
 DEPEND="${RDEPEND}
 	x11-proto/inputproto
@@ -133,104 +150,39 @@ QA_DT_HASH="
 	usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
 "
 
-_check_kernel_config() {
-	local failed=0
-	local error=""
-	if ! kernel_is ge 2 6; then
-		eerror "You need a 2.6 linux kernel to compile against!"
-		die "No 2.6 Kernel found"
-	fi
-
-	if ! linux_chkconfig_present MTRR; then
-		ewarn "You don't have MTRR support enabled in the kernel."
-		ewarn "Direct rendering will not work."
-	fi
-
-	if linux_chkconfig_builtin DRM; then
-		ewarn "You have DRM support built in to the kernel"
-		ewarn "Direct rendering will not work."
-	fi
-
-	if ! linux_chkconfig_present AGP && \
-		! linux_chkconfig_present PCIEPORTBUS; then
-		ewarn "You don't have AGP and/or PCIe support enabled in the kernel"
-		ewarn "Direct rendering will not work."
-	fi
-
-	if ! linux_chkconfig_present ACPI; then
-		eerror "${P} requires the ACPI support in the kernel"
-		eerror "Please enable it:"
-		eerror "    CONFIG_ACPI=y"
-		eerror "in /usr/src/linux/.config or"
-		eerror "    Power management and ACPI options --->"
-		eerror "        [*] Power Management support"
-		eerror "in the 'menuconfig'"
-		error+=" CONFIG_ACPI disabled;"
-		failed=1
-	fi
-
-	if ! linux_chkconfig_present PCI_MSI; then
-		eerror "${P} requires MSI in the kernel."
-		eerror "Please enable it:"
-		eerror "    CONFIG_PCI_MSI=y"
-		eerror "in /usr/src/linux/.config or"
-		eerror "    Bus options (PCI etc.)  --->"
-		eerror "        [*] Message Signaled Interrupts (MSI and MSI-X)"
-		eerror "in the kernel config."
-		error+=" CONFIG_PCI_MSI disabled;"
-		failed=1
-	fi
-
-	if linux_chkconfig_present LOCKDEP; then
-		eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
-		eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only."
-		eerror "This prevents ${P} from compiling with an error like this:"
-		eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'"
-		eerror "Please make sure the following options have been unset:"
-		eerror "    Kernel hacking  --->"
-		eerror "        [ ] Lock debugging: detect incorrect freeing of live locks"
-		eerror "        [ ] Lock debugging: prove locking correctness"
-		eerror "        [ ] Lock usage statistics"
-		eerror "in 'menuconfig'"
-		error+=" LOCKDEP enabled;"
-		failed=1
-	fi
-
-	use amd64 && if ! linux_chkconfig_present COMPAT; then
-		eerror "${P} requires COMPAT."
-		eerror "Please enable the 32 bit emulation:"
-		eerror "Executable file formats / Emulations  --->"
-		eerror "    [*] IA32 Emulation"
-		eerror "in the kernel config."
-		eerror "if this doesn't enable CONFIG_COMPAT add"
-		eerror "    CONFIG_COMPAT=y"
-		eerror "in /usr/src/linux/.config"
-		error+=" COMPAT disabled;"
-		failed=1
-	fi
-
-	kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then
-		eerror "${P} requires BKL."
-		eerror "Please enable the Big Kernel Lock:"
-		eerror "Kernel hacking  --->"
-		eerror "    [*] Big Kernel Lock"
-		eerror "in the kernel config."
-		eerror "or add"
-		eerror "    CONFIG_BKL=y"
-		eerror "in /usr/src/linux/.config"
-		error+=" BKL disabled;"
-		failed=1
-	fi
-
-	[[ ${failed} -ne 0 ]] && die "${error}"
-}
-
 pkg_pretend() {
+	local CONFIG_CHECK="~MTRR ~!DRM ACPI PCI_MSI !LOCKDEP !PAX_KERNEXEC_PLUGIN_METHOD_OR"
+	use amd64 && CONFIG_CHECK+=" COMPAT"
+
+	local ERROR_MTRR="CONFIG_MTRR required for direct rendering."
+	local ERROR_DRM="CONFIG_DRM must be disabled or compiled as a module and not loaded for direct
+		rendering to work."
+	local ERROR_LOCKDEP="CONFIG_LOCKDEP (lock tracking) exports the symbol lock_acquire
+		as GPL-only. This prevents ${P} from compiling with an error like this:
+		FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'"
+	local ERROR_PAX_KERNEXEC_PLUGIN_METHOD_OR="This config option will cause
+		kernel to reject loading the fglrx module with
+		\"ERROR: could not insert 'fglrx': Exec format error.\"
+		You may want to try CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_BTS instead."
+	local ERROR_BKL="CONFIG_BKL must be enabled for kernels 2.6.37-2.6.38."
+
 	# workaround until bug 365543 is solved
 	if use modules; then
 		linux-info_pkg_setup
 		require_configured_kernel
-		_check_kernel_config
+		kernel_is ge 2 6 37 && kernel_is le 2 6 38 && CONFIG_CHECK+=" BKL"
+		check_extra_config
+		if ! linux_chkconfig_present AGP && \
+			! linux_chkconfig_present PCIEPORTBUS; then
+			ewarn "You don't have AGP and/or PCIe support enabled in the kernel"
+			ewarn "Direct rendering will not work."
+		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
 }
 
@@ -264,20 +216,20 @@ pkg_setup() {
 	fi
 
 	elog
-	elog "Please note that this driver supports only graphic cards based on"
+	elog "Please note that this driver only supports graphic cards based on"
 	elog "Evergreen chipset and newer."
-	elog "This represent the AMD Radeon HD 5400+ series at this moment."
+	elog "This includes the AMD Radeon HD 5400+ series at this moment."
 	elog
 	elog "If your card is older then use ${CATEGORY}/xf86-video-ati"
-	elog "For migration informations please reffer to:"
+	elog "For migration informations please refer to:"
 	elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
 	einfo
 }
 
 src_unpack() {
 	local DRIVERS_DISTFILE XVBA_SDK_DISTFILE
-	DRIVERS_DISTFILE=${DRIVERS_URI/*\//}
-	XVBA_SDK_DISTFILE=${XVBA_SDK_URI/*\//}
+	DRIVERS_DISTFILE=${DRIVERS_URI##*/}
+	XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/}
 
 	if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then
 		unpack ${DRIVERS_DISTFILE}
@@ -289,19 +241,20 @@ src_unpack() {
 		else
 			RUN="${DISTDIR}/${DRIVERS_DISTFILE}"
 		fi
-		sh ${RUN} --extract "${S}" 2>&1 > /dev/null || die
+		sh "${RUN}" --extract "${S}" 2>&1 > /dev/null || die
 	fi
 
 	mkdir xvba_sdk
 	cd xvba_sdk
 	unpack ${XVBA_SDK_DISTFILE}
+
+	mkdir -p "${WORKDIR}/extra" || die "mkdir extra failed"
+	cd "${WORKDIR}/extra"
+	tar -xf "../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz"
 }
 
 src_prepare() {
-	# All kernel options for prepare are ment to be in here
 	if use modules; then
-		# version patches
-		# epatch "${FILESDIR}"/kernel/${PV}-*.patch
 		if use debug; then
 			sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
 				"${MODULE_DIR}/firegl_public.c" \
@@ -323,7 +276,7 @@ src_prepare() {
 		-e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
 		-e "s:/var/lib/gdm/:/var/gdm/:" \
 		"${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \
-		|| die "sed failed."
+		|| die "ACPI fixups failed."
 
 	# Since "who" is in coreutils, we're using that one instead of "finger".
 	sed -i -e 's:finger:who:' \
@@ -338,16 +291,27 @@ src_prepare() {
 	# first hunk applied upstream second (x32 related) was not
 	epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch
 
-	# compile fix for linux-3.7
-	# https://bugs.gentoo.org/show_bug.cgi?id=438516
-	epatch "${FILESDIR}/ati-drivers-vm-reserverd.patch"
-
 	# compile fix for AGP-less kernel, bug #435322
 	epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
 
-	# Use ACPI_DEVICE_HANDLE wrapper to make driver build on linux-3.8
-	# see https://bugs.gentoo.org/show_bug.cgi?id=448216
-	epatch "${FILESDIR}/ati-drivers-kernel-3.8-acpihandle.patch"
+	# Compile fix for kernel typesafe uid types #469160
+	epatch "${FILESDIR}/typesafe-kuid.diff"
+
+	epatch "${FILESDIR}/ati-drivers-13.8-beta-include-seq_file.patch"
+
+	epatch "${FILESDIR}/check-for-iommu-only-if-iommu-is-supported.patch"
+
+	# Fix #483400
+	epatch "${FILESDIR}/fgl_glxgears-do-not-include-glATI.patch"
+
+	# Fix build on new kernels
+	epatch "${FILESDIR}/ati-drivers-13.12-acpi.patch"
+
+	# Add support for linux-3.13. See #498766
+	epatch "${FILESDIR}/ati-drivers-linux-3.13-acpi-handle.patch"
+
+	# Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
+	use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
 
 	cd "${MODULE_DIR}"
 
@@ -364,22 +328,6 @@ src_prepare() {
 	sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed"
 	sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \
 		|| die "MODVERSIONS sed failed"
-	cd "${S}"
-
-	mkdir extra || die "mkdir failed"
-	cd extra
-	unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz
-
-	# Get rid of watermark. Oldest known reference:
-	# http://phoronix.com/forums/showthread.php?19875-Unsupported-Hardware-watermark
-	if use disable-watermark; then
-		ebegin "Disabling watermark"
-		driver="${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
-		for x in $(objdump -d ${driver}|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do
-		sed -i "s/${x/x5b/\x5b}/\x90\x90\x90\x90\x90/g" ${driver} || break 1
-		done
-		eend $? || die "Disabling watermark failed"
-	fi
 }
 
 src_compile() {
@@ -398,8 +346,6 @@ src_compile() {
 	eend $?
 }
 
-src_test() { :; } # no tests present
-
 src_install() {
 	use modules && linux-mod_src_install
 
@@ -611,6 +557,10 @@ src_install-libs() {
 
 	#install xvba sdk headers
 	doheader xvba_sdk/include/amdxvba.h
+
+	if use pax_kernel; then
+		pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed"
+	fi
 }
 
 pkg_postinst() {
@@ -633,12 +583,19 @@ pkg_postinst() {
 	"${ROOT}"/usr/bin/eselect opengl set --use-old ati
 	"${ROOT}"/usr/bin/eselect opencl set --use-old amd
 
-	if has_version ">=x11-drivers/xf86-video-intel-2.20.3"; then
-		ewarn "It is reported that xf86-video-intel-2.20.3 and later cause the X server"
+	if has_version "x11-drivers/xf86-video-intel[sna]"; then
+		ewarn "It is reported that xf86-video-intel built with USE=\"sna\" causes the X server"
 		ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience"
-		ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier."
+		ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier or"
+		ewarn "try disabling sna for xf86-video-intel."
 		ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000"
 	fi
+
+	if use pax_kernel; then
+		ewarn "Please run \"revdep-pax -s libGL.so.1 -me\" after installation and"
+		ewarn "after you have run \"eselect opengl set ati\". Executacle"
+		ewarn "revdep-pax is part of package sys-apps/elfix."
+	fi
 }
 
 pkg_preinst() {

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-13.12-acpi.patch b/x11-drivers/ati-drivers/files/ati-drivers-13.12-acpi.patch
new file mode 100644
index 0000000..0a27431
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-13.12-acpi.patch
@@ -0,0 +1,16 @@
+diff -urN common.old/lib/modules/fglrx/build_mod/kcl_acpi.c common/lib/modules/fglrx/build_mod/kcl_acpi.c
+--- common.old/lib/modules/fglrx/build_mod/kcl_acpi.c	2013-12-27 13:32:34.734832283 +0100
++++ common/lib/modules/fglrx/build_mod/kcl_acpi.c	2013-12-27 13:33:31.849831765 +0100
+@@ -1002,7 +1002,11 @@
+ #endif
+     {
+         return KCL_ACPI_ERROR;
+-    }    
++    }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,1)
++    ((acpi_tbl_table_handler)handler)(hdr);
++#else
+     ((acpi_table_handler)handler)(hdr);
++#endif
+     return KCL_ACPI_OK;
+ }

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-linux-3.13-acpi-handle.patch b/x11-drivers/ati-drivers/files/ati-drivers-linux-3.13-acpi-handle.patch
new file mode 100644
index 0000000..3ecc7c4
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-linux-3.13-acpi-handle.patch
@@ -0,0 +1,27 @@
+From 889165af52ba694f72d4d1e333a1f9ba14a82fde Mon Sep 17 00:00:00 2001
+From: Emil Karlson <jekarlson@gmail.com>
+Date: Tue, 21 Jan 2014 23:25:26 +0200
+Subject: [PATCH] ati-drivers: linux-3.13 acpi handle
+
+---
+ common/lib/modules/fglrx/build_mod/kcl_acpi.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/common/lib/modules/fglrx/build_mod/kcl_acpi.c b/common/lib/modules/fglrx/build_mod/kcl_acpi.c
+index d875bf9..e063057 100755
+--- a/common/lib/modules/fglrx/build_mod/kcl_acpi.c
++++ b/common/lib/modules/fglrx/build_mod/kcl_acpi.c
+@@ -792,7 +792,9 @@ static unsigned int KCL_ACPI_SearchHandles(KCL_ACPI_DevHandle handle, unsigned i
+ unsigned int ATI_API_CALL KCL_ACPI_GetHandles(kcl_match_info_t *pInfo)
+ {
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)
+-    #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
++    #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
++        pInfo->video_handle = (acpi_handle)ACPI_HANDLE(&pInfo->pcidev->dev);
++    #elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
+         pInfo->video_handle = pInfo->pcidev->dev.acpi_node.handle;
+     #elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19)
+         pInfo->video_handle = pInfo->pcidev->dev.archdata.acpi_handle;
+-- 
+1.8.3.2
+


^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2013-09-07  6:36 Emil Karlson
  0 siblings, 0 replies; 26+ messages in thread
From: Emil Karlson @ 2013-09-07  6:36 UTC (permalink / raw
  To: gentoo-commits

commit:     df81dae9dd0362cdccb0e5afc95e0a3c03b3c351
Author:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
AuthorDate: Sat Sep  7 06:32:40 2013 +0000
Commit:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
CommitDate: Sat Sep  7 06:32:40 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=df81dae9

x11-drivers/ati-drivers: Do not include glATI.h in fgl_glxgears

Fixes #483400
Fix pointed out by Matthew Dawson

---
 x11-drivers/ati-drivers/ati-drivers-13.8_beta2.ebuild        | 12 +++++++-----
 .../files/fgl_glxgears-do-not-include-glATI.patch            | 11 +++++++++++
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-13.8_beta2.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.8_beta2.ebuild
index bc8437c..ffb2cbe 100644
--- a/x11-drivers/ati-drivers/ati-drivers-13.8_beta2.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-13.8_beta2.ebuild
@@ -252,6 +252,10 @@ src_unpack() {
 	mkdir xvba_sdk
 	cd xvba_sdk
 	unpack ${XVBA_SDK_DISTFILE}
+
+	mkdir -p "${WORKDIR}/extra" || die "mkdir extra failed"
+	cd "${WORKDIR}/extra"
+	tar -xf "../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz"
 }
 
 src_prepare() {
@@ -303,6 +307,9 @@ src_prepare() {
 	epatch "${FILESDIR}/check-for-iommu-only-if-iommu-is-supported.patch"
 	epatch "${FILESDIR}/ati-drivers-13.8-proc-permissions.diff"
 
+	# Fix #483400
+	epatch "${FILESDIR}/fgl_glxgears-do-not-include-glATI.patch"
+
 	# Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
 	use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
 
@@ -321,11 +328,6 @@ src_prepare() {
 	sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed"
 	sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \
 		|| die "MODVERSIONS sed failed"
-	cd "${S}"
-
-	mkdir extra || die "mkdir extra failed"
-	cd extra
-	unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz
 }
 
 src_compile() {

diff --git a/x11-drivers/ati-drivers/files/fgl_glxgears-do-not-include-glATI.patch b/x11-drivers/ati-drivers/files/fgl_glxgears-do-not-include-glATI.patch
new file mode 100644
index 0000000..d46e027
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/fgl_glxgears-do-not-include-glATI.patch
@@ -0,0 +1,11 @@
+diff -Nur extra/fgl_glxgears/fgl_glxgears.c extra-r1/fgl_glxgears/fgl_glxgears.c
+--- extra/fgl_glxgears/fgl_glxgears.c	2012-08-29 09:59:03.000000000 +0300
++++ extra-r1/fgl_glxgears/fgl_glxgears.c	2013-09-07 09:26:11.034723135 +0300
+@@ -78,7 +78,6 @@
+ #endif // _WIN32
+ 
+ #define INT_PTR ptrdiff_t
+-#include <GL/glATI.h>
+ 
+ #ifdef _WIN32
+ #include <GL/wglATI.h>


^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2013-06-15 16:49 Emil Karlson
  0 siblings, 0 replies; 26+ messages in thread
From: Emil Karlson @ 2013-06-15 16:49 UTC (permalink / raw
  To: gentoo-commits

commit:     dffa21cd50ef2c8082a25561225d156601a147f1
Author:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
AuthorDate: Sat Jun 15 16:42:16 2013 +0000
Commit:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
CommitDate: Sat Jun 15 16:42:16 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=dffa21cd

x11-drivers/ati-drivers: typesafe-kuid diff also needed for older kernels

linux-3.5...3.8

---
 .../ati-drivers/ati-drivers-13.1_pre897.ebuild     |  2 +-
 x11-drivers/ati-drivers/ati-drivers-13.4.ebuild    |  2 +-
 .../ati-drivers/ati-drivers-13.6_beta.ebuild       |  2 +-
 x11-drivers/ati-drivers/files/linux-3.9-kuid.diff  | 33 ---------------------
 x11-drivers/ati-drivers/files/typesafe-kuid.diff   | 34 ++++++++++++++++++++++
 5 files changed, 37 insertions(+), 36 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-13.1_pre897.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.1_pre897.ebuild
index 636830b..b95fad7 100644
--- a/x11-drivers/ati-drivers/ati-drivers-13.1_pre897.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-13.1_pre897.ebuild
@@ -302,7 +302,7 @@ src_prepare() {
 	use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
 
 	# Compile fix for kernel typesafe uid types #469160
-	epatch "${FILESDIR}/linux-3.9-kuid.diff"
+	epatch "${FILESDIR}/typesafe-kuid.diff"
 
 	epatch "${FILESDIR}/linux-3.10-proc.diff"
 

diff --git a/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild
index d8bfdb1..ad6484c 100644
--- a/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild
@@ -313,7 +313,7 @@ src_prepare() {
 	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}/typesafe-kuid.diff"
 
 	epatch "${FILESDIR}/linux-3.10-proc.diff"
 

diff --git a/x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild
index 5c856fc..edd4825 100644
--- a/x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild
@@ -313,7 +313,7 @@ src_prepare() {
 	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}/typesafe-kuid.diff"
 
 	epatch "${FILESDIR}/ati-drivers-13.6-linux-3.10-proc.diff"
 

diff --git a/x11-drivers/ati-drivers/files/linux-3.9-kuid.diff b/x11-drivers/ati-drivers/files/linux-3.9-kuid.diff
deleted file mode 100644
index 7e910d9..0000000
--- a/x11-drivers/ati-drivers/files/linux-3.9-kuid.diff
+++ /dev/null
@@ -1,33 +0,0 @@
-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
- }
- 

diff --git a/x11-drivers/ati-drivers/files/typesafe-kuid.diff b/x11-drivers/ati-drivers/files/typesafe-kuid.diff
new file mode 100644
index 0000000..c226ea3
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/typesafe-kuid.diff
@@ -0,0 +1,34 @@
+diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
+index d3ad3ce..9362b58 100755
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -34,6 +34,11 @@
+ #include <linux/autoconf.h>
+ #endif
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,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_Pid ATI_API_CALL KCL_GetTgid(void)
+ KCL_TYPE_Uid ATI_API_CALL KCL_GetEffectiveUid(void)
+ {
+ #ifdef current_euid
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++    return __kuid_val(current_euid());
++# else
+     return current_euid();
++# endif
+ #else
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++    return __kuid_val(current->euid);
++# else
+     return current->euid;
++# endif
+ #endif
+ }
+ 


^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2013-06-10 16:35 Emil Karlson
  0 siblings, 0 replies; 26+ messages in thread
From: Emil Karlson @ 2013-06-10 16:35 UTC (permalink / raw
  To: gentoo-commits

commit:     d08f145e6dbc13796fddf39c41467a87dfb4db35
Author:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
AuthorDate: Mon Jun 10 16:34:06 2013 +0000
Commit:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
CommitDate: Mon Jun 10 16:34:06 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=d08f145e

x11-drivers/ati-drivers: port linux-3.10-proc.diff to 13.6_beta

---
 .../ati-drivers/ati-drivers-13.6_beta.ebuild       |   2 +-
 .../files/ati-drivers-13.6-linux-3.10-proc.diff    | 356 +++++++++++++++++++++
 2 files changed, 357 insertions(+), 1 deletion(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild
index 0fe8a6f..5c856fc 100644
--- a/x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild
@@ -315,7 +315,7 @@ src_prepare() {
 	# Compile fix for kernel typesafe uid types #469160
 	epatch "${FILESDIR}/linux-3.9-kuid.diff"
 
-	epatch "${FILESDIR}/linux-3.10-proc.diff"
+	epatch "${FILESDIR}/ati-drivers-13.6-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/ati-drivers-13.6-linux-3.10-proc.diff b/x11-drivers/ati-drivers/files/ati-drivers-13.6-linux-3.10-proc.diff
new file mode 100644
index 0000000..bdb22ea
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-13.6-linux-3.10-proc.diff
@@ -0,0 +1,356 @@
+diff --git a/common/lib/modules/fglrx/build_mod/drmP.h b/common/lib/modules/fglrx/build_mod/drmP.h
+index 81546b2..4e74526 100755
+--- a/common/lib/modules/fglrx/build_mod/drmP.h
++++ b/common/lib/modules/fglrx/build_mod/drmP.h
+@@ -901,10 +901,6 @@ int                   DRM(stub_register)(const char *name,
+ 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 --git a/common/lib/modules/fglrx/build_mod/drm_proc.h b/common/lib/modules/fglrx/build_mod/drm_proc.h
+index 1e3ab4a..c52ad7e 100755
+--- a/common/lib/modules/fglrx/build_mod/drm_proc.h
++++ b/common/lib/modules/fglrx/build_mod/drm_proc.h
+@@ -75,61 +75,6 @@ struct drm_proc_list {
+ #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 --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
+index d3ad3ce..890a0aa 100755
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -583,6 +583,202 @@ kcl_proc_list_t KCL_PROC_FileList[] =
+     { "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 @@ static struct proc_dir_entry *firegl_proc_init( device_t *dev,
+ 
+     return root;
+ }
++#endif
+ 
+ static int firegl_proc_cleanup( int minor,
+                                 struct proc_dir_entry *root,
+@@ -6135,59 +6332,4 @@ void ATI_API_CALL KCL_fpu_end(void)
+     kernel_fpu_end();
+ }
+ 
+-/** Create new directory entry under "/proc/ati/...."
+- * Where
+- * root_dir - Root directory. If NULL then we should use "/proc/ati" root.
+- * name    - Pointer to the name of directory
+- * access  - Access attribute. We could use it to disable access to the directory for everybody accept owner.
+- *                By default owner is root.
+- * Return NULL if failure. Pointer to proc_dir_entry otherwise
+- */
+-void * KCL_create_proc_dir(void *root_dir, const char *name, unsigned int access)
+-{
+-    struct proc_dir_entry *dir = NULL;
+-
+-    if (root_dir == NULL)
+-         dir = create_proc_entry(name, S_IFDIR | access, firegl_stub_root);
+-    else
+-         dir = create_proc_entry(name, S_IFDIR | access, (struct proc_dir_entry *)root_dir);
+-
+-    return dir;
+-}
+-
+-/* Remove proc directory entry
+- * root   - Pointer to directory proc entry or NULL if for "/proc/ati"
+- * name - Name to delete
+- */
+-void KCL_remove_proc_dir_entry(void *root, const char *name)
+-{
+-    if (root == NULL)
+-        remove_proc_entry(name, firegl_stub_root);
+-    else
+-        remove_proc_entry(name, (struct proc_dir_entry *)root);
+-}
+-
+-
+-/* Create proc_entry under "root_dir"
+- * read_fn - Function which will be called on read request
+- * write_fn - Function which will be called on write request
+- * private_data - Pointer to private data which will be passed
+- */
+-void KCL_create_proc_entry(void *root_dir, const char *name, unsigned int access_mode, void *read_fn, void *write_fn, void *private_data)
+-{
+-    struct proc_dir_entry *ent = NULL;
+-
+-    if (root_dir == NULL || name == NULL)
+-        return;
+-
+-    ent = create_proc_entry(name, access_mode, (struct proc_dir_entry *)root_dir);
+-
+-    if (ent)
+-    {
+-        ent->read_proc = (read_proc_t *)read_fn;    
+-        ent->write_proc = (write_proc_t *)write_fn; 
+-        ent->data = private_data;
+-    }
+-}
+-
+ #endif /* __KERNEL__ */


^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2013-05-19  0:25 Emil Karlson
  0 siblings, 0 replies; 26+ messages in thread
From: Emil Karlson @ 2013-05-19  0:25 UTC (permalink / raw
  To: gentoo-commits

commit:     e8d7d34e28d7c6b4115bb7e12a0400edf72fadca
Author:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
AuthorDate: Sun May 19 00:24:21 2013 +0000
Commit:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
CommitDate: Sun May 19 00:24:21 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=e8d7d34e

x11-drivers/ati-drivers: add initial linux-3.10 support.

The patch is huge and some problems may be expected.

---
 x11-drivers/ati-drivers/ati-drivers-13.4.ebuild    |    2 +
 x11-drivers/ati-drivers/files/linux-3.10-proc.diff |  293 ++++++++++++++++++++
 2 files changed, 295 insertions(+), 0 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild
index c149797..c8f0b40 100644
--- a/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild
@@ -315,6 +315,8 @@ src_prepare() {
 	# 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 0000000..ce4871c
--- /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,


^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2013-05-11  2:15 Emil Karlson
  0 siblings, 0 replies; 26+ messages in thread
From: Emil Karlson @ 2013-05-11  2:15 UTC (permalink / raw
  To: gentoo-commits

commit:     cb0a205493850e3d81cea7bfbcd371506ee14a5b
Author:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
AuthorDate: Sat May 11 02:12:22 2013 +0000
Commit:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
CommitDate: Sat May 11 02:12:22 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=cb0a2054

x11-drivers/ati-drivers compile fix for kuid_t

Should fix bug #469160

---
 x11-drivers/ati-drivers/ati-drivers-13.4.ebuild   |    3 ++
 x11-drivers/ati-drivers/files/linux-3.9-kuid.diff |   33 +++++++++++++++++++++
 2 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild
index 6f5e274..39928c3 100644
--- a/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild
@@ -309,6 +309,9 @@ 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"
+
 	# 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.9-kuid.diff b/x11-drivers/ati-drivers/files/linux-3.9-kuid.diff
new file mode 100644
index 0000000..7e910d9
--- /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
+ }
+ 


^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2013-02-15 18:49 Emil Karlson
  0 siblings, 0 replies; 26+ messages in thread
From: Emil Karlson @ 2013-02-15 18:49 UTC (permalink / raw
  To: gentoo-commits

commit:     b5725eca10bdba826d5362e81fab4ef57c0b2c55
Author:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
AuthorDate: Fri Feb 15 18:47:48 2013 +0000
Commit:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
CommitDate: Fri Feb 15 18:47:48 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=b5725eca

ati-drivers: add compile patch for hardened kernel

Add IUSE=pax_kernel to apply the incompatible kernel patch conditionally.

---
 .../ati-drivers/ati-drivers-13.2_beta3-r200.ebuild |    5 +++-
 .../ati-drivers/files/const-notifier-block.patch   |   25 ++++++++++++++++++++
 x11-drivers/ati-drivers/metadata.xml               |    3 ++
 3 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-13.2_beta3-r200.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.2_beta3-r200.ebuild
index cf18684..0f65f61 100644
--- a/x11-drivers/ati-drivers/ati-drivers-13.2_beta3-r200.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-13.2_beta3-r200.ebuild
@@ -20,7 +20,7 @@ fi
 XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz"
 SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}"
 FOLDER_PREFIX="common/"
-IUSE="debug +modules multilib qt4 static-libs disable-watermark"
+IUSE="debug +modules multilib qt4 static-libs disable-watermark pax_kernel"
 
 LICENSE="AMD GPL-2 QPL-1.0"
 KEYWORDS="-* ~amd64 ~x86"
@@ -287,6 +287,9 @@ src_prepare() {
 	# see https://bugs.gentoo.org/show_bug.cgi?id=448216
 	epatch "${FILESDIR}/ati-drivers-kernel-3.8-acpihandle.patch"
 
+	# Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
+	use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
+
 	cd "${MODULE_DIR}"
 
 	# bugged fglrx build system, this file should be copied by hand

diff --git a/x11-drivers/ati-drivers/files/const-notifier-block.patch b/x11-drivers/ati-drivers/files/const-notifier-block.patch
new file mode 100644
index 0000000..ba1fdb2
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/const-notifier-block.patch
@@ -0,0 +1,25 @@
+diff -Nur common/lib/modules/fglrx/build_mod/kcl_acpi.c common-r1/lib/modules/fglrx/build_mod/kcl_acpi.c
+--- common/lib/modules/fglrx/build_mod/kcl_acpi.c	2013-01-29 17:03:51.000000000 +0200
++++ common-r1/lib/modules/fglrx/build_mod/kcl_acpi.c	2013-02-15 20:33:10.611838616 +0200
+@@ -15,6 +15,9 @@
+  ****************************************************************************/
+ 
+ #include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
++#include <linux/notifier.h>
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
+ #include <generated/autoconf.h>
+ #else
+@@ -145,7 +148,11 @@
+     return NOTIFY_OK;
+ }
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
++static notifier_block_no_const firegl_acpi_lid_notifier = {
++#else
+ static struct notifier_block firegl_acpi_lid_notifier = {
++#endif
+         .notifier_call = firegl_acpi_lid_event,
+ };
+ #endif

diff --git a/x11-drivers/ati-drivers/metadata.xml b/x11-drivers/ati-drivers/metadata.xml
index 7f03c15..872d247 100644
--- a/x11-drivers/ati-drivers/metadata.xml
+++ b/x11-drivers/ati-drivers/metadata.xml
@@ -16,4 +16,7 @@
 	<use>
 		<flag name='disable-watermark'>Do a potentially dangerous binary search and replace to disable watermark</flag>
 	</use>
+	<use>
+		<flag name='pax_kernel'>Enable pax kernel specific patches</flag>
+	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2012-12-23 17:06 Emil Karlson
  0 siblings, 0 replies; 26+ messages in thread
From: Emil Karlson @ 2012-12-23 17:06 UTC (permalink / raw
  To: gentoo-commits

commit:     64ef31b71805499db28970b50538ddcfffd060b4
Author:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
AuthorDate: Sun Dec 23 16:53:49 2012 +0000
Commit:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
CommitDate: Sun Dec 23 16:53:49 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=64ef31b7

ati-drivers: patch for linux-3.8 compatibility.

Thanks to Fabio Rossi <rossi.f <AT> inwind.it> for the patch.

---
 .../ati-drivers/ati-drivers-12.11_beta11.ebuild    |    4 ++++
 .../ati-drivers-12.6_beta_pre897.ebuild            |    4 ++++
 .../files/ati-drivers-kernel-3.8-acpihandle.patch  |   15 +++++++++++++++
 3 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-12.11_beta11.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.11_beta11.ebuild
index 5dfac04..e5b5fc9 100644
--- a/x11-drivers/ati-drivers/ati-drivers-12.11_beta11.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-12.11_beta11.ebuild
@@ -341,6 +341,10 @@ src_prepare() {
 	# compile fix for AGP-less kernel, bug #435322
 	epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
 
+	# Use ACPI_DEVICE_HANDLE wrapper to make driver build on linux-3.8
+	# see https://bugs.gentoo.org/show_bug.cgi?id=448216 
+	epatch "${FILESDIR}/ati-drivers-kernel-3.8-acpihandle.patch"
+
 	cd "${MODULE_DIR}"
 
 	# bugged fglrx build system, this file should be copied by hand

diff --git a/x11-drivers/ati-drivers/ati-drivers-12.6_beta_pre897.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.6_beta_pre897.ebuild
index cd05be3..7522018 100644
--- a/x11-drivers/ati-drivers/ati-drivers-12.6_beta_pre897.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-12.6_beta_pre897.ebuild
@@ -326,6 +326,10 @@ src_prepare() {
 	#fixes bug #420751
 	epatch "${FILESDIR}"/ati-drivers-do_mmap.patch
 
+	# Use ACPI_DEVICE_HANDLE wrapper to make driver build on linux-3.8
+	# see https://bugs.gentoo.org/show_bug.cgi?id=448216 
+	epatch "${FILESDIR}/ati-drivers-kernel-3.8-acpihandle.patch"
+
 	cd "${MODULE_DIR}"
 
 	# bugged fglrx build system, this file should be copied by hand

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-kernel-3.8-acpihandle.patch b/x11-drivers/ati-drivers/files/ati-drivers-kernel-3.8-acpihandle.patch
new file mode 100644
index 0000000..bdff4fb
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-kernel-3.8-acpihandle.patch
@@ -0,0 +1,15 @@
+--- common/lib/modules/fglrx/build_mod/kcl_acpi.c	2012-07-04 21:43:47.000000000 +0200
++++ common/lib/modules/fglrx/build_mod/kcl_acpi.c.new	2012-12-23 11:25:38.000000000 +0100
+@@ -775,11 +775,7 @@
+ unsigned int ATI_API_CALL KCL_ACPI_GetHandles(kcl_match_info_t *pInfo)
+ {
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)
+-    #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19)
+-        pInfo->video_handle = pInfo->pcidev->dev.archdata.acpi_handle;
+-    #else 
+-        pInfo->video_handle = pInfo->pcidev->dev.firmware_data;
+-    #endif    
++    pInfo->video_handle = DEVICE_ACPI_HANDLE(&pInfo->pcidev->dev);
+     if ( pInfo->video_handle &&
+         (KCL_ACPI_videoDevice(pInfo->video_handle) != KCL_ACPI_OK) )
+     {


^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2012-11-11  1:29 Chi-Thanh Christopher Nguyen
  0 siblings, 0 replies; 26+ messages in thread
From: Chi-Thanh Christopher Nguyen @ 2012-11-11  1:29 UTC (permalink / raw
  To: gentoo-commits

commit:     d866500c11dc0f3bed6352ef3e5fdc0662f906a0
Author:     Chi-Thanh Christopher Nguyen <chithanh <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 11 01:29:46 2012 +0000
Commit:     Chi-Thanh Christopher Nguyen <chithanh <AT> cs <DOT> tu-berlin <DOT> de>
CommitDate: Sun Nov 11 01:29:46 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=d866500c

x11-drivers/ati-drivers: add patch to fix building against AGP-less kernel, bug #435322.

---
 .../ati-drivers/ati-drivers-12.11_beta.ebuild      |    3 ++
 ...ivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch |   27 ++++++++++++++++++++
 2 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-12.11_beta.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.11_beta.ebuild
index 7cf42e6..dc75442 100644
--- a/x11-drivers/ati-drivers/ati-drivers-12.11_beta.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-12.11_beta.ebuild
@@ -338,6 +338,9 @@ src_prepare() {
 	# https://bugs.gentoo.org/show_bug.cgi?id=438516
 	epatch "${FILESDIR}/ati-drivers-vm-reserverd.patch"
 
+	# compile fix for AGP-less kernel, bug #435322
+	epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
+
 	cd "${MODULE_DIR}"
 
 	# bugged fglrx build system, this file should be copied by hand

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch b/x11-drivers/ati-drivers/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
new file mode 100644
index 0000000..0ea461b
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
@@ -0,0 +1,27 @@
+From: Vasiliy Yeremeyev <vayerx@gmail.com>
+Date: Sun, 4 Nov 2012 23:59:36 +0400
+Subject: [PATCH] KCL_AGP_FindCapsRegisters stub for AGP-less systems
+
+---
+ common/lib/modules/fglrx/build_mod/kcl_agp.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/common/lib/modules/fglrx/build_mod/kcl_agp.c b/common/lib/modules/fglrx/build_mod/kcl_agp.c
+index b9c0655..cb1902b 100644
+--- a/common/lib/modules/fglrx/build_mod/kcl_agp.c
++++ b/common/lib/modules/fglrx/build_mod/kcl_agp.c
+@@ -479,6 +479,11 @@ int ATI_API_CALL KCL_AGP_Enable(unsigned long mode)
+     return -EINVAL;
+ }
+ 
++int ATI_API_CALL KCL_AGP_FindCapsRegisters(KCL_PCI_DevHandle dev)
++{
++    return -EINVAL;
++}
++
+ int ATI_API_CALL KCL_AGP_ReadCapsRegisters(KCL_PCI_DevHandle dev, unsigned int *caps)
+ {
+     return -EINVAL;
+-- 
+1.7.12
+


^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2012-10-21 22:21 Emil Karlson
  0 siblings, 0 replies; 26+ messages in thread
From: Emil Karlson @ 2012-10-21 22:21 UTC (permalink / raw
  To: gentoo-commits

commit:     e14da9af1e4e159760f1934dafddb9b7f99dc2c7
Author:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
AuthorDate: Sun Oct 21 20:50:03 2012 +0000
Commit:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
CommitDate: Sun Oct 21 20:50:03 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=e14da9af

x11-drivers/ati-drivers: Add patch to replace VM_RESERVED in linux-3.7

This patch fixes compile failure with linux-3.7.
ref https://bugs.gentoo.org/show_bug.cgi?id=438516
Thanks to Fabio Rossi for the patch.

---
 .../ati-drivers/ati-drivers-12.9_beta9000.ebuild   |    4 ++++
 .../files/ati-drivers-vm-reserverd.patch           |   12 ++++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-12.9_beta9000.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.9_beta9000.ebuild
index 95e9207..36cc5ab 100644
--- a/x11-drivers/ati-drivers/ati-drivers-12.9_beta9000.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-12.9_beta9000.ebuild
@@ -334,6 +334,10 @@ src_prepare() {
 	# first hunk applied upstream second (x32 related) was not
 	epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch
 
+	# compile fix for linux-3.7
+	# https://bugs.gentoo.org/show_bug.cgi?id=438516
+	epatch "${FILESDIR}/ati-drivers-vm-reserverd.patch"
+
 	cd "${MODULE_DIR}"
 
 	# bugged fglrx build system, this file should be copied by hand

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-vm-reserverd.patch b/x11-drivers/ati-drivers/files/ati-drivers-vm-reserverd.patch
new file mode 100644
index 0000000..08045a6
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-vm-reserverd.patch
@@ -0,0 +1,12 @@
+--- common/lib/modules/fglrx/build_mod/firegl_public.c	2012-10-18 00:29:21.778369464 +0200
++++ common/lib/modules/fglrx/build_mod/firegl_public.c.new	2012-10-18 00:30:39.647416026 +0200
+@@ -222,6 +222,10 @@
+ #define preempt_enable()
+ #endif
+ 
++#ifndef VM_RESERVED
++#define  VM_RESERVED   (VM_DONTEXPAND | VM_DONTDUMP)
++#endif
++
+ // ============================================================
+ /* globals */


^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2012-09-14 15:48 Emil Karlson
  0 siblings, 0 replies; 26+ messages in thread
From: Emil Karlson @ 2012-09-14 15:48 UTC (permalink / raw
  To: gentoo-commits

commit:     697b508268415d22f9e3f5d89aa22ce995deda68
Author:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
AuthorDate: Fri Sep 14 15:42:06 2012 +0000
Commit:     Emil Karlson <jekarlson <AT> gmail <DOT> com>
CommitDate: Fri Sep 14 15:42:06 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=697b5082

x11-drivers/ati-drivers: version bump

Changes from portage ati-drivers-12.8
Remove ati-drivers-do_mmap.patch, does now build for linux-3.5 without it.
Conditionally disable watermark when USE=disable-watermark.
Fix watermark search and replace that fails visibly, there may be more...
Simplify variable declarations at the start of the ebuild.

---
 x11-drivers/ati-drivers/ati-drivers-12.9.ebuild    |  621 ++++++++++++++++++++
 .../ati-drivers-x32_something_something.patch      |   13 +
 .../files/ati-powermode-opt-path-3.patch           |   40 ++
 x11-drivers/ati-drivers/metadata.xml               |    3 +
 4 files changed, 677 insertions(+), 0 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-12.9.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.9.ebuild
new file mode 100644
index 0000000..92f1749
--- /dev/null
+++ b/x11-drivers/ati-drivers/ati-drivers-12.9.ebuild
@@ -0,0 +1,621 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils multilib linux-info linux-mod toolchain-funcs versionator
+
+DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets"
+HOMEPAGE="http://www.amd.com"
+MY_V=( $(get_version_components) )
+RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run"
+SRC_URI="http://www2.ati.com/drivers/embedded/9.00-120815a-146426C-EDG_Direct.zip"
+FOLDER_PREFIX="common/"
+IUSE="debug +modules multilib qt4 static-libs disable-watermark"
+
+LICENSE="AMD GPL-2 QPL-1.0 as-is"
+KEYWORDS="-* ~amd64 ~x86"
+SLOT="1"
+
+RESTRICT="bindist"
+
+RDEPEND="
+	<=x11-base/xorg-server-1.12.49[-minimal]
+	>=app-admin/eselect-opengl-1.0.7
+	app-admin/eselect-opencl
+	sys-power/acpid
+	x11-apps/xauth
+	x11-libs/libX11
+	x11-libs/libXext
+	x11-libs/libXinerama
+	x11-libs/libXrandr
+	x11-libs/libXrender
+	multilib? (
+			app-emulation/emul-linux-x86-opengl
+			app-emulation/emul-linux-x86-xlibs
+	)
+	qt4? (
+			x11-libs/libICE
+			x11-libs/libSM
+			x11-libs/libXcursor
+			x11-libs/libXfixes
+			x11-libs/libXxf86vm
+			x11-libs/qt-core:4
+			x11-libs/qt-gui:4
+	)
+"
+
+DEPEND="${RDEPEND}
+	x11-proto/inputproto
+	x11-proto/xf86miscproto
+	x11-proto/xf86vidmodeproto
+	x11-proto/xineramaproto
+	x11-libs/libXtst
+	sys-apps/findutils
+	app-misc/pax-utils
+"
+
+EMULTILIB_PKG="true"
+
+S="${WORKDIR}"
+
+# QA Silencing
+QA_TEXTRELS="
+	usr/lib*/opengl/ati/lib/libGL.so.1.2
+	usr/lib*/libatiadlxx.so
+	usr/lib*/xorg/modules/glesx.so
+	usr/lib*/libaticaldd.so
+	usr/lib*/dri/fglrx_dri.so
+"
+
+QA_EXECSTACK="
+	opt/bin/atiode
+	opt/bin/amdcccle
+	usr/lib*/opengl/ati/lib/libGL.so.1.2
+	usr/lib*/dri/fglrx_dri.so
+"
+
+QA_WX_LOAD="
+	usr/lib*/opengl/ati/lib/libGL.so.1.2
+	usr/lib*/dri/fglrx_dri.so
+"
+
+QA_PRESTRIPPED="
+	usr/lib\(32\|64\)\?/libXvBAW.so.1.0
+	usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
+	usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
+	usr/lib\(32\|64\)\?/xorg/modules/glesx.so
+	usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
+	usr/lib\(32\|64\)\?/libaticaldd.so
+	usr/lib\(32\|64\)\?/dri/fglrx_dri.so
+"
+
+QA_SONAME="
+	usr/lib\(32\|64\)\?/libatiadlxx.so
+	usr/lib\(32\|64\)\?/libaticalcl.so
+	usr/lib\(32\|64\)\?/libaticaldd.so
+	usr/lib\(32\|64\)\?/libaticalrt.so
+	usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so
+"
+
+QA_DT_HASH="
+	opt/bin/amdcccle
+	opt/bin/aticonfig
+	opt/bin/atiodcli
+	opt/bin/atiode
+	opt/bin/clinfo
+	opt/bin/fglrxinfo
+	opt/sbin/atieventsd
+	opt/sbin/amdnotifyui
+	usr/lib\(32\|64\)\?/libaticalcl.so
+	usr/lib\(32\|64\)\?/libaticalrt.so
+	usr/lib\(32\|64\)\?/libatiuki.so.1.0
+	usr/lib\(32\|64\)\?/libatiadlxx.so
+	usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0
+	usr/lib\(32\|64\)\?/libXvBAW.so.1.0
+	usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
+	usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so
+	usr/lib\(32\|64\)\?/xorg/modules/glesx.so
+	usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so
+	usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so
+	usr/lib\(32\|64\)\?/libaticaldd.so
+	usr/lib\(32\|64\)\?/dri/fglrx_dri.so
+	usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
+	usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so
+	usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2
+	usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
+	usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so
+	usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
+"
+
+_check_kernel_config() {
+	local failed=0
+	local error=""
+	if ! kernel_is ge 2 6; then
+		eerror "You need a 2.6 linux kernel to compile against!"
+		die "No 2.6 Kernel found"
+	fi
+
+	if ! linux_chkconfig_present MTRR; then
+		ewarn "You don't have MTRR support enabled in the kernel."
+		ewarn "Direct rendering will not work."
+	fi
+
+	if linux_chkconfig_builtin DRM; then
+		ewarn "You have DRM support built in to the kernel"
+		ewarn "Direct rendering will not work."
+	fi
+
+	if ! linux_chkconfig_present AGP && \
+		! linux_chkconfig_present PCIEPORTBUS; then
+		ewarn "You don't have AGP and/or PCIe support enabled in the kernel"
+		ewarn "Direct rendering will not work."
+	fi
+
+	if ! linux_chkconfig_present ACPI; then
+		eerror "${P} requires the ACPI support in the kernel"
+		eerror "Please enable it:"
+		eerror "    CONFIG_ACPI=y"
+		eerror "in /usr/src/linux/.config or"
+		eerror "    Power management and ACPI options --->"
+		eerror "        [*] Power Management support"
+		eerror "in the 'menuconfig'"
+		error+=" CONFIG_ACPI disabled;"
+		failed=1
+	fi
+
+	if ! linux_chkconfig_present PCI_MSI; then
+		eerror "${P} requires MSI in the kernel."
+		eerror "Please enable it:"
+		eerror "    CONFIG_PCI_MSI=y"
+		eerror "in /usr/src/linux/.config or"
+		eerror "    Bus options (PCI etc.)  --->"
+		eerror "        [*] Message Signaled Interrupts (MSI and MSI-X)"
+		eerror "in the kernel config."
+		error+=" CONFIG_PCI_MSI disabled;"
+		failed=1
+	fi
+
+	if linux_chkconfig_present LOCKDEP; then
+		eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+		eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only."
+		eerror "This prevents ${P} from compiling with an error like this:"
+		eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'"
+		eerror "Please make sure the following options have been unset:"
+		eerror "    Kernel hacking  --->"
+		eerror "        [ ] Lock debugging: detect incorrect freeing of live locks"
+		eerror "        [ ] Lock debugging: prove locking correctness"
+		eerror "        [ ] Lock usage statistics"
+		eerror "in 'menuconfig'"
+		error+=" LOCKDEP enabled;"
+		failed=1
+	fi
+
+	use amd64 && if ! linux_chkconfig_present COMPAT; then
+		eerror "${P} requires COMPAT."
+		eerror "Please enable the 32 bit emulation:"
+		eerror "Executable file formats / Emulations  --->"
+		eerror "    [*] IA32 Emulation"
+		eerror "in the kernel config."
+		eerror "if this doesn't enable CONFIG_COMPAT add"
+		eerror "    CONFIG_COMPAT=y"
+		eerror "in /usr/src/linux/.config"
+		error+=" COMPAT disabled;"
+		failed=1
+	fi
+
+	kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then
+		eerror "${P} requires BKL."
+		eerror "Please enable the Big Kernel Lock:"
+		eerror "Kernel hacking  --->"
+		eerror "    [*] Big Kernel Lock"
+		eerror "in the kernel config."
+		eerror "or add"
+		eerror "    CONFIG_BKL=y"
+		eerror "in /usr/src/linux/.config"
+		error+=" BKL disabled;"
+		failed=1
+	fi
+
+	#if linux_chkconfig_present X86_X32; then
+	#	eerror "You've enabled x32 in the kernel."
+	#	eerror "Unfortunately, this option is not supported yet and prevents the fglrx"
+	#	eerror "kernel module from loading."
+	#	error+=" X86_32 enabled;"
+	#	failed=1
+	#fi
+
+	[[ ${failed} -ne 0 ]] && die "${error}"
+}
+
+pkg_pretend() {
+	# workaround until bug 365543 is solved
+	if use modules; then
+		linux-info_pkg_setup
+		require_configured_kernel
+		_check_kernel_config
+	fi
+}
+
+pkg_setup() {
+	if use modules; then
+		MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod/2.6.x)"
+		BUILD_TARGETS="kmod_build"
+		linux-mod_pkg_setup
+		BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
+		BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\""
+		if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then
+			BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space"
+		else
+			BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space"
+		fi
+	fi
+	# Define module dir.
+	MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod"
+	# get the xorg-server version and set BASE_DIR for that
+	BASE_DIR="${S}/xpic"
+
+	# amd64/x86
+	if use amd64 ; then
+		MY_BASE_DIR="${BASE_DIR}_64a"
+		PKG_LIBDIR=lib64
+		ARCH_DIR="${S}/arch/x86_64"
+	else
+		MY_BASE_DIR="${BASE_DIR}"
+		PKG_LIBDIR=lib
+		ARCH_DIR="${S}/arch/x86"
+	fi
+
+	elog
+	elog "Please note that this driver supports only graphic cards based on"
+	elog "Evergreen chipset and newer."
+	elog "This represent the AMD Radeon HD 5400+ series at this moment."
+	elog
+	elog "If your card is older then use ${CATEGORY}/xf86-video-ati"
+	elog "For migration informations please reffer to:"
+	elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
+	einfo
+}
+
+src_unpack() {
+	#please note, RUN may be insanely assigned at top near SRC_URI
+	if [[ ${A} =~ .*\.zip ]]; then
+		unpack ${A}
+		[[ -z "$RUN" ]] && RUN="${S}/${A/%.zip/.run}"
+	else
+		RUN="${DISTDIR}/${A}"
+	fi
+	sh ${RUN} --extract "${S}" 2>&1 > /dev/null || die
+}
+
+src_prepare() {
+	# All kernel options for prepare are ment to be in here
+	if use modules; then
+		# version patches
+		# epatch "${FILESDIR}"/kernel/${PV}-*.patch
+		if use debug; then
+			sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
+				"${MODULE_DIR}/firegl_public.c" \
+				|| die "Failed to enable debug output."
+		fi
+	fi
+
+	# These are the userspace utilities that we also have source for.
+	# We rebuild these later.
+	rm \
+		"${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \
+		|| die "bin rm failed"
+
+	# in this version amdcccle isn't static, thus we depend on qt4
+	use qt4 || rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle
+
+	# ACPI fixups
+	sed -i \
+		-e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
+		-e "s:/var/lib/gdm/:/var/gdm/:" \
+		"${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \
+		|| die "sed failed."
+
+	# Since "who" is in coreutils, we're using that one instead of "finger".
+	sed -i -e 's:finger:who:' \
+		"${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \
+		|| die "Replacing 'finger' with 'who' failed."
+	# Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and
+	# add function to detect default state.
+	epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch
+
+	# see http://ati.cchtml.com/show_bug.cgi?id=495
+	#epatch "${FILESDIR}"/ati-drivers-old_rsp.patch
+	# first hunk applied upstream second (x32 related) was not
+	epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch
+
+	cd "${MODULE_DIR}"
+
+	# bugged fglrx build system, this file should be copied by hand
+	cp ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x
+
+	convert_to_m 2.6.x/Makefile || die "convert_to_m failed"
+
+	# When built with ati's make.sh it defines a bunch of macros if
+	# certain .config values are set, falling back to less reliable
+	# detection methods if linux/autoconf.h is not available. We
+	# simply use the linux/autoconf.h settings directly, bypassing the
+	# detection script.
+	sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed"
+	sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \
+		|| die "MODVERSIONS sed failed"
+	cd "${S}"
+
+	mkdir extra || die "mkdir failed"
+	cd extra
+	unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz
+
+	# Get rid of watermark. Oldest known reference:
+	# http://phoronix.com/forums/showthread.php?19875-Unsupported-Hardware-watermark
+	if use disable-watermark; then
+		ebegin "Disabling watermark"
+		driver="${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
+		for x in $(objdump -d ${driver}|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do
+		sed -i "s/${x/x5b/\x5b}/\x90\x90\x90\x90\x90/g" ${driver} || break 1
+		done
+		eend $? || die "Disabling watermark failed"
+	fi
+}
+
+src_compile() {
+	use modules && linux-mod_src_compile
+
+	ebegin "Building fgl_glxgears"
+	cd "${S}"/extra/fgl_glxgears
+	# These extra libs/utils either have an Imakefile that does not
+	# work very well without tweaking or a Makefile ignoring CFLAGS
+	# and the like. We bypass those.
+	# The -DUSE_GLU is needed to compile using nvidia headers
+	# according to a comment in ati-drivers-extra-8.33.6.ebuild.
+	"$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
+		-I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \
+		-lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
+	eend $?
+}
+
+src_test() { :; } # no tests present
+
+src_install() {
+	use modules && linux-mod_src_install
+
+	# We can do two things here, and neither of them is very nice.
+
+	# For direct rendering libGL has to be able to load one or more
+	# dri modules (files ending in _dri.so, like fglrx_dri.so).
+	# Gentoo's mesa looks for these files in the location specified by
+	# LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded
+	# location /usr/$(get_libdir)/dri. Ati's libGL does the same
+	# thing, but the hardcoded location is /usr/X11R6/lib/modules/dri
+	# on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64
+	# 64bit. So we can either put the .so files in that (unusual,
+	# compared to "normal" mesa libGL) location or set
+	# LIBGL_DRIVERS_PATH. We currently do the latter. See also bug
+	# 101539.
+
+	# The problem with this approach is that LIBGL_DRIVERS_PATH
+	# *overrides* the default hardcoded location, it does not extend
+	# it. So if ati-drivers is merged but a non-ati libGL is selected
+	# and its hardcoded path does not match our LIBGL_DRIVERS_PATH
+	# (because it changed in a newer mesa or because it was compiled
+	# for a different set of multilib abis than we are) stuff breaks.
+
+	# We create one file per ABI to work with "native" multilib, see
+	# below.
+
+	echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep"
+	doenvd "${T}/03ati-colon-sep" || die
+
+	# All libraries that we have a 32 bit and 64 bit version of on
+	# amd64 are installed in src_install-libs. Everything else
+	# (including libraries only available in native 64bit on amd64)
+	# goes in here.
+
+	# There used to be some code here that tried to detect running
+	# under a "native multilib" portage ((precursor of)
+	# http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it
+	# should just work (only doing some duplicate work). --marienz
+	if has_multilib_profile; then
+		local OABI=${ABI}
+		for ABI in $(get_install_abis); do
+			src_install-libs
+		done
+		ABI=${OABI}
+		unset OABI
+	else
+		src_install-libs
+	fi
+
+	# This is sorted by the order the files occur in the source tree.
+
+	# X modules.
+	exeinto /usr/$(get_libdir)/xorg/modules/drivers
+	doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
+	exeinto /usr/$(get_libdir)/xorg/modules/linux
+	doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
+	exeinto /usr/$(get_libdir)/xorg/modules
+	doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so}
+
+	# Arch-specific files.
+	# (s)bin.
+	into /opt
+	dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
+	use qt4 && dosbin "${ARCH_DIR}"/usr/sbin/amdnotifyui
+	dobin "${ARCH_DIR}"/usr/bin/clinfo
+	# We cleaned out the compilable stuff in src_unpack
+	dobin "${ARCH_DIR}"/usr/X11R6/bin/*
+
+	# Common files.
+	# etc.
+	insinto /etc/ati
+	exeinto /etc/ati
+	# Everything except for the authatieventsd.sh script.
+	doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default}
+	doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh
+
+	# include.
+	insinto /usr
+	doins -r ${FOLDER_PREFIX}usr/include
+	insinto /usr/include/X11/extensions
+
+	# Just the atigetsysteminfo.sh script.
+	into /usr
+	dosbin ${FOLDER_PREFIX}usr/sbin/*
+
+	# data files for the control panel.
+	if use qt4 ; then
+		insinto /usr/share
+		doins -r ${FOLDER_PREFIX}usr/share/ati
+		insinto /usr/share/pixmaps
+		doins ${FOLDER_PREFIX}usr/share/icons/ccc_large.xpm
+		make_desktop_entry amdcccle 'AMD Catalyst Control Center' \
+			ccc_large System
+	fi
+
+	# doc.
+	dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx
+
+	doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8
+
+	pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null
+
+	exeinto /etc/acpi
+	doexe ati-powermode.sh
+	insinto /etc/acpi/events
+	doins events/*
+
+	popd > /dev/null
+
+	# Done with the "source" tree. Install tools we rebuilt:
+	dobin extra/fgl_glxgears/fgl_glxgears
+	newdoc extra/fgl_glxgears/README README.fgl_glxgears
+
+	# Gentoo-specific stuff:
+	newinitd "${FILESDIR}"/atieventsd.init atieventsd
+	echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
+	newconfd "${T}"/atieventsd.conf atieventsd
+
+	# PowerXpress stuff
+	exeinto /usr/$(get_libdir)/fglrx
+	doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed"
+	cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx
+	doexe "${T}"/switchlibglx || die "doexe switchlibglx failed"
+}
+
+src_install-libs() {
+	if [[ "${ABI}" == "amd64" ]]; then
+		local EX_BASE_DIR="${BASE_DIR}_64a"
+		local pkglibdir=lib64
+		local MY_ARCH_DIR="${S}/arch/x86_64"
+		local oclsuffix=64
+	else
+		local EX_BASE_DIR="${BASE_DIR}"
+		local pkglibdir=lib
+		local MY_ARCH_DIR="${S}/arch/x86"
+		local oclsuffix=32
+	fi
+	einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system"
+
+	local ATI_ROOT=/usr/$(get_libdir)/opengl/ati
+	# To make sure we do not miss a spot when these change.
+	local libmajor=1 libminor=2
+	local libver=${libmajor}.${libminor}
+
+	# The GLX libraries
+	# (yes, this really is "lib" even on amd64/multilib --marienz)
+	exeinto ${ATI_ROOT}/lib
+	newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \
+		libGL.so.${libver}
+	dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
+	dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
+
+	exeinto ${ATI_ROOT}/extensions
+	doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so
+	mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so
+
+	# other libs
+	exeinto /usr/$(get_libdir)
+	# Everything except for the libGL.so installed some row above
+	doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \
+		-maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*')
+	insinto /usr/$(get_libdir)
+	doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \
+		-maxdepth 1 -type f -not -name '*.so*')
+
+	# DRI modules, installed into the path used by recent versions of mesa.
+	exeinto /usr/$(get_libdir)/dri
+	doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
+
+	# AMD Cal and OpenCL libraries
+	exeinto /usr/$(get_libdir)/OpenCL/vendors/amd
+	doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so*
+	doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so*
+	dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so
+	exeinto /usr/$(get_libdir)
+	doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so*
+
+	# OpenCL vendor files
+	insinto /etc/OpenCL/vendors/
+	cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF
+		/usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so
+	EOF
+	doins "${T}"/amdocl${oclsuffix}.icd
+
+	local envname="${T}"/04ati-dri-path
+	if [[ -n ${ABI} ]]; then
+		envname="${envname}-${ABI}"
+	fi
+	echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}"
+	doenvd "${envname}"
+
+	# Silence the QA notice by creating missing soname symlinks
+	for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9])
+	do
+		local soname=${so##*/}
+		## let's keep also this alternative way ;)
+		#dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]}
+		dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so})
+	done
+
+	#remove static libs if not wanted
+	use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a
+}
+
+pkg_postinst() {
+	elog "To switch to AMD OpenGL, run \"eselect opengl set ati\""
+	elog "To change your xorg.conf you can use the bundled \"aticonfig\""
+	elog
+	elog "If you experience unexplained segmentation faults and kernel crashes"
+	elog "with this driver and multi-threaded applications such as wine,"
+	elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
+	elog
+	elog "Fully rebooting the system after an ${PN} update is recommended"
+	elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg"
+	elog "might not work"
+	elog
+	elog "Some cards need acpid running to handle events"
+	elog "Please add it to boot runlevel with rc-update add acpid boot"
+	elog
+
+	use modules && linux-mod_pkg_postinst
+	"${ROOT}"/usr/bin/eselect opengl set --use-old ati
+	"${ROOT}"/usr/bin/eselect opencl set --use-old amd
+}
+
+pkg_preinst() {
+	use modules && linux-mod_pkg_preinst
+}
+
+pkg_prerm() {
+	"${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
+
+pkg_postrm() {
+	use modules && linux-mod_pkg_postrm
+	"${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-x32_something_something.patch b/x11-drivers/ati-drivers/files/ati-drivers-x32_something_something.patch
new file mode 100644
index 0000000..d37c119
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-x32_something_something.patch
@@ -0,0 +1,13 @@
+--- a/common/lib/modules/fglrx/build_mod/kcl_ioctl.c	2012-05-26 19:11:03.402987821 +0200
++++ b/common/lib/modules/fglrx/build_mod/kcl_ioctl.c	2012-05-26 19:13:00.273986422 +0200
+@@ -217,6 +217,10 @@
+  *  \param size [in] Number of bytes to allocate
+  *  \return Pointer to allocated memory
+  */
++#ifndef CONFIG_X86_X32
++DEFINE_PER_CPU(unsigned long, old_rsp);
++#endif
++
+ void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
+ {
+     void __user *ret = COMPAT_ALLOC_USER_SPACE(size);

diff --git a/x11-drivers/ati-drivers/files/ati-powermode-opt-path-3.patch b/x11-drivers/ati-drivers/files/ati-powermode-opt-path-3.patch
new file mode 100644
index 0000000..106e67e
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-powermode-opt-path-3.patch
@@ -0,0 +1,40 @@
+--- a/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh	2012-08-17 22:39:05.077984979 +0800
++++ b/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh	2012-08-17 22:41:15.919976149 +0800
+@@ -4,6 +4,8 @@
+ # Control script for ACPI lid state and AC adapter state
+ #
+ 
++aticonfig='/opt/bin/aticonfig'
++
+ getXuser() {
+         user=`who| grep -m1 ":$displaynum " | awk '{print $1}'`
+         if [ x"$user" = x"" ]; then
+@@ -47,7 +49,7 @@
+ done
+ 
+ #If PPLIB is enabled
+-su $user -c '/usr/bin/aticonfig --pplib-cmd="get version"' | grep PPLIB
++su $user -c '$aticonfig --pplib-cmd="get version"' | grep PPLIB
+ if [ $? = 0 ]; then
+    echo "Has PPLIB"
+    has_pplib=1
+@@ -61,15 +63,15 @@
+ if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then
+     echo "Low power"
+     if [ ${has_pplib} -eq 1 ]; then
+-        su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"'
++        su $user -c '$aticonfig --pplib-cmd="notify psrc dc"'
+     else
+-        su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now"
++        su $user -c "$aticonfig --set-powerstate=1 --effective=now"
+     fi
+ else
+     echo "high power"
+     if [ ${has_pplib} -eq 1 ]; then
+-        su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"'
++        su $user -c '$aticonfig --pplib-cmd="notify psrc ac"'
+     else
+-        su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now"
++	su $user -c "$aticonfig --set-powerstate=3 --effective=now"
+     fi
+ fi

diff --git a/x11-drivers/ati-drivers/metadata.xml b/x11-drivers/ati-drivers/metadata.xml
index e68850a..5a072c3 100644
--- a/x11-drivers/ati-drivers/metadata.xml
+++ b/x11-drivers/ati-drivers/metadata.xml
@@ -23,4 +23,7 @@
 			Enable if the user plans to run the package under a pax enabled hardened kernel
 		</flag>
 	</use>
+	<use>
+		<flag name='disable-watermark'>Do a potentially dangerous binary search and replace to disable watermark</flag>
+	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2012-06-23 14:58 Enrico Tagliavini
  0 siblings, 0 replies; 26+ messages in thread
From: Enrico Tagliavini @ 2012-06-23 14:58 UTC (permalink / raw
  To: gentoo-commits

commit:     b5689e3a5f9dfe40be6b007a0f0e6ba1bd53946a
Author:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
AuthorDate: Sat Jun 23 14:58:34 2012 +0000
Commit:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
CommitDate: Sat Jun 23 14:58:34 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=b5689e3a

x11-drivers/ati-drivers: add kernel 3.5 support

This fixed bug #420751. Thank you very much to
Fabio Rossi <rossi.f <AT> inwind.it> for testing the patch

---
 x11-drivers/ati-drivers/ati-drivers-12.4.ebuild    |    2 +-
 .../ati-drivers/files/ati-drivers-do_mmap.patch    |   55 ++++++++++++++++---
 2 files changed, 47 insertions(+), 10 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
index 112def6..dee9be0 100644
--- a/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
@@ -333,7 +333,7 @@ src_prepare() {
 	# see http://ati.cchtml.com/show_bug.cgi?id=495
 	epatch "${FILESDIR}"/ati-drivers-old_rsp.patch
 	#fixes bug #420751
-	#epatch "${FILESDIR}"/ati-drivers-do_mmap.patch
+	epatch "${FILESDIR}"/ati-drivers-do_mmap.patch
 
 	cd "${MODULE_DIR}"
 

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch b/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch
index 966346c..04248eb 100644
--- a/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch
+++ b/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch
@@ -1,13 +1,50 @@
---- common/lib/modules/fglrx/build_mod/firegl_public.c.orig	2012-06-15 18:30:13.483762070 +0200
-+++ common/lib/modules/fglrx/build_mod/firegl_public.c	2012-06-15 18:57:10.375817772 +0200
-@@ -219,6 +219,10 @@
- #define preempt_enable()
- #endif
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c	2012-06-15 18:30:13.483762070 +0200
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c	2012-06-17 17:47:36.543041869 +0200
+@@ -2106,6 +2106,12 @@
+     }
+ }
  
-+#ifndef do_mmap
-+# define do_mmap(a,b,c,d,e,f) vm_mmap(a, b, c, d, e, (f) >> PAGE_SHIFT)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
++# define NO_DO_MMAP
++# define do_mmap(a,b,c,d,e,f) vm_mmap(a, b, c, d, e, f)
++# define do_munmap(a,b,c) vm_munmap(b, c)
 +#endif
 +
- // ============================================================
- /* globals */
+ unsigned long ATI_API_CALL KCL_MEM_AllocLinearAddrInterval(
+                                         KCL_IO_FILE_Handle file,
+                                         unsigned long addr,
+@@ -2117,10 +2123,13 @@
+ 
+     flags = MAP_SHARED;
+     prot  = PROT_READ|PROT_WRITE;
+-
++#ifdef NO_DO_MMAP
++    vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff);
++#else
+     down_write(&current->mm->mmap_sem);
+     vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff);
+     up_write(&current->mm->mmap_sem);
++#endif
+     if (IS_ERR(vaddr))
+        return 0;
+     else
+@@ -2131,7 +2140,9 @@
+ {
+     int retcode = 0;
+ 
++#ifndef NO_DO_MMAP
+     down_write(&current->mm->mmap_sem);
++#endif
+ #ifdef FGL_LINUX_RHEL_MUNMAP_API
+     retcode = do_munmap(current->mm,
+                         addr,
+@@ -2142,7 +2153,9 @@
+                         addr,
+                         len);
+ #endif                        
++#ifndef NO_DO_MMAP
+     up_write(&current->mm->mmap_sem);
++#endif
+     return retcode;
+ }
  



^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2012-06-15 17:21 Enrico Tagliavini
  0 siblings, 0 replies; 26+ messages in thread
From: Enrico Tagliavini @ 2012-06-15 17:21 UTC (permalink / raw
  To: gentoo-commits

commit:     7ea5145aa8e9429600ed5b72f1e1d2b2bb6fbc43
Author:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
AuthorDate: Fri Jun 15 17:21:43 2012 +0000
Commit:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
CommitDate: Fri Jun 15 17:21:43 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=7ea5145a

x11-drivers/ati-drivers: add kernel 3.5 support

This should fix bug #420751. Runtime test is needed
but the module compile at least

---
 x11-drivers/ati-drivers/ati-drivers-12.4.ebuild    |    2 ++
 .../ati-drivers/files/ati-drivers-do_mmap.patch    |   13 +++++++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
index 34d8e5b..dee9be0 100644
--- a/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
@@ -332,6 +332,8 @@ src_prepare() {
 
 	# see http://ati.cchtml.com/show_bug.cgi?id=495
 	epatch "${FILESDIR}"/ati-drivers-old_rsp.patch
+	#fixes bug #420751
+	epatch "${FILESDIR}"/ati-drivers-do_mmap.patch
 
 	cd "${MODULE_DIR}"
 

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch b/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch
new file mode 100644
index 0000000..966346c
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch
@@ -0,0 +1,13 @@
+--- common/lib/modules/fglrx/build_mod/firegl_public.c.orig	2012-06-15 18:30:13.483762070 +0200
++++ common/lib/modules/fglrx/build_mod/firegl_public.c	2012-06-15 18:57:10.375817772 +0200
+@@ -219,6 +219,10 @@
+ #define preempt_enable()
+ #endif
+ 
++#ifndef do_mmap
++# define do_mmap(a,b,c,d,e,f) vm_mmap(a, b, c, d, e, (f) >> PAGE_SHIFT)
++#endif
++
+ // ============================================================
+ /* globals */
+ 



^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2012-05-26 21:06 Enrico Tagliavini
  0 siblings, 0 replies; 26+ messages in thread
From: Enrico Tagliavini @ 2012-05-26 21:06 UTC (permalink / raw
  To: gentoo-commits

commit:     f924d696314376bd0c7cbb2ae091b5b8abbd5c09
Author:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
AuthorDate: Sat May 26 21:06:04 2012 +0000
Commit:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
CommitDate: Sat May 26 21:06:04 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=f924d696

x11-drivers/ati-drivers: add kernel 3.4 support

This fix bug #413569. This time the change is tested
and it works at lest for the commiter. Commit
443439142344878f77b7076980e94954dd080718 has been reverted

---
 x11-drivers/ati-drivers/ati-drivers-12.4.ebuild    |    5 ++---
 .../files/amd-cpu_possible_map_define.patch        |   13 -------------
 2 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
index 679290c..34d8e5b 100644
--- a/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
@@ -330,9 +330,8 @@ src_prepare() {
 	# and finally backported to kernel 3.2.8.
 	epatch "${FILESDIR}"/amd-drivers-3.2.7.1.patch
 
-	# see https://lkml.org/lkml/2012/4/10/485 3.4.0-rc remove the define of
-	# cpu_possible_map, we add it back temporary util AMD fixes
-	epatch "${FILESDIR}"/amd-cpu_possible_map_define.patch
+	# see http://ati.cchtml.com/show_bug.cgi?id=495
+	epatch "${FILESDIR}"/ati-drivers-old_rsp.patch
 
 	cd "${MODULE_DIR}"
 

diff --git a/x11-drivers/ati-drivers/files/amd-cpu_possible_map_define.patch b/x11-drivers/ati-drivers/files/amd-cpu_possible_map_define.patch
deleted file mode 100644
index 5b3cb9a..0000000
--- a/x11-drivers/ati-drivers/files/amd-cpu_possible_map_define.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- common/lib/modules/fglrx/build_mod/firegl_public.c.orig	2012-05-01 14:35:33.453055055 +0200
-+++ common/lib/modules/fglrx/build_mod/firegl_public.c	2012-05-01 14:36:42.184270842 +0200
-@@ -219,6 +219,10 @@
- #define preempt_enable()
- #endif
- 
-+#ifndef cpu_possible_map
-+#define cpu_possible_map	(*(cpumask_t *)cpu_possible_mask)
-+#endif
-+
- // ============================================================
- /* globals */
- 



^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2012-05-01 13:03 Enrico Tagliavini
  0 siblings, 0 replies; 26+ messages in thread
From: Enrico Tagliavini @ 2012-05-01 13:03 UTC (permalink / raw
  To: gentoo-commits

commit:     443439142344878f77b7076980e94954dd080718
Author:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
AuthorDate: Tue May  1 13:03:33 2012 +0000
Commit:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
CommitDate: Tue May  1 13:03:33 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=44343914

x11-drivers/ati-drivers: add kernel 3.4 support

This should fix bug #413569. See also [1]

[1] https://lkml.org/lkml/2012/4/10/485

---
 x11-drivers/ati-drivers/ati-drivers-12.4.ebuild    |    4 ++++
 .../files/amd-cpu_possible_map_define.patch        |   13 +++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
index 4b062be..679290c 100644
--- a/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
@@ -330,6 +330,10 @@ src_prepare() {
 	# and finally backported to kernel 3.2.8.
 	epatch "${FILESDIR}"/amd-drivers-3.2.7.1.patch
 
+	# see https://lkml.org/lkml/2012/4/10/485 3.4.0-rc remove the define of
+	# cpu_possible_map, we add it back temporary util AMD fixes
+	epatch "${FILESDIR}"/amd-cpu_possible_map_define.patch
+
 	cd "${MODULE_DIR}"
 
 	# bugged fglrx build system, this file should be copied by hand

diff --git a/x11-drivers/ati-drivers/files/amd-cpu_possible_map_define.patch b/x11-drivers/ati-drivers/files/amd-cpu_possible_map_define.patch
new file mode 100644
index 0000000..5b3cb9a
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/amd-cpu_possible_map_define.patch
@@ -0,0 +1,13 @@
+--- common/lib/modules/fglrx/build_mod/firegl_public.c.orig	2012-05-01 14:35:33.453055055 +0200
++++ common/lib/modules/fglrx/build_mod/firegl_public.c	2012-05-01 14:36:42.184270842 +0200
+@@ -219,6 +219,10 @@
+ #define preempt_enable()
+ #endif
+ 
++#ifndef cpu_possible_map
++#define cpu_possible_map	(*(cpumask_t *)cpu_possible_mask)
++#endif
++
+ // ============================================================
+ /* globals */
+ 



^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2012-04-26 17:53 Enrico Tagliavini
  0 siblings, 0 replies; 26+ messages in thread
From: Enrico Tagliavini @ 2012-04-26 17:53 UTC (permalink / raw
  To: gentoo-commits

commit:     965d150bd941ee81435fdc0353ec166bbdaaca2a
Author:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
AuthorDate: Thu Apr 26 17:53:08 2012 +0000
Commit:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
CommitDate: Thu Apr 26 17:53:08 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=965d150b

x11-drivers/ati-drivers: version bump to 12.4

Version bump to 12.4, bug #409935 should be fixed

---
 ...drivers-12.3.ebuild => ati-drivers-12.4.ebuild} |    7 +++++++
 .../ati-drivers/files/amd-drivers-3.2.7.1.patch    |   19 +++++++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-12.3.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
similarity index 97%
rename from x11-drivers/ati-drivers/ati-drivers-12.3.ebuild
rename to x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
index be41e50..4b062be 100644
--- a/x11-drivers/ati-drivers/ati-drivers-12.3.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-12.4.ebuild
@@ -323,6 +323,13 @@ src_prepare() {
 	# fix needed for at least hardened-sources, see bug #392753
 	use pax_kernel && epatch "${FILESDIR}"/ati-drivers-12.2-redefine-WARN.patch
 
+	# fixed fgrlx compilation error on 32-bit x86 arch with kernel 3.3-rc4 due to commit:
+	# https://github.com/torvalds/linux/commit/f94edacf998516ac9d849f7bc6949a703977a7f3
+	# later modified (in 3.3-rc5) by commit:
+	# https://github.com/torvalds/linux/commit/7e16838d94b566a17b65231073d179bc04d590c8#diff-1
+	# and finally backported to kernel 3.2.8.
+	epatch "${FILESDIR}"/amd-drivers-3.2.7.1.patch
+
 	cd "${MODULE_DIR}"
 
 	# bugged fglrx build system, this file should be copied by hand

diff --git a/x11-drivers/ati-drivers/files/amd-drivers-3.2.7.1.patch b/x11-drivers/ati-drivers/files/amd-drivers-3.2.7.1.patch
new file mode 100644
index 0000000..104c878
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/amd-drivers-3.2.7.1.patch
@@ -0,0 +1,19 @@
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -5797,10 +5797,16 @@ void ATI_API_CALL KCL_fpu_begin(void)
+ #ifdef CONFIG_X86_64
+     kernel_fpu_begin();
+ #else
++#ifndef TS_USEDFPU
++    preempt_disable();
++    if (__thread_has_fpu(current))
++        __save_init_fpu(current);
++#else
+     struct thread_info *cur_task = current_thread_info();
+     preempt_disable();
+     if (cur_task->status & TS_USEDFPU)
+         __save_init_fpu(cur_task->task);
++#endif
+     else
+         clts();
+ #endif



^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2012-03-08 19:01 Enrico Tagliavini
  0 siblings, 0 replies; 26+ messages in thread
From: Enrico Tagliavini @ 2012-03-08 19:01 UTC (permalink / raw
  To: gentoo-commits

commit:     30a2b409dd41b7d4a43c4147fca968d3817bbfca
Author:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
AuthorDate: Thu Mar  8 19:00:53 2012 +0000
Commit:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
CommitDate: Thu Mar  8 19:00:53 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=30a2b409

x11-drivers/ati-drivers: version bump to 12.2

This bump should finally fix bug #391193 (the XV crash).
If this is the case and nothing else breaks
this is a good stable candidate.

bug #407363 is fixed too.

---
 ...vers-12.1-r1.ebuild => ati-drivers-12.2.ebuild} |    5 +--
 .../files/ati-drivers-12.2-redefine-WARN.patch     |   42 ++++++++++++++++++++
 2 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-12.1-r1.ebuild b/x11-drivers/ati-drivers/ati-drivers-12.2.ebuild
similarity index 98%
rename from x11-drivers/ati-drivers/ati-drivers-12.1-r1.ebuild
rename to x11-drivers/ati-drivers/ati-drivers-12.2.ebuild
index 59eac76..7cf44d1 100644
--- a/x11-drivers/ati-drivers/ati-drivers-12.1-r1.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-12.2.ebuild
@@ -321,7 +321,7 @@ src_prepare() {
 	epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch
 
 	# fix needed for at least hardened-sources, see bug #392753
-	use pax_kernel && epatch "${FILESDIR}"/ati-drivers-redefine-WARN.patch
+	use pax_kernel && epatch "${FILESDIR}"/ati-drivers-12.2-redefine-WARN.patch
 
 	cd "${MODULE_DIR}"
 
@@ -580,9 +580,6 @@ pkg_postinst() {
 	elog "Some cards need acpid running to handle events"
 	elog "Please add it to boot runlevel with rc-update add acpid boot"
 	elog
-	ewarn "This release of ati-drivers has a crashing bug when using Xv video."
-	ewarn "To avoid this problem, configure your video playback software for"
-	ewarn "OpenGL output. See https://bugs.gentoo.org/show_bug.cgi?id=391193"
 
 	use modules && linux-mod_pkg_postinst
 	"${ROOT}"/usr/bin/eselect opengl set --use-old ati

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-12.2-redefine-WARN.patch b/x11-drivers/ati-drivers/files/ati-drivers-12.2-redefine-WARN.patch
new file mode 100644
index 0000000..f4fab43
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-12.2-redefine-WARN.patch
@@ -0,0 +1,42 @@
+--- common/lib/modules/fglrx/build_mod/kcl_debug.h.orig	2012-03-08 19:30:38.195025328 +0100
++++ common/lib/modules/fglrx/build_mod/kcl_debug.h	2012-03-08 19:31:24.976024507 +0100
+@@ -85,8 +85,8 @@
+ #ifdef ERROR
+ #undef ERROR
+ #endif
+-#ifdef WARN
+-#undef WARN
++#ifdef AMD_WARN
++#undef AMD_WARN
+ #endif
+ #ifdef INFO
+ #undef INFO
+@@ -122,7 +122,7 @@
+ {
+     SPECIAL = 0,
+     ERROR  ,
+-    WARN  ,
++    AMD_WARN  ,
+     INFO ,
+     INFOEX,
+     TRACE,
+@@ -160,7 +160,7 @@
+ }log_map;
+ 
+ 
+-#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(WARN) | ___BIT(TRACE)| ___BIT(SPECIAL)  ))
++#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(AMD_WARN) | ___BIT(TRACE)| ___BIT(SPECIAL)  ))
+ #define INFO_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX)))
+ extern const log_map module_log_map[];
+ extern const module_map module_type_map[];
+--- common/lib/modules/fglrx/build_mod/kcl_debug.c.orig	2012-03-08 19:36:18.244019310 +0100
++++ common/lib/modules/fglrx/build_mod/kcl_debug.c	2012-03-08 19:36:36.197018973 +0100
+@@ -69,7 +69,7 @@
+ {
+     {SPECIAL        ,   'S'},
+     {ERROR          ,   'E'},
+-    {WARN           ,   'W'},
++    {AMD_WARN           ,   'W'},
+     {INFO           ,   'I'},
+     {INFOEX         ,   'X'},
+     {TRACE          ,   'T'},



^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2011-12-30 15:03 Enrico Tagliavini
  0 siblings, 0 replies; 26+ messages in thread
From: Enrico Tagliavini @ 2011-12-30 15:03 UTC (permalink / raw
  To: gentoo-commits

commit:     f9b3e92c2fd7512eecee3f259193912a83e00db1
Author:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
AuthorDate: Fri Dec 30 15:03:32 2011 +0000
Commit:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
CommitDate: Fri Dec 30 15:03:32 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=f9b3e92c

x11-drivers/ati-drivers: hardened fixups

This commit add a patch needed for hardened to compile
It just rename the WARN enum entry in kcl_debug.h
to avoid a name collision with the kernel WARN macro

Many thanks to Zhang Hongjiu <noctuorare <AT> gmail.com>
for the solution.

---
 ...11.12-r1.ebuild => ati-drivers-11.12-r2.ebuild} |    7 +++-
 .../files/ati-drivers-redefine-WARN.patch          |   39 ++++++++++++++++++++
 2 files changed, 45 insertions(+), 1 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-11.12-r1.ebuild b/x11-drivers/ati-drivers/ati-drivers-11.12-r2.ebuild
similarity index 98%
rename from x11-drivers/ati-drivers/ati-drivers-11.12-r1.ebuild
rename to x11-drivers/ati-drivers/ati-drivers-11.12-r2.ebuild
index a397629..73b44b5 100644
--- a/x11-drivers/ati-drivers/ati-drivers-11.12-r1.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-11.12-r2.ebuild
@@ -320,7 +320,12 @@ src_prepare() {
 		|| die "Replacing 'finger' with 'who' failed."
 	# Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and
 	# add function to detect default state.
-	epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch || die "Failed to epatch powermode-opt-path-2.patch"
+	epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch || die \
+		"Failed to epatch powermode-opt-path-2.patch"
+
+	# fix needed for at least hardened-sources, see bug #392753
+	epatch "${FILESDIR}"/ati-drivers-redefine-WARN.patch || die \
+		"Failed to epatch ati-drivers-redefine-WARN.patch"
 
 	cd "${MODULE_DIR}"
 

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-redefine-WARN.patch b/x11-drivers/ati-drivers/files/ati-drivers-redefine-WARN.patch
new file mode 100644
index 0000000..fe5ed2f
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-redefine-WARN.patch
@@ -0,0 +1,39 @@
+--- common/lib/modules/fglrx/build_mod/kcl_debug.h.orig	2011-12-30 14:32:00.271391437 +0100
++++ common/lib/modules/fglrx/build_mod/kcl_debug.h	2011-12-30 15:48:21.647473696 +0100
+@@ -85,8 +85,8 @@
+ #ifdef ERROR
+ #undef ERROR
+ #endif
+-#ifdef WARN
+-#undef WARN
++#ifdef AMD_WARN
++#undef AMD_WARN
+ #endif
+ #ifdef INFO
+ #undef INFO
+@@ -122,7 +122,7 @@
+ {
+     SPECIAL = 0,
+     ERROR  ,
+-    WARN  ,
++    AMD_WARN  ,
+     INFO ,
+     INFOEX,
+     TRACE,
+@@ -163,14 +163,14 @@
+ {
+     {SPECIAL        ,   'S'},
+     {ERROR          ,   'E'},
+-    {WARN           ,   'W'},
++    {AMD_WARN       ,   'W'},
+     {INFO           ,   'I'},
+     {INFOEX         ,   'X'},
+     {TRACE          ,   'T'},
+     {PERFORMANCE    ,   'P'},
+     {DUMP           ,   'D'},
+ };
+-#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(WARN) | ___BIT(TRACE)| ___BIT(SPECIAL)  ))
++#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(AMD_WARN) | ___BIT(TRACE)| ___BIT(SPECIAL)  ))
+ #define INFO_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX)))
+ static module_map module_type_map[LOG_M_MAX] =
+ {



^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2011-09-28 20:27 Enrico Tagliavini
  0 siblings, 0 replies; 26+ messages in thread
From: Enrico Tagliavini @ 2011-09-28 20:27 UTC (permalink / raw
  To: gentoo-commits

commit:     c859ae87b336c0bfa8fee8b035919a3b4b973b92
Author:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
AuthorDate: Wed Sep 28 20:27:24 2011 +0000
Commit:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
CommitDate: Wed Sep 28 20:27:24 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=c859ae87

[ati-drivers] version bump and PowerXpress support added

Finally the PowerXpress support should be there.
Be aware i don't have the hardware to test on
so this work should be tested.
The switch can be done with amdcccle or aticonfig
tools. Needless to say only root can do that.
All the libs symlinks are removed since they
should not be needed with the custom switchlib{GL,glx}
scripts, instead eselect is used.

Many many thanks to gdbalbuzard [0] and chickpea [1]
for the help!

A null src_test was added since the package provides no test
functions.

[0] https://forums.gentoo.org/viewtopic-p-6748306.html?sid=789ed92ff252599668e53fbbcaf8b936#6748306
[1] https://bugs.sabayon.org/show_bug.cgi?id=2210

---
 ...drivers-11.8.ebuild => ati-drivers-11.9.ebuild} |   29 +++-------
 .../ati-drivers-fix_compilation-bug-297322.patch   |   25 ---------
 x11-drivers/ati-drivers/files/switchlibGL          |   58 ++++++++++++++++++++
 3 files changed, 67 insertions(+), 45 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-11.8.ebuild b/x11-drivers/ati-drivers/ati-drivers-11.9.ebuild
similarity index 95%
rename from x11-drivers/ati-drivers/ati-drivers-11.8.ebuild
rename to x11-drivers/ati-drivers/ati-drivers-11.9.ebuild
index dfb3317..ec6093e 100644
--- a/x11-drivers/ati-drivers/ati-drivers-11.8.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-11.9.ebuild
@@ -25,8 +25,6 @@ SLOT="1"
 
 RDEPEND="
 	<=x11-base/xorg-server-1.10.99
-	!x11-drivers/ati-drivers:0
-	!x11-apps/ati-drivers-extra
 	>=app-admin/eselect-opengl-1.0.7
 	sys-power/acpid
 	x11-apps/xauth
@@ -86,7 +84,7 @@ QA_WX_LOAD="
 QA_PRESTRIPPED="
 	usr/lib\(32\|64\)\?/libXvBAW.so.1.0
 	usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
-	usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so
+	usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
 	usr/lib\(32\|64\)\?/xorg/modules/glesx.so
 	usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
 	usr/lib\(32\|64\)\?/libaticaldd.so
@@ -346,7 +344,7 @@ src_compile() {
 	# These extra libs/utils either have an Imakefile that does not
 	# work very well without tweaking or a Makefile ignoring CFLAGS
 	# and the like. We bypass those.
-
+src_test() { :; } # no tests present
 	# The -DUSE_GLU is needed to compile using nvidia headers
 	# according to a comment in ati-drivers-extra-8.33.6.ebuild.
 	"$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
@@ -355,6 +353,8 @@ src_compile() {
 	eend $?
 }
 
+src_test() { :; } # no tests presentsrc_test() { :; } # no tests present
+
 src_install() {
 	use modules && linux-mod_src_install
 
@@ -473,14 +473,10 @@ src_install() {
 	newconfd "${T}"/atieventsd.conf atieventsd
 
 	# PowerXpress stuff
-	local alllibdir="$(get_libdir)"
-	use multilib && alllibdir="lib64 lib32"
-	for libdir in ${alllibdir}
-	do
-		dosym /usr/${libdir}/opengl/xorg-x11/lib/libGL.so.1.2 \
-			/usr/${libdir}/fglrx/libGL.so.1.2
-		dosym ./libGL.so.1.2 /usr/${libdir}/fglrx/fglrx-libGL.so.1.2
-	done
+	exeinto /usr/$(get_libdir)/fglrx
+	doexe "${FILESDIR}"/switchlibGL || die "newexe switchlibGL failed"
+	dosym ./switchlibGL /usr/$(get_libdir)/fglrx/switchlibglx || die \
+	"dosym switchlibglx failed"
 }
 
 src_install-libs() {
@@ -507,17 +503,10 @@ src_install-libs() {
 		libGL.so.${libver}
 	dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
 	dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
-	# PowerXpress stuff
-	dosym /usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.so.1.2 \
-		${ATI_ROOT}/lib/FGL.renamed.libGL.so.1.2
-	dosym ./libGL.so.1.2 ${ATI_ROOT}/lib/fglrx-libGL.so.1.2
 
 	exeinto ${ATI_ROOT}/extensions
 	doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so
-	# PowerXpress stuff
-	dosym /usr/$(get_libdir)/opengl/xorg-x11/extensions/libglx.so \
-		${ATI_ROOT}/extensions/FGL.renamed.libglx.so
-	dosym fglrx-libglx.so ${ATI_ROOT}/extensions/libglx.so
+	mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so
 
 	# other libs
 	exeinto /usr/$(get_libdir)

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch b/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch
deleted file mode 100644
index e2af915..0000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -1441,7 +1441,9 @@
- todo !!!
- #endif
- 
--unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old,
-+void __cmpxchg_wrong_size(void) {}
-+
-+unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old,
-          unsigned long new, int size)
- {
- #ifndef __HAVE_ARCH_CMPXCHG
---- common/lib/modules/fglrx/build_mod/firegl_public.h
-+++ common/lib/modules/fglrx/build_mod/firegl_public.h
-@@ -441,7 +441,8 @@
- extern void ATI_API_CALL KCL_SIGNAL_BlockAll(int (*notifier)(void *priv), void *pPriv, __ke_sigset_t *pSigMask);
- extern void ATI_API_CALL KCL_SIGNAL_UnblockAll(void);
- 
--extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old,                      
-+extern void __cmpxchg_wrong_size(void);
-+extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old,                      
-                       unsigned long new, int size);
- 
- #define __ke_cmpxchg(ptr,o,n)                        \

diff --git a/x11-drivers/ati-drivers/files/switchlibGL b/x11-drivers/ati-drivers/files/switchlibGL
new file mode 100644
index 0000000..e8fac1e
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/switchlibGL
@@ -0,0 +1,58 @@
+#!/bin/bash
+#  switchlibGL
+#
+#  Copyright (c) 2011 Advanced Micro Devices, Inc.
+#
+#  Purpose:
+#    For switch between AMD and Intel graphic driver library.
+#
+#  Usage:
+#  switchlibGL   amd|intel|query
+#    amd:   switches to the AMD version of libGL.
+#    intel: switches to the open-source version of libGL .
+#    query: checks, which version is currently active and prints either "amd"
+#    or "intel" or "unknown" on the standard output.
+#    must be root to execute this script
+
+ARCH=`uname -m`
+E_ERR=1
+
+# Check if root
+if [ "`whoami`" != "root" ]; then
+  echo "Must be root to run this script." 1>&2
+  exit $E_ERR
+fi
+
+# One parameter
+if [ $# -ne 1 ]; then
+  echo "Usage: `basename $0` amd|intel|query " 1>&2
+  echo "Please choose one parameter " 1>&2
+  exit $E_ERR
+fi
+
+
+# Switch to right mode
+case "$1" in
+  "amd" )
+        eselect opengl set ati
+  ;;
+  "intel" )
+        eselect opengl set xorg-x11
+  ;;
+  "query" )
+        current=`eselect opengl show`
+        case "$current" in
+          "ati" )
+             echo "amd"
+          ;;
+          "xorg-x11" )
+             echo "intel"
+          ;;
+        esac
+  ;;
+  * ) echo "Usage: `basename $0` amd|intel|query" 1>&2; exit $E_ERR;;
+  # other than amd|intel|query parameter report an error
+esac
+
+#  A zero return value from the script upon exit indicates success.
+exit 0



^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2011-08-19 10:06 Enrico Tagliavini
  0 siblings, 0 replies; 26+ messages in thread
From: Enrico Tagliavini @ 2011-08-19 10:06 UTC (permalink / raw
  To: gentoo-commits

commit:     37f1f1531a72a88e623a0c44c43538c60c56737a
Author:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
AuthorDate: Fri Aug 19 10:05:41 2011 +0000
Commit:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
CommitDate: Fri Aug 19 10:05:41 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=37f1f153

[ati-drivers] version bump. remove old

---
 ...drivers-11.7.ebuild => ati-drivers-11.8.ebuild} |    0
 .../ati-drivers/files/ati-drivers-2.6.39.patch     |   96 --------------------
 2 files changed, 0 insertions(+), 96 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-11.7.ebuild b/x11-drivers/ati-drivers/ati-drivers-11.8.ebuild
similarity index 100%
rename from x11-drivers/ati-drivers/ati-drivers-11.7.ebuild
rename to x11-drivers/ati-drivers/ati-drivers-11.8.ebuild

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch
deleted file mode 100644
index 6f3940c..0000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-Description: add support for missing kernel lock
-Author: Pascal Giard <evilynux@gmail.com>
-
-diff -Naur fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c
---- fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-04-27 21:30:08.000000000 +0200
-+++ fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-04-27 21:29:27.000000000 +0200
-@@ -1902,13 +1902,17 @@
- /** \brief Grab global kernel lock */
- void ATI_API_CALL KCL_GlobalKernelLock(void)
- {
-+#ifdef CONFIG_KERNEL_LOCK
-     lock_kernel();
-+#endif
- }
- 
- /** \brief Release global kernel lock */
- void ATI_API_CALL KCL_GlobalKernelUnlock(void)
- {
-+#ifdef CONFIG_KERNEL_LOCK
-     unlock_kernel();
-+#endif
- }
- 
- /*****************************************************************************/
-# Do not include smp_lock.h if the Kernel is built without BKL.
-# Closes: #619952
-
-diff -Naur fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/drmP.h fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/drmP.h
---- fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/drmP.h	2011-03-24 17:00:28.000000000 +0100
-+++ fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/drmP.h	2011-03-29 20:39:05.000000000 +0200
-@@ -57,7 +57,11 @@
- #include <linux/pci.h>
- #include <linux/version.h>
- #include <linux/sched.h>
-+/* with no Big Kernel Lock and linux 2.6.38
-+   and higher smp_lock.h is removed      */
-+#ifdef CONFIG_KERNEL_LOCK || LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
- #include <linux/smp_lock.h>	/* For (un)lock_kernel */
-+#endif
- #include <linux/mm.h>
- #include <linux/pagemap.h>
- #if defined(__alpha__) || defined(__powerpc__)
-diff -Naur fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/firegl_public.c
---- fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-03-29 20:37:04.000000000 +0200
-+++ fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-03-29 20:39:05.000000000 +0200
-@@ -116,7 +116,16 @@
- #include <linux/pci.h>
- #include <linux/wait.h>
- #include <linux/miscdevice.h>
--#include <linux/smp_lock.h>
-+
-+/* with no Big Kernel Lock and linux 2.6.38
-+   and higher is smp_lock.h removed.
-+   instead of smp_lock.h is sched.h required    */
-+#ifdef CONFIG_KERNEL_LOCK || LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
-+#include <linux/smp_lock.h>	/* For (un)lock_kernel */
-+#else
-+#include <linux/sched.h>
-+#endif
-+
- // newer SuSE kernels need this
- #include <linux/highmem.h>
- 
-Description: Add Linux 2.6.39 support
- <linux/spinlock_types.h> had the following comment until 2.6.38:
- .
- /*
-  * SPIN_LOCK_UNLOCKED defeats lockdep state tracking and is hence
-  * deprecated.
-  * Please use DEFINE_SPINLOCK() or __SPIN_LOCK_UNLOCKED() as
-  * appropriate.
-  */
- #define SPIN_LOCK_UNLOCKED     __SPIN_LOCK_UNLOCKED(old_style_spin_init)
- .
- This definition got removed in 2.6.39. Restore it locally until it gets fixed
- upstream.
-Author: Miguel Colon <debian.micove@gmail.com>
-Forwarded: no
-Last-Update: 2011-03-30
-
-diff -Naur fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c
---- fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-04-27 21:48:43.000000000 +0200
-+++ fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-04-27 21:49:36.000000000 +0200
-@@ -1060,7 +1060,12 @@
-     dev->pubdev.signature = FGL_DEVICE_SIGNATURE;
- 
-     for (i = 0; i < __KE_MAX_SPINLOCKS; i++)
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
-         dev->spinlock[i] = SPIN_LOCK_UNLOCKED;
-+#else
-+        dev->spinlock[i] = __SPIN_LOCK_UNLOCKED(old_style_spin_init);
-+#endif
-+
- 
-     for (i=0; i < __KE_MAX_SEMAPHORES; i++)
-         sema_init(&dev->struct_sem[i], 1);



^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2011-05-21 10:00 Enrico Tagliavini
  0 siblings, 0 replies; 26+ messages in thread
From: Enrico Tagliavini @ 2011-05-21 10:00 UTC (permalink / raw
  To: gentoo-commits

commit:     2c9a00ad6ce75a9d04a8c9b2e4ddcdc629d9cd17
Author:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
AuthorDate: Sat May 21 10:00:30 2011 +0000
Commit:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
CommitDate: Sat May 21 10:00:30 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=2c9a00ad

[ati-drivers] add EXPERIMENTAL 2.6.39 kernels support

---
 x11-drivers/ati-drivers/ati-drivers-11.5-r1.ebuild |  567 ++++++++++++++++++++
 .../ati-drivers/files/ati-drivers-2.6.38.patch     |   60 --
 .../ati-drivers/files/ati-drivers-2.6.39.patch     |   96 ++++
 3 files changed, 663 insertions(+), 60 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-11.5-r1.ebuild b/x11-drivers/ati-drivers/ati-drivers-11.5-r1.ebuild
new file mode 100644
index 0000000..1a60d2a
--- /dev/null
+++ b/x11-drivers/ati-drivers/ati-drivers-11.5-r1.ebuild
@@ -0,0 +1,567 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils multilib linux-info linux-mod toolchain-funcs versionator
+
+DESCRIPTION="Ati precompiled drivers for r600 (HD Series) and newer chipsets"
+HOMEPAGE="http://www.ati.com"
+# 8.ble will be used for beta releases.
+if [[ $(get_major_version) -gt 8 ]]; then
+	ATI_URL="http://www2.ati.com/drivers/linux/"
+	SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run"
+	FOLDER_PREFIX="common/"
+else
+	SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz"
+	FOLDER_PREFIX=""
+fi
+IUSE="debug +modules multilib qt4"
+
+LICENSE="AMD GPL-2 QPL-1.0 as-is"
+KEYWORDS="~amd64 ~x86"
+SLOT="1"
+
+RDEPEND="
+	<=x11-base/xorg-server-1.10.99
+	!x11-drivers/ati-drivers:0
+	!x11-apps/ati-drivers-extra
+	>=app-admin/eselect-opengl-1.0.7
+	sys-power/acpid
+	x11-apps/xauth
+	x11-libs/libX11
+	x11-libs/libXext
+	x11-libs/libXinerama
+	x11-libs/libXrandr
+	x11-libs/libXrender
+	multilib? ( app-emulation/emul-linux-x86-opengl )
+	qt4? (
+			x11-libs/libICE
+			x11-libs/libSM
+			x11-libs/libXcursor
+			x11-libs/libXfixes
+			x11-libs/libXxf86vm
+			x11-libs/qt-core
+			x11-libs/qt-gui
+	)
+"
+
+DEPEND="${RDEPEND}
+	app-portage/portage-utils
+	x11-proto/inputproto
+	x11-proto/xf86miscproto
+	x11-proto/xf86vidmodeproto
+	x11-proto/xineramaproto
+	x11-libs/libXtst
+"
+
+EMULTILIB_PKG="true"
+
+S="${WORKDIR}"
+
+# QA Silencing
+QA_TEXTRELS="
+	usr/lib*/opengl/ati/lib/libGL.so.1.2
+	usr/lib*/libatiadlxx.so
+	usr/lib*/xorg/modules/glesx.so
+	usr/lib*/libaticaldd.so
+	usr/lib*/dri/fglrx_dri.so
+"
+
+QA_EXECSTACK="
+	opt/bin/atiode
+	opt/bin/amdcccle
+	usr/lib*/opengl/ati/lib/libGL.so.1.2
+	usr/lib*/dri/fglrx_dri.so
+"
+
+QA_WX_LOAD="
+	usr/lib*/opengl/ati/lib/libGL.so.1.2
+	usr/lib*/dri/fglrx_dri.so
+"
+
+QA_PRESTRIPPED="
+	usr/lib\(32\|64\)\?/libXvBAW.so.1.0
+	usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
+	usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so
+	usr/lib\(32\|64\)\?/xorg/modules/glesx.so
+	usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
+	usr/lib\(32\|64\)\?/libaticaldd.so
+	usr/lib\(32\|64\)\?/dri/fglrx_dri.so
+"
+
+QA_SONAME="
+	usr/lib\(32\|64\)\?/libatiadlxx.so
+	usr/lib\(32\|64\)\?/libaticalcl.so
+	usr/lib\(32\|64\)\?/libaticaldd.so
+	usr/lib\(32\|64\)\?/libaticalrt.so
+"
+
+QA_DT_HASH="
+	opt/bin/amdcccle
+	opt/bin/aticonfig
+	opt/bin/atiodcli
+	opt/bin/atiode
+	opt/bin/fglrxinfo
+	opt/sbin/atieventsd
+	usr/lib\(32\|64\)\?/libaticalcl.so
+	usr/lib\(32\|64\)\?/libaticalrt.so
+	usr/lib\(32\|64\)\?/libatiuki.so.1.0
+	usr/lib\(32\|64\)\?/libatiadlxx.so
+	usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0
+	usr/lib\(32\|64\)\?/libXvBAW.so.1.0
+	usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
+	usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so
+	usr/lib\(32\|64\)\?/xorg/modules/glesx.so
+	usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so
+	usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so
+	usr/lib\(32\|64\)\?/libaticaldd.so
+	usr/lib\(32\|64\)\?/dri/fglrx_dri.so
+	usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
+	usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so
+	usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2
+	usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
+"
+
+_check_kernel_config() {
+	local failed=0
+	local error=""
+	if ! kernel_is 2 6; then
+		eerror "You need a 2.6 linux kernel to compile against!"
+		die "No 2.6 Kernel found"
+	fi
+
+	if ! linux_chkconfig_present MTRR; then
+		ewarn "You don't have MTRR support enabled in the kernel."
+		ewarn "Direct rendering will not work."
+	fi
+
+	if linux_chkconfig_builtin DRM; then
+		ewarn "You have DRM support built in to the kernel"
+		ewarn "Direct rendering will not work."
+	fi
+
+	if ! linux_chkconfig_present AGP && \
+		! linux_chkconfig_present PCIEPORTBUS; then
+		ewarn "You don't have AGP and/or PCIe support enabled in the kernel"
+		ewarn "Direct rendering will not work."
+	fi
+
+	if ! linux_chkconfig_present ACPI; then
+		eerror "${P} requires the ACPI support in the kernel"
+		eerror "Please enable it:"
+		eerror "    CONFIG_ACPI=y"
+		eerror "in /usr/src/linux/.config or"
+		eerror "    Power management and ACPI options --->"
+		eerror "        [*] Power Management support"
+		eerror "in the 'menuconfig'"
+		error+=" CONFIG_ACPI disabled;"
+		failed=1
+	fi
+
+	if ! linux_chkconfig_present PCI_MSI; then
+		eerror "${P} requires MSI in the kernel."
+		eerror "Please enable it:"
+		eerror "    CONFIG_PCI_MSI=y"
+		eerror "in /usr/src/linux/.config or"
+		eerror "    Bus options (PCI etc.)  --->"
+		eerror "        [*] Message Signaled Interrupts (MSI and MSI-X)"
+		eerror "in the kernel config."
+		error+=" CONFIG_PCI_MSI disabled;"
+		failed=1
+	fi
+
+	if linux_chkconfig_present LOCKDEP; then
+		eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+		eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only."
+		eerror "This prevents ${P} from compiling with an error like this:"
+		eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'"
+		eerror "Please make sure the following options have been unset:"
+		eerror "    Kernel hacking  --->"
+		eerror "        [ ] Lock debugging: detect incorrect freeing of live locks"
+		eerror "        [ ] Lock debugging: prove locking correctness"
+		eerror "        [ ] Lock usage statistics"
+		eerror "in 'menuconfig'"
+		error+=" LOCKDEP enabled;"
+		failed=1
+	fi
+
+	use amd64 && if ! linux_chkconfig_present COMPAT; then
+		eerror "${P} requires COMPAT."
+		eerror "Please enable the 32 bit emulation:"
+		eerror "Executable file formats / Emulations  --->"
+		eerror "    [*] IA32 Emulation"
+		eerror "in the kernel config."
+		eerror "if this doesn't enable CONFIG_COMPAT add"
+		eerror "    CONFIG_COMPAT=y"
+		eerror "in /usr/src/linux/.config"
+		error+=" COMPAT disabled;"
+		failed=1
+	fi
+
+	[[ ${failed} -ne 0 ]] && die "${error}"
+}
+
+pkg_pretend() {
+	# workaround until bug 365543 is solved
+	if use modules; then
+		linux-info_pkg_setup
+		require_configured_kernel
+		_check_kernel_config
+	fi
+}
+
+pkg_setup() {
+	if use modules; then
+		MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod/2.6.x)"
+		BUILD_TARGETS="kmod_build"
+		linux-mod_pkg_setup
+		BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
+		BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\""
+		if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then
+			BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space"
+		else
+			BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space"
+		fi
+	fi
+	# Define module dir.
+	MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod"
+	# get the xorg-server version and set BASE_DIR for that
+	BASE_DIR="${S}/xpic"
+
+	# amd64/x86
+	if use amd64 ; then
+		MY_BASE_DIR="${BASE_DIR}_64a"
+		PKG_LIBDIR=lib64
+		ARCH_DIR="${S}/arch/x86_64"
+	else
+		MY_BASE_DIR="${BASE_DIR}"
+		PKG_LIBDIR=lib
+		ARCH_DIR="${S}/arch/x86"
+	fi
+
+	elog
+	elog "Please note that this driver supports only graphic cards based on"
+	elog "r600 chipset and newer."
+	elog "This represent the ATI Radeon HD series at this moment."
+	elog
+	elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati"
+	elog "as replacement is highly recommended. Rather than staying with"
+	elog "old versions of this driver."
+	elog "For migration informations please reffer to:"
+	elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
+	einfo
+}
+
+src_unpack() {
+	if [[ $(get_major_version) -gt 8 ]]; then
+		# Switching to a standard way to extract the files since otherwise no signature file
+		# would be created
+		local src="${DISTDIR}/${A}"
+		sh "${src}" --extract "${S}"  2&>1 /dev/null
+	else
+		unpack ${A}
+	fi
+}
+
+src_prepare() {
+	# All kernel options for prepare are ment to be in here
+	if use modules; then
+		# version patches
+		# epatch "${FILESDIR}"/kernel/${PV}-*.patch
+		if use debug; then
+			sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
+				"${MODULE_DIR}/firegl_public.c" \
+				|| die "Failed to enable debug output."
+		fi
+	fi
+
+	# Fix a known compilation error
+	epatch "${FILESDIR}"/ati-drivers-fix_compilation-bug-297322.patch
+
+	# Experimental 2.6.39 support
+	if kernel_is -ge 2 6 39 ; then
+		epatch "${FILESDIR}"/ati-drivers-2.6.39.patch || die "epatch failed"
+	fi
+
+	# These are the userspace utilities that we also have source for.
+	# We rebuild these later.
+	rm \
+		"${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \
+		|| die "bin rm failed"
+
+	# in this version amdcccle isn't static, thus we depend on qt4
+	use qt4 || rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle
+
+	# ACPI fixups
+	sed -i \
+		-e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
+		-e "s:/var/lib/gdm/:/var/gdm/:" \
+		"${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \
+		|| die "sed failed."
+
+	# Since "who" is in coreutils, we're using that one instead of "finger".
+	sed -i -e 's:finger:who:' \
+		"${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \
+		|| die "Replacing 'finger' with 'who' failed."
+	# Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and
+	# add function to detect default state.
+	epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch || die "Failed to epatch powermode-opt-path-2.patch"
+
+	cd "${MODULE_DIR}"
+
+	# bugged fglrx build system, this file should be copied by hand
+	cp ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x
+
+	convert_to_m 2.6.x/Makefile || die "convert_to_m failed"
+
+	# When built with ati's make.sh it defines a bunch of macros if
+	# certain .config values are set, falling back to less reliable
+	# detection methods if linux/autoconf.h is not available. We
+	# simply use the linux/autoconf.h settings directly, bypassing the
+	# detection script.
+	sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed"
+	sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \
+		|| die "MODVERSIONS sed failed"
+	cd "${S}"
+
+	mkdir extra || die "mkdir failed"
+	cd extra
+	unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz
+}
+
+src_compile() {
+	use modules && linux-mod_src_compile
+
+	ebegin "Building fgl_glxgears"
+	cd "${S}"/extra/fgl_glxgears
+	# These extra libs/utils either have an Imakefile that does not
+	# work very well without tweaking or a Makefile ignoring CFLAGS
+	# and the like. We bypass those.
+
+	# The -DUSE_GLU is needed to compile using nvidia headers
+	# according to a comment in ati-drivers-extra-8.33.6.ebuild.
+	"$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
+		-I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \
+		-lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
+	eend $?
+}
+
+src_install() {
+	use modules && linux-mod_src_install
+
+	# We can do two things here, and neither of them is very nice.
+
+	# For direct rendering libGL has to be able to load one or more
+	# dri modules (files ending in _dri.so, like fglrx_dri.so).
+	# Gentoo's mesa looks for these files in the location specified by
+	# LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded
+	# location /usr/$(get_libdir)/dri. Ati's libGL does the same
+	# thing, but the hardcoded location is /usr/X11R6/lib/modules/dri
+	# on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64
+	# 64bit. So we can either put the .so files in that (unusual,
+	# compared to "normal" mesa libGL) location or set
+	# LIBGL_DRIVERS_PATH. We currently do the latter. See also bug
+	# 101539.
+
+	# The problem with this approach is that LIBGL_DRIVERS_PATH
+	# *overrides* the default hardcoded location, it does not extend
+	# it. So if ati-drivers is merged but a non-ati libGL is selected
+	# and its hardcoded path does not match our LIBGL_DRIVERS_PATH
+	# (because it changed in a newer mesa or because it was compiled
+	# for a different set of multilib abis than we are) stuff breaks.
+
+	# We create one file per ABI to work with "native" multilib, see
+	# below.
+
+	echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep"
+	doenvd "${T}/03ati-colon-sep" || die
+
+	# All libraries that we have a 32 bit and 64 bit version of on
+	# amd64 are installed in src_install-libs. Everything else
+	# (including libraries only available in native 64bit on amd64)
+	# goes in here.
+
+	# There used to be some code here that tried to detect running
+	# under a "native multilib" portage ((precursor of)
+	# http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it
+	# should just work (only doing some duplicate work). --marienz
+	if has_multilib_profile; then
+		local OABI=${ABI}
+		for ABI in $(get_install_abis); do
+			src_install-libs
+		done
+		ABI=${OABI}
+		unset OABI
+	else
+		src_install-libs
+	fi
+
+	# This is sorted by the order the files occur in the source tree.
+
+	# X modules.
+	exeinto /usr/$(get_libdir)/xorg/modules/drivers
+	doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
+	exeinto /usr/$(get_libdir)/xorg/modules/linux
+	doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
+	exeinto /usr/$(get_libdir)/xorg/modules
+	doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so}
+
+	# Arch-specific files.
+	# (s)bin.
+	into /opt
+	dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
+	# We cleaned out the compilable stuff in src_unpack
+	dobin "${ARCH_DIR}"/usr/X11R6/bin/*
+
+	# lib.
+	exeinto /usr/$(get_libdir)
+	# Everything except for the libGL.so installed in src_install-libs.
+	doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
+		-maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*')
+	insinto /usr/$(get_libdir)
+	doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
+		-maxdepth 1 -type f -not -name '*.so*')
+
+	# Common files.
+	# etc.
+	insinto /etc/ati
+	exeinto /etc/ati
+	# Everything except for the authatieventsd.sh script.
+	doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default}
+	doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh
+
+	# include.
+	insinto /usr
+	doins -r ${FOLDER_PREFIX}usr/include
+	insinto /usr/include/X11/extensions
+
+	# Just the atigetsysteminfo.sh script.
+	into /usr
+	dosbin ${FOLDER_PREFIX}usr/sbin/*
+
+	# data files for the control panel.
+	if use qt4 ; then
+		insinto /usr/share
+		doins -r ${FOLDER_PREFIX}usr/share/ati
+		insinto /usr/share/pixmaps
+		doins ${FOLDER_PREFIX}usr/share/icons/ccc_large.xpm
+		make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
+			ccc_large System
+	fi
+
+	# doc.
+	dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx
+
+	doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8
+
+	pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null
+
+	exeinto /etc/acpi
+	doexe ati-powermode.sh
+	insinto /etc/acpi/events
+	doins events/*
+
+	popd > /dev/null
+
+	# Done with the "source" tree. Install tools we rebuilt:
+	dobin extra/fgl_glxgears/fgl_glxgears
+	newdoc extra/fgl_glxgears/README README.fgl_glxgears
+
+	# Gentoo-specific stuff:
+	newinitd "${FILESDIR}"/atieventsd.init atieventsd
+	echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
+	newconfd "${T}"/atieventsd.conf atieventsd
+
+	# PowerXpress stuff
+	local alllibdir="$(get_libdir)"
+	use multilib && alllibdir="lib64 lib32"
+	for libdir in ${alllibdir}
+	do
+		dosym /usr/${libdir}/opengl/xorg-x11/lib/libGL.so.1.2 \
+			/usr/${libdir}/fglrx/libGL.so.1.2
+		dosym ./libGL.so.1.2 /usr/${libdir}/fglrx/fglrx-libGL.so.1.2
+	done
+}
+
+src_install-libs() {
+	if [[ "${ABI}" == "amd64" ]]; then
+		local EX_BASE_DIR="${BASE_DIR}_64a"
+		local pkglibdir=lib64
+		local MY_ARCH_DIR="${S}/arch/x86_64"
+	else
+		local EX_BASE_DIR="${BASE_DIR}"
+		local pkglibdir=lib
+		local MY_ARCH_DIR="${S}/arch/x86"
+	fi
+	einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system"
+
+	local ATI_ROOT=/usr/$(get_libdir)/opengl/ati
+	# To make sure we do not miss a spot when these change.
+	local libmajor=1 libminor=2
+	local libver=${libmajor}.${libminor}
+
+	# The GLX libraries
+	# (yes, this really is "lib" even on amd64/multilib --marienz)
+	exeinto ${ATI_ROOT}/lib
+	newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \
+		libGL.so.${libver}
+	dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
+	dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
+	# PowerXpress stuff
+	dosym /usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.so.1.2 \
+		${ATI_ROOT}/lib/FGL.renamed.libGL.so.1.2
+	dosym ./libGL.so.1.2 ${ATI_ROOT}/lib/fglrx-libGL.so.1.2
+
+	exeinto ${ATI_ROOT}/extensions
+	doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so
+	# PowerXpress stuff
+	dosym /usr/$(get_libdir)/opengl/xorg-x11/extensions/libglx.so \
+		${ATI_ROOT}/extensions/FGL.renamed.libglx.so
+	dosym fglrx-libglx.so ${ATI_ROOT}/extensions/libglx.so
+
+	# DRI modules, installed into the path used by recent versions of mesa.
+	exeinto /usr/$(get_libdir)/dri
+	doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
+
+	# AMD Cal libraries
+	exeinto /usr/$(get_libdir)
+	doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so*
+
+	local envname="${T}"/04ati-dri-path
+	if [[ -n ${ABI} ]]; then
+		envname="${envname}-${ABI}"
+	fi
+	echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}"
+	doenvd "${envname}"
+}
+
+pkg_postinst() {
+	elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
+	elog "To change your xorg.conf you can use the bundled \"aticonfig\""
+	elog
+	elog "If you experience unexplained segmentation faults and kernel crashes"
+	elog "with this driver and multi-threaded applications such as wine,"
+	elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
+	elog
+	elog "Fully rebooting the system after an ${PN} update is recommended"
+	elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg"
+	elog "might not work"
+
+	use modules && linux-mod_pkg_postinst
+	"${ROOT}"/usr/bin/eselect opengl set --use-old ati
+}
+
+pkg_preinst() {
+	use modules && linux-mod_pkg_preinst
+}
+
+pkg_prerm() {
+	"${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
+
+pkg_postrm() {
+	use modules && linux-mod_pkg_postrm
+	"${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.38.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.38.patch
deleted file mode 100644
index 0c3970e..0000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-2.6.38.patch
+++ /dev/null
@@ -1,60 +0,0 @@
---- cat11.1/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-01-17 15:59:26.000000000 +0100
-+++ cat11.1/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-02-01 18:39:08.902218444 +0100
-@@ -848,7 +848,12 @@
-      * happen much less frequent then without this workaround.
-      */
-     if (state == PM_EVENT_SUSPEND)
--        acquire_console_sem();
-+      
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
-+        console_lock();
-+#else
-+	acquire_console_sem();
-+#endif
- 
-     if (firegl_cail_powerdown(privdev, state))
-         ret = -EIO;
-@@ -870,8 +875,13 @@
-     }
- 
-     if (state == PM_EVENT_SUSPEND)
--        release_console_sem();
--
-+      
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
-+        console_unlock();
-+#else
-+	release_console_sem();
-+#endif
-+	
-     KCL_DEBUG_TRACEOUT(FN_FIREGL_ACPI, ret, NULL);  
-     
-     return ret;
-@@ -894,7 +904,12 @@
-     if (PMSG_EVENT(pdev->dev.power.power_state) == 0) return 0;
- 
-     if (PMSG_EVENT(pdev->dev.power.power_state) == PM_EVENT_SUSPEND)
--        acquire_console_sem();
-+      
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
-+        console_lock();
-+#else
-+	acquire_console_sem();
-+#endif
- 
- #ifdef FIREGL_USWC_SUPPORT
-     // Restore the PAT after resuming from S3 or S4.
-@@ -919,7 +934,12 @@
-     firegl_cail_powerup(privdev);
- 
-     if (PMSG_EVENT(pdev->dev.power.power_state) == PM_EVENT_SUSPEND)
--        release_console_sem();
-+      
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
-+        console_unlock();
-+#else
-+	release_console_sem();
-+#endif
- 
-     PMSG_EVENT(pdev->dev.power.power_state) = 0;
-     KCL_DEBUG_TRACEOUT(FN_FIREGL_ACPI, 0, NULL);  

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch
new file mode 100644
index 0000000..6f3940c
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch
@@ -0,0 +1,96 @@
+Description: add support for missing kernel lock
+Author: Pascal Giard <evilynux@gmail.com>
+
+diff -Naur fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-04-27 21:30:08.000000000 +0200
++++ fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-04-27 21:29:27.000000000 +0200
+@@ -1902,13 +1902,17 @@
+ /** \brief Grab global kernel lock */
+ void ATI_API_CALL KCL_GlobalKernelLock(void)
+ {
++#ifdef CONFIG_KERNEL_LOCK
+     lock_kernel();
++#endif
+ }
+ 
+ /** \brief Release global kernel lock */
+ void ATI_API_CALL KCL_GlobalKernelUnlock(void)
+ {
++#ifdef CONFIG_KERNEL_LOCK
+     unlock_kernel();
++#endif
+ }
+ 
+ /*****************************************************************************/
+# Do not include smp_lock.h if the Kernel is built without BKL.
+# Closes: #619952
+
+diff -Naur fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/drmP.h fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/drmP.h
+--- fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/drmP.h	2011-03-24 17:00:28.000000000 +0100
++++ fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/drmP.h	2011-03-29 20:39:05.000000000 +0200
+@@ -57,7 +57,11 @@
+ #include <linux/pci.h>
+ #include <linux/version.h>
+ #include <linux/sched.h>
++/* with no Big Kernel Lock and linux 2.6.38
++   and higher smp_lock.h is removed      */
++#ifdef CONFIG_KERNEL_LOCK || LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
+ #include <linux/smp_lock.h>	/* For (un)lock_kernel */
++#endif
+ #include <linux/mm.h>
+ #include <linux/pagemap.h>
+ #if defined(__alpha__) || defined(__powerpc__)
+diff -Naur fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-03-29 20:37:04.000000000 +0200
++++ fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-03-29 20:39:05.000000000 +0200
+@@ -116,7 +116,16 @@
+ #include <linux/pci.h>
+ #include <linux/wait.h>
+ #include <linux/miscdevice.h>
+-#include <linux/smp_lock.h>
++
++/* with no Big Kernel Lock and linux 2.6.38
++   and higher is smp_lock.h removed.
++   instead of smp_lock.h is sched.h required    */
++#ifdef CONFIG_KERNEL_LOCK || LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
++#include <linux/smp_lock.h>	/* For (un)lock_kernel */
++#else
++#include <linux/sched.h>
++#endif
++
+ // newer SuSE kernels need this
+ #include <linux/highmem.h>
+ 
+Description: Add Linux 2.6.39 support
+ <linux/spinlock_types.h> had the following comment until 2.6.38:
+ .
+ /*
+  * SPIN_LOCK_UNLOCKED defeats lockdep state tracking and is hence
+  * deprecated.
+  * Please use DEFINE_SPINLOCK() or __SPIN_LOCK_UNLOCKED() as
+  * appropriate.
+  */
+ #define SPIN_LOCK_UNLOCKED     __SPIN_LOCK_UNLOCKED(old_style_spin_init)
+ .
+ This definition got removed in 2.6.39. Restore it locally until it gets fixed
+ upstream.
+Author: Miguel Colon <debian.micove@gmail.com>
+Forwarded: no
+Last-Update: 2011-03-30
+
+diff -Naur fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-04-27 21:48:43.000000000 +0200
++++ fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-04-27 21:49:36.000000000 +0200
+@@ -1060,7 +1060,12 @@
+     dev->pubdev.signature = FGL_DEVICE_SIGNATURE;
+ 
+     for (i = 0; i < __KE_MAX_SPINLOCKS; i++)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
+         dev->spinlock[i] = SPIN_LOCK_UNLOCKED;
++#else
++        dev->spinlock[i] = __SPIN_LOCK_UNLOCKED(old_style_spin_init);
++#endif
++
+ 
+     for (i=0; i < __KE_MAX_SEMAPHORES; i++)
+         sema_init(&dev->struct_sem[i], 1);



^ permalink raw reply related	[flat|nested] 26+ messages in thread
* [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
@ 2011-03-30  9:51 Enrico Tagliavini
  0 siblings, 0 replies; 26+ messages in thread
From: Enrico Tagliavini @ 2011-03-30  9:51 UTC (permalink / raw
  To: gentoo-commits

commit:     968cb8536aa08f020377845db7e00fbc4f2e8676
Author:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
AuthorDate: Wed Mar 30 09:50:54 2011 +0000
Commit:     Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com>
CommitDate: Wed Mar 30 09:50:54 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=968cb853

Create ati-drivers folder, and bump to version 11.3

---
 x11-drivers/ati-drivers/ati-drivers-11.3.ebuild    |  574 ++++++++++++++++++++
 .../ati-drivers/files/ati-drivers-2.6.38.patch     |   60 ++
 .../ati-drivers-fix_compilation-bug-297322.patch   |   25 +
 .../files/ati-powermode-opt-path-2.patch           |   42 ++
 x11-drivers/ati-drivers/files/atieventsd.init      |   20 +
 x11-drivers/ati-drivers/metadata.xml               |   11 +
 6 files changed, 732 insertions(+), 0 deletions(-)

diff --git a/x11-drivers/ati-drivers/ati-drivers-11.3.ebuild b/x11-drivers/ati-drivers/ati-drivers-11.3.ebuild
new file mode 100644
index 0000000..d2218ef
--- /dev/null
+++ b/x11-drivers/ati-drivers/ati-drivers-11.3.ebuild
@@ -0,0 +1,574 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-11.2.ebuild,v 1.5 2011/03/26 10:31:56 fauli Exp $
+
+EAPI="2"
+
+inherit eutils multilib linux-mod toolchain-funcs versionator
+
+DESCRIPTION="Ati precompiled drivers for r600 (HD Series) and newer chipsets"
+HOMEPAGE="http://www.ati.com"
+# 8.ble will be used for beta releases.
+if [[ $(get_major_version) -gt 8 ]]; then
+	ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
+	SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run"
+	FOLDER_PREFIX="common/"
+else
+	SRC_URI="https://launchpad.net/ubuntu/maverick/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz"
+	FOLDER_PREFIX=""
+fi
+IUSE="debug +modules multilib qt4"
+
+LICENSE="AMD GPL-2 QPL-1.0 as-is"
+KEYWORDS="amd64 x86"
+SLOT="1"
+
+RDEPEND="
+	<x11-base/xorg-server-1.9.99
+	!x11-drivers/ati-drivers:0
+	!x11-apps/ati-drivers-extra
+	>=app-admin/eselect-opengl-1.0.7
+	sys-power/acpid
+	x11-apps/xauth
+	x11-libs/libX11
+	x11-libs/libXext
+	x11-libs/libXinerama
+	x11-libs/libXrandr
+	x11-libs/libXrender
+	multilib? ( app-emulation/emul-linux-x86-opengl )
+	qt4? (
+			x11-libs/libICE
+			x11-libs/libSM
+			x11-libs/libXcursor
+			x11-libs/libXfixes
+			x11-libs/libXxf86vm
+			x11-libs/qt-core
+			x11-libs/qt-gui
+		 )
+"
+
+DEPEND="${RDEPEND}
+	app-portage/portage-utils
+	x11-proto/inputproto
+	x11-proto/xf86miscproto
+	x11-proto/xf86vidmodeproto
+	x11-proto/xineramaproto
+	x11-libs/libXtst
+"
+
+EMULTILIB_PKG="true"
+
+S="${WORKDIR}"
+
+# QA Silencing
+QA_TEXTRELS="
+	usr/lib*/opengl/ati/lib/libGL.so.1.2
+	usr/lib*/libatiadlxx.so
+	usr/lib*/xorg/modules/glesx.so
+	usr/lib*/libaticaldd.so
+	usr/lib*/dri/fglrx_dri.so
+"
+
+QA_EXECSTACK="
+	opt/bin/atiode
+	opt/bin/amdcccle
+	usr/lib*/opengl/ati/lib/libGL.so.1.2
+	usr/lib*/dri/fglrx_dri.so
+"
+
+QA_WX_LOAD="
+	usr/lib*/opengl/ati/lib/libGL.so.1.2
+	usr/lib*/dri/fglrx_dri.so
+"
+
+QA_PRESTRIPPED="
+	usr/lib\(32\|64\)\?/libXvBAW.so.1.0
+	usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
+	usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
+	usr/lib\(32\|64\)\?/xorg/modules/glesx.so
+	usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
+	usr/lib\(32\|64\)\?/libaticaldd.so
+	usr/lib\(32\|64\)\?/dri/fglrx_dri.so
+"
+
+QA_SONAME="
+	usr/lib\(32\|64\)\?/libatiadlxx.so
+	usr/lib\(32\|64\)\?/libaticalcl.so
+	usr/lib\(32\|64\)\?/libaticaldd.so
+	usr/lib\(32\|64\)\?/libaticalrt.so
+"
+
+QA_DT_HASH="
+	opt/bin/amdcccle
+	opt/bin/aticonfig
+	opt/bin/atiodcli
+	opt/bin/atiode
+	opt/bin/fglrxinfo
+	opt/sbin/atieventsd
+	usr/lib\(32\|64\)\?/libaticalcl.so
+	usr/lib\(32\|64\)\?/libaticalrt.so
+	usr/lib\(32\|64\)\?/libatiuki.so.1.0
+	usr/lib\(32\|64\)\?/libatiadlxx.so
+	usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0
+	usr/lib\(32\|64\)\?/libXvBAW.so.1.0
+	usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
+	usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so
+	usr/lib\(32\|64\)\?/xorg/modules/glesx.so
+	usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so
+	usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so
+	usr/lib\(32\|64\)\?/libaticaldd.so
+	usr/lib\(32\|64\)\?/dri/fglrx_dri.so
+	usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
+	usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
+"
+
+_check_kernel_config() {
+	local failed=0
+	local error=""
+	if ! kernel_is 2 6; then
+		eerror "You need a 2.6 linux kernel to compile against!"
+		die "No 2.6 Kernel found"
+	fi
+
+	if ! linux_chkconfig_present MTRR; then
+		ewarn "You don't have MTRR support enabled in the kernel."
+		ewarn "Direct rendering will not work."
+	fi
+
+	if linux_chkconfig_builtin DRM; then
+		ewarn "You have DRM support built in to the kernel"
+		ewarn "Direct rendering will not work."
+	fi
+
+	if ! linux_chkconfig_present AGP && \
+		! linux_chkconfig_present PCIEPORTBUS; then
+		ewarn "You don't have AGP and/or PCIe support enabled in the kernel"
+		ewarn "Direct rendering will not work."
+	fi
+
+	if ! linux_chkconfig_present ACPI; then
+		eerror "${P} requires the ACPI support in the kernel"
+		eerror "Please enable it:"
+		eerror "    CONFIG_ACPI=y"
+		eerror "in /usr/src/linux/.config or"
+		eerror "    Power management and ACPI options --->"
+		eerror "        [*] Power Management support"
+		eerror "in the 'menuconfig'"
+		error="${error} CONFIG_ACPI disabled"
+		failed=1
+	fi
+
+	if ! linux_chkconfig_present MAGIC_SYSRQ; then
+		eerror "${P} requires the magic SysRq keys in the kernel."
+		eerror "Please enable it:"
+		eerror "    CONFIG_MAGIC_SYSRQ=y"
+		eerror "in /usr/src/linux/.config or"
+		eerror "    Kernel hacking  --->"
+		eerror "        [*] Magic SysRq key"
+		eerror "in the 'menuconfig'"
+		error="${error} CONFIG_MAGIC_SYSRQ disabled"
+		failed=1
+	fi
+
+	if ! linux_chkconfig_present PCI_MSI; then
+		eerror "${P} requires MSI in the kernel."
+		eerror "Please enable it:"
+		eerror "    CONFIG_PCI_MSI=y"
+		eerror "in /usr/src/linux/.config or"
+		eerror "    Bus options (PCI etc.)  --->"
+		eerror "        [*] Message Signaled Interrupts (MSI and MSI-X)"
+		eerror "in the kernel config."
+		error="${error} CONFIG_PCI_MSI disabled"
+		failed=1
+	fi
+
+	if linux_chkconfig_present LOCKDEP; then
+		eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+		eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only."
+		eerror "This prevents ${P} from compiling with an error like this:"
+		eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'"
+		eerror "Please make sure the following options have been unset:"
+		eerror "    Kernel hacking  --->"
+		eerror "        [ ] Lock debugging: detect incorrect freeing of live locks"
+		eerror "        [ ] Lock debugging: prove locking correctness"
+		eerror "        [ ] Lock usage statistics"
+		eerror "in 'menuconfig'"
+		error="${error} LOCKDEP enabled"
+		failed=1
+	fi
+
+	use amd64 && if ! linux_chkconfig_present COMPAT; then
+		eerror "${P} requires COMPAT."
+		eerror "Please enable the 32 bit emulation:"
+		eerror "Executable file formats / Emulations  --->"
+		eerror "    [*] IA32 Emulation"
+		eerror "in the kernel config."
+		eerror "if this doesn't enable CONFIG_COMPAT add"
+		eerror "    CONFIG_COMPAT=y"
+		eerror "in /usr/src/linux/.config"
+		error="${error} COMPAT disabled"
+		failed=1
+	fi
+
+	kernel_is ge 2 6 37 && if ! linux_chkconfig_present BKL ; then
+		eerror "${P} requires BKL."
+		eerror "Please enable the Big Kernel Lock:"
+		eerror "Kernel hacking  --->"
+		eerror "    [*] Big Kernel Lock"
+		eerror "in the kernel config."
+		eerror "or add"
+		eerror "    CONFIG_BKL=y"
+		eerror "in /usr/src/linux/.config"
+		error="${error} BKL disabled"
+		failed=1
+	fi
+
+	[ "x${failed}" != "x0" ] && die "${error}"
+}
+
+pkg_setup() {
+	# Define module dir.
+	MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod"
+	# get the xorg-server version and set BASE_DIR for that
+	local ver_str=$(qatom `best_version x11-base/xorg-server` | cut -d ' ' -f 3)
+	case ${ver_str} in
+		1\.9*) BASE_DIR="${S}/xpic" ;;
+		9999*) BASE_DIR="${S}/xpic"
+			ewarn "Experimental xorg-server-${ver_str}"
+			ewarn "Picking the last implementation" ;;
+		1\.8*|1\.7*) BASE_DIR="${S}/xpic" ;;
+		*) die "xorg-server-${ver_str} not supported" ;;
+	esac
+
+	# amd64/x86
+	if use amd64 ; then
+		MY_BASE_DIR="${BASE_DIR}_64a"
+		PKG_LIBDIR=lib64
+		ARCH_DIR="${S}/arch/x86_64"
+	else
+		MY_BASE_DIR="${BASE_DIR}"
+		PKG_LIBDIR=lib
+		ARCH_DIR="${S}/arch/x86"
+	fi
+
+	if use modules; then
+		MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod/2.6.x)"
+		BUILD_TARGETS="kmod_build"
+		linux-mod_pkg_setup
+		BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
+		BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\""
+		if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then
+			BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space"
+		else
+			BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space"
+		fi
+		_check_kernel_config
+	fi
+
+	elog
+	elog "Please note that this driver supports only graphic cards based on"
+	elog "r600 chipset and newer."
+	elog "This represent the ATI Radeon HD series at this moment."
+	elog
+	elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati"
+	elog "as replacement is highly recommended. Rather than staying with"
+	elog "old versions of this driver."
+	elog "For migration informations please reffer to:"
+	elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
+	einfo
+}
+
+src_unpack() {
+	if [[ $(get_major_version) -gt 8 ]]; then
+		# Switching to a standard way to extract the files since otherwise no signature file
+		# would be created
+		local src="${DISTDIR}/${A}"
+		sh "${src}" --extract "${S}"  2&>1 /dev/null
+	else
+		unpack ${A}
+	fi
+}
+
+src_prepare() {
+	# All kernel options for prepare are ment to be in here
+	if use modules; then
+		# version patches
+		# epatch "${FILESDIR}"/kernel/${PV}-*.patch
+		if use debug; then
+			sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
+				"${MODULE_DIR}/firegl_public.c" \
+				|| die "Failed to enable debug output."
+		fi
+	fi
+
+	# Fix a known compilation error
+	epatch "${FILESDIR}"/ati-drivers-fix_compilation-bug-297322.patch
+
+	if kernel_is ge 2 6 38 ; then
+		epatch "${FILESDIR}"/ati-drivers-2.6.38.patch || \
+			die "epatch ati-drivers-2.6.38.patch failed"
+	fi
+
+	# These are the userspace utilities that we also have source for.
+	# We rebuild these later.
+	rm \
+		"${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \
+		|| die "bin rm failed"
+
+	# in this version amdcccle isn't static, thus we depend on qt4
+	use qt4 || rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle
+
+	# ACPI fixups
+	sed -i \
+		-e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
+		-e "s:/var/lib/gdm/:/var/gdm/:" \
+		"${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \
+		|| die "sed failed."
+
+	# Since "who" is in coreutils, we're using that one instead of "finger".
+	sed -i -e 's:finger:who:' \
+		"${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \
+		|| die "Replacing 'finger' with 'who' failed."
+	# Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and
+	# add function to detect default state.
+	epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch || die "Failed to epatch powermode-opt-path-2.patch"
+
+	cd "${MODULE_DIR}"
+
+	# bugged fglrx build system, this file should be copied by hand
+	cp ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x
+
+	convert_to_m 2.6.x/Makefile || die "convert_to_m failed"
+
+	# When built with ati's make.sh it defines a bunch of macros if
+	# certain .config values are set, falling back to less reliable
+	# detection methods if linux/autoconf.h is not available. We
+	# simply use the linux/autoconf.h settings directly, bypassing the
+	# detection script.
+	sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed"
+	sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \
+		|| die "MODVERSIONS sed failed"
+	cd "${S}"
+
+	mkdir extra || die "mkdir failed"
+	cd extra
+	unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz
+}
+
+src_compile() {
+	use modules && linux-mod_src_compile
+
+	ebegin "Building fgl_glxgears"
+	cd "${S}"/extra/fgl_glxgears
+	# These extra libs/utils either have an Imakefile that does not
+	# work very well without tweaking or a Makefile ignoring CFLAGS
+	# and the like. We bypass those.
+
+	# The -DUSE_GLU is needed to compile using nvidia headers
+	# according to a comment in ati-drivers-extra-8.33.6.ebuild.
+	"$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
+		-I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \
+		-lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
+	eend $?
+}
+
+src_install() {
+	use modules && linux-mod_src_install
+
+	# We can do two things here, and neither of them is very nice.
+
+	# For direct rendering libGL has to be able to load one or more
+	# dri modules (files ending in _dri.so, like fglrx_dri.so).
+	# Gentoo's mesa looks for these files in the location specified by
+	# LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded
+	# location /usr/$(get_libdir)/dri. Ati's libGL does the same
+	# thing, but the hardcoded location is /usr/X11R6/lib/modules/dri
+	# on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64
+	# 64bit. So we can either put the .so files in that (unusual,
+	# compared to "normal" mesa libGL) location or set
+	# LIBGL_DRIVERS_PATH. We currently do the latter. See also bug
+	# 101539.
+
+	# The problem with this approach is that LIBGL_DRIVERS_PATH
+	# *overrides* the default hardcoded location, it does not extend
+	# it. So if ati-drivers is merged but a non-ati libGL is selected
+	# and its hardcoded path does not match our LIBGL_DRIVERS_PATH
+	# (because it changed in a newer mesa or because it was compiled
+	# for a different set of multilib abis than we are) stuff breaks.
+
+	# We create one file per ABI to work with "native" multilib, see
+	# below.
+
+	echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep"
+	doenvd "${T}/03ati-colon-sep" || die
+
+	# All libraries that we have a 32 bit and 64 bit version of on
+	# amd64 are installed in src_install-libs. Everything else
+	# (including libraries only available in native 64bit on amd64)
+	# goes in here.
+
+	# There used to be some code here that tried to detect running
+	# under a "native multilib" portage ((precursor of)
+	# http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it
+	# should just work (only doing some duplicate work). --marienz
+	if has_multilib_profile; then
+		local OABI=${ABI}
+		for ABI in $(get_install_abis); do
+			src_install-libs
+		done
+		ABI=${OABI}
+		unset OABI
+	else
+		src_install-libs
+	fi
+
+	# This is sorted by the order the files occur in the source tree.
+
+	# X modules.
+	exeinto /usr/$(get_libdir)/xorg/modules/drivers
+	doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so || die
+	exeinto /usr/$(get_libdir)/xorg/modules/linux
+	doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so || die
+	exeinto /usr/$(get_libdir)/xorg/modules
+	doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} || die
+
+	# Arch-specific files.
+	# (s)bin.
+	into /opt
+	dosbin "${ARCH_DIR}"/usr/sbin/atieventsd || die
+	# We cleaned out the compilable stuff in src_unpack
+	dobin "${ARCH_DIR}"/usr/X11R6/bin/* || die
+
+	# lib.
+	exeinto /usr/$(get_libdir)
+	# Everything except for the libGL.so installed in src_install-libs.
+	doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
+		-maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*')
+	insinto /usr/$(get_libdir)
+	doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
+		-maxdepth 1 -type f -not -name '*.so*')
+
+	# Common files.
+	# etc.
+	insinto /etc/ati
+	# Everything except for the authatieventsd.sh script.
+	doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default}
+	insopts -m0755
+	doins ${FOLDER_PREFIX}etc/ati/authatieventsd.sh || die
+
+	# include.
+	insinto /usr
+	doins -r ${FOLDER_PREFIX}usr/include || die
+	insinto /usr/include/X11/extensions
+
+	# Just the atigetsysteminfo.sh script.
+	into /usr
+	dosbin ${FOLDER_PREFIX}usr/sbin/* || die
+
+	# data files for the control panel.
+	if use qt4 ; then
+		insinto /usr/share
+		doins -r ${FOLDER_PREFIX}usr/share/ati || die
+		insinto /usr/share/pixmaps
+		doins ${FOLDER_PREFIX}usr/share/icons/ccc_large.xpm || die
+		make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
+			ccc_large System
+	fi
+
+	# doc.
+	dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx || die
+
+	doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 || die
+
+	pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null
+
+	exeinto /etc/acpi
+	doexe ati-powermode.sh || die
+	insinto /etc/acpi/events
+	doins events/* || die
+
+	popd > /dev/null
+
+	# Done with the "source" tree. Install tools we rebuilt:
+	dobin extra/fgl_glxgears/fgl_glxgears || die
+	newdoc extra/fgl_glxgears/README README.fgl_glxgears || die
+
+	# Gentoo-specific stuff:
+	newinitd "${FILESDIR}"/atieventsd.init atieventsd \
+		|| die "Failed to install atieventsd.init.d"
+	echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
+	insopts -m0644
+	newconfd "${T}"/atieventsd.conf atieventsd || die
+}
+
+src_install-libs() {
+	if [[ "${ABI}" == "amd64" ]]; then
+		local EX_BASE_DIR="${BASE_DIR}_64a"
+		local pkglibdir=lib64
+		local MY_ARCH_DIR="${S}/arch/x86_64"
+	else
+		local EX_BASE_DIR="${BASE_DIR}"
+		local pkglibdir=lib
+		local MY_ARCH_DIR="${S}/arch/x86"
+	fi
+	einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system"
+
+	local ATI_ROOT=/usr/$(get_libdir)/opengl/ati
+	# To make sure we do not miss a spot when these change.
+	local libmajor=1 libminor=2
+	local libver=${libmajor}.${libminor}
+
+	# The GLX libraries
+	# (yes, this really is "lib" even on amd64/multilib --marienz)
+	exeinto ${ATI_ROOT}/lib
+	doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver} || die
+	dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} || die
+	dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so || die
+
+	exeinto ${ATI_ROOT}/extensions
+	doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/*.so || die
+
+	# DRI modules, installed into the path used by recent versions of mesa.
+	exeinto /usr/$(get_libdir)/dri
+	doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so || die
+
+	# AMD Cal libraries
+	exeinto /usr/$(get_libdir)
+	doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* || die
+
+	local envname="${T}"/04ati-dri-path
+	if [[ -n ${ABI} ]]; then
+		envname="${envname}-${ABI}"
+	fi
+	echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}"
+	doenvd "${envname}" || die
+}
+
+pkg_postinst() {
+	elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
+	elog "To change your xorg.conf you can use the bundled \"aticonfig\""
+	elog
+	elog "If you experience unexplained segmentation faults and kernel crashes"
+	elog "with this driver and multi-threaded applications such as wine,"
+	elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
+	elog
+	elog "Fully rebooting the system after an ${PN} update is raccomended"
+	elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg"
+	elog "might not work"
+
+	use modules && linux-mod_pkg_postinst
+	"${ROOT}"/usr/bin/eselect opengl set --use-old ati
+}
+
+pkg_preinst() {
+	use modules && linux-mod_pkg_preinst
+}
+
+pkg_prerm() {
+	"${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
+
+pkg_postrm() {
+	use modules && linux-mod_pkg_postrm
+	"${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.38.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.38.patch
new file mode 100644
index 0000000..0c3970e
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-2.6.38.patch
@@ -0,0 +1,60 @@
+--- cat11.1/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-01-17 15:59:26.000000000 +0100
++++ cat11.1/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-02-01 18:39:08.902218444 +0100
+@@ -848,7 +848,12 @@
+      * happen much less frequent then without this workaround.
+      */
+     if (state == PM_EVENT_SUSPEND)
+-        acquire_console_sem();
++      
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
++        console_lock();
++#else
++	acquire_console_sem();
++#endif
+ 
+     if (firegl_cail_powerdown(privdev, state))
+         ret = -EIO;
+@@ -870,8 +875,13 @@
+     }
+ 
+     if (state == PM_EVENT_SUSPEND)
+-        release_console_sem();
+-
++      
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
++        console_unlock();
++#else
++	release_console_sem();
++#endif
++	
+     KCL_DEBUG_TRACEOUT(FN_FIREGL_ACPI, ret, NULL);  
+     
+     return ret;
+@@ -894,7 +904,12 @@
+     if (PMSG_EVENT(pdev->dev.power.power_state) == 0) return 0;
+ 
+     if (PMSG_EVENT(pdev->dev.power.power_state) == PM_EVENT_SUSPEND)
+-        acquire_console_sem();
++      
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
++        console_lock();
++#else
++	acquire_console_sem();
++#endif
+ 
+ #ifdef FIREGL_USWC_SUPPORT
+     // Restore the PAT after resuming from S3 or S4.
+@@ -919,7 +934,12 @@
+     firegl_cail_powerup(privdev);
+ 
+     if (PMSG_EVENT(pdev->dev.power.power_state) == PM_EVENT_SUSPEND)
+-        release_console_sem();
++      
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
++        console_unlock();
++#else
++	release_console_sem();
++#endif
+ 
+     PMSG_EVENT(pdev->dev.power.power_state) = 0;
+     KCL_DEBUG_TRACEOUT(FN_FIREGL_ACPI, 0, NULL);  

diff --git a/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch b/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch
new file mode 100644
index 0000000..e2af915
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch
@@ -0,0 +1,25 @@
+--- common/lib/modules/fglrx/build_mod/firegl_public.c
++++ common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -1441,7 +1441,9 @@
+ todo !!!
+ #endif
+ 
+-unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old,
++void __cmpxchg_wrong_size(void) {}
++
++unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old,
+          unsigned long new, int size)
+ {
+ #ifndef __HAVE_ARCH_CMPXCHG
+--- common/lib/modules/fglrx/build_mod/firegl_public.h
++++ common/lib/modules/fglrx/build_mod/firegl_public.h
+@@ -441,7 +441,8 @@
+ extern void ATI_API_CALL KCL_SIGNAL_BlockAll(int (*notifier)(void *priv), void *pPriv, __ke_sigset_t *pSigMask);
+ extern void ATI_API_CALL KCL_SIGNAL_UnblockAll(void);
+ 
+-extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old,                      
++extern void __cmpxchg_wrong_size(void);
++extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old,                      
+                       unsigned long new, int size);
+ 
+ #define __ke_cmpxchg(ptr,o,n)                        \

diff --git a/x11-drivers/ati-drivers/files/ati-powermode-opt-path-2.patch b/x11-drivers/ati-drivers/files/ati-powermode-opt-path-2.patch
new file mode 100644
index 0000000..f5a35a3
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-powermode-opt-path-2.patch
@@ -0,0 +1,42 @@
+diff -ur common.orig/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh
+--- common.orig/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh	2006-07-28 04:22:36.000000000 +0100
++++ common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh	2006-08-04 12:19:42.000000000 +0100
+@@ -4,6 +4,8 @@
+ # Control script for ACPI lid state and AC adapter state
+ #
+ 
++aticonfig='/opt/bin/aticonfig'
++
+ getXuser() {
+         user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'`
+         if [ x"$user" = x"" ]; then
+@@ -47,7 +49,7 @@
+ done
+ 
+ #If PPLIB is enabled
+-su $user -c '/usr/bin/aticonfig --pplib-cmd="get version"' | grep PPLIB
++su $user -c '$aticonfig --pplib-cmd="get version"' | grep PPLIB
+ if [ $? = 0 ]; then
+    echo "Has PPLIB"
+    has_pplib=1
+@@ -61,15 +63,15 @@
+ if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then
+     echo "Low power"
+     if [ ${has_pplib} -eq 1 ]; then
+-        su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"'
++        su $user -c '$aticonfig --pplib-cmd="notify psrc dc"'
+     else
+-        su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now"
++        su $user -c "$aticonfig --set-powerstate=1"
+     fi
+ else
+     echo "high power"
+     if [ ${has_pplib} -eq 1 ]; then
+-        su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"'
++        su $user -c '$aticonfig --pplib-cmd="notify psrc ac"'
+     else
+-        su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now"
++	su $user -c "$aticonfig --set-powerstate=$($aticonfig --lsp | grep 'default state' | cut -c 3)"
+     fi
+ fi
+

diff --git a/x11-drivers/ati-drivers/files/atieventsd.init b/x11-drivers/ati-drivers/files/atieventsd.init
new file mode 100644
index 0000000..73139ce
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/atieventsd.init
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/files/atieventsd.init,v 1.3 2007/05/18 23:58:01 marienz Exp $
+
+depend() {
+    need acpid
+}
+
+start() {
+    ebegin "Starting ${SVCNAME}"
+    start-stop-daemon --start --exec /opt/sbin/atieventsd -- ${ATIEVENTSDOPTS}
+    eend $?
+}
+
+stop() {
+    ebegin "Stopping ${SVCNAME}"
+    start-stop-daemon --stop --quiet --exec /opt/sbin/atieventsd
+    eend $?
+}
\ No newline at end of file

diff --git a/x11-drivers/ati-drivers/metadata.xml b/x11-drivers/ati-drivers/metadata.xml
new file mode 100644
index 0000000..eee0c2c
--- /dev/null
+++ b/x11-drivers/ati-drivers/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<herd>x11</herd>
+	<maintainer>
+		<email>lu_zero@gentoo.org</email>
+	</maintainer>
+	<use>
+		<flag name='modules'>Build the kernel modules</flag>
+	</use>
+</pkgmetadata>



^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2015-12-08 11:19 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-15 14:39 [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/ Enrico Tagliavini
  -- strict thread matches above, loose matches on Subject: below --
2015-12-08 11:19 Emil Karlson
2015-02-12 20:03 Emil Karlson
2014-11-10 20:07 Emil Karlson
2014-01-22 21:48 Emil Karlson
2013-09-07  6:36 Emil Karlson
2013-06-15 16:49 Emil Karlson
2013-06-10 16:35 Emil Karlson
2013-05-19  0:25 Emil Karlson
2013-05-11  2:15 Emil Karlson
2013-02-15 18:49 Emil Karlson
2012-12-23 17:06 Emil Karlson
2012-11-11  1:29 Chi-Thanh Christopher Nguyen
2012-10-21 22:21 Emil Karlson
2012-09-14 15:48 Emil Karlson
2012-06-23 14:58 Enrico Tagliavini
2012-06-15 17:21 Enrico Tagliavini
2012-05-26 21:06 Enrico Tagliavini
2012-05-01 13:03 Enrico Tagliavini
2012-04-26 17:53 Enrico Tagliavini
2012-03-08 19:01 Enrico Tagliavini
2011-12-30 15:03 Enrico Tagliavini
2011-09-28 20:27 Enrico Tagliavini
2011-08-19 10:06 Enrico Tagliavini
2011-05-21 10:00 Enrico Tagliavini
2011-03-30  9:51 Enrico Tagliavini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox