Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Rich.RatOffline
Post subject: fglrx 11-2 & 2.6.38 & ...  PostPosted: 28.03.2011, 01:45



Joined: 2011-03-27
Posts: 4
Location: Germany/Bavaria/Oderding
Status: Offline
Hello

I had a time to take a deep look in the latest fglrx-modules-dkms and now it is works for me on my laptop.
2xamd64 & hd2600
Issue is the removed smp_lock.h from aptosid kernel headers.


!! at your own risk !!
Here is my patch, it goes against drmP.h and firegl_public.c from package

      Code:
fglrx-modules-dkms_1%3a11-2-2_amd64.deb


It should work with all kernels, aptosid and non aptosid - like from alfgaida.de. It should, but please don't blane me if ...

      Code:
--- drmP.h.orig   2011-02-02 19:39:00.000000000 +0100
+++ drmP.h   2011-03-28 00:48:08.338428122 +0100
@@ -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__)
--- firegl_public.c.orig   2011-03-18 23:34:00.000000000 +0100
+++ firegl_public.c   2011-03-28 00:51:41.330750446 +0100
@@ -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>

If the patch is working, please give a respond.
If the patch is not working, hmm - I think I can't help you. But, please give a respond. ;)
If you know it better, feel free to edit.

cu rich
 
 View user's profile Send private message  
Reply with quote Back to top
orinocoOffline
Post subject:   PostPosted: 28.03.2011, 21:01



Joined: 2011-01-28
Posts: 30

Status: Offline
Hello,

I'm interested to test your patch but I ran into a problem applying this patch. I have no experience in doing such a task. I created a text-file from your patch and copied it to /usr/src/fglrx-11-2/patch.txt and run it with patch < patch.txt.

Unfortunately the patch failed with the message: Hunk #1 failed at 57

Can you give me a hint what I've made wrong?

But I was to curious to got to bed without further trying. (:

I made the patches by hand and run
      Code:
dkms build -m fglrx -v 11-2 -k $(uname -r)

and loaded the module with
      Code:
insmod /var/lib/dkms/fglrx/11-2/2.6.38-2.slh.1-aptosid-amd64/x86_64/module/fglrx.ko

and it works. (:

But to which folder I must copy the module?

I recognized one bad thing. I lost the compositing in KDE...
 
 View user's profile Send private message  
Reply with quote Back to top
towoOnline!
Post subject:   PostPosted: 28.03.2011, 21:03



Joined: 2010-09-13
Posts: 499
Location: Pößneck / Thüringen
Status: Online!
That's not my patch, if it would my patch, it would work, because i would build a deb, which has the patch in.
 
 View user's profile Send private message  
Reply with quote Back to top
orinocoOffline
Post subject:   PostPosted: 28.03.2011, 21:16



Joined: 2011-01-28
Posts: 30

Status: Offline
      towo wrote:
That's not my patch, if it would my patch, it would work, because i would build a deb, which has the patch in.


??? Yes, I know that this is not your patch. I just wanted to give Rich.Rat a positive feedback for his work and asked him for some further help. If somebody tells me where I have to copy the module I would be happy for today.
 
 View user's profile Send private message  
Reply with quote Back to top
towoOnline!
Post subject:   PostPosted: 28.03.2011, 21:32



Joined: 2010-09-13
Posts: 499
Location: Pößneck / Thüringen
Status: Online!
Oh, i missed, that this is not the initial thread of you, sorry.
 
 View user's profile Send private message  
Reply with quote Back to top
orinocoOffline
Post subject:   PostPosted: 28.03.2011, 21:36



Joined: 2011-01-28
Posts: 30

Status: Offline
I cheated from VirtualBox and copied fglrx.ko to /lib/modules/2.6.38-2.slh.1-aptosid-amd64/updates/dkms.

Then
      Code:
# depmod -a
# modprobe fglrx
# service kdm restart


It even survived a reboot. Thanks to Rich.Rat for his work.
 
 View user's profile Send private message  
Reply with quote Back to top
Rich.RatOffline
Post subject:   PostPosted: 29.03.2011, 09:37



Joined: 2011-03-27
Posts: 4
Location: Germany/Bavaria/Oderding
Status: Offline
Sorry for my late answer.

How to build a deb - Hmm, I dont know, but I can manipulate an existing thats all.
This means the package Version stays same.

You must have the package
      Quote:
fglrx-modules-dkms_1%3a11-2-2_amd64.deb
Copy the package in a separat folder;
navigate to the folder;
if necessary, change the owner rights of the package from ROOT to USER;
extraxt the package files and the related DEBIAN files with with dpkg-deb;
      Code:
$dpkg-deb -x fglrx-modules-dkms_1%3a11-2-2_amd64.deb fglrx-modules-dkms_1%3a11-2-2-NEW_amd64
$dpkg-deb -e fglrx-modules-dkms_1%3a11-2-2_amd64.deb fglrx-modules-dkms_1%3a11-2-2-NEW_amd64/DEBIAN

Attention to the correct writing !! /DEBIAN !! and not /debian or what ...

After this you have extracted the complete package in one folder fglrx-modules-dkms_1%3a11-2-2-NEW_amd64
If you have this sub folders and some other files under the folder fglrx-modules-dkms_1%3a11-2-2-NEW_amd64 everything should be all right.
/usr/...
/DEBIAN/...


Now you can patch the files. You find the related files under
§/fglrx-modules-dkms_1%3a11-2-2-NEW_amd64/usr/src/fglrx-11-2/
the related files are
drmP.h
firegl_public.c

apply the patch with
      Code:
patch -p0 <YourPatchFileName

The output should be like (in my case)
sid@sidbox:~/tst3$ patch -p0 <fglrx-11-2_no_smp_lock_h.patch
patching file drmP.h
patching file firegl_public.c
sid@sidbox:~/tst3$

Check the files, search for 2.6.38 - the related area should look nearly like my patch (without the first characters # - @ )
Delete or move the patchfile to an other folder.
navigate back above the folder fglrx-modules-dkms_1%3a11-2-2-NEW_amd64
Build the package with dpkg-deb
      Code:
$dpkg-deb -b fglrx-modules-dkms_1%3a11-2-2-NEW_amd64

EDIT: ]$dpkg-deb -b .... Rich
Now you should have a package fglrx-modules-dkms_1%3a11-2-2-NEW_amd64.deb.

But like I sayd ...-NEW... is no Version or Subversion!
Both packages are version 1:11.2.2
How to change the versions? Sorry I don't know.
 
 View user's profile Send private message  
Reply with quote Back to top
Rich.RatOffline
Post subject:   PostPosted: 29.03.2011, 16:05



Joined: 2011-03-27
Posts: 4
Location: Germany/Bavaria/Oderding
Status: Offline
Sorry,
perhaps something is missing in the patch. (copy and past issue )

At the end of the last line ...

#include <linux/highmem.h>[press ENTER button & save]
 
 View user's profile Send private message  
Reply with quote Back to top
Rich.RatOffline
15 Post subject:   PostPosted: 29.03.2011, 22:18



Joined: 2011-03-27
Posts: 4
Location: Germany/Bavaria/Oderding
Status: Offline
I'm really suprised, Our maintainer is verry fast Very Happy

Debian Bug report logs - #619952
fglrx-modules-dkms DKMS fails with missing include/linux/smp_lock.h

Date: Mon, 28 Mar 2011 15:18:01 UTC
Severity: wishlist
Tags: patch
Found in version fglrx-driver/1:11-2-2
Fixed in version fglrx-driver/1:11-3-1
Done: Patrick Matthäi <pmatthaei>

be happy ..., until it breaks again Smile
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio