Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 02-19-07, 12:19 PM   #1
zzzhong
Registered User
 
Join Date: Feb 2007
Posts: 2
Default Compile problem of 7184 driver in 2.6.20 (patch included)

For some reason I must use driver version 7184 instead of 9631 on my MX440 with TV out. But 7184 won't compile well on 2.6.20. If you have the same situation you may get the error like "incompatible pointer type of argument 2 of request_irq...", you can use the patch below, that is back-port from 9631. Now I can use 7184 on 2.6.20 and watch mplayer with nice TV-out.


Code:
diff -ur NVIDIA-Linux-x86-1.0-7184-pkg1.orig/usr/src/nv/Makefile.kbuild NVIDIA-Linux-x86-1.0-7184-pkg1/usr/src/nv/Makefile.kbuild
--- NVIDIA-Linux-x86-1.0-7184-pkg1.orig/usr/src/nv/Makefile.kbuild      Wed Aug  2 10:07:27 2006
+++ NVIDIA-Linux-x86-1.0-7184-pkg1/usr/src/nv/Makefile.kbuild   Tue Feb 20 01:26:55 2007
@@ -186,6 +186,9 @@
     EXTRA_CFLAGS += -DNV_PM_MESSAGE_T_PRESENT
   endif

+  ifeq ($(shell $(CONFTEST) irq_handler_ptregs), 1)
+    EXTRA_CFLAGS += -DNV_IRQ_HANDLER_WITH_PTREGS_PRESENT
+  endif
   ifeq ($(shell $(CONFTEST) pci_choose_state), 1)
     EXTRA_CFLAGS += -DNV_PCI_CHOOSE_STATE_PRESENT
   endif
diff -ur NVIDIA-Linux-x86-1.0-7184-pkg1.orig/usr/src/nv/nv-linux.h NVIDIA-Linux-x86-1.0-7184-pkg1/usr/src/nv/nv-linux.h
--- NVIDIA-Linux-x86-1.0-7184-pkg1.orig/usr/src/nv/nv-linux.h   Wed Aug  2 10:07:27 2006
+++ NVIDIA-Linux-x86-1.0-7184-pkg1/usr/src/nv/nv-linux.h        Tue Feb 20 01:26:55 2007
@@ -14,7 +14,7 @@

 #include "nv.h"

-#include <linux/config.h>
+#include <linux/autoconf.h>
 #include <linux/version.h>
 #include <linux/utsname.h>

@@ -672,6 +672,10 @@
 #define NV_PM_SUPPORT_OLD_STYLE_APM
 #endif

+#if defined(KERNEL_2_4)
+#define NV_IRQ_HANDLER_WITH_PTREGS_PRESENT
+#endif
+
 #ifndef minor
 # define minor(x) MINOR(x)
 #endif
diff -ur NVIDIA-Linux-x86-1.0-7184-pkg1.orig/usr/src/nv/nv.c NVIDIA-Linux-x86-1.0-7184-pkg1/usr/src/nv/nv.c
--- NVIDIA-Linux-x86-1.0-7184-pkg1.orig/usr/src/nv/nv.c Wed Aug  2 10:07:26 2006
+++ NVIDIA-Linux-x86-1.0-7184-pkg1/usr/src/nv/nv.c      Tue Feb 20 01:26:55 2007
@@ -242,7 +242,11 @@
 int           nv_kern_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
 long          nv_kern_compat_ioctl(struct file *, unsigned int, unsigned long);
 void          nv_kern_isr_bh(unsigned long);
+#if defined(NV_IRQ_HANDLER_WITH_PTREGS_PRESENT)
 irqreturn_t   nv_kern_isr(int, void *, struct pt_regs *);
+#else
+irqreturn_t   nv_kern_isr(int, void *);
+#endif
 void          nv_kern_rc_timer(unsigned long);
 #if defined(NV_PM_SUPPORT_OLD_STYLE_APM)
 static int    nv_kern_apm_event(struct pm_dev *, pm_request_t, void *);
@@ -2482,8 +2486,10 @@
  */
 irqreturn_t nv_kern_isr(
     int   irq,
-    void *arg,
-    struct pt_regs *regs
+    void *arg
+#if defined(NV_IRQ_HANDLER_WITH_PTREGS_PRESENT)
+    ,struct pt_regs *regs
+#endif
 )
 {
     nv_linux_state_t *nvl = (void *) arg;
zzzhong is offline   Reply With Quote
Old 02-20-07, 12:39 PM   #2
crypticreign
Registered User
 
Join Date: Oct 2006
Posts: 4
Default Re: Compile problem of 7184 driver in 2.6.20 (patch included)

How do I apply this patch?
crypticreign is offline   Reply With Quote
Old 02-22-07, 01:33 AM   #3
zzzhong
Registered User
 
Join Date: Feb 2007
Posts: 2
Default Re: Compile problem of 7184 driver in 2.6.20 (patch included)

It's a standard way. First, save the patch file along with original 7184 driver package. extract the driver by "-x" and run "patch < patch-file". If patch is OK, run "nvidia-installer". See commands below

Code:
[root@bobogw nvidia]# sh NVIDIA-Linux-x86-1.0-7184-pkg1.run  -x       
Creating directory NVIDIA-Linux-x86-1.0-7184-pkg1
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86 1.0-7184
........................................................................................................
........................................................................................................
.................

[root@bobogw nvidia]# cd NVIDIA-Linux-x86-1.0-7184-pkg1
[root@bobogw NVIDIA-Linux-x86-1.0-7184-pkg1]# patch -p1 < ../NVIDIA-Linux-x86-1.0-7184-pkg1.patch  
patching file usr/src/nv/Makefile.kbuild
patching file usr/src/nv/nv-linux.h
patching file usr/src/nv/nv.c

[root@bobogw NVIDIA-Linux-x86-1.0-7184-pkg1]# ./nvidia-installer
zzzhong is offline   Reply With Quote
Old 02-23-07, 09:18 PM   #4
whererun
Registered User
 
Join Date: Jun 2005
Posts: 13
Default Re: Compile problem of 7184 driver in 2.6.20 (patch included)

Quote:
Originally Posted by zzzhong
For some reason I must use driver version 7184 instead of 9631 on my MX440 with TV out. But 7184 won't compile well on 2.6.20. If you have the same situation you may get the error like "incompatible pointer type of argument 2 of request_irq...", you can use the patch below, that is back-port from 9631. Now I can use 7184 on 2.6.20 and watch mplayer with nice TV-out.


Code:
diff -ur NVIDIA-Linux-x86-1.0-7184-pkg1.orig/usr/src/nv/Makefile.kbuild NVIDIA-Linux-x86-1.0-7184-pkg1/usr/src/nv/Makefile.kbuild
--- NVIDIA-Linux-x86-1.0-7184-pkg1.orig/usr/src/nv/Makefile.kbuild      Wed Aug  2 10:07:27 2006
+++ NVIDIA-Linux-x86-1.0-7184-pkg1/usr/src/nv/Makefile.kbuild   Tue Feb 20 01:26:55 2007
@@ -186,6 +186,9 @@
     EXTRA_CFLAGS += -DNV_PM_MESSAGE_T_PRESENT
   endif

+  ifeq ($(shell $(CONFTEST) irq_handler_ptregs), 1)
+    EXTRA_CFLAGS += -DNV_IRQ_HANDLER_WITH_PTREGS_PRESENT
+  endif
   ifeq ($(shell $(CONFTEST) pci_choose_state), 1)
     EXTRA_CFLAGS += -DNV_PCI_CHOOSE_STATE_PRESENT
   endif
diff -ur NVIDIA-Linux-x86-1.0-7184-pkg1.orig/usr/src/nv/nv-linux.h NVIDIA-Linux-x86-1.0-7184-pkg1/usr/src/nv/nv-linux.h
--- NVIDIA-Linux-x86-1.0-7184-pkg1.orig/usr/src/nv/nv-linux.h   Wed Aug  2 10:07:27 2006
+++ NVIDIA-Linux-x86-1.0-7184-pkg1/usr/src/nv/nv-linux.h        Tue Feb 20 01:26:55 2007
@@ -14,7 +14,7 @@

 #include "nv.h"

-#include <linux/config.h>
+#include <linux/autoconf.h>
 #include <linux/version.h>
 #include <linux/utsname.h>

@@ -672,6 +672,10 @@
 #define NV_PM_SUPPORT_OLD_STYLE_APM
 #endif

+#if defined(KERNEL_2_4)
+#define NV_IRQ_HANDLER_WITH_PTREGS_PRESENT
+#endif
+
 #ifndef minor
 # define minor(x) MINOR(x)
 #endif
diff -ur NVIDIA-Linux-x86-1.0-7184-pkg1.orig/usr/src/nv/nv.c NVIDIA-Linux-x86-1.0-7184-pkg1/usr/src/nv/nv.c
--- NVIDIA-Linux-x86-1.0-7184-pkg1.orig/usr/src/nv/nv.c Wed Aug  2 10:07:26 2006
+++ NVIDIA-Linux-x86-1.0-7184-pkg1/usr/src/nv/nv.c      Tue Feb 20 01:26:55 2007
@@ -242,7 +242,11 @@
 int           nv_kern_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
 long          nv_kern_compat_ioctl(struct file *, unsigned int, unsigned long);
 void          nv_kern_isr_bh(unsigned long);
+#if defined(NV_IRQ_HANDLER_WITH_PTREGS_PRESENT)
 irqreturn_t   nv_kern_isr(int, void *, struct pt_regs *);
+#else
+irqreturn_t   nv_kern_isr(int, void *);
+#endif
 void          nv_kern_rc_timer(unsigned long);
 #if defined(NV_PM_SUPPORT_OLD_STYLE_APM)
 static int    nv_kern_apm_event(struct pm_dev *, pm_request_t, void *);
@@ -2482,8 +2486,10 @@
  */
 irqreturn_t nv_kern_isr(
     int   irq,
-    void *arg,
-    struct pt_regs *regs
+    void *arg
+#if defined(NV_IRQ_HANDLER_WITH_PTREGS_PRESENT)
+    ,struct pt_regs *regs
+#endif
 )
 {
     nv_linux_state_t *nvl = (void *) arg;
thanks ,but when patch ,show me :
Code:
[root@CentOS NVIDIA-Linux-x86-1.0-7184-pkg1]# ls
LICENSE  nvidia-installer  pkg-history.txt  usr
[root@CentOS NVIDIA-Linux-x86-1.0-7184-pkg1]# patch -p1 < ../NVIDIA-Linux-x86-1.0-7184-pkg1.patch
patching file usr/src/nv/Makefile.kbuild
patching file usr/src/nv/nv-linux.h
patching file usr/src/nv/nv.c
patch unexpectedly ends in middle of line
Hunk #2 succeeded at 2486 with fuzz 1.
[root@CentOS NVIDIA-Linux-x86-1.0-7184-pkg1]#
Is it succeeded?

here is the patch file,right?

Can you put the path file with the Attachments,thank you very much!!
Attached Files
File Type: txt NVIDIA-Linux-x86-1.0-7184-pkg1.patch.txt (2.3 KB, 186 views)
whererun is offline   Reply With Quote
Old 03-06-07, 06:11 AM   #5
vlk
Registered User
 
Join Date: Jan 2007
Posts: 3
Default Re: Compile problem of 7184 driver in 2.6.20 (patch included)

is possible to make similar patch for 8776? my graphic card working good on this driver, bud not on 9xxx .. i have GeForce4 4200 Go in notebook DELL Latitude D800
thanks
vlk is offline   Reply With Quote
Old 05-12-07, 11:24 AM   #6
Licaon
Registered User
 
Licaon's Avatar
 
Join Date: Nov 2004
Location: Between the keyboard and the chair.
Posts: 490
Default Re: Compile problem of 7184 driver in 2.6.20 (patch included)

@vik: see here
Licaon is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphics driver installation problem (your comments will be highly appreciated) apuurboo NVIDIA GeForce 400/500 Series 0 06-16-12 07:35 AM
Graphics driver installation problem (your comments will be highly appreciated) apuurboo NVIDIA GeForce 400/500 Series 0 06-13-12 07:58 AM
Driver problem cOoL_Ti NVIDIA Linux 2 10-12-02 08:16 AM
Problem with Ethernet (nvnet) driver for RH 7.3 bernz NVIDIA Linux 4 08-05-02 10:18 AM
download problem with linux NVIDIA driver packages Timo NVIDIA Linux 7 07-31-02 09:22 AM

All times are GMT -5. The time now is 07:48 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.