catalyst: update to 13.12.

This commit is contained in:
Juan RP 2014-01-16 10:25:06 +01:00
parent 9e3e73e3b3
commit c16ddbe884
6 changed files with 202 additions and 10 deletions

View File

@ -0,0 +1,13 @@
--- 13.11/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-11-22 19:52:37.000000000 +0100
+++ 13.11/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-11-25 11:48:51.227678982 +0100
@@ -778,7 +778,9 @@
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 = pInfo->pcidev->dev.acpi_node.companion;
+ #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;

View File

@ -0,0 +1,50 @@
--- 13.8/common/lib/modules/fglrx/build_mod/firegl_public.c 2013-09-26 00:59:28.292596334 -0400
+++ 13.8/common/lib/modules/fglrx/build_mod/firegl_public.c 2013-09-26 01:02:35.036252455 -0400
@@ -821,7 +821,7 @@ static struct proc_dir_entry *firegl_pro
KCL_DEBUG1(FN_FIREGL_PROC, "minor %d, proc_list 0x%08lx\n", minor, (unsigned long)proc_list);
if (!minor)
{
- root = KCL_create_proc_dir(NULL, "ati", S_IRUGO|S_IXUGO);
+ root = KCL_create_proc_dir(NULL, "ati", 0);
}
if (!root)
@@ -835,7 +835,7 @@ static struct proc_dir_entry *firegl_pro
// Global major debice number entry and Global debug entry
while (globallist->rp || globallist->fops)
{
- ent = KCL_create_proc_entry(root, globallist->name, S_IFREG|S_IRUGO, globallist->fops, globallist->rp, globallist->wp, dev);
+ ent = KCL_create_proc_entry(root, globallist->name, 0, globallist->fops, globallist->rp, globallist->wp, dev);
if (!ent)
{
KCL_remove_proc_dir_entry(NULL, "ati");
@@ -847,7 +847,7 @@ static struct proc_dir_entry *firegl_pro
}
sprintf(name, "%d", minor);
- *dev_root = KCL_create_proc_dir(root, name, S_IRUGO|S_IXUGO);
+ *dev_root = KCL_create_proc_dir(root, name, 0);
if (!*dev_root) {
KCL_remove_proc_dir_entry(root, "major");
KCL_remove_proc_dir_entry(NULL, "ati");
@@ -857,7 +857,7 @@ static struct proc_dir_entry *firegl_pro
while (list->rp || list->fops)
{
- ent = KCL_create_proc_entry(*dev_root, list->name, S_IFREG|S_IRUGO, list->fops, list->rp, list->wp,
+ ent = KCL_create_proc_entry(*dev_root, list->name, 0, list->fops, list->rp, list->wp,
((dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev)));
if (!ent)
{
@@ -6358,9 +6358,9 @@ void * KCL_create_proc_dir(void *root_di
dir = create_proc_entry(name, S_IFDIR | access, (struct proc_dir_entry *)root_dir);
#else
if (root_dir == NULL)
- dir = proc_mkdir_mode(name, S_IFDIR | access, NULL);
+ dir = proc_mkdir_mode(name, access, NULL);
else
- dir = proc_mkdir_mode(name, S_IFDIR | access, (struct proc_dir_entry *)root_dir);
+ dir = proc_mkdir_mode(name, access, (struct proc_dir_entry *)root_dir);
#endif
return dir;

View File

@ -0,0 +1,11 @@
--- 13.4/common/lib/modules/fglrx/build_mod/firegl_public.c 2013-04-16 23:29:55.000000000 +0200
+++ 13.4/common/lib/modules/fglrx/build_mod/firegl_public.c 2013-05-21 17:05:34.726681102 +0200
@@ -93,7 +93,7 @@
and they use different config options. These options can only be enabled
on x86_64 with newer 2.6 kernels (2.6.23 for intel, 2.6.26 for amd).
*/
-#if defined(CONFIG_AMD_IOMMU) || defined(CONFIG_DMAR)
+#if defined(CONFIG_AMD_IOMMU) || defined(CONFIG_INTEL_IOMMU)
#define FIREGL_DMA_REMAPPING
#endif

View File

@ -0,0 +1,90 @@
--- 13.4/common/lib/modules/fglrx/build_mod/kcl_agp.c 2013-05-24 16:45:52.236740084 -0400
+++ 13.4/common/lib/modules/fglrx/build_mod/kcl_agp.c 2013-05-24 16:49:29.283579408 -0400
@@ -56,6 +56,43 @@ unsigned int KCL_AGP_IsInUse(void)
return kcl_agp_is_in_use;
}
+/** \brief Find AGP caps registers in PCI config space
+ ** \param dev PCI device handle
+ ** \return Positive register index on success, negative errno on error
+ */
+int ATI_API_CALL KCL_AGP_FindCapsRegisters(KCL_PCI_DevHandle dev)
+{
+ u8 capndx;
+ u32 cap_id;
+
+ if (!dev)
+ {
+ return -ENODEV;
+ }
+
+ pci_read_config_byte((struct pci_dev*)dev, 0x34, &capndx);
+
+ if (capndx == 0x00)
+ {
+ return -ENODATA;
+ }
+
+ do
+ { // search capability list for AGP caps
+ pci_read_config_dword((struct pci_dev*)dev, capndx, &cap_id);
+
+ if ((cap_id & 0xff) == 0x02)
+ {
+ return capndx;
+ }
+
+ capndx = (cap_id >> 8) & 0xff;
+ }
+ while (capndx != 0x00);
+
+ return -ENODATA;
+}
+
#if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE)
typedef struct {
@@ -272,43 +309,6 @@ int ATI_API_CALL KCL_AGP_Enable(unsigned
}
}
-/** \brief Find AGP caps registers in PCI config space
- ** \param dev PCI device handle
- ** \return Positive register index on success, negative errno on error
- */
-int ATI_API_CALL KCL_AGP_FindCapsRegisters(KCL_PCI_DevHandle dev)
-{
- u8 capndx;
- u32 cap_id;
-
- if (!dev)
- {
- return -ENODEV;
- }
-
- pci_read_config_byte((struct pci_dev*)dev, 0x34, &capndx);
-
- if (capndx == 0x00)
- {
- return -ENODATA;
- }
-
- do
- { // search capability list for AGP caps
- pci_read_config_dword((struct pci_dev*)dev, capndx, &cap_id);
-
- if ((cap_id & 0xff) == 0x02)
- {
- return capndx;
- }
-
- capndx = (cap_id >> 8) & 0xff;
- }
- while (capndx != 0x00);
-
- return -ENODATA;
-}
-
/** \brief Get AGP caps
** \param dev PCI device handle
** \param caps pointer to caps vector

View File

@ -0,0 +1,17 @@
--- 13.12/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-12-17 20:05:35.000000000 +0100
+++ 13.12/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-12-19 18:40:18.386568588 +0100
@@ -995,7 +995,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;
-}
+}
\ No newline at end of file

View File

@ -2,22 +2,25 @@
_desc="AMD catalyst driver for Linux"
pkgname=catalyst
version=13.9
version=13.12
revision=1
maintainer="Juan RP <xtraeme@gmail.com>"
license="Propietary AMD license"
homepage="http://www.amd.com"
only_for_archs="i686 x86_64"
create_wrksrc=yes
nonfree=yes
makedepends="unzip"
hostmakedepends="unzip wget"
depends="xserver-abi-video<15 ${pkgname}-dkms-${version}_${revision}"
conflicts="nvidia>=0"
short_desc="${_desc} - Libraries and Utilities"
nonfree=yes
create_wrksrc=yes
XBPS_FETCH_CMD="wget --referer='http://support.amd.com/en-us/download/desktop?os=Linux+x86' "
distfiles="http://www2.ati.com/drivers/linux/amd-catalyst-${version}-linux-x86.x86_64.zip"
checksum=024033f4847d1c2a182fc44e0b3df29b2d133e24aeaba390f4504a8f3361a0ca
distfiles=http://www2.ati.com/drivers/linux/amd-catalyst-${version}-linux-x86.x86_64.zip
checksum=ebade5062713c69d2b703b0a3f62defc409d58e98ceab3bfac7a71643c0c4cd3
if [ "$XBPS_MACHINE" = "i686" ]; then
_ARCHDIR="x86"
@ -32,11 +35,19 @@ do_build() {
./amd-catalyst-*.run --extract fglrx
}
pre_install() {
cd ${wrksrc}/fglrx
for f in ${FILESDIR}/*.patch; do
patch -Np1 -i $f
done
}
do_install() {
cd ${wrksrc}/fglrx
install -dm755 ${DESTDIR}/usr/{bin,sbin}
install -dm755 ${DESTDIR}/usr/lib/{dri,xorg/modules/{dri,drivers,extensions/fglrx,linux},systemd/system}
install -dm755 ${DESTDIR}/usr/lib/{dri,xorg/modules/{drivers,extensions/fglrx,linux},systemd/system}
install -dm755 ${DESTDIR}/usr/include/GL
install -dm755 ${DESTDIR}/etc/{ati,acpi/events,security/console.apps}
install -dm755 ${DESTDIR}/usr/share/{applications,ati/amdcccle,man/man8,pixmaps}
@ -59,8 +70,7 @@ do_install() {
cd ${wrksrc}/fglrx/arch/${_ARCHDIR}/usr/X11R6/lib${_ARCHLIB}
install -m755 modules/dri/fglrx_dri.so ${DESTDIR}/usr/lib/xorg/modules/dri/
ln -s /usr/lib/xorg/modules/dri/fglrx_dri.so ${DESTDIR}/usr/lib/dri/
install -m755 modules/dri/fglrx_dri.so ${DESTDIR}/usr/lib/xorg/modules/drivers/
install -m755 fglrx/fglrx-libGL.so.1.2 ${DESTDIR}/usr/lib/
install -m755 *.so* ${DESTDIR}/usr/lib/
install -m644 libAMDXvBA.cap ${DESTDIR}/usr/lib/
@ -107,6 +117,7 @@ do_install() {
catalyst-dkms_package() {
short_desc="${_desc} - DKMS kernel module"
triggers="dkms"
depends="dkms"
dkms_modules="fglrx ${version}_${revision}"
nonfree=yes
pkg_install() {
@ -132,7 +143,7 @@ catalyst-dkms_package() {
catalyst-opencl_package() {
short_desc="${_desc} - OpenCL implementation"
provides="libOpenCL-${version}"
provides="libOpenCL-${version}_${revision}"
replaces="libOpenCL>=0"
nonfree=yes
noverifyrdeps=yes