diff options
author | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2012-07-21 21:45:01 +0000 |
---|---|---|
committer | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2012-07-21 21:45:01 +0000 |
commit | 1058cfaf957f93492222eaab538c4b21f77aba3f (patch) | |
tree | a1be1defe1d3884220595dfac409096d2a22c3ca /x11-drivers/ati-drivers/files | |
parent | marked x86 per bug 416725 (diff) | |
download | gentoo-2-1058cfaf957f93492222eaab538c4b21f77aba3f.tar.gz gentoo-2-1058cfaf957f93492222eaab538c4b21f77aba3f.tar.bz2 gentoo-2-1058cfaf957f93492222eaab538c4b21f77aba3f.zip |
Import driver for legacy hardware from x11 overlay, ebuild by Enrico Tagliavini. Update 12.6 ebuild patches per bug #420689 and bug #420751.
(Portage version: 2.2.0_alpha115/cvs/Linux x86_64)
Diffstat (limited to 'x11-drivers/ati-drivers/files')
-rw-r--r-- | x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch | 50 |
1 files changed, 50 insertions, 0 deletions
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 000000000000..04248eb7bc5d --- /dev/null +++ b/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch @@ -0,0 +1,50 @@ +--- 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 @@ + } + } + ++#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 ++ + 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(¤t->mm->mmap_sem); + vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff); + up_write(¤t->mm->mmap_sem); ++#endif + if (IS_ERR(vaddr)) + return 0; + else +@@ -2131,7 +2140,9 @@ + { + int retcode = 0; + ++#ifndef NO_DO_MMAP + down_write(¤t->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(¤t->mm->mmap_sem); ++#endif + return retcode; + } + |