public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Enrico Tagliavini" <enrico.tagliavini@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/
Date: Sat, 23 Jun 2012 14:58:48 +0000 (UTC)	[thread overview]
Message-ID: <1340463514.b5689e3a5f9dfe40be6b007a0f0e6ba1bd53946a.Enrico@gentoo> (raw)

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;
+ }
  



             reply	other threads:[~2012-06-23 14:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-23 14:58 Enrico Tagliavini [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-12-08 11:19 [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/, x11-drivers/ati-drivers/files/ 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-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-10-15 14:39 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1340463514.b5689e3a5f9dfe40be6b007a0f0e6ba1bd53946a.Enrico@gentoo \
    --to=enrico.tagliavini@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox