[pkg-nvidia-devel] r592 - in /packages/nvidia-settings/trunk: debian/README.source debian/changelog debian/control debian/nvidia-settings.desktop samples/nv-control-framelock.c src/gtk+-2.x/ctkgpu.c src/libXNVCtrl/NVCtrl.h src/parse.c src/query-assign.c

fabo at users.alioth.debian.org fabo at users.alioth.debian.org
Sat Aug 22 08:17:48 UTC 2009


Author: fabo
Date: Sat Aug 22 08:17:48 2009
New Revision: 592

URL: http://svn.debian.org/wsvn/pkg-nvidia/?sc=1&rev=592
Log:
Add nvidia-settings (185.18.31-1)
  * Update debian/control:
    - Bump Standards-Version from 3.8.2 to 3.8.3
  * Add debian/README.source file

Added:
    packages/nvidia-settings/trunk/debian/README.source
Modified:
    packages/nvidia-settings/trunk/debian/changelog
    packages/nvidia-settings/trunk/debian/control
    packages/nvidia-settings/trunk/debian/nvidia-settings.desktop
    packages/nvidia-settings/trunk/samples/nv-control-framelock.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgpu.c
    packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrl.h
    packages/nvidia-settings/trunk/src/parse.c
    packages/nvidia-settings/trunk/src/query-assign.c

Added: packages/nvidia-settings/trunk/debian/README.source
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/debian/README.source?rev=592&op=file
==============================================================================
--- packages/nvidia-settings/trunk/debian/README.source (added)
+++ packages/nvidia-settings/trunk/debian/README.source Sat Aug 22 08:17:48 2009
@@ -1,0 +1,6 @@
+This package uses quilt for upstream source code patch management. Please read
+/usr/share/doc/quilt/README.source for more information how to apply, unapply,
+add, modify or remove patches.
+
+Please note that /usr/share/doc/quilt/README.source is only available in quilt
+version 0.46-4.1 or later.

Modified: packages/nvidia-settings/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/debian/changelog?rev=592&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/debian/changelog (original)
+++ packages/nvidia-settings/trunk/debian/changelog Sat Aug 22 08:17:48 2009
@@ -1,3 +1,14 @@
+nvidia-settings (185.18.31-1) unstable; urgency=low
+
+  * New upstream release
+
+  [ Fathi Boudra ]
+  * Update debian/control:
+    - Bump Standards-Version from 3.8.2 to 3.8.3
+  * Add debian/README.source file
+
+ -- Debian NVIDIA Maintainers <pkg-nvidia-devel at lists.alioth.debian.org>  Sat, 22 Aug 2009 09:18:50 +0200
+
 nvidia-settings (185.18.14-2) unstable; urgency=low
 
   [ Fathi Boudra ]

Modified: packages/nvidia-settings/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/debian/control?rev=592&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/debian/control (original)
+++ packages/nvidia-settings/trunk/debian/control Sat Aug 22 08:17:48 2009
@@ -6,7 +6,7 @@
 Build-Depends: debhelper (>= 7.2), quilt, sharutils, m4, libgtk2.0-dev,
  libgl1-mesa-dev | libgl-dev, libxext-dev, libxrandr-dev, libxv-dev,
  libxxf86vm-dev
-Standards-Version: 3.8.2
+Standards-Version: 3.8.3
 
 Package: nvidia-settings
 Architecture: i386 amd64

Modified: packages/nvidia-settings/trunk/debian/nvidia-settings.desktop
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/debian/nvidia-settings.desktop?rev=592&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/debian/nvidia-settings.desktop (original)
+++ packages/nvidia-settings/trunk/debian/nvidia-settings.desktop Sat Aug 22 08:17:48 2009
@@ -7,4 +7,3 @@
 Icon=nvidia-settings
 Name=NVIDIA X Server Settings
 Comment=Configure NVIDIA X Server Settings
-

Modified: packages/nvidia-settings/trunk/samples/nv-control-framelock.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/samples/nv-control-framelock.c?rev=592&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/samples/nv-control-framelock.c (original)
+++ packages/nvidia-settings/trunk/samples/nv-control-framelock.c Sat Aug 22 08:17:48 2009
@@ -166,7 +166,7 @@
             if (!ret) {
                 printf("Failed to query enabled displays.\n");
             } else {
-                printf("0x%08u\n", mask);
+                printf("0x%08x\n", mask);
             }
 
             /* Query GPU server (master) */
@@ -181,7 +181,7 @@
             if (!ret) {
                 printf("Failed to query server mask.\n");
             } else {
-                printf("0x%08u\n", mask);
+                printf("0x%08x\n", mask);
             }
 
             /* Query GPU clients (slaves) */
@@ -196,7 +196,7 @@
             if (!ret) {
                 printf("Failed to query clients mask.\n");
             } else {
-                printf("0x%08u\n", mask);
+                printf("0x%08x\n", mask);
             }
 
         } /* Done disabling GPUs */
@@ -313,7 +313,9 @@
                 continue;
             }
 
-            /* Query if this GPU can be set as master */
+            /* Query if any of the enabled displays can be set as a
+             * master on this GPU.
+             */
 
             ret = XNVCTRLQueryTargetAttribute(dpy,
                                               NV_CTRL_TARGET_TYPE_GPU,
@@ -328,7 +330,7 @@
             
             /* Clear the master setting if any */
             
-            if (masterable == NV_CTRL_FRAMELOCK_MASTERABLE_TRUE) {
+            if (masterable) {
                 XNVCTRLSetTargetAttribute(dpy,
                                           NV_CTRL_TARGET_TYPE_GPU,
                                           gpu, // target_id
@@ -350,13 +352,12 @@
             
             /* Pick the first available/capable display device as master */
 
-            if (pick_server &&
-                masterable == NV_CTRL_FRAMELOCK_MASTERABLE_TRUE) {
+            if (pick_server && masterable) {
                 
                 /* Just pick the first enabled display */
                 
                 unsigned int master = (1<<31);
-                while (master && !(master & mask)) {
+                while (master && !(master & masterable)) {
                     master >>= 1;
                 }
                 
@@ -381,7 +382,7 @@
                                               NV_CTRL_FRAMELOCK_MASTER,
                                               master);
 
-                    printf("    - Set Server Display    : 0x%08u\n", master);
+                    printf("    - Set Server Display    : 0x%08x\n", master);
                     pick_server = 0;
                     server_set = 1;
                 }
@@ -396,7 +397,7 @@
                                           0, // display_mask
                                           NV_CTRL_FRAMELOCK_SLAVES,
                                           mask);
-                printf("    - Set Client Display(s) : 0x%08u\n", mask);
+                printf("    - Set Client Display(s) : 0x%08x\n", mask);
             }
 
             /* Enable frame lock */
@@ -552,6 +553,12 @@
 
     printf("Using NV-CONTROL extension %d.%d on %s\n\n",
            major, minor, XDisplayName(NULL));
+
+    if ((major < 1) || (major == 1 && minor < 9)) {
+        printf("The NV-CONTROL X extension is too old.  Version 1.9 or above "
+               " is required for configuring Frame Lock via target types.\n");
+        return 1;
+    }
     
     /* Do what the user wants */
 

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgpu.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkgpu.c?rev=592&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgpu.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgpu.c Sat Aug 22 08:17:48 2009
@@ -154,6 +154,7 @@
 
     gchar *screens;
     gchar *displays;
+    gchar *tmp_str;
 
     unsigned int display_devices;
     int xinerama_enabled;
@@ -269,52 +270,58 @@
         irq = g_strdup_printf("%d", tmp);
     }
     
-    /* List of X Screens using GPU */
-
-    if (xinerama_enabled) {
-
-        /* In Xinerama, there is only one logical X screen */
-
-        screens = g_strdup("Screen 0 (Xinerama)");
-
-    } else {
-        gchar *tmp_str;
-        screens = NULL;
-
-        ret = NvCtrlGetBinaryAttribute(handle,
-                                       0,
-                                       NV_CTRL_BINARY_DATA_XSCREENS_USING_GPU,
-                                       (unsigned char **)(&pData),
-                                       &len);
-        if (ret == NvCtrlSuccess) {
-            for (i = 1; i <= pData[0]; i++) {
-                
-                if (screens) {
-                    tmp_str = g_strdup_printf("%s,\nScreen %d",
-                                              screens, pData[i]);
-                } else {
-                    tmp_str = g_strdup_printf("Screen %d", pData[i]);
+    /* List of X Screens using the GPU */
+
+    screens = NULL;
+    ret = NvCtrlGetBinaryAttribute(handle,
+                                   0,
+                                   NV_CTRL_BINARY_DATA_XSCREENS_USING_GPU,
+                                   (unsigned char **)(&pData),
+                                   &len);
+    if (ret == NvCtrlSuccess) {
+        if (pData[0] == 0) {
+            screens = g_strdup("None");
+        } else {
+            NvCtrlAttributeHandle *screen_handle;
+
+            if (xinerama_enabled) {
+                screens = g_strdup("Screen 0 (Xinerama)");
+                /* XXX Use the only screen handle we have.
+                 *     This is currently OK since we only
+                 *     query xinerama attributes with this
+                 *     handle below.  If we needed to query
+                 *     a screen-specific attribute below,
+                 *     then we would need to get a handle
+                 *     for the correct screen instead.
+                 */
+                screen_handle = t[0].h;
+            } else {
+                for (i = 1; i <= pData[0]; i++) {
+                    if (screens) {
+                        tmp_str = g_strdup_printf("%s,\nScreen %d",
+                                                  screens, pData[i]);
+                    } else {
+                        tmp_str = g_strdup_printf("Screen %d", pData[i]);
+                    }
+                    g_free(screens);
+                    screens = tmp_str;
                 }
+                screen_handle = t[pData[1]].h;
+            }
+
+            ret = NvCtrlGetAttribute(screen_handle,
+                                     NV_CTRL_SHOW_SLI_HUD,
+                                     &tmp);
+            if (ret == NvCtrlSuccess) {
+                tmp_str = g_strdup_printf("%s (SLI)", screens);
                 g_free(screens);
                 screens = tmp_str;
             }
-            if (!screens) {
-                screens = g_strdup("None");
-
-            } else if (pData[0] > 0) {
-
-                ret = NvCtrlGetAttribute(t[pData[1]].h,
-                                         NV_CTRL_SHOW_SLI_HUD,
-                                         &tmp);
-
-                if (ret == NvCtrlSuccess) {
-                    tmp_str = g_strdup_printf("%s (SLI)", screens);
-                    g_free(screens);
-                    screens = tmp_str;
-                }
-            }
-            XFree(pData);
         }
+        XFree(pData);
+    }
+    if (!screens) {
+        screens = g_strdup("Unknown");
     }
 
     /* List of Display Device connected on GPU */

Modified: packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrl.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrl.h?rev=592&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrl.h (original)
+++ packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrl.h Sat Aug 22 08:17:48 2009
@@ -1591,10 +1591,9 @@
 #define NV_CTRL_FRAMELOCK_SLAVES                                 232 /* RW-G */
 
 /*
- * NV_CTRL_FRAMELOCK_MASTERABLE - Can this Display Device be set
- * as the master of the frame lock group.  Returns MASTERABLE_TRUE if
- * the GPU driving the display device is connected to the "primary"
- * connector on the frame lock board.
+ * NV_CTRL_FRAMELOCK_MASTERABLE - Can any of the given display devices
+ * be set as master of the frame lock group.  Returns a bitmask of the
+ * corresponding display devices that can be set as master.
  *
  * This attribute can only be queried through XNVCTRLQueryTargetAttribute()
  * using a NV_CTRL_TARGET_TYPE_GPU target.  This attribute cannot be
@@ -1602,9 +1601,6 @@
  */
 
 #define NV_CTRL_FRAMELOCK_MASTERABLE                             233 /* R-DG */
-#define NV_CTRL_FRAMELOCK_MASTERABLE_FALSE                       0
-#define NV_CTRL_FRAMELOCK_MASTERABLE_TRUE                        1
-
 
 /*
  * NV_CTRL_PROBE_DISPLAYS - re-probes the hardware to detect what

Modified: packages/nvidia-settings/trunk/src/parse.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/parse.c?rev=592&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/parse.c (original)
+++ packages/nvidia-settings/trunk/src/parse.c Sat Aug 22 08:17:48 2009
@@ -175,7 +175,7 @@
     { "FrameLockTiming",       NV_CTRL_FRAMELOCK_TIMING,            N|F|G,   "This is 1 when the GPU is both receiving and locked to an input timing signal. Timing information may come from the following places: Another frame lock device that is set to master, the house sync signal, or the GPU's internal timing from a display device." },
     { "FramelockUseHouseSync", NV_CTRL_USE_HOUSE_SYNC,              N|F|G,   "When 1, the server (master) frame lock device will propagate the incoming house sync signal as the outgoing frame lock sync signal.  If the frame lock device cannot detect a frame lock sync signal, it will default to using the internal timings from the GPU connected to the primary connector." },
     { "FrameLockSlaves",       NV_CTRL_FRAMELOCK_SLAVES,            N|F|G|D, "Get/set whether the display device(s) given should listen or ignore the master's sync signal." },
-    { "FrameLockMasterable",   NV_CTRL_FRAMELOCK_MASTERABLE,        N|F|G,   "Returns whether the display device(s) can be set as the master of the frame lock group.  Returns 1 if the GPU driving the display device is connected to the \"primary\" connector on the frame lock board." },
+    { "FrameLockMasterable",   NV_CTRL_FRAMELOCK_MASTERABLE,        N|F|G|D, "Returns whether the display device(s) can be set as the master of the frame lock group.  Returns a bitmask indicating which of the given display devices can be set as a frame lock master." },
     { "FrameLockSlaveable",    NV_CTRL_FRAMELOCK_SLAVEABLE,         N|F|G|D, "Returns whether the display device(s) can be set as slave(s) of the frame lock group." },
     { "FrameLockFPGARevision", NV_CTRL_FRAMELOCK_FPGA_REVISION,     N|F|G,   "Returns the FPGA revision of the Frame Lock device." },
     { "FrameLockSyncRate4",    NV_CTRL_FRAMELOCK_SYNC_RATE_4,       N|F|G,   "Returns the refresh rate that the frame lock board is sending to the GPU in 1/10000 Hz (i.e. to get the refresh rate in Hz, divide the returned value by 10000.)" },

Modified: packages/nvidia-settings/trunk/src/query-assign.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/query-assign.c?rev=592&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/query-assign.c (original)
+++ packages/nvidia-settings/trunk/src/query-assign.c Sat Aug 22 08:17:48 2009
@@ -731,8 +731,8 @@
         }
 
         if (flags & NV_PARSER_TYPE_PACKED_ATTRIBUTE) {
-            nv_msg(INDENT, "Valid values for '%s' are: [%s], [%s].", name, str,
-                   str2);
+            nv_msg(INDENT, "Valid values for '%s' are: [%s], [%s].", name, str2,
+                   str);
         } else {
             nv_msg(INDENT, "Valid values for '%s' are: %s.", name, str);
         }




More information about the Pkg-nvidia-devel mailing list