Le vendredi 10 avril 2009 à 09:53 +0200, Emmanuel Fleury a écrit :
> Package: fglrx-kernel-src
> Version: 1:9-3-1
> Severity: normal
>
> What did change in the 2.6.29 seems to be the following struct:
>
> - current->euid --> current->cred->euid
> - current->uid --> current->cred->uid
> - current->gid --> current->cred->gid
Way more things changed, especially with respect to the ACPI subsystem
(specifically, the driver made use of a sizeable amount of private
structures)
The following patch kind of works for me; it seems DPMS is still bust
and I get the occasional lock-up, but otherwise I've been happily
compiz'ing and gaming with it for a couple weeks.
As one of the comments mentions, some parts are still quite dirty and
possibly not DFSG compliant (borderline, at least)
The ACPI side almost works, after running it, I noticed I made the
effort to keep track of fglrx-private data (which used to be stuffed
within the acpi layer's own private data), but I forgot to rewire the
actual notifications. Should be trivial now; might explain the DPMS
troubles.
Anyway, right now I'm pretty satisfied with the way my HD 4350 behaves
with this driver... YMMV, HTH.
-- Cyrille
Seulement dans fglrx.vanilla/: configure-stamp
Seulement dans fglrx.vanilla/debian: control
diff -ur fglrx.vanilla/firegl_public.c fglrx/firegl_public.c
--- fglrx.vanilla/firegl_public.c 2009-03-29 21:08:16.0 +0200
+++ fglrx/firegl_public.c 2009-03-30 00:17:17.0 +0200
@@ -1402,7 +1402,7 @@
*/
KCL_TYPE_Uid ATI_API_CALL KCL_GetEffectiveUid(void)
{
-return current->euid;
+return current_euid();
}
/** /brief Delay execution for the specified number of microseconds
@@ -1774,15 +1774,19 @@
*/
void ATI_API_CALL KCL_PosixSecurityCapSetIPCLock(unsigned int lock)
{
+struct cred *new;
+new = prepare_creds();
+if (!new) return /* -ENOMEM */;
+
if (lock == 0 )
{
-cap_lower(current->cap_effective, CAP_IPC_LOCK);
+cap_raise(new->cap_effective, CAP_IPC_LOCK);
}
else
{
-cap_raise(current->cap_effective, CAP_IPC_LOCK);
+cap_lower(new->cap_effective, CAP_IPC_LOCK);
}
-return;
+commit_creds(new);
}
/** \brief Get number of available RAM pages
@@ -2256,13 +2260,16 @@
* kernel < 2.6.27, on_each_cpu has 4 parameters.
* kernel >= 2.6.27, on_each_cpu has 3 parameters (removed the "retry" parameter)
*/
-#if defined(__x86_64__) && defined(__SMP__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25))
+#if defined(__x86_64__) && defined(__SMP__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28))
# if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27))
on_each_cpu(KCL_flush_tlb_one, &va, 1, 1);
# else
on_each_cpu(KCL_flush_tlb_one, &va, 1);
# endif
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
+on_each_cpu(KCL_flush_tlb_one, &va, 1);
#else
+/* old code */
flush_tlb_page(vma, va);
#endif
}
diff -ur fglrx.vanilla/firegl_public.h fglrx/firegl_public.h
--- fglrx.vanilla/firegl_public.h 2009-03-29 21:08:16.0 +0200
+++ fglrx/firegl_public.h 2009-03-30 00:11:20.0 +0200
@@ -161,7 +161,9 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
#define PMSG_EVENT(pmsg_state) (pmsg_state).event
+#ifndef PM_EVENT_SUSPEND
#define PM_EVENT_SUSPEND 2
+#endif
#else
#define PMSG_EVENT(pmsg_state) (pmsg_state)
#define PM_EVENT_SUSPEND 3
@@ -591,6 +593,14 @@
#define cpu_has_pge test_bit(X86_FEATURE_PGE, &boot_cpu_data.x86_capability)
#endif
+
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)
+/* this is DIRTY but will circumvent the GPL-only restriction for now? */
+#undef pgprot_writecombine
+#undef pgprot_noncached
+
+#endif
+
#ifndef pgprot_writecombine
#define pgprot_writecombine(prot) __pgprot((pgprot_val(prot) & ~(_PAGE_PCD)) | _PAGE_PWT)
#endif
Seulement dans fglrx.vanilla/: .firegl_public.o.d
diff -ur fglrx.vanilla/kcl_acpi.c fglrx/kcl_acpi.c
--- fglrx.vanilla/kcl_acpi.c 2009-03-29 21:08:16.0 +0200
+++ fglrx/kcl_acpi.c 2009-03-30 00:13:41.0 +0200
@@ -12,6 +12,11 @@
* User License Agreement is included with this software and is also*
* available by contacting ATI Technologies Inc. at http://www.ati.com *
* *
+ * *
+ * *
+ * blah, blah, blah. *
+ * I wanted to run this on kernel 2.6.29, had to do some dirty work to*
+ * get it limping. YMMV. Cyrille Chepelov *
/
#include
@@ -62,6 +67,76 @@
return acpi_get_devices(NULL, (acpi_walk_callback)callback, context, NULL);
}
+
+/* store the first child */
+struct kcl_acpi