nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Compile problem of 7184 driver in 2.6.20 (patch included) (http://www.nvnews.net/vbulletin/showthread.php?t=86689)

zzzhong 02-19-07 12:19 PM

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;


crypticreign 02-20-07 12:39 PM

Re: Compile problem of 7184 driver in 2.6.20 (patch included)
 
How do I apply this patch?

zzzhong 02-22-07 01:33 AM

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


whererun 02-23-07 09:18 PM

Re: Compile problem of 7184 driver in 2.6.20 (patch included)
 
1 Attachment(s)
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!!

vlk 03-06-07 06:11 AM

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

Licaon 05-12-07 11:24 AM

Re: Compile problem of 7184 driver in 2.6.20 (patch included)
 
@vik: see here


All times are GMT -5. The time now is 07:11 AM.

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