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

version 1.3, 2004/03/10 18:14:32 version 1.4, 2004/05/24 14:14:10
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   2003-05-28 16:51:52.000000000 +0000
+++ ../../NVIDIA-patched/module/Makefile        Wed Mar 10 12:45:32 2004+++ ../../nvidia-patched/module/Makefile        2004-05-20 03:42:14.000000000 +0000
 @@ -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        1970-01-01 00:00:00.000000000 +0000
+++ ../../NVIDIA-patched/src/nv-dragonfly.h     Wed Mar 10 12:45:32 2004+++ ../../nvidia-patched/src/nv-dragonfly.h     2004-05-20 03:42:14.000000000 +0000
 @@ -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  2003-05-28 16:51:52.000000000 +0000
+++ ../../NVIDIA-patched/src/nvidia_ctl.c       Wed Mar 10 12:45:32 2004+++ ../../nvidia-patched/src/nvidia_ctl.c       2004-05-20 03:42:14.000000000 +0000
 @@ -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 368  diff -urN ./src/nvidia_ctl.c ../../NVIDI Line 368  diff -urN ./src/nvidia_ctl.c ../../NVIDI
  };   };
     
  static dev_t          nvidia_ctl_cdev;   static dev_t          nvidia_ctl_cdev;
@@ -218,7 +241,7 @@@@ -200,16 +223,20 @@
      struct nvidia_softc *sc;
  
      if (nvidia_count == 0) {
 +
 +
          /*
           * This routine is called from nvidia_attach, multiple times when
           * more than one device is installed - this makes it necessary to
           * prevent multiple calls to make_dev.
           */
 +       cdevsw_add(&nvidia_ctl_cdevsw, -1, 255); /* XXX */
          nvidia_ctl_cdev = make_dev(&nvidia_ctl_cdevsw,
                  CDEV_CTL_MINOR,
                  UID_ROOT, GID_WHEEL, 0666,
                  "%s", nvidia_ctl_cdevsw.d_name);
  
 +
          sc = &nvidia_ctl_sc;
          bzero(sc, sizeof(nvidia_softc_t));
          nvidia_ctl_state.os_state = sc;
 @@ -218,7 +245,7 @@
          mtx_init(&sc->mtx_api, "ctl.mtx_api", NULL, MTX_DEF);           mtx_init(&sc->mtx_api, "ctl.mtx_api", NULL, MTX_DEF);
          mtx_init(&sc->mtx_rm,  "ctl.mtx_rm",  NULL, MTX_SPIN);           mtx_init(&sc->mtx_rm,  "ctl.mtx_rm",  NULL, MTX_SPIN);
  #else   #else
Line 377  diff -urN ./src/nvidia_ctl.c ../../NVIDI Line 398  diff -urN ./src/nvidia_ctl.c ../../NVIDI
  #endif   #endif
      }       }
     
@@ -242,8 +265,10 @@@@ -242,10 +269,17 @@
  #if __FreeBSD_version >= 500000   #if __FreeBSD_version >= 500000
          mtx_destroy(&sc->mtx_rm);           mtx_destroy(&sc->mtx_rm);
          mtx_destroy(&sc->mtx_api);           mtx_destroy(&sc->mtx_api);
 -#else  -#else
 +#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);
   -#endif
            destroy_dev(nvidia_ctl_cdev);
 +#else   +#else 
 +        lockmgr(&sc->api_lock, LK_DRAIN, NULL, curthread);  +        lockmgr(&sc->api_lock, LK_DRAIN, NULL, curthread);
 #endif+#endif
         destroy_dev(nvidia_ctl_cdev);+
 +#if defined(__FreeBSD__) && !defined(__DragonFly__)
 +       cdevsw_remove(&nvidia_ctl_cdevsw, -1, 255); /* XXX */
 +#endif
 +
      }       }
diff -urN ./src/nvidia_dev.c ../../NVIDIA-patched/src/nvidia_dev.c 
--- ./src/nvidia_dev.c  Wed May 28 18:51:52 2003     return 0;
+++ ../../NVIDIA-patched/src/nvidia_dev.c       Wed Mar 10 12:45:32 2004diff -urN ./src/nvidia_dev.c ../../nvidia-patched/src/nvidia_dev.c
 --- ./src/nvidia_dev.c  2003-05-28 16:51:52.000000000 +0000
 +++ ../../nvidia-patched/src/nvidia_dev.c       2004-05-20 03:43:16.000000000 +0000
 @@ -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 478  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.c@@ -187,6 +211,7 @@
--- ./src/nvidia_linux.c        Wed May 28 18:51:52 2003 
+++ ../../NVIDIA-patched/src/nvidia_linux.c     Wed Mar 10 12:45:32 2004 int nvidia_dev_attach (struct nvidia_softc *sc)
  {
 +    cdevsw_add(&nvidia_dev_cdevsw, -1, device_get_unit(sc->dev));
      sc->cdev = make_dev(&nvidia_dev_cdevsw,
                  device_get_unit(sc->dev),
                  UID_ROOT, GID_WHEEL, 0666,
 @@ -199,7 +224,11 @@
  
  int nvidia_dev_detach (struct nvidia_softc *sc)
  {
 +#if defined(__FreeBSD__) && !defined(__DragonFly__)
      destroy_dev(sc->cdev);
 +#else
 +    cdevsw_remove(&nvidia_dev_cdevsw, -1, device_get_unit(sc->dev));
 +#endif
      return 0;
  }
  
 diff -urN ./src/nvidia_linux.c ../../nvidia-patched/src/nvidia_linux.c
 --- ./src/nvidia_linux.c        2003-05-28 16:51:52.000000000 +0000
 +++ ../../nvidia-patched/src/nvidia_linux.c     2004-05-20 03:42:14.000000000 +0000
 @@ -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 525  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   2003-05-28 16:51:52.000000000 +0000
+++ ../../NVIDIA-patched/src/nvidia_os.c        Wed Mar 10 12:45:32 2004+++ ../../nvidia-patched/src/nvidia_os.c        2004-05-20 03:42:14.000000000 +0000
 @@ -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 524  diff -urN ./src/nvidia_os.c ../../NVIDIA Line 573  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       2003-05-28 16:51:52.000000000 +0000
+++ ../../NVIDIA-patched/src/nvidia_os_pci.c    Wed Mar 10 12:45:32 2004+++ ../../nvidia-patched/src/nvidia_os_pci.c    2004-05-20 03:42:14.000000000 +0000
 @@ -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 539  diff -urN ./src/nvidia_os_pci.c ../../NV Line 588  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  2003-05-28 16:51:52.000000000 +0000
+++ ../../NVIDIA-patched/src/nvidia_os_registry.c       Wed Mar 10 12:45:32 2004+++ ../../nvidia-patched/src/nvidia_os_registry.c       2004-05-20 03:42:14.000000000 +0000
 @@ -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 554  diff -urN ./src/nvidia_os_registry.c ../ Line 603  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  2003-05-28 16:51:52.000000000 +0000
+++ ../../NVIDIA-patched/src/nvidia_pci.c       Wed Mar 10 12:45:32 2004+++ ../../nvidia-patched/src/nvidia_pci.c       2004-05-20 03:42:14.000000000 +0000
 @@ -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 593  diff -urN ./src/nvidia_pci.c ../../NVIDI Line 642  diff -urN ./src/nvidia_pci.c ../../NVIDI
  #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 2003-05-28 16:51:52.000000000 +0000
+++ ../../NVIDIA-patched/src/nvidia_subr.c      Wed Mar 10 12:45:32 2004+++ ../../nvidia-patched/src/nvidia_subr.c      2004-05-20 03:42:14.000000000 +0000
 @@ -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 658  diff -urN ./src/nvidia_subr.c ../../NVID Line 707  diff -urN ./src/nvidia_subr.c ../../NVID
  #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       2003-05-28 16:51:52.000000000 +0000
+++ ../../NVIDIA-patched/src/nvidia_sysctl.c    Wed Mar 10 12:45:32 2004+++ ../../nvidia-patched/src/nvidia_sysctl.c    2004-05-20 03:42:14.000000000 +0000
 @@ -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.3  
changed lines
  Added in v.1.4