Diff for /dfports/x11/nvidia-driver/files/Attic/patch-dfly between versions 1.2 and 1.3

version 1.2, 2004/02/27 17:19:10 version 1.3, 2004/03/10 18:14:32
Line 1 Line 1
diff -urN ./module/Makefile ../../nvidia-patched/module/Makefilediff -urN ./module/Makefile ../../NVIDIA-patched/module/Makefile
 --- ./module/Makefile   Wed May 28 18:51:52 2003  --- ./module/Makefile   Wed May 28 18:51:52 2003
+++ ../../nvidia-patched/module/Makefile        Wed Feb 25 19:35:22 2004+++ ../../NVIDIA-patched/module/Makefile        Wed Mar 10 12:45:32 2004
 @@ -6,7 +6,7 @@  @@ -6,7 +6,7 @@
  KMOD=          nvidia   KMOD=          nvidia
  SRCS=          nvidia_ctl.c nvidia_dev.c nvidia_linux.c nvidia_os.c nvidia_os_pci.c nvidia_os_registry.c nvidia_pci.c nvidia_subr.c nvidia_sysctl.c    SRCS=          nvidia_ctl.c nvidia_dev.c nvidia_linux.c nvidia_os.c nvidia_os_pci.c nvidia_os_registry.c nvidia_pci.c nvidia_subr.c nvidia_sysctl.c 
Line 10  diff -urN ./module/Makefile ../../nvidia Line 10  diff -urN ./module/Makefile ../../nvidia
  NVOBJ=         ${NVIDIA_ROOT}/obj/nv-kernel.o   NVOBJ=         ${NVIDIA_ROOT}/obj/nv-kernel.o
  OBJS+=         NVIDIA.o   OBJS+=         NVIDIA.o
  NOOBJ=         true   NOOBJ=         true
diff -urN ./src/nv-dragonfly.h ../../nvidia-patched/src/nv-dragonfly.hdiff -urN ./src/nv-dragonfly.h ../../NVIDIA-patched/src/nv-dragonfly.h
 --- ./src/nv-dragonfly.h        Thu Jan  1 01:00:00 1970  --- ./src/nv-dragonfly.h        Thu Jan  1 01:00:00 1970
+++ ../../nvidia-patched/src/nv-dragonfly.h     Wed Feb 25 19:32:38 2004+++ ../../NVIDIA-patched/src/nv-dragonfly.h     Wed Mar 10 12:45:32 2004
 @@ -0,0 +1,295 @@  @@ -0,0 +1,295 @@
 +/* _NVRM_COPYRIGHT_BEGIN_  +/* _NVRM_COPYRIGHT_BEGIN_
 + *  + *
Line 309  diff -urN ./src/nv-dragonfly.h ../../nvi Line 309  diff -urN ./src/nv-dragonfly.h ../../nvi
 +  +
 +#endif /* __NV_DRAGONFLY_H */  +#endif /* __NV_DRAGONFLY_H */
 +  +
diff -urN ./src/nvidia_ctl.c ../../nvidia-patched/src/nvidia_ctl.cdiff -urN ./src/nvidia_ctl.c ../../NVIDIA-patched/src/nvidia_ctl.c
 --- ./src/nvidia_ctl.c  Wed May 28 18:51:52 2003  --- ./src/nvidia_ctl.c  Wed May 28 18:51:52 2003
+++ ../../nvidia-patched/src/nvidia_ctl.c       Wed Feb 25 19:32:38 2004+++ ../../NVIDIA-patched/src/nvidia_ctl.c       Wed Mar 10 12:45:32 2004
 @@ -11,7 +11,11 @@  @@ -11,7 +11,11 @@
  #include "nv-misc.h"   #include "nv-misc.h"
  #include "os-interface.h"   #include "os-interface.h"
Line 385  diff -urN ./src/nvidia_ctl.c ../../nvidi Line 385  diff -urN ./src/nvidia_ctl.c ../../nvidi
 +#elif defined(__FreeBSD__) && !defined(__DragonFly__)  +#elif defined(__FreeBSD__) && !defined(__DragonFly__)
          lockmgr(&sc->api_lock, LK_DRAIN, 0, curproc);           lockmgr(&sc->api_lock, LK_DRAIN, 0, curproc);
 +#else   +#else 
+        lockmgr(&sc->api_lock, LK_DRAIN, 0, curthread);+        lockmgr(&sc->api_lock, LK_DRAIN, NULL, curthread);
  #endif   #endif
          destroy_dev(nvidia_ctl_cdev);           destroy_dev(nvidia_ctl_cdev);
      }       }
diff -urN ./src/nvidia_dev.c ../../nvidia-patched/src/nvidia_dev.cdiff -urN ./src/nvidia_dev.c ../../NVIDIA-patched/src/nvidia_dev.c
 --- ./src/nvidia_dev.c  Wed May 28 18:51:52 2003  --- ./src/nvidia_dev.c  Wed May 28 18:51:52 2003
+++ ../../nvidia-patched/src/nvidia_dev.c       Wed Feb 25 19:32:38 2004+++ ../../NVIDIA-patched/src/nvidia_dev.c       Wed Mar 10 12:45:32 2004
 @@ -11,7 +11,11 @@  @@ -11,7 +11,11 @@
  #include "nv-misc.h"   #include "nv-misc.h"
  #include "os-interface.h"   #include "os-interface.h"
Line 449  diff -urN ./src/nvidia_dev.c ../../nvidi Line 449  diff -urN ./src/nvidia_dev.c ../../nvidi
  };   };
     
  int nvidia_dev_open(   int nvidia_dev_open(
diff -urN ./src/nvidia_linux.c ../../nvidia-patched/src/nvidia_linux.cdiff -urN ./src/nvidia_linux.c ../../NVIDIA-patched/src/nvidia_linux.c
 --- ./src/nvidia_linux.c        Wed May 28 18:51:52 2003  --- ./src/nvidia_linux.c        Wed May 28 18:51:52 2003
+++ ../../nvidia-patched/src/nvidia_linux.c     Wed Feb 25 19:32:38 2004+++ ../../NVIDIA-patched/src/nvidia_linux.c     Wed Mar 10 12:45:32 2004
 @@ -11,7 +11,11 @@  @@ -11,7 +11,11 @@
  #include "nv-misc.h"   #include "nv-misc.h"
  #include "os-interface.h"   #include "os-interface.h"
Line 476  diff -urN ./src/nvidia_linux.c ../../nvi Line 476  diff -urN ./src/nvidia_linux.c ../../nvi
  }   }
     
  struct linux_ioctl_handler nvidia_handler = {   struct linux_ioctl_handler nvidia_handler = {
diff -urN ./src/nvidia_os.c ../../nvidia-patched/src/nvidia_os.cdiff -urN ./src/nvidia_os.c ../../NVIDIA-patched/src/nvidia_os.c
 --- ./src/nvidia_os.c   Wed May 28 18:51:52 2003  --- ./src/nvidia_os.c   Wed May 28 18:51:52 2003
+++ ../../nvidia-patched/src/nvidia_os.c        Wed Feb 25 19:51:00 2004+++ ../../NVIDIA-patched/src/nvidia_os.c        Wed Mar 10 12:45:32 2004
 @@ -11,7 +11,11 @@  @@ -11,7 +11,11 @@
  #include "nv-misc.h"   #include "nv-misc.h"
  #include "os-interface.h"   #include "os-interface.h"
Line 491  diff -urN ./src/nvidia_os.c ../../nvidia Line 491  diff -urN ./src/nvidia_os.c ../../nvidia
     
     
  /*   /*
@@ -164,7 +168,7 @@@@ -94,7 +98,11 @@
      U032 size
  )
  {
 +#ifndef __DragonFly__
      *address = malloc(size, M_NVIDIA, M_NOWAIT|M_ZERO);
 +#else 
 +    *address = malloc(size, M_NVIDIA, M_WAITOK|M_ZERO);
 +#endif
      return *address ? RM_OK : RM_ERROR;
  }
  
 @@ -164,7 +172,7 @@
     
  BOOL os_is_administrator(PHWINFO pDev)   BOOL os_is_administrator(PHWINFO pDev)
  {   {
Line 500  diff -urN ./src/nvidia_os.c ../../nvidia Line 512  diff -urN ./src/nvidia_os.c ../../nvidia
      return suser(curproc);       return suser(curproc);
  #else   #else
      return suser(curthread);       return suser(curthread);
@@ -301,7 +305,11 @@@@ -301,7 +309,11 @@
              *pte |= PG_N;               *pte |= PG_N;
              va += PAGE_SIZE;               va += PAGE_SIZE;
          } while (va < (vm_offset_t) vm + size);           } while (va < (vm_offset_t) vm + size);
Line 512  diff -urN ./src/nvidia_os.c ../../nvidia Line 524  diff -urN ./src/nvidia_os.c ../../nvidia
      }       }
     
      return vm;       return vm;
diff -urN ./src/nvidia_os_pci.c ../../nvidia-patched/src/nvidia_os_pci.cdiff -urN ./src/nvidia_os_pci.c ../../NVIDIA-patched/src/nvidia_os_pci.c
 --- ./src/nvidia_os_pci.c       Wed May 28 18:51:52 2003  --- ./src/nvidia_os_pci.c       Wed May 28 18:51:52 2003
+++ ../../nvidia-patched/src/nvidia_os_pci.c    Wed Feb 25 19:32:38 2004+++ ../../NVIDIA-patched/src/nvidia_os_pci.c    Wed Mar 10 12:45:32 2004
 @@ -11,7 +11,11 @@  @@ -11,7 +11,11 @@
  #include "nv-misc.h"   #include "nv-misc.h"
  #include "os-interface.h"   #include "os-interface.h"
Line 527  diff -urN ./src/nvidia_os_pci.c ../../nv Line 539  diff -urN ./src/nvidia_os_pci.c ../../nv
     
     
  VOID* os_pci_init_handle(   VOID* os_pci_init_handle(
diff -urN ./src/nvidia_os_registry.c ../../nvidia-patched/src/nvidia_os_registry.cdiff -urN ./src/nvidia_os_registry.c ../../NVIDIA-patched/src/nvidia_os_registry.c
 --- ./src/nvidia_os_registry.c  Wed May 28 18:51:52 2003  --- ./src/nvidia_os_registry.c  Wed May 28 18:51:52 2003
+++ ../../nvidia-patched/src/nvidia_os_registry.c       Wed Feb 25 19:32:38 2004+++ ../../NVIDIA-patched/src/nvidia_os_registry.c       Wed Mar 10 12:45:32 2004
 @@ -11,7 +11,11 @@  @@ -11,7 +11,11 @@
  #include "nv-misc.h"   #include "nv-misc.h"
  #include "os-interface.h"   #include "os-interface.h"
Line 542  diff -urN ./src/nvidia_os_registry.c ../ Line 554  diff -urN ./src/nvidia_os_registry.c ../
     
     
  /*   /*
diff -urN ./src/nvidia_pci.c ../../nvidia-patched/src/nvidia_pci.cdiff -urN ./src/nvidia_pci.c ../../NVIDIA-patched/src/nvidia_pci.c
 --- ./src/nvidia_pci.c  Wed May 28 18:51:52 2003  --- ./src/nvidia_pci.c  Wed May 28 18:51:52 2003
+++ ../../nvidia-patched/src/nvidia_pci.c       Wed Feb 25 19:32:38 2004+++ ../../NVIDIA-patched/src/nvidia_pci.c       Wed Mar 10 12:45:32 2004
 @@ -11,7 +11,11 @@  @@ -11,7 +11,11 @@
  #include "nv-misc.h"   #include "nv-misc.h"
  #include "os-interface.h"   #include "os-interface.h"
Line 577  diff -urN ./src/nvidia_pci.c ../../nvidi Line 589  diff -urN ./src/nvidia_pci.c ../../nvidi
 +#elif !defined(__DragonFly__)  +#elif !defined(__DragonFly__)
      lockmgr(&sc->api_lock, LK_DRAIN, 0, curproc);       lockmgr(&sc->api_lock, LK_DRAIN, 0, curproc);
 +#else  +#else
+    lockmgr(&sc->api_lock, LK_DRAIN, 0, curthread);+    lockmgr(&sc->api_lock, LK_DRAIN, NULL, curthread);
  #endif   #endif
     
      status = nvidia_detach(dev);       status = nvidia_detach(dev);
diff -urN ./src/nvidia_subr.c ../../nvidia-patched/src/nvidia_subr.cdiff -urN ./src/nvidia_subr.c ../../NVIDIA-patched/src/nvidia_subr.c
 --- ./src/nvidia_subr.c Wed May 28 18:51:52 2003  --- ./src/nvidia_subr.c Wed May 28 18:51:52 2003
+++ ../../nvidia-patched/src/nvidia_subr.c      Wed Feb 25 19:32:38 2004+++ ../../NVIDIA-patched/src/nvidia_subr.c      Wed Mar 10 12:45:32 2004
 @@ -11,7 +11,11 @@  @@ -11,7 +11,11 @@
  #include "nv-misc.h"   #include "nv-misc.h"
  #include "os-interface.h"   #include "os-interface.h"
Line 627  diff -urN ./src/nvidia_subr.c ../../nvid Line 639  diff -urN ./src/nvidia_subr.c ../../nvid
 +#ifndef __DragonFly__  +#ifndef __DragonFly__
      lockmgr(&sc->api_lock, LK_EXCLUSIVE, 0, curproc);       lockmgr(&sc->api_lock, LK_EXCLUSIVE, 0, curproc);
 +#else  +#else
+    lockmgr(&sc->api_lock, LK_EXCLUSIVE, 0, curthread);+    lockmgr(&sc->api_lock, LK_EXCLUSIVE, NULL, curthread);
 +#endif  +#endif
 +  +
  #endif   #endif
Line 640  diff -urN ./src/nvidia_subr.c ../../nvid Line 652  diff -urN ./src/nvidia_subr.c ../../nvid
 +#ifndef __DragonFly__  +#ifndef __DragonFly__
      lockmgr(&sc->api_lock, LK_RELEASE, 0, curproc);       lockmgr(&sc->api_lock, LK_RELEASE, 0, curproc);
 +#else  +#else
+    lockmgr(&sc->api_lock, LK_RELEASE, 0, curthread);+    lockmgr(&sc->api_lock, LK_RELEASE, NULL, curthread);
 +#endif  +#endif
 +  +
  #endif   #endif
  }   }
     
diff -urN ./src/nvidia_sysctl.c ../../nvidia-patched/src/nvidia_sysctl.cdiff -urN ./src/nvidia_sysctl.c ../../NVIDIA-patched/src/nvidia_sysctl.c
 --- ./src/nvidia_sysctl.c       Wed May 28 18:51:52 2003  --- ./src/nvidia_sysctl.c       Wed May 28 18:51:52 2003
+++ ../../nvidia-patched/src/nvidia_sysctl.c    Wed Feb 25 19:50:41 2004+++ ../../NVIDIA-patched/src/nvidia_sysctl.c    Wed Mar 10 12:45:32 2004
 @@ -11,7 +11,11 @@  @@ -11,7 +11,11 @@
  #include "nv-misc.h"   #include "nv-misc.h"
  #include "os-interface.h"   #include "os-interface.h"

Removed from v.1.2  
changed lines
  Added in v.1.3