[pkg-nvidia-devel] r886 - in /packages/nvidia-settings/trunk: doc/ samples/ src/ src/XF86Config-parser/ src/gtk+-2.x/ src/libXNVCtrl/ src/libXNVCtrlAttributes/

fabo at users.alioth.debian.org fabo at users.alioth.debian.org
Tue May 18 08:52:17 UTC 2010


Author: fabo
Date: Tue May 18 08:52:05 2010
New Revision: 886

URL: http://svn.debian.org/wsvn/pkg-nvidia/?sc=1&rev=886
Log:
Merge nvidia-settings 195.36.24 sources

Added:
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkecc.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkecc.h
Modified:
    packages/nvidia-settings/trunk/doc/nvidia-settings.1.m4
    packages/nvidia-settings/trunk/samples/nv-control-events.c
    packages/nvidia-settings/trunk/src/XF86Config-parser/Generate.c
    packages/nvidia-settings/trunk/src/XF86Config-parser/xf86Parser.h
    packages/nvidia-settings/trunk/src/gtk+-2.x/Makefile.inc
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkclocks.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkcolorcorrection.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkconfig.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkdisplayconfig-utils.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkdisplayconfig.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkdisplaydevice-dfp.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkevent.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkframelock.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkglx.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgpu.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgpu.h
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvi.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvi.h
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvo-sync.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvo.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvo.h
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkmultisample.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkopengl.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkpowermizer.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkscreen.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkslimm.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkui.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkutils.c
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkutils.h
    packages/nvidia-settings/trunk/src/gtk+-2.x/ctkwindow.c
    packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrl.c
    packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrl.h
    packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrlLib.h
    packages/nvidia-settings/trunk/src/libXNVCtrl/nv_control.h
    packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributes.c
    packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributes.h
    packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c
    packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h
    packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c
    packages/nvidia-settings/trunk/src/lscf.c
    packages/nvidia-settings/trunk/src/parse.c
    packages/nvidia-settings/trunk/src/query-assign.c

Modified: packages/nvidia-settings/trunk/doc/nvidia-settings.1.m4
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/doc/nvidia-settings.1.m4?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/doc/nvidia-settings.1.m4 (original)
+++ packages/nvidia-settings/trunk/doc/nvidia-settings.1.m4 Tue May 18 08:52:05 2010
@@ -199,6 +199,12 @@
 .B \-q all
 to query all attributes.
 .TP
+.B \-t, \-\-terse
+When querying attribute values with the '--query' commandline option, only print the current value, rather than the more verbose description of the attribute, its valid values, and its current value.
+.TP
+.B \-d, \-\-display\-device\-string
+When printing attribute values in response to the '--query' option, if the attribute value is a display device mask, print the value as a list of display devices (e.g., "CRT-0, DFP-0"), rather than a hexidecimal bitmask (e.g., 0x00010001).
+.TP
 .B \-g, \-\-glxinfo
 Print GLX Information for the X display and exit.
 .TP

Modified: packages/nvidia-settings/trunk/samples/nv-control-events.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/samples/nv-control-events.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/samples/nv-control-events.c (original)
+++ packages/nvidia-settings/trunk/samples/nv-control-events.c Tue May 18 08:52:05 2010
@@ -548,5 +548,6 @@
     MAKE_ENTRY(NV_CTRL_OPENGL_AA_LINE_GAMMA_VALUE),
     MAKE_ENTRY(NV_CTRL_DISPLAYPORT_LINK_RATE),
     MAKE_ENTRY(NV_CTRL_STEREO_EYES_EXCHANGE),
+    MAKE_ENTRY(NV_CTRL_ACCELERATE_TRAPEZOIDS),
     { -1, NULL, NULL }
 };

Modified: packages/nvidia-settings/trunk/src/XF86Config-parser/Generate.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/XF86Config-parser/Generate.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/XF86Config-parser/Generate.c (original)
+++ packages/nvidia-settings/trunk/src/XF86Config-parser/Generate.c Tue May 18 08:52:05 2010
@@ -8,12 +8,12 @@
  * modify it under the terms of the GNU General Public License as
  * published by the Free Software Foundation; either version 2 of the
  * License, or (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the:
  *
@@ -66,7 +66,7 @@
 XConfigPtr xconfigGenerate(GenerateOptions *gop)
 {
     XConfigPtr config;
-    
+
     config = xconfigAlloc(sizeof(XConfigRec));
 
     /* add files, fonts, and modules */
@@ -105,34 +105,34 @@
     XConfigScreenPtr screen, s;
     XConfigDevicePtr device;
     XConfigMonitorPtr monitor;
-    
+
     monitor = xconfigAddMonitor(config, count);
     device = add_device(config, bus, slot, boardname, count);
-    
+
     screen = xconfigAlloc(sizeof(XConfigScreenRec));
 
     screen->identifier = xconfigAlloc(32);
     snprintf(screen->identifier, 32, SCREEN_IDENTIFIER, count);
-    
+
     screen->device_name = xconfigStrdup(device->identifier);
     screen->device = device;
 
     screen->monitor_name = xconfigStrdup(monitor->identifier);
     screen->monitor = monitor;
-        
+
     screen->defaultdepth = 24;
-    
+
     xconfigAddDisplay(&screen->displays, screen->defaultdepth);
 
     /* append to the end of the screen list */
-    
+
     if (!config->screens) {
         config->screens = screen;
     } else {
         for (s = config->screens; s->next; s = s->next);
         s->next = screen;
     }
-    
+
     return screen;
 
 } /* xconfigGenerateAddScreen() */
@@ -149,16 +149,16 @@
 void xconfigGenerateAssignScreenAdjacencies(XConfigLayoutPtr layout)
 {
     XConfigAdjacencyPtr adj, prev = NULL;
-    
+
     for (adj = layout->adjacencies; adj; adj = adj->next) {
-        
+
         if (prev) {
             adj->where = CONF_ADJ_RIGHTOF;
             adj->refscreen = xconfigStrdup(prev->screen_name);
         } else {
             adj->x = adj->y = -1;
         }
-        
+
         /* make sure all the obsolete positioning is empty */
 
         adj->top = NULL;
@@ -169,10 +169,10 @@
         adj->left_name = NULL;
         adj->right = NULL;
         adj->right_name = NULL;
-        
+
         prev = adj;
     }
-    
+
 } /* xconfigGenerateAssignScreenAdjacencies() */
 
 
@@ -188,7 +188,7 @@
 static int is_file(const char *filename)
 {
     return (access(filename, F_OK) == 0);
-    
+
 } /* is_file() */
 
 
@@ -208,14 +208,14 @@
     struct stat stat_buf;
     FILE *stream = NULL;
     char *s, *libdir = NULL;
-    
+
     /*
      * run the pkg-config command and read the output; if the output
      * is a directory, then return that as the libdir
      */
-    
+
     stream = popen("pkg-config --variable=libdir xorg-server", "r");
-    
+
     if (stream) {
         char buf[256];
 
@@ -223,23 +223,23 @@
 
         while (1) {
             if (fgets(buf, 255, stream) == NULL) break;
-            
+
             if (buf[0] != '\0') {
 
                 /* truncate any newline */
-                
+
                 s = strchr(buf, '\n');
                 if (s) *s = '\0';
 
                 if ((stat(buf, &stat_buf) == 0) &&
                     (S_ISDIR(stat_buf.st_mode))) {
-                
+
                     libdir = xconfigStrdup(buf);
                     break;
                 }
             }
         }
-        
+
         pclose(stream);
 
         if (libdir) return libdir;
@@ -248,7 +248,7 @@
     /* otherwise, just fallback to [X PROJECT ROOT]/lib */
 
     return xconfigStrcat(gop->x_project_root, "/lib", NULL);
-    
+
 } /* find_libdir() */
 
 
@@ -264,12 +264,12 @@
 {
     int i, ret;
     char *path, *p, *orig, *fonts_dir, *libdir;
-    
+
     /*
      * The below font path has been constructed from various examples
      * and uses some suggests from the Font De-uglification HOWTO
      */
-    
+
     static const char *__font_paths[] = {
         "LIBDIR/X11/fonts/local/",
         "LIBDIR/X11/fonts/misc/:unscaled",
@@ -292,7 +292,7 @@
         "/usr/lib/openoffice/share/fonts/truetype",
         NULL
     };
-    
+
     /*
      * if a font server is running, set the font path to that
      *
@@ -312,7 +312,7 @@
         /* get the X server libdir */
 
         libdir = find_libdir(gop);
-        
+
         for (i = 0; __font_paths[i]; i++) {
             path = xconfigStrdup(__font_paths[i]);
 
@@ -323,7 +323,7 @@
                 free(path);
                 path = p;
             }
-        
+
             /* temporarily chop off any ":unscaled" appendage */
 
             p = strchr(path, ':');
@@ -339,7 +339,7 @@
                 continue;
             }
             free(fonts_dir);
-        
+
             /* add the ":unscaled" back */
 
             if (p) *p = ':';
@@ -385,7 +385,7 @@
     if (gop->autoloads_glx) return;
 
     config->modules = xconfigAlloc(sizeof(XConfigModuleRec));
-    
+
     xconfigAddNewLoadDirective(&l, xconfigStrdup("dbe"),
                                XCONFIG_LOAD_MODULE, NULL, FALSE);
     xconfigAddNewLoadDirective(&l, xconfigStrdup("extmod"),
@@ -405,9 +405,9 @@
 #endif
     xconfigAddNewLoadDirective(&l, xconfigStrdup("glx"),
                                XCONFIG_LOAD_MODULE, NULL, FALSE);
-    
+
     config->modules->loads = l;
-    
+
 } /* add_modules() */
 
 
@@ -425,12 +425,12 @@
     /* XXX need to query resman for the EDID */
 
     monitor = xconfigAlloc(sizeof(XConfigMonitorRec));
-    
+
     monitor->identifier = xconfigAlloc(32);
     snprintf(monitor->identifier, 32, MONITOR_IDENTIFIER, count);
     monitor->vendor = xconfigStrdup("Unknown");  /* XXX */
     monitor->modelname = xconfigStrdup("Unknown"); /* XXX */
-    
+
     /* XXX check EDID for freq ranges */
 
     monitor->n_hsync = 1;
@@ -445,16 +445,16 @@
     xconfigAddNewOption(&monitor->options, "DPMS", NULL);
 
     /* append to the end of the monitor list */
-    
+
     if (!config->monitors) {
         config->monitors = monitor;
     } else {
         for (m = config->monitors; m->next; m = m->next);
         m->next = monitor;
     }
-    
+
     return monitor;
-   
+
 } /* xconfigAddMonitor() */
 
 
@@ -481,23 +481,23 @@
     }
 
     if (boardname) device->board = xconfigStrdup(boardname);
-    
+
     device->chipid = -1;
     device->chiprev = -1;
     device->irq = -1;
     device->screen = -1;
-    
+
     /* append to the end of the device list */
-    
+
     if (!config->devices) {
         config->devices = device;
     } else {
         for (d = config->devices; d->next; d = d->next);
         d->next = device;
     }
-    
+
     return device;
-    
+
 } /* add_device() */
 
 
@@ -529,33 +529,33 @@
     XConfigLayoutPtr layout;
     XConfigAdjacencyPtr adj;
     XConfigScreenPtr screen;
-    
+
     /* assume 1 X screen */
 
     screen = xconfigGenerateAddScreen(config, -1, -1, NULL, 0);
-    
+
     /* create layout */
 
     layout = xconfigAlloc(sizeof(XConfigLayoutRec));
-    
+
     layout->identifier = xconfigStrdup("Layout0");
-    
+
     adj = xconfigAlloc(sizeof(XConfigAdjacencyRec));
 
     adj->scrnum = 0;
     adj->screen = screen;
     adj->screen_name = xconfigStrdup(screen->identifier);
-    
+
     layout->adjacencies = adj;
-    
+
     xconfigGenerateAssignScreenAdjacencies(layout);
-    
+
     add_inputref(config, layout, MOUSE_IDENTIFER, "CorePointer");
     add_inputref(config, layout, KEYBOARD_IDENTIFER, "CoreKeyboard");
-    
+
     layout->next = config->layouts;
     config->layouts = layout;
-    
+
 } /* add_layout() */
 
 
@@ -752,7 +752,7 @@
 {
     int i;
     int emulate3 = FALSE;
-    
+
     /*
      * translate the emulate3 string into a boolean we can use below
      * for comparison
@@ -768,20 +768,20 @@
     /*
      * skip the "/dev/" part of the device filename
      */
-    
+
     if (device && (strncmp(device, "/dev/", 5) == 0)) {
         device += 5; /* strlen("/dev/") */
     }
-    
+
     for (i = 0; __mice[i].name; i++) {
         if ((device) && (strcmp(device, __mice[i].device) != 0)) continue;
         if ((proto) && (strcasecmp(proto, __mice[i].Xproto)) != 0) continue;
         if ((emulate3_str) && (emulate3 != __mice[i].emulate3)) continue;
         return &__mice[i];
     }
-    
+
     return NULL;
-    
+
 } /* find_closest_mouse_entry() */
 
 
@@ -801,14 +801,14 @@
     char *tmp, *start, *c, *end;
     struct stat stat_buf;
     size_t len;
-    
+
     if ((fd = open(filename, O_RDONLY)) == -1) goto done;
-    
+
     if (fstat(fd, &stat_buf) == -1) goto done;
-    
+
     if ((data = mmap(0, stat_buf.st_size, PROT_READ, MAP_SHARED,
                      fd, 0)) == (void *) -1) goto done;
-    
+
     /*
      * create a sysmem copy of the buffer, so that we can explicitly
      * NULL terminate it
@@ -820,9 +820,9 @@
 
     memcpy(buf, data, stat_buf.st_size);
     buf[stat_buf.st_size] = '\0';
-    
+
     /* search for the keyword */
-    
+
     start = buf;
 
     while (TRUE) {
@@ -837,7 +837,7 @@
 
         c = tmp;
         while ((c >= start) && (*c != '\n') && (*c != '#')) c--;
-        
+
         if (*c == '#') {
             /* keyword was commented out... search again */
             start = tmp+1;
@@ -854,9 +854,9 @@
     /* there must be something between the start and the end */
 
     if (start == end) goto done;
-    
+
     /* take what is between as the value */
-    
+
     len = end - start;
     value = xconfigAlloc(len + 1);
     strncpy(value, start, len);
@@ -871,7 +871,7 @@
         free(value);
         value = tmp;
     }
-    
+
  done:
 
     if (buf) free(buf);
@@ -879,7 +879,7 @@
     if (fd != -1) close(fd);
 
     return value;
-    
+
 } /* find_config_entry() */
 
 
@@ -891,13 +891,13 @@
 void xconfigGeneratePrintPossibleMice(void)
 {
     int i;
-    
+
     printf("%-25s%-35s\n\n", "Short Name", "Name");
-    
+
     for (i = 0; __mice[i].name; i++) {
         printf("%-25s%-35s\n", __mice[i].shortname, __mice[i].name);
     }
-    
+
     printf("\n");
 
 } /* xconfigGeneratePrintPossibleMice() */
@@ -925,9 +925,9 @@
     const MouseEntry *entry = NULL;
     XConfigInputPtr input;
     char *device_path, *comment = "default";
-    
+
     /* if the user specified on the commandline, use that */
-    
+
     if (gop->mouse) {
         entry = find_mouse_entry(gop->mouse);
         if (entry) {
@@ -937,19 +937,19 @@
                             gop->mouse);
         }
     }
-    
+
     /*
      * if /etc/sysconfig/mouse exists, and contains valid data, use
      * that
      */
-    
+
     if (!entry) {
         char *protocol, *device, *emulate3;
-        
+
         device = find_config_entry("/etc/sysconfig/mouse", "DEVICE=");
         protocol = find_config_entry("/etc/sysconfig/mouse", "XMOUSETYPE=");
         emulate3 = find_config_entry("/etc/sysconfig/mouse", "XEMU3=");
-        
+
         if (device || protocol || emulate3) {
             entry = find_closest_mouse_entry(device, protocol, emulate3);
             if (entry) {
@@ -962,10 +962,10 @@
 
     if (!entry) {
         char *protocol, *device;
-        
+
         protocol = find_config_entry("/etc/conf.d/gpm", "MOUSE=");
         device = find_config_entry("/etc/conf.d/gpm", "MOUSEDEV=");
-        
+
         if (protocol && device) {
             MouseEntry *e = xconfigAlloc(sizeof(MouseEntry));
             e->shortname = "custom";
@@ -978,7 +978,7 @@
             comment = "data in \"/etc/conf.d/gpm\"";
         }
     }
-    
+
     /*
      * XXX we could try to infer the settings from the commandline
      * options gpm is using
@@ -987,9 +987,9 @@
     if (!entry) {
         /* XXX implement me */
     }
-    
+
     /* at this point, we must have a mouse entry */
-    
+
     if (!entry) {
         MouseEntry *e = xconfigAlloc(sizeof(MouseEntry));
         e->Xproto = "auto";
@@ -1012,7 +1012,7 @@
     /* add a new mouse input section */
 
     input = xconfigAlloc(sizeof(XConfigInputRec));
-    
+
     input->comment = xconfigStrcat("    # generated from ",
                                    comment, "\n", NULL);
     input->identifier = xconfigStrdup("Mouse0");
@@ -1026,20 +1026,20 @@
     xconfigAddNewOption(&input->options, "Emulate3Buttons",
                               (entry->emulate3 ? "yes" : "no"));
     TEST_FREE(device_path);
-    
-    
+
+
     /*
      * This will make wheel mice work, and non-wheel mice should
      * ignore ZAxisMapping
      */
 
     xconfigAddNewOption(&input->options, "ZAxisMapping", "4 5");
-    
+
     input->next = config->inputs;
     config->inputs = input;
-    
+
     return TRUE;
-    
+
 } /* xconfigAddMouse() */
 
 
@@ -1069,23 +1069,23 @@
  *
  *
  * keyboard_models.py - keyboard model list
- * 
+ *
  * Brent Fox <bfox at redhat.com>
  * Mike Fulbright <msf at redhat.com>
  * Jeremy Katz <katzj at redhat.com>
- * 
+ *
  * Copyright 2002 Red Hat, Inc.
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -1093,7 +1093,7 @@
  */
 
 static const KeyboardEntry __keyboards[] = {
-    
+
     /* keytable               name                              layout         model  variant options */
 
     { "be-latin1",            "Belgian (be-latin1)",            "be",          "pc105", NULL, NULL },
@@ -1186,13 +1186,13 @@
 void xconfigGeneratePrintPossibleKeyboards(void)
 {
     int i;
-    
+
     printf("%-25s%-35s\n\n", "Short Name", "Name");
 
     for (i = 0; __keyboards[i].name; i++) {
         printf("%-25s%-35s\n", __keyboards[i].keytable, __keyboards[i].name);
     }
-    
+
     printf("\n");
 
 } /* xconfigGeneratePrintPossibleKeyboards() */
@@ -1215,13 +1215,13 @@
 {
     char *value, *comment = "default";
     const KeyboardEntry *entry = NULL;
-    
+
     XConfigInputPtr input;
-    
+
     /*
      * if the user specified on the command line, use that
      */
-    
+
     if (gop->keyboard) {
         entry = find_keyboard_entry(gop->keyboard);
         if (entry) {
@@ -1231,7 +1231,7 @@
                             gop->keyboard);
         }
     }
-    
+
     /*
      * if /etc/sysconfig/keyboard exists, and contains a valid
      * KEYTABLE entry, use that
@@ -1249,9 +1249,9 @@
     }
 
     /* add a new keyboard input section */
-    
+
     input = xconfigAlloc(sizeof(XConfigInputRec));
-    
+
     input->comment = xconfigStrcat("    # generated from ",
                                    comment, "\n", NULL);
     input->identifier = xconfigStrdup("Keyboard0");
@@ -1263,7 +1263,7 @@
      * otherwise, use "keyboard".
      * On Solaris, use the default "keyboard"
      */
-    
+
     if (gop->keyboard_driver) {
         input->driver = gop->keyboard_driver;
     } else {
@@ -1277,7 +1277,7 @@
         }
 #endif
     }
-    
+
     /*
      * set additional keyboard options, based on the Keyboard table
      * entry we found above
@@ -1295,12 +1295,12 @@
         if (entry->options)
             xconfigAddNewOption(&input->options, "XkbOptions", entry->options);
     }
-    
+
     input->next = config->inputs;
     config->inputs = input;
 
     return TRUE;
-    
+
 } /* xconfigAddKeyboard() */
 
 
@@ -1318,18 +1318,18 @@
     char *paths[] = { "/usr/X11R6", "/usr/X11", NULL };
     struct stat stat_buf;
     int i;
-        
+
     for (i = 0; paths[i]; i++) {
-        
+
         if (stat(paths[i], &stat_buf) == -1) {
             continue;
         }
-    
+
         if (S_ISDIR(stat_buf.st_mode)) {
             return paths[i];
         }
     }
-    
+
     /* default to "/usr/X11R6", I guess */
 
     return paths[0];
@@ -1462,21 +1462,21 @@
     int isXorg;
     int dummy, len, found;
     char *cmd, *ptr, *ret;
-    
+
     gop->supports_extension_section = FALSE;
     gop->autoloads_glx = FALSE;
 
     /* run `X -version` with a PATH that hopefully includes the X binary */
-    
+
     cmd = xconfigStrcat("PATH=", gop->x_project_root, ":",
                         EXTRA_PATH, ":$PATH ", XSERVER_BIN_NAME,
                         " -version 2>&1", NULL);
-    
+
     if ((stream = popen(cmd, "r"))) {
         char buf[NV_LINE_LEN];
-        
+
         /* read in as much of the input as we can fit into the buffer */
-        
+
         ptr = buf;
 
         do {
@@ -1484,18 +1484,18 @@
             ret = fgets(ptr, len, stream);
             ptr = strchr(ptr, '\0');
         } while ((ret != NULL) && (len > 1));
-        
+
         /*
          * process the `X -version` output to infer relevant
          * information from this X server
          */
-        
+
         found = get_xserver_information(buf,
                                         &isXorg,
                                         &dummy, /* isModular */
                                         &gop->autoloads_glx,
                                         &gop->supports_extension_section);
-                
+
         if (found) {
             if (isXorg) {
                 xserver = X_IS_XORG;
@@ -1521,7 +1521,7 @@
         }
         free(xorgpath);
     }
-    
+
     gop->xserver=xserver;
 
 } /* xconfigGetXServerInUse() */

Modified: packages/nvidia-settings/trunk/src/XF86Config-parser/xf86Parser.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/XF86Config-parser/xf86Parser.h?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/XF86Config-parser/xf86Parser.h (original)
+++ packages/nvidia-settings/trunk/src/XF86Config-parser/xf86Parser.h Tue May 18 08:52:05 2010
@@ -79,7 +79,7 @@
 #endif  // defined(__linux__)
 
 // Unix variations:  SunOS
-#if !defined(NV_SUNOS) && defined(__sun__) || defined(__sun)
+#if !defined(NV_SUNOS) && (defined(__sun__) || defined(__sun))
 #   define NV_SUNOS
 #endif // defined(__sun__)
 

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/Makefile.inc
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/Makefile.inc?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/Makefile.inc (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/Makefile.inc Tue May 18 08:52:05 2010
@@ -65,9 +65,10 @@
 	ctkdisplayconfig-utils.c \
 	ctkgvo-banner.c \
 	ctkgvo-sync.c \
+	ctkgvi.c \
 	ctklicense.c \
-	ctkgvi.c \
-	ctkpowersavings.c
+	ctkpowersavings.c \
+	ctkecc.c
 
 
 EXTRA_DIST += \
@@ -113,9 +114,10 @@
 	ctkpowersavings.h \
 	ctkgvo-banner.h \
 	ctkgvo-sync.h \
+	ctkgvi.h \
 	ctklicense.h \
-	ctkgvi.h \
-	ctkpowersavings.h
+	ctkpowersavings.h \
+	ctkecc.h
 
 dist_list::
 	@ echo $(SRC) $(EXTRA_DIST)

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkclocks.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkclocks.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkclocks.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkclocks.c Tue May 18 08:52:05 2010
@@ -602,7 +602,7 @@
                   "WARNING: Overclocking has the potential of destroying your "
                   "graphics card, CPU, RAM and any other component.  It may "
                   "also reduce the life expectancy of your components and "
-                  "void manufacturer warranties.  DO THIS AT YOUR OWN RISK. "
+                  "void manufacturer warranties.  DO THIS AT YOUR OWN RISK."
                   );
     ctk_help_heading(b, &i, "Enabeling Clock Frequencies");
     ctk_help_para(b, &i, __enable_button_help);

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkcolorcorrection.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkcolorcorrection.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkcolorcorrection.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkcolorcorrection.c Tue May 18 08:52:05 2010
@@ -45,7 +45,7 @@
 
 static const char *__active_color_help = "The Active Color Channel drop-down "
 "menu allows you to select the color channel controlled by the Brightness, "
-"Contrast and Gamma sliders. You can adjust the red, green or blue channels "
+"Contrast and Gamma sliders.  You can adjust the red, green or blue channels "
 "individually or all three channels at once.";
 
 static const char *__resest_button_help = "The Reset Hardware Defaults "
@@ -1024,7 +1024,7 @@
                   "or gamma values for the selected color channel(s).  This "
                   "helps you to compensate "
                   "for variations in luminance between a source image and "
-                  "its output on a display device. This is useful when "
+                  "its output on a display device.  This is useful when "
                   "working with image processing applications to help "
                   "provide more accurate color reproduction of images (such "
                   "as photographs) when they are displayed on your "

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkconfig.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkconfig.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkconfig.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkconfig.c Tue May 18 08:52:05 2010
@@ -69,12 +69,12 @@
 
 static const char *__show_quit_dialog_help =
 "When this option is enabled, nvidia-settings will ask if you "
-"really want to quit when the quit button is pressed. ";
+"really want to quit when the quit button is pressed.";
 
 static const char *__save_current_config_help =
 "When nvidia-settings exits, it saves the current X server "
 "configuration to a configuration file (\"~/.nvidia-settings-rc\", "
-"by default). Use this button to save the current X server "
+"by default).  Use this button to save the current X server "
 "configuration immediately, optionally to a different file.";
 
 static void ctk_config_class_init(CtkConfigClass *ctk_config_class);
@@ -515,8 +515,8 @@
     
     ctk_help_heading(b, &i, "Active Timers");
     ctk_help_para(b, &i, "Some attributes are polled periodically "
-                  "to ensure the reported values are up-to-date. "
-                  " Each row in the 'Active Timers' table reflects "
+                  "to ensure the reported values are up-to-date.  "
+                  "Each row in the 'Active Timers' table reflects "
                   "the configuration of one of these timers and "
                   "controls how frequently, if at all, a given "
                   "attribute is polled.  The 'Description' field "

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkdisplayconfig-utils.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkdisplayconfig-utils.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkdisplayconfig-utils.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkdisplayconfig-utils.c Tue May 18 08:52:05 2010
@@ -1851,6 +1851,7 @@
     if (display->is_sdi && !gpu->gvo_mode_data) {
         unsigned int valid1 = 0;
         unsigned int valid2 = 0;
+        unsigned int valid3 = 0;
         NVCTRLAttributeValidValuesRec valid;
 
         ret = NvCtrlGetValidAttributeValues(gpu->handle,
@@ -1873,9 +1874,20 @@
             valid2 = valid.u.bits.ints;
         }
 
+        ret = NvCtrlGetValidAttributeValues(gpu->handle,
+                                            NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT3,
+                                            &valid);
+        if ((ret != NvCtrlSuccess) ||
+            (valid.type != ATTRIBUTE_TYPE_INT_BITS)) {
+            valid3 = 0;
+        } else {
+            valid3 = valid.u.bits.ints;
+        }
+
         /* Count the number of valid modes there are */
         gpu->num_gvo_modes = count_number_of_bits(valid1);
         gpu->num_gvo_modes += count_number_of_bits(valid2);
+        gpu->num_gvo_modes += count_number_of_bits(valid3);
         if (gpu->num_gvo_modes > 0) {
             gpu->gvo_mode_data = (GvoModeData *)calloc(gpu->num_gvo_modes,
                                                        sizeof(GvoModeData));
@@ -1903,7 +1915,16 @@
                 }
                 valid2 >>= 1;
                 id++;
-            }                
+            }
+            while (valid3) {
+                if (valid3 & 1) {
+                    if (gpu_query_gvo_mode_info(gpu, id, idx)) {
+                        idx++;
+                    }
+                }
+                valid3 >>= 1;
+                id++;
+            }
         }
     }
 

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkdisplayconfig.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkdisplayconfig.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkdisplayconfig.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkdisplayconfig.c Tue May 18 08:52:05 2010
@@ -25,6 +25,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
+#include <assert.h>
 
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
@@ -137,7 +138,7 @@
 #define VALIDATE_APPLY 0
 #define VALIDATE_SAVE  1
 
-#define SCREEN_DEPTH_COUNT 4
+#define SCREEN_DEPTH_COUNT 5
 
 
 /*** G L O B A L S ***********************************************************/
@@ -177,18 +178,18 @@
 
 static const char * __dpy_position_type_help =
 "The Position Type drop-down allows you to set how the selected display "
-"device is placed within the X screen. This is only available when "
+"device is placed within the X screen.  This is only available when "
 "multiple display devices are present.";
 
 static const char * __dpy_position_relative_help =
 "The Position Relative drop-down allows you to set which other display "
 "device (within the X screen) the selected display device should be "
-"relative to. This is only available when multiple display "
+"relative to.  This is only available when multiple display "
 "devices are present.";
 
 static const char * __dpy_position_offset_help =
 "The Position Offset identifies the top left of the display device "
-"as an offset from the top left of the X screen position. This is only "
+"as an offset from the top left of the X screen position.  This is only "
 "available when multiple display devices are present.";
 
 static const char * __dpy_panning_help =
@@ -204,7 +205,7 @@
 /* Screen tooltips */
 
 static const char * __screen_virtual_size_help =
-"The Virtual Size allows setting the size of the resulting X screen. "
+"The Virtual Size allows setting the size of the resulting X screen.  "
 "The virtual size must be at least large enough to hold all the display "
 "devices that are currently enabled for scanout.";
 
@@ -213,20 +214,20 @@
 "screen; changing this option will require restarting your X server.";
 
 static const char * __screen_position_type_help =
-"The Position Type drop-down appears when two or more display devices are active. "
+"The Position Type drop-down appears when two or more display devices are active.  "
 "This allows you to set how the selected screen "
 "is placed within the X server layout; changing this option will require "
 "restarting your X server.";
 
 static const char * __screen_position_relative_help =
-"The Position Relative drop-down appears when two or more display devices are active. "
-"This allows you to set which other Screen "
+"The Position Relative drop-down appears when two or more display devices "
+"are active.  This allows you to set which other Screen "
 "the selected screen should be relative to; changing this option will "
 "require restarting your X server.";
 
 static const char * __screen_position_offset_help =
-"The Position Offset drop-down appears when two or more display devices are active. "
-"This identifies the top left of the selected Screen as "
+"The Position Offset drop-down appears when two or more display devices "
+"are active.  This identifies the top left of the selected Screen as "
 "an offset from the top left of the X server layout in absolute coordinates; "
 "changing this option will require restarting your X server.";
 
@@ -3134,6 +3135,7 @@
     gtk_widget_show(menu_item);
     ctk_object->screen_depth_table[screen_depth_table_len++] = 8;
 
+    assert(screen_depth_table_len <= SCREEN_DEPTH_COUNT);
     g_signal_handlers_block_by_func(G_OBJECT(ctk_object->mnu_screen_depth),
                                     G_CALLBACK(screen_depth_changed),
                                     (gpointer) ctk_object);
@@ -3474,6 +3476,8 @@
 
     /* Setup the screen number */
     tmp = g_strdup_printf("%d", screen->scrnum);
+    g_object_set(gtk_widget_get_settings(ctk_object->txt_screen_num),
+                 "gtk-label-select-on-focus", FALSE, NULL);
     gtk_label_set_text(GTK_LABEL(ctk_object->txt_screen_num), tmp);
     g_free(tmp);
     

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkdisplaydevice-dfp.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkdisplaydevice-dfp.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkdisplaydevice-dfp.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkdisplaydevice-dfp.c Tue May 18 08:52:05 2010
@@ -86,7 +86,7 @@
 "A flat panel usually has a single 'native' resolution.  If you are "
 "using a resolution that is smaller than the flat panel's native "
 "resolution, then Flat Panel Scaling can adjust how the image is "
-"displayed on the flat panel. This setting will only take effect when "
+"displayed on the flat panel.  This setting will only take effect when "
 "GPU scaling is active, which occurs when the frontend and backend "
 "resolutions of the current mode are different.";
 
@@ -870,7 +870,7 @@
     
     ctk_help_term(b, &i, "Centered");
     ctk_help_para(b, &i, "The image will only occupy the number of pixels "
-                  "needed and be centered on the flat panel. Setting this "
+                  "needed and be centered on the flat panel.  Setting this "
                   "will disable image sharpening for the display device.");
     
     ctk_help_term(b, &i, "Aspect Ratio Scaled");

Added: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkecc.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkecc.c?rev=886&op=file
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkecc.c (added)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkecc.c Tue May 18 08:52:05 2010
@@ -1,0 +1,599 @@
+/*
+ * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
+ * and Linux systems.
+ *
+ * Copyright (C) 2009 NVIDIA Corporation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of Version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See Version 2
+ * of the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the:
+ *
+ *           Free Software Foundation, Inc.
+ *           59 Temple Place - Suite 330
+ *           Boston, MA 02111-1307, USA
+ *
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <inttypes.h>
+
+#include <gtk/gtk.h>
+#include <NvCtrlAttributes.h>
+
+#include "msg.h"
+
+#include "ctkutils.h"
+#include "ctkhelp.h"
+#include "ctkecc.h"
+#include "ctkgpu.h"
+#include "ctkbanner.h"
+
+#define DEFAULT_UPDATE_ECC_STATUS_INFO_TIME_INTERVAL 1000
+
+static const char *__ecc_settings_help =
+"This page allows you to change the Error Correction Code (ECC) "
+"setting for this GPU. You can also view memory details and the number "
+"of ECC events.";
+
+static const char *__ecc_status_help =
+"Returns the current hardware ECC setting "
+"for the targeted GPU.";
+
+static const char *__dbit_error_help =
+"Returns the number of double-bit ECC errors detected by "
+"the targeted GPU since the last POST.";
+
+static const char *__aggregate_dbit_error_help =
+"Returns the number of double-bit ECC errors detected by the "
+"targeted GPU since the last counter reset.";
+
+static const char *__configuration_status_help =
+"Returns the current ECC configuration setting or specifies new "
+"settings.  A new setting do not take effect until the next POST.";
+
+static const char *__clear_button_help =
+"This button is used to clear the ECC errors detected since last POST.";
+
+static const char *__clear_aggregate_button_help =
+"This button is used to reset aggregate ECC errors counter.";
+
+static const char *__reset_default_config_button_help =
+"The button is used to restore the GPU's default ECC configuration setting.";
+
+static void ecc_config_button_toggled(GtkWidget *, gpointer);
+
+GType ctk_ecc_get_type(void)
+{
+    static GType ctk_ecc_type = 0;
+
+    if (!ctk_ecc_type) {
+        static const GTypeInfo ctk_ecc_info = {
+            sizeof (CtkEccClass),
+            NULL, /* base_init */
+            NULL, /* base_finalize */
+            NULL, /* constructor */
+            NULL, /* class_finalize */
+            NULL, /* class_data */
+            sizeof (CtkEcc),
+            0,    /* n_preallocs */
+            NULL, /* instance_init */
+        };
+
+        ctk_ecc_type =
+            g_type_register_static(GTK_TYPE_VBOX, "CtkEcc",
+                                   &ctk_ecc_info, 0);
+    }
+
+    return ctk_ecc_type;
+
+} /* ctk_ecc_get_type() */
+
+
+
+static void set_label_value(GtkWidget *widget, uint64_t val)
+{
+    gchar *s;
+
+    s = g_strdup_printf("%" PRIu64, val);
+    gtk_label_set_text(GTK_LABEL(widget), s);
+    g_free(s);
+}
+
+
+
+/*
+ * add_table_int_row() - helper function to add label-value pair to table.
+ */
+
+static GtkWidget *add_table_int_row(CtkConfig *ctk_config, GtkWidget *table,
+                                    const gchar *help, gchar *label1,
+                                    uint64_t val, gint row,
+                                    gboolean ecc_enabled)
+{
+    GtkWidget *hbox2, *label, *eventbox;
+
+    gtk_table_resize(GTK_TABLE(table), row+1, 2);
+    hbox2 = gtk_hbox_new(FALSE, 0);
+    gtk_table_attach(GTK_TABLE(table), hbox2, 0, 1, row, row+1,
+                     GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+
+    label = gtk_label_new(label1);
+    gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+    gtk_box_pack_start(GTK_BOX(hbox2), label, FALSE, FALSE, 0);
+    gtk_widget_set_sensitive(label, ecc_enabled);
+
+    eventbox = gtk_event_box_new();
+    gtk_table_attach(GTK_TABLE(table), eventbox, 1, 2, row, row+1,
+                     GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+
+    label = gtk_label_new(NULL);
+    set_label_value(label, val);
+    gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+    gtk_container_add(GTK_CONTAINER(eventbox), label);
+    ctk_config_set_tooltip(ctk_config, eventbox, help);
+    gtk_widget_set_sensitive(label, ecc_enabled);
+
+    return label;
+} /* add_table_int_row() */
+
+
+
+/*
+ * update_ecc_info() - update ECC status and configuration
+ */
+
+static gboolean update_ecc_info(gpointer user_data)
+{
+    CtkEcc *ctk_ecc = CTK_ECC(user_data);
+    int64_t val;
+    gint ecc_config;
+    ReturnStatus ret;
+
+    if ( ctk_ecc->ecc_enabled == FALSE ) {
+        goto end;
+    }
+    
+    /* Query ECC Errors */
+
+    if ( ctk_ecc->dbit_error ) {
+        ret = NvCtrlGetAttribute64(ctk_ecc->handle,
+                                   NV_CTRL_GPU_ECC_DOUBLE_BIT_ERRORS,
+                                   &val);
+        if ( ret != NvCtrlSuccess ) {
+            val = 0;
+        }
+        set_label_value(ctk_ecc->dbit_error, val);
+    }
+
+    if ( ctk_ecc->aggregate_dbit_error ) {
+        ret = NvCtrlGetAttribute64(ctk_ecc->handle,
+                                   NV_CTRL_GPU_ECC_AGGREGATE_DOUBLE_BIT_ERRORS,
+                                   &val);
+        if ( ret != NvCtrlSuccess ) {
+            val = 0;
+        }
+        set_label_value(ctk_ecc->aggregate_dbit_error, val);
+    }
+end:
+    /* Query ECC configuration */
+
+    if ( ctk_ecc->configuration_status ) {
+        ret = NvCtrlGetAttribute(ctk_ecc->handle,
+                                 NV_CTRL_GPU_ECC_CONFIGURATION,
+                                 &ecc_config);
+        if (ret != NvCtrlSuccess ||
+            ecc_config != NV_CTRL_GPU_ECC_CONFIGURATION_ENABLED) {
+            ecc_config = 0;
+        } else {
+            ecc_config = 1;
+        }
+        g_signal_handlers_block_by_func(G_OBJECT(ctk_ecc->configuration_status),
+                                        G_CALLBACK(ecc_config_button_toggled),
+                                        (gpointer) ctk_ecc);
+        gtk_toggle_button_set_active(
+                            GTK_TOGGLE_BUTTON(ctk_ecc->configuration_status),
+                            ecc_config);
+        g_signal_handlers_unblock_by_func(G_OBJECT(ctk_ecc->configuration_status),
+                                          G_CALLBACK(ecc_config_button_toggled),
+                                          (gpointer) ctk_ecc);
+    }
+    
+    return TRUE;
+} /* update_ecc_info() */
+
+
+
+/*
+ * reset_default_config_button_clicked() - callback function for reset default
+ * configuration button.
+ */
+
+static void reset_default_config_button_clicked(GtkWidget *widget,
+                                                gpointer user_data)
+{
+    gboolean status;
+    CtkEcc *ctk_ecc = CTK_ECC(user_data);
+    
+    /* get default status and set it to ECC configuration */
+    NvCtrlGetAttribute(ctk_ecc->handle,
+                       NV_CTRL_GPU_ECC_DEFAULT_CONFIGURATION,
+                       &status);
+    NvCtrlSetAttribute(ctk_ecc->handle,
+                       NV_CTRL_GPU_ECC_CONFIGURATION,
+                       status);
+    
+    ctk_config_statusbar_message(ctk_ecc->ctk_config,
+                                 "Set to default configuration.");
+} /* reset_default_config_button_clicked() */
+
+
+
+/* 
+ * clear_ecc_errors_button_clicked() - callback function for clear ecc errors
+ * button
+ */
+
+static void clear_ecc_errors_button_clicked(GtkWidget *widget,
+                                            gpointer user_data)
+{
+    CtkEcc *ctk_ecc = CTK_ECC(user_data);
+    
+    NvCtrlSetAttribute(ctk_ecc->handle,
+                       NV_CTRL_GPU_ECC_RESET_ERROR_STATUS,
+                       NV_CTRL_GPU_ECC_RESET_ERROR_STATUS_VOLATILE);
+    
+    ctk_config_statusbar_message(ctk_ecc->ctk_config,
+                                 "ECC errors cleared.");
+} /* clear_ecc_errors_button_clicked() */
+
+
+
+/*
+ * clear_aggregate_ecc_errors_button_clicked() - callback function for
+ * clear aggregate ecc errors button.
+ */
+
+static void clear_aggregate_ecc_errors_button_clicked(GtkWidget *widget,
+                                                      gpointer user_data)
+{
+    CtkEcc *ctk_ecc = CTK_ECC(user_data);
+    
+    NvCtrlSetAttribute(ctk_ecc->handle,
+                       NV_CTRL_GPU_ECC_RESET_ERROR_STATUS,
+                       NV_CTRL_GPU_ECC_RESET_ERROR_STATUS_AGGREGATE);
+    
+    ctk_config_statusbar_message(ctk_ecc->ctk_config,
+                                 "ECC aggregate errors cleared.");
+} /* clear_aggregate_ecc_errors_button_clicked() */
+
+
+
+/*
+ * ecc_config_button_toggled() - callback function for
+ * enable ECC checkbox.
+ */
+
+static void ecc_config_button_toggled(GtkWidget *widget,
+                                      gpointer user_data)
+{
+    gboolean enabled;
+    CtkEcc *ctk_ecc = CTK_ECC(user_data);
+    enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+
+    NvCtrlSetAttribute(ctk_ecc->handle,
+                       NV_CTRL_GPU_ECC_CONFIGURATION,
+                       enabled);
+    ctk_config_statusbar_message(ctk_ecc->ctk_config,
+                                 "ECC %s.",
+                                 enabled ? "enabled" : "disabled");
+} /* ecc_config_button_toggled() */
+
+
+
+GtkWidget* ctk_ecc_new(NvCtrlAttributeHandle *handle,
+                       CtkConfig *ctk_config,
+                       CtkEvent *ctk_event)
+{
+    GObject *object;
+    CtkEcc *ctk_ecc;
+    GtkWidget *hbox, *hbox2, *vbox, *hsep, *hseparator, *table;
+    GtkWidget *banner, *label, *eventbox;
+    int64_t dbit_error;
+    int64_t aggregate_dbit_error;
+    gint ecc_config_supported;
+    gint val, row = 0;
+    gboolean dbit_error_available;
+    gboolean aggregate_dbit_error_available;
+    gboolean ecc_enabled;
+    ReturnStatus ret;
+    gchar *ecc_enabled_string;
+
+    /* make sure we have a handle */
+
+    g_return_val_if_fail(handle != NULL, NULL);
+
+    /*
+     * check if ECC support available.
+     */
+
+    ret = NvCtrlGetAttribute(handle,
+                             NV_CTRL_GPU_ECC_SUPPORTED,
+                             &val);
+    if (ret != NvCtrlSuccess || val != NV_CTRL_GPU_ECC_SUPPORTED_TRUE) {
+       return NULL; 
+    }
+
+    /* create the CtkEcc object */
+
+    object = g_object_new(CTK_TYPE_ECC, NULL);
+    
+    ctk_ecc = CTK_ECC(object);
+    ctk_ecc->handle = handle;
+    ctk_ecc->ctk_config = ctk_config;
+
+    dbit_error_available = TRUE;
+    aggregate_dbit_error_available = TRUE;
+    
+    dbit_error = 0;
+    aggregate_dbit_error = 0;
+
+    /* Query ECC Status */
+
+    ret = NvCtrlGetAttribute(handle, NV_CTRL_GPU_ECC_STATUS,
+                             &val);
+    if (ret != NvCtrlSuccess || val == NV_CTRL_GPU_ECC_STATUS_DISABLED) {
+        ecc_enabled = FALSE;
+        ecc_enabled_string = "Disabled";
+    } else {
+        ecc_enabled = TRUE;
+        ecc_enabled_string = "Enabled";
+    }
+    ctk_ecc->ecc_enabled = ecc_enabled; 
+
+    /* Query ECC errors */
+    
+    ret = NvCtrlGetAttribute64(handle, NV_CTRL_GPU_ECC_DOUBLE_BIT_ERRORS,
+                             &dbit_error);
+    if ( ret != NvCtrlSuccess ) {
+        dbit_error_available = FALSE;
+    }
+    ret = NvCtrlGetAttribute64(handle,
+                             NV_CTRL_GPU_ECC_AGGREGATE_DOUBLE_BIT_ERRORS,
+                             &aggregate_dbit_error);
+    if ( ret != NvCtrlSuccess ) {
+        aggregate_dbit_error_available = FALSE;
+    }
+
+    /* Query ECC configuration supported */
+
+    ret = NvCtrlGetAttribute(handle,
+                             NV_CTRL_GPU_ECC_CONFIGURATION_SUPPORTED,
+                             &ecc_config_supported);
+    if ( ret != NvCtrlSuccess ) {
+        ecc_config_supported = 0;
+    }
+
+    /* set container properties for the CtkEcc widget */
+
+    gtk_box_set_spacing(GTK_BOX(ctk_ecc), 5);
+
+    /* banner */
+
+    banner = ctk_banner_image_new(BANNER_ARTWORK_GPU);
+    gtk_box_pack_start(GTK_BOX(object), banner, FALSE, FALSE, 0);
+
+    vbox = gtk_vbox_new(FALSE, 5);
+    gtk_box_pack_start(GTK_BOX(object), vbox, TRUE, TRUE, 0);
+
+    hbox = gtk_hbox_new(FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
+
+    label = gtk_label_new("ECC Status");
+    gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+
+    hseparator = gtk_hseparator_new();
+    gtk_box_pack_start(GTK_BOX(hbox), hseparator, TRUE, TRUE, 5);
+
+    table = gtk_table_new(1, 2, FALSE);
+    gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
+    gtk_table_set_row_spacings(GTK_TABLE(table), 3);
+    gtk_table_set_col_spacings(GTK_TABLE(table), 15);
+    gtk_container_set_border_width(GTK_CONTAINER(table), 5);
+
+    /* ECC Status */
+    hbox2 = gtk_hbox_new(FALSE, 0);
+    gtk_table_attach(GTK_TABLE(table), hbox2, 0, 1, row, row+1,
+                     GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+
+    label = gtk_label_new("ECC:");
+    gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+    gtk_box_pack_start(GTK_BOX(hbox2), label, FALSE, FALSE, 0);
+
+    eventbox = gtk_event_box_new();
+    gtk_table_attach(GTK_TABLE(table), eventbox, 1, 2, row, row+1,
+                     GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+
+    label = gtk_label_new(ecc_enabled_string);
+    gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+    gtk_container_add(GTK_CONTAINER(eventbox), label);
+    ctk_config_set_tooltip(ctk_config, eventbox, __ecc_status_help);
+    ctk_ecc->status = label;
+    
+    row += 3;
+    
+    /* Add ECC Errors */
+
+    if ( dbit_error_available ) {
+        ctk_ecc->dbit_error =
+            add_table_int_row(ctk_config, table, __dbit_error_help,
+                              "Double-bit ECC Errors:", dbit_error,
+                              row, ecc_enabled);
+        row += 3; // add vertical padding between rows
+    }
+    
+    if ( aggregate_dbit_error_available ) {
+        ctk_ecc->aggregate_dbit_error =
+            add_table_int_row(ctk_config, table, __aggregate_dbit_error_help,
+                              "Aggregate Double-bit ECC Errors:",
+                              aggregate_dbit_error, row, ecc_enabled);
+    }
+    
+    /* ECC configuration settings */
+
+    hbox = gtk_hbox_new(FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
+
+    label = gtk_label_new("ECC Configuration");
+    gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+
+    hsep = gtk_hseparator_new();
+    gtk_box_pack_start(GTK_BOX(hbox), hsep, TRUE, TRUE, 5);
+
+    hbox2 = gtk_hbox_new(FALSE, 0);
+    ctk_ecc->configuration_status =
+        gtk_check_button_new_with_label("Enable ECC");
+    gtk_box_pack_start(GTK_BOX(hbox2),
+                       ctk_ecc->configuration_status, FALSE, FALSE, 0);
+    gtk_container_set_border_width(GTK_CONTAINER(hbox2), 5);
+    gtk_box_pack_start(GTK_BOX(vbox), hbox2, FALSE, FALSE, 0);
+    ctk_config_set_tooltip(ctk_config, ctk_ecc->configuration_status,
+                           __configuration_status_help);
+    g_signal_connect(G_OBJECT(ctk_ecc->configuration_status), "clicked",
+                     G_CALLBACK(ecc_config_button_toggled),
+                     (gpointer) ctk_ecc);
+    gtk_widget_set_sensitive(ctk_ecc->configuration_status, ecc_config_supported);
+
+    hbox = gtk_hbox_new(FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(ctk_ecc), hbox, FALSE, FALSE, 0);
+    
+    /* Add buttons */
+
+    if ( dbit_error_available ) {
+        ctk_ecc->clear_button = gtk_button_new_with_label("Clear ECC Errors");
+        gtk_box_pack_end(GTK_BOX(hbox), ctk_ecc->clear_button, FALSE, FALSE, 0);
+        ctk_config_set_tooltip(ctk_config, ctk_ecc->clear_button,
+                               __clear_button_help);
+        gtk_widget_set_sensitive(ctk_ecc->clear_button, ecc_enabled);
+        g_signal_connect(G_OBJECT(ctk_ecc->clear_button), "clicked",
+                         G_CALLBACK(clear_ecc_errors_button_clicked),
+                         (gpointer) ctk_ecc);
+    }
+
+    if ( aggregate_dbit_error_available ) {
+        ctk_ecc->clear_aggregate_button =
+            gtk_button_new_with_label("Clear Aggregate ECC Errors");
+        gtk_box_pack_end(GTK_BOX(hbox), ctk_ecc->clear_aggregate_button,
+                         FALSE, FALSE, 0);
+        ctk_config_set_tooltip(ctk_config, ctk_ecc->clear_button,
+                               __clear_aggregate_button_help);
+        gtk_widget_set_sensitive(ctk_ecc->clear_aggregate_button, ecc_enabled);
+        g_signal_connect(G_OBJECT(ctk_ecc->clear_aggregate_button),
+                         "clicked",
+                         G_CALLBACK(clear_aggregate_ecc_errors_button_clicked),
+                         (gpointer) ctk_ecc);
+    }
+
+    ctk_ecc->reset_default_config_button =
+        gtk_button_new_with_label("Reset Default Configuration");
+    eventbox = gtk_event_box_new();
+    gtk_container_add(GTK_CONTAINER(eventbox),
+                      ctk_ecc->reset_default_config_button);
+    gtk_box_pack_end(GTK_BOX(hbox), eventbox, FALSE, FALSE, 5);
+    ctk_config_set_tooltip(ctk_config, ctk_ecc->reset_default_config_button,
+                           __reset_default_config_button_help);
+    gtk_widget_set_sensitive(ctk_ecc->reset_default_config_button,
+                             ecc_config_supported && ecc_enabled);
+    g_signal_connect(G_OBJECT(ctk_ecc->reset_default_config_button),
+                     "clicked",
+                     G_CALLBACK(reset_default_config_button_clicked),
+                     (gpointer) ctk_ecc);
+
+    /* Register a timer callback to update Ecc status info */
+
+    ctk_config_add_timer(ctk_ecc->ctk_config,
+                         DEFAULT_UPDATE_ECC_STATUS_INFO_TIME_INTERVAL,
+                         "ECC Settings",
+                         (GSourceFunc) update_ecc_info,
+                         (gpointer) ctk_ecc);
+    
+    gtk_widget_show_all(GTK_WIDGET(ctk_ecc));
+
+    update_ecc_info(ctk_ecc);
+
+    return GTK_WIDGET(ctk_ecc);
+}
+
+GtkTextBuffer *ctk_ecc_create_help(GtkTextTagTable *table,
+                                       CtkEcc *ctk_ecc)
+{
+    GtkTextIter i;
+    GtkTextBuffer *b;
+
+    b = gtk_text_buffer_new(table);
+    
+    gtk_text_buffer_get_iter_at_offset(b, &i, 0);
+
+    ctk_help_heading(b, &i, "ECC Settings Help");
+    ctk_help_para(b, &i, __ecc_settings_help);
+    
+    ctk_help_heading(b, &i, "ECC");
+    ctk_help_para(b, &i, __ecc_status_help);
+
+    ctk_help_heading(b, &i, "Double-bit ECC Errors");
+    ctk_help_para(b, &i, __dbit_error_help);
+
+    ctk_help_heading(b, &i, "Aggregate Double-bit ECC Errors");
+    ctk_help_para(b, &i, __aggregate_dbit_error_help);
+
+    ctk_help_heading(b, &i, "ECC Configuration");
+    ctk_help_para(b, &i, __configuration_status_help);
+
+    ctk_help_heading(b, &i, "Enable ECC");
+    ctk_help_para(b, &i, __ecc_status_help);
+
+    ctk_help_heading(b, &i, "Reset Default Configuration");
+    ctk_help_para(b, &i, __reset_default_config_button_help);
+
+    ctk_help_heading(b, &i, "Clear Aggregate ECC Errors");
+    ctk_help_para(b, &i, __clear_aggregate_button_help);
+
+    ctk_help_heading(b, &i, "Clear ECC Errors");
+    ctk_help_para(b, &i, __clear_button_help);
+
+
+
+    ctk_help_finish(b);
+
+    return b;
+}
+
+void ctk_ecc_start_timer(GtkWidget *widget)
+{
+    CtkEcc *ctk_ecc = CTK_ECC(widget);
+
+    /* Start the ECC timer */
+
+    ctk_config_start_timer(ctk_ecc->ctk_config,
+                           (GSourceFunc) update_ecc_info,
+                           (gpointer) ctk_ecc);
+}
+
+void ctk_ecc_stop_timer(GtkWidget *widget)
+{
+    CtkEcc *ctk_ecc = CTK_ECC(widget);
+
+    /* Stop the ECC timer */
+
+    ctk_config_stop_timer(ctk_ecc->ctk_config,
+                          (GSourceFunc) update_ecc_info,
+                          (gpointer) ctk_ecc);
+}

Added: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkecc.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkecc.h?rev=886&op=file
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkecc.h (added)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkecc.h Tue May 18 08:52:05 2010
@@ -1,0 +1,89 @@
+/*
+ * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
+ * and Linux systems.
+ *
+ * Copyright (C) 2009 NVIDIA Corporation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of Version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See Version 2
+ * of the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the:
+ *
+ *           Free Software Foundation, Inc.
+ *           59 Temple Place - Suite 330
+ *           Boston, MA 02111-1307, USA
+ *
+ */
+
+#ifndef __CTK_ECC_H__
+#define __CTK_ECC_H__
+
+#include "NvCtrlAttributes.h"
+#include "ctkevent.h"
+#include "ctkconfig.h"
+
+G_BEGIN_DECLS
+
+#define CTK_TYPE_ECC (ctk_ecc_get_type())
+
+#define CTK_ECC(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST ((obj), CTK_TYPE_ECC, CtkEcc))
+
+#define CTK_ECC_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST ((klass), CTK_TYPE_ECC, CtkEccClass))
+
+#define CTK_IS_ECC(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CTK_TYPE_ECC))
+
+#define CTK_IS_ECC_CLASS(class) \
+    (G_TYPE_CHECK_CLASS_TYPE ((klass), CTK_TYPE_ECC))
+
+#define CTK_ECC_GET_CLASS(obj) \
+    (G_TYPE_INSTANCE_GET_CLASS ((obj), CTK_TYPE_ECC, CtkEccClass))
+
+
+typedef struct _CtkEcc       CtkEcc;
+typedef struct _CtkEccClass  CtkEccClass;
+
+struct _CtkEcc
+{
+    GtkVBox parent;
+
+    NvCtrlAttributeHandle *handle;
+    CtkConfig *ctk_config;
+
+    GtkWidget* status;
+    GtkWidget* dbit_error;
+    GtkWidget* aggregate_dbit_error;
+    GtkWidget* ecc_config_supported;
+    GtkWidget* clear_button;
+    GtkWidget* clear_aggregate_button;
+    GtkWidget* reset_default_config_button;
+    GtkWidget* configuration_status;
+
+    gboolean ecc_enabled;
+
+};
+
+struct _CtkEccClass
+{
+    GtkVBoxClass parent_class;
+};
+
+GType          ctk_ecc_get_type    (void) G_GNUC_CONST;
+GtkWidget*     ctk_ecc_new         (NvCtrlAttributeHandle *, CtkConfig *, CtkEvent *);
+GtkTextBuffer* ctk_ecc_create_help (GtkTextTagTable *, CtkEcc *);
+
+void           ctk_ecc_start_timer (GtkWidget *);
+void           ctk_ecc_stop_timer  (GtkWidget *);
+
+G_END_DECLS
+
+#endif /* __CTK_ECC_H__ */

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkevent.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkevent.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkevent.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkevent.c Tue May 18 08:52:05 2010
@@ -287,12 +287,19 @@
     MAKE_SIGNAL(NV_CTRL_THERMAL_COOLER_LEVEL_SET_DEFAULT);
     MAKE_SIGNAL(NV_CTRL_THERMAL_COOLER_CONTROL_TYPE);
     MAKE_SIGNAL(NV_CTRL_THERMAL_COOLER_TARGET);
+    MAKE_SIGNAL(NV_CTRL_GPU_ECC_CONFIGURATION);
     MAKE_SIGNAL(NV_CTRL_GPU_POWER_MIZER_MODE);
     MAKE_SIGNAL(NV_CTRL_GVI_SYNC_OUTPUT_FORMAT);
     MAKE_SIGNAL(NV_CTRL_GVI_MAX_CHANNELS_PER_JACK);
     MAKE_SIGNAL(NV_CTRL_GVI_MAX_STREAMS);
     MAKE_SIGNAL(NV_CTRL_GVI_NUM_CAPTURE_SURFACES);
     MAKE_SIGNAL(NV_CTRL_OVERSCAN_COMPENSATION);
+    MAKE_SIGNAL(NV_CTRL_GPU_PCIE_GENERATION);
+    MAKE_SIGNAL(NV_CTRL_GVI_BOUND_GPU);
+    MAKE_SIGNAL(NV_CTRL_ACCELERATE_TRAPEZOIDS);
+    MAKE_SIGNAL(NV_CTRL_GPU_CORES);
+    MAKE_SIGNAL(NV_CTRL_GPU_MEMORY_BUS_WIDTH);
+    MAKE_SIGNAL(NV_CTRL_GVI_TEST_MODE);
 
 #undef MAKE_SIGNAL
     
@@ -303,7 +310,7 @@
      * knows about.
      */
 
-#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_OVERSCAN_COMPENSATION
+#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_GVI_TEST_MODE
 #warning "There are attributes that do not emit signals!"
 #endif
 

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkframelock.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkframelock.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkframelock.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkframelock.c Tue May 18 08:52:05 2010
@@ -1362,7 +1362,7 @@
 
     /* G-Sync Buttons */
     gtk_widget_set_sensitive(ctk_framelock->remove_devices_button,
-                             tree->nentries);
+                             (tree->selected_entry==NULL)?FALSE:TRUE);
 
     gtk_widget_set_sensitive(ctk_framelock->extra_info_button,
                              tree->nentries);
@@ -1618,6 +1618,9 @@
     }
     if (entry != entry->tree->selected_entry) {
         list_entry_set_select(entry, True);
+
+        /* Update GUI state */
+        update_framelock_controls(entry->tree->ctk_framelock);
     }
 }
 

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkglx.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkglx.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkglx.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkglx.c Tue May 18 08:52:05 2010
@@ -49,7 +49,7 @@
 static const char * __vid_help  =
   "vid (XVisual ID) -  ID of the associated X Visual.";
 static const char * __vt_help  =
-  "vt (XVisual Type) -  Type of the associated X Visual. "
+  "vt (XVisual Type) -  Type of the associated X Visual.  "
   "Possible X visual types are 'tc', 'dc', 'pc', 'sc', 'gs', 'sg' and '.' "
   "which mean TrueColor, DirectColor, PseudoColor, StaticColor, GrayScale, "
   "StaticGray and None, respectively.";
@@ -72,16 +72,16 @@
   "st (Stereo buffer) - 'y' if the configuration has left and right color "
   "buffers that are rendered to in stereo.  '-' if this is not supported.";
 static const char * __rs_help =
-  "rs (Red size) - Number of bits per color used for red. "
+  "rs (Red size) - Number of bits per color used for red.  "
   "Undefined for configurations that use color indexing.";
 static const char * __gs_help =
-  "gs (Green size) - Number of bits per color used for green. "
+  "gs (Green size) - Number of bits per color used for green.  "
   "Undefined for configurations that use color indexing.";
 static const char * __bs_help =
-  "bs (Blue size) - Number of bits per color used for blue. "
+  "bs (Blue size) - Number of bits per color used for blue.  "
   "Undefined for configurations that use color indexing.";
 static const char * __as_help =
-  "as (Alpha size) - Number of bits per color used for alpha. "
+  "as (Alpha size) - Number of bits per color used for alpha.  "
   "Undefined for configurations that use color indexing.";
 static const char * __aux_help =
   "aux (Auxiliary buffers) - Number of available auxiliary color buffers.";
@@ -111,7 +111,7 @@
   "cav (Caveats) - Caveats for this configuration.  A frame buffer "
   "configuration may have the following caveats: 'NonC' if it supports "
   "any non-conformant visual extension.  'Slow' if it has reduced "
-  "preformance. '-' if it has no caveats.";
+  "preformance.  '-' if it has no caveats.";
 static const char * __pbw_help =
   "pbw (Pbuffer width) - Width of pbuffer (in hexadecimal).";
 static const char * __pbh_help =

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=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgpu.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgpu.c Tue May 18 08:52:05 2010
@@ -125,38 +125,62 @@
                           gchar **bus,
                           gchar **pci_bus_id)
 {
-    int tmp, ret;
+    int tmp, ret, bus_type;
     int pci_domain, pci_bus, pci_device, pci_func;
-    gchar *bus_type, *bus_rate, *bus_id;
+    gchar *bus_type_str, *bus_rate, *pcie_gen, *bus_id;
     gchar *__pci_bus_id_unknown = "?@?:?:?";
     
     /* NV_CTRL_BUS_TYPE */
 
-    ret = NvCtrlGetAttribute(handle, NV_CTRL_BUS_TYPE, &tmp);
-    bus_type = NULL;
+    bus_type = 0xffffffff;
+    bus_type_str = "Unknown";
+    ret = NvCtrlGetAttribute(handle, NV_CTRL_BUS_TYPE, &bus_type);
     if (ret == NvCtrlSuccess) {
-        if      (tmp == NV_CTRL_BUS_TYPE_AGP) bus_type = "AGP";
-        else if (tmp == NV_CTRL_BUS_TYPE_PCI) bus_type = "PCI";
-        else if (tmp == NV_CTRL_BUS_TYPE_PCI_EXPRESS) bus_type = "PCI Express";
-        else if (tmp == NV_CTRL_BUS_TYPE_INTEGRATED) bus_type = "Integrated";
+        if      (bus_type == NV_CTRL_BUS_TYPE_AGP)
+            bus_type_str = "AGP";
+        else if (bus_type == NV_CTRL_BUS_TYPE_PCI)
+            bus_type_str = "PCI";
+        else if (bus_type == NV_CTRL_BUS_TYPE_PCI_EXPRESS)
+            bus_type_str = "PCI Express";
+        else if (bus_type == NV_CTRL_BUS_TYPE_INTEGRATED)
+            bus_type_str = "Integrated";
     }
 
     /* NV_CTRL_BUS_RATE */
 
     bus_rate = NULL;
-    if (tmp == NV_CTRL_BUS_TYPE_AGP ||
-        tmp == NV_CTRL_BUS_TYPE_PCI_EXPRESS) {
+    if (bus_type == NV_CTRL_BUS_TYPE_AGP ||
+        bus_type == NV_CTRL_BUS_TYPE_PCI_EXPRESS) {
         ret = NvCtrlGetAttribute(handle, NV_CTRL_BUS_RATE, &tmp);
         if (ret == NvCtrlSuccess) {
-            bus_rate = g_strdup_printf("%dX", tmp);
+            if (bus_type == NV_CTRL_BUS_TYPE_PCI_EXPRESS) {
+                bus_rate = g_strdup_printf("x%u", tmp);
+            } else {
+                bus_rate = g_strdup_printf("%uX", tmp);
+            }
         }
     }
 
-    if (bus_rate) {
-        *bus = g_strdup_printf("%s %s", bus_type, bus_rate);
+    /* NV_CTRL_GPU_PCIE_GENERATION */
+
+    pcie_gen = NULL;
+    if (bus_type == NV_CTRL_BUS_TYPE_PCI_EXPRESS) {
+        ret = NvCtrlGetAttribute(handle, NV_CTRL_GPU_PCIE_GENERATION, &tmp);
+        if (ret == NvCtrlSuccess)
+            pcie_gen = g_strdup_printf("Gen%u", tmp);
+    }
+
+    /* concatenate all the available bus related information */
+
+    if (bus_rate || pcie_gen) {
+        *bus = g_strdup_printf("%s %s%s%s", bus_type_str,
+                               bus_rate ? bus_rate : "",
+                               bus_rate ? " " : "",
+                               pcie_gen ? pcie_gen : "");
         g_free(bus_rate);
+        g_free(pcie_gen);
     } else {
-        *bus = g_strdup(bus_type);
+        *bus = g_strdup(bus_type_str);
     }
 
     /* NV_CTRL_PCI_DOMAIN & NV_CTRL_PCI_BUS &
@@ -221,12 +245,16 @@
     gchar *screens;
     gchar *displays;
     gchar *tmp_str;
+    gchar *gpu_cores;
+    gchar *memory_interface;
 
     unsigned int display_devices;
     int xinerama_enabled;
     int *pData;
     int len;
     int i;
+    int row = 0;
+    int total_rows = 19;
 
 
     /*
@@ -282,7 +310,25 @@
     } else {
         video_ram = g_strdup_printf("%d MB", tmp >> 10);
     }
-
+    
+    /* NV_CTRL_GPU_CORES */
+
+    ret = NvCtrlGetAttribute(handle, NV_CTRL_GPU_CORES, &tmp);
+    if (ret != NvCtrlSuccess) {
+        gpu_cores = NULL;
+    } else {
+        gpu_cores = g_strdup_printf("%d", tmp);
+    }
+
+    /* NV_CTRL_GPU_MEMORY_BUS_WIDTH  */
+
+    ret = NvCtrlGetAttribute(handle, NV_CTRL_GPU_MEMORY_BUS_WIDTH, &tmp);
+    if (ret != NvCtrlSuccess) {
+        memory_interface = NULL;
+    } else {
+        memory_interface = g_strdup_printf("%d-bit", tmp);
+    }
+    
     /* NV_CTRL_IRQ */
     
     ret = NvCtrlGetAttribute(handle, NV_CTRL_IRQ, &tmp);
@@ -363,6 +409,8 @@
     /* cache the attribute handle */
 
     ctk_gpu->handle = handle;
+    ctk_gpu->gpu_cores = (gpu_cores != NULL) ? 1 : 0;
+    ctk_gpu->memory_interface = (memory_interface != NULL) ? 1 : 0;
 
     /* set container properties of the object */
 
@@ -393,44 +441,59 @@
     hseparator = gtk_hseparator_new();
     gtk_box_pack_start(GTK_BOX(hbox), hseparator, TRUE, TRUE, 5);
 
-    table = gtk_table_new(19, 2, FALSE);
+    table = gtk_table_new(total_rows, 2, FALSE);
     gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
     gtk_table_set_row_spacings(GTK_TABLE(table), 3);
     gtk_table_set_col_spacings(GTK_TABLE(table), 15);
     gtk_container_set_border_width(GTK_CONTAINER(table), 5);
 
-    add_table_row(table, 0,
+    add_table_row(table, row++,
                   0, 0.5, "Graphics Processor:",
                   0, 0.5, product_name);
-    add_table_row(table, 1,
+    if ( ctk_gpu->gpu_cores ) {
+        gtk_table_resize(GTK_TABLE(table), ++total_rows, 2);
+        add_table_row(table, row++,
+                      0, 0.5, "CUDA Cores:",
+                      0, 0.5, gpu_cores);
+    }
+    add_table_row(table, row++,
                   0, 0.5, "VBIOS Version:",
                   0, 0.5, vbios_version);
-    add_table_row(table, 2,
+    add_table_row(table, row++,
                   0, 0.5, "Memory:",
                   0, 0.5, video_ram);
+    if ( ctk_gpu->memory_interface ) {
+        gtk_table_resize(GTK_TABLE(table), ++total_rows, 2);
+        add_table_row(table, row++,
+                      0, 0.5, "Memory Interface:",
+                      0, 0.5, memory_interface);
+    }
     /* spacing */
-    add_table_row(table, 6,
+    row += 3;
+    add_table_row(table, row++,
                   0, 0.5, "Bus Type:",
                   0, 0.5, bus);
-    add_table_row(table, 7,
+    add_table_row(table, row++,
                   0, 0.5, "Bus ID:",
                   0, 0.5, pci_bus_id);
-    add_table_row(table, 8,
+    add_table_row(table, row++,
                   0, 0.5, "PCI Device ID:",
                   0, 0.5, pci_device_id);
-    add_table_row(table, 9,
+    add_table_row(table, row++,
                   0, 0.5, "PCI Vendor ID:",
                   0, 0.5, pci_vendor_id);
-    add_table_row(table, 10,
+    add_table_row(table, row++,
                   0, 0.5, "IRQ:",
                   0, 0.5, irq);
     /* spacing */
-    add_table_row(table, 14,
+    row += 3;
+    add_table_row(table, row++,
                   0, 0, "X Screens:",
                   0, 0, screens);
     /* spacing */
+    row += 3;
     ctk_gpu->displays =
-        add_table_row(table, 18,
+        add_table_row(table, row,
                       0, 0, "Display Devices:",
                       0, 0, displays);
 
@@ -438,6 +501,8 @@
     XFree(vbios_version);
     g_free(video_ram);
     g_free(bus);
+    g_free(gpu_cores);
+    g_free(memory_interface);
     g_free(pci_bus_id);
     g_free(irq);
     g_free(screens);
@@ -456,7 +521,8 @@
 }
 
     
-GtkTextBuffer *ctk_gpu_create_help(GtkTextTagTable *table)
+GtkTextBuffer *ctk_gpu_create_help(GtkTextTagTable *table, 
+                                   CtkGpu *ctk_gpu)
 {
     GtkTextIter i;
     GtkTextBuffer *b;
@@ -474,6 +540,12 @@
     
     ctk_help_heading(b, &i, "Graphics Processor");
     ctk_help_para(b, &i, "This is the product name of the GPU.");
+    
+    if (ctk_gpu->gpu_cores) {
+        ctk_help_heading(b, &i, "CUDA Cores");
+        ctk_help_para(b, &i, "This is the number of CUDA cores supported by "
+                      "the graphics pipeline.");
+    }
     
     ctk_help_heading(b, &i, "VBIOS Version");
     ctk_help_para(b, &i, "This is the Video BIOS version.");
@@ -487,6 +559,12 @@
                   "dedicated system memory set aside by the system "
                   "BIOS for use by the integrated GPU.");
 
+    if (ctk_gpu->memory_interface) {
+        ctk_help_heading(b, &i, "Memory Interface");
+        ctk_help_para(b, &i, "This is the bus bandwidth of the GPU's "
+                      "memory interface.");
+    }
+
     ctk_help_heading(b, &i, "Bus Type");
     ctk_help_para(b, &i, "This is the bus type which is "
                   "used to connect the NVIDIA GPU to the rest of "
@@ -495,8 +573,8 @@
     
     ctk_help_heading(b, &i, "Bus ID");
     ctk_help_para(b, &i, "This is the GPU's PCI identification string, "
-                  "reported in the form 'bus:device:function'. It uniquely "
-                  "identifies the GPU's location in the host system. "
+                  "reported in the form 'bus:device:function'.  It uniquely "
+                  "identifies the GPU's location in the host system.  "
                   "This string can be used as-is with the 'BusID' X "
                   "configuration file option to unambiguously associate "
                   "Device sections with this GPU.");

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgpu.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkgpu.h?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgpu.h (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgpu.h Tue May 18 08:52:05 2010
@@ -62,6 +62,8 @@
     NvCtrlAttributeHandle *handle;
 
     GtkWidget *displays;
+    gint gpu_cores;
+    gint memory_interface;
 };
 
 struct _CtkGpuClass
@@ -78,7 +80,8 @@
                           gchar **bus,
                           gchar **pci_bus_id);
 
-GtkTextBuffer *ctk_gpu_create_help(GtkTextTagTable *);
+GtkTextBuffer *ctk_gpu_create_help(GtkTextTagTable *,
+                                   CtkGpu *);
 
 
 

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvi.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkgvi.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvi.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvi.c Tue May 18 08:52:05 2010
@@ -125,6 +125,7 @@
     int color_space;
     int bpc;
     int link_id;
+    unsigned int smpte352_id;
 } ChannelInfo;
 
 
@@ -174,6 +175,14 @@
                                     &(channel_info->link_id));
     if (ret != NvCtrlSuccess) {
         channel_info->link_id = NV_CTRL_GVI_LINK_ID_UNKNOWN;
+    }
+
+    ret = NvCtrlGetDisplayAttribute(ctk_gvi->handle,
+                                    jack_channel,
+                                    NV_CTRL_GVI_DETECTED_CHANNEL_SMPTE352_IDENTIFIER,
+                                    &(channel_info->smpte352_id));
+    if (ret != NvCtrlSuccess) {
+        channel_info->smpte352_id = 0x0;
     }
 }
 
@@ -356,7 +365,7 @@
     box = gtk_hbox_new(FALSE, 0);
     gtk_box_pack_start(GTK_BOX(vbox), box, FALSE, FALSE, 0);
 
-    table = gtk_table_new(5, 2, FALSE);
+    table = gtk_table_new(6, 2, FALSE);
     gtk_table_set_row_spacings(GTK_TABLE(table), 5);
     gtk_table_set_col_spacings(GTK_TABLE(table), 5);
 
@@ -429,6 +438,16 @@
     gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
     gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 4, 5);
     g_free(label_str);
+
+    label = gtk_label_new("SMPTE 352 Payload Identifier:");
+    gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+    gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 5, 6);
+
+    label_str = g_strdup_printf("0x%08x", channel_info.smpte352_id);
+    label = gtk_label_new(label_str);
+    gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+    gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 5, 6);
+    g_free(label_str);
 }
 
 
@@ -475,15 +494,40 @@
     update_sdi_input_info(ctk_gvi);
 }
 
+static gchar* gpu_name_string(gint gpu, CtrlHandles *handle)
+{
+    gchar *gpu_name;
+
+    if ((gpu < 0) || (gpu >= handle->targets[GPU_TARGET].n)) {
+        gpu_name = g_strdup_printf("None");
+    } else {
+        NvCtrlAttributeHandle *gpu_handle = handle->targets[GPU_TARGET].t[gpu].h;
+        gpu_name = create_gpu_name_string(gpu_handle);
+    }
+    return gpu_name;
+}
+
+static void bound_gpu_changed(GtkObject *object, gpointer arg1,
+                              gpointer user_data)
+{
+    CtkGvi *ctk_gvi = (CtkGvi *) user_data;
+    CtkEventStruct *event_struct = (CtkEventStruct *) arg1;
+    gchar *gpu_name;
+
+    gpu_name = gpu_name_string(event_struct->value, ctk_gvi->ctk_config->pCtrlHandles);
+    
+    gtk_label_set_label(GTK_LABEL(ctk_gvi->gpu_name), gpu_name);
+}
 
 GtkWidget* ctk_gvi_new(NvCtrlAttributeHandle *handle,
-                       CtkConfig *ctk_config)
+                       CtkConfig *ctk_config,
+                       CtkEvent *ctk_event)
 {
     GObject *object;
     CtkGvi *ctk_gvi;
     GtkWidget *hbox, *vbox, *hsep, *hseparator, *table, *button;
     GtkWidget *banner, *label;
-    gchar *bus, *pci_bus_id, *irq;
+    gchar *bus, *pci_bus_id, *irq, *gpu_name;
     int tmp;
     ReturnStatus ret;
     gchar *firmware_version; 
@@ -518,7 +562,15 @@
     } else {
         irq = g_strdup_printf("%d", tmp);
     }
-    
+   
+    /* NV_CTRL_GVI_BOUND_GPU */
+
+    ret = NvCtrlGetAttribute(handle, NV_CTRL_GVI_BOUND_GPU, &tmp);
+    if (ret != NvCtrlSuccess) {
+        tmp = -1;
+    }
+    gpu_name = gpu_name_string(tmp, ctk_config->pCtrlHandles);
+
     /* create the CtkGvi object */
 
     object = g_object_new(CTK_TYPE_GVI, NULL);
@@ -563,7 +615,7 @@
     hseparator = gtk_hseparator_new();
     gtk_box_pack_start(GTK_BOX(hbox), hseparator, TRUE, TRUE, 5);
 
-    table = gtk_table_new(6, 2, FALSE);
+    table = gtk_table_new(8, 2, FALSE);
     gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
     gtk_table_set_row_spacings(GTK_TABLE(table), 3);
     gtk_table_set_col_spacings(GTK_TABLE(table), 15);
@@ -583,10 +635,25 @@
     add_table_row(table, 5,
                   0, 0.5, "IRQ:",
                   0, 0.5, irq);
+    
+    label = gtk_label_new("Bound GPU:");
+    gtk_label_set_selectable(GTK_LABEL(label), TRUE);
+    gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+    gtk_table_attach(GTK_TABLE(table), label, 0, 1, 7, 8,
+                     GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    label = gtk_label_new(gpu_name);
+    gtk_label_set_selectable(GTK_LABEL(label), TRUE);
+    gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+    gtk_table_attach(GTK_TABLE(table), label, 1, 2, 7, 8,
+                     GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    ctk_gvi->gpu_name = label;
+    
     g_free(firmware_version);
     g_free(bus);
     g_free(pci_bus_id);
     g_free(irq);
+    g_free(gpu_name);
 
 
     hbox = gtk_hbox_new(FALSE, 0);
@@ -636,6 +703,11 @@
                      G_CALLBACK(show_detailed_info_button_toggled),
                      GTK_OBJECT(ctk_gvi));
 
+    g_signal_connect(G_OBJECT(ctk_event),
+                     CTK_EVENT_NAME(NV_CTRL_GVI_BOUND_GPU),
+                     G_CALLBACK(bound_gpu_changed),
+                     (gpointer) ctk_gvi);
+
     gtk_widget_show_all(GTK_WIDGET(ctk_gvi));
 
     update_sdi_input_info(ctk_gvi);

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvi.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkgvi.h?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvi.h (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvi.h Tue May 18 08:52:05 2010
@@ -26,6 +26,7 @@
 #define __CTK_GVI_H__
 
 #include "NvCtrlAttributes.h"
+#include "ctkevent.h"
 #include "ctkconfig.h"
 
 G_BEGIN_DECLS
@@ -61,6 +62,8 @@
     int num_jacks;
     int max_channels_per_jack;
 
+    GtkWidget *gpu_name;
+
     GtkWidget *jack_channel_omenu;
 
     GtkWidget *input_info_vbox;
@@ -75,7 +78,8 @@
 };
 
 GType          ctk_gvi_get_type    (void) G_GNUC_CONST;
-GtkWidget*     ctk_gvi_new         (NvCtrlAttributeHandle *, CtkConfig *);
+GtkWidget*     ctk_gvi_new         (NvCtrlAttributeHandle *, CtkConfig *,
+                                    CtkEvent *);
 GtkTextBuffer* ctk_gvi_create_help (GtkTextTagTable *, CtkGvi *);
 
 void           ctk_gvi_start_timer (GtkWidget *);

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvo-sync.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkgvo-sync.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvo-sync.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvo-sync.c Tue May 18 08:52:05 2010
@@ -1519,7 +1519,7 @@
     ctk_help_heading(b, &i, "Input Video Format Detect");
     ctk_help_para(b, &i, __input_video_format_detect_help);
     ctk_help_heading(b, &i, "Composite Termination");
-    ctk_help_para(b, &i, "%s. This allows the composite signal to be daisy "
+    ctk_help_para(b, &i, "%s.  This allows the composite signal to be daisy "
                   "chained from a server load.",
                   __composite_termination_help);
     ctk_help_heading(b, &i, "Sync Mode");

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvo.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkgvo.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvo.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvo.c Tue May 18 08:52:05 2010
@@ -183,10 +183,32 @@
     { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_25_00_SMPTE372,     "2048 x 1080p   25.00  Hz  (SMPTE372)"    },
     { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_29_97_SMPTE372,     "2048 x 1080p   29.97  Hz  (SMPTE372)"    },
     { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_30_00_SMPTE372,     "2048 x 1080p   30.00  Hz  (SMPTE372)"    },
-    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_50_00_3G_LEVEL_A_SMPTE274, "1920 x 1080p   50.00  Hz  (SMPTE274) 3G LEVEL A" },
-    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_59_94_3G_LEVEL_A_SMPTE274, "1920 x 1080p   59.94  Hz  (SMPTE274) 3G LEVEL A" },
-    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_60_00_3G_LEVEL_A_SMPTE274, "1920 x 1080p   60.00  Hz  (SMPTE274) 3G LEVEL A" },
-
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_50_00_3G_LEVEL_A_SMPTE274, "1920 x 1080p   50.00  Hz  (SMPTE274) 3G Level A" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_59_94_3G_LEVEL_A_SMPTE274, "1920 x 1080p   59.94  Hz  (SMPTE274) 3G Level A" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_60_00_3G_LEVEL_A_SMPTE274, "1920 x 1080p   60.00  Hz  (SMPTE274) 3G Level A" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_60_00_3G_LEVEL_B_SMPTE274, "1920 x 1080p   60.00  Hz  (SMPTE274) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_60_00_3G_LEVEL_B_SMPTE274, "1920 x 1080i   60.00  Hz  (SMPTE274) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_60_00_3G_LEVEL_B_SMPTE372, "2048 x 1080i   60.00  Hz  (SMPTE372) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_50_00_3G_LEVEL_B_SMPTE274, "1920 x 1080p   50.00  Hz  (SMPTE274) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_50_00_3G_LEVEL_B_SMPTE274, "1920 x 1080i   50.00  Hz  (SMPTE274) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_50_00_3G_LEVEL_B_SMPTE372, "2048 x 1080i   50.00  Hz  (SMPTE372) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_30_00_3G_LEVEL_B_SMPTE274, "1920 x 1080p   30.00  Hz  (SMPTE274) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_30_00_3G_LEVEL_B_SMPTE372, "2048 x 1080p   30.00  Hz  (SMPTE372) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_25_00_3G_LEVEL_B_SMPTE274, "1920 x 1080p   25.00  Hz  (SMPTE274) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_25_00_3G_LEVEL_B_SMPTE372, "2048 x 1080p   25.00  Hz  (SMPTE372) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_24_00_3G_LEVEL_B_SMPTE274, "1920 x 1080p   24.00  Hz  (SMPTE274) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_24_00_3G_LEVEL_B_SMPTE372, "2048 x 1080p   24.00  Hz  (SMPTE372) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_48_00_3G_LEVEL_B_SMPTE274, "1920 x 1080i   48.00  Hz  (SMPTE274) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_48_00_3G_LEVEL_B_SMPTE372, "2048 x 1080i   48.00  Hz  (SMPTE372) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_59_94_3G_LEVEL_B_SMPTE274, "1920 x 1080p   59.94  Hz  (SMPTE274) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_59_94_3G_LEVEL_B_SMPTE274, "1920 x 1080i   59.94  Hz  (SMPTE274) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_59_94_3G_LEVEL_B_SMPTE372, "2048 x 1080i   59.94  Hz  (SMPTE372) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_29_97_3G_LEVEL_B_SMPTE274, "1920 x 1080p   29.97  Hz  (SMPTE274) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_29_97_3G_LEVEL_B_SMPTE372, "2048 x 1080p   29.97  Hz  (SMPTE372) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_23_98_3G_LEVEL_B_SMPTE274, "1920 x 1080p   23.98  Hz  (SMPTE274) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_23_98_3G_LEVEL_B_SMPTE372, "2048 x 1080p   23.98  Hz  (SMPTE372) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_47_96_3G_LEVEL_B_SMPTE274, "1920 x 1080i   47.96  Hz  (SMPTE274) 3G Level B" },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_47_96_3G_LEVEL_B_SMPTE372, "2048 x 1080i   47.96  Hz  (SMPTE372) 3G Level B" },
     { -1, NULL },
 };
 
@@ -233,7 +255,29 @@
     { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_50_00_3G_LEVEL_A_SMPTE274, 0, 0, 0 },
     { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_59_94_3G_LEVEL_A_SMPTE274, 0, 0, 0 },
     { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_60_00_3G_LEVEL_A_SMPTE274, 0, 0, 0 },
-
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_60_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_60_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_60_00_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_50_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_50_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_50_00_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_30_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_30_00_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_25_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_25_00_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_24_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_24_00_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_48_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_48_00_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_59_94_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_59_94_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_59_94_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_29_97_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_29_97_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_23_98_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_23_98_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_47_96_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
+    { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_47_96_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
     { -1, -1, -1, -1 },
 };
 
@@ -377,12 +421,13 @@
     if ((width > ctk_gvo->screen_width) || (height > ctk_gvo->screen_height)) {
         valid &= ~(GVO_VIDEO_FORMAT_RESOLUTION_VALID);
     }
-    
+
     /* Check that format is supported */
-    if (((format < 32) &&
-         !((1 << format) & ctk_gvo->valid_output_video_format_mask[0])) ||
-        ((format >= 32) &&
-         !((1 << (format -32)) & ctk_gvo->valid_output_video_format_mask[1]))) {
+    if (((format / 32) >=
+         (sizeof(ctk_gvo->valid_output_video_format_mask)/
+          sizeof(ctk_gvo->valid_output_video_format_mask[0]))) ||
+        !(ctk_gvo->valid_output_video_format_mask[format / 32] &
+          (1 << (format % 32)))) {
         valid &= ~(GVO_VIDEO_FORMAT_MODE_VALID);
     }
 
@@ -1220,6 +1265,16 @@
         ctk_gvo->valid_output_video_format_mask[1] = 0;
     } else {
         ctk_gvo->valid_output_video_format_mask[1] = valid.u.bits.ints;
+    }
+
+    ret = NvCtrlGetValidAttributeValues(ctk_gvo->handle,
+                                        NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT3,
+                                        &valid);
+
+    if ((ret != NvCtrlSuccess) || (valid.type != ATTRIBUTE_TYPE_INT_BITS)) {
+        ctk_gvo->valid_output_video_format_mask[2] = 0;
+    } else {
+        ctk_gvo->valid_output_video_format_mask[2] = valid.u.bits.ints;
     }
 
     /* Output data format */

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvo.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkgvo.h?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvo.h (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkgvo.h Tue May 18 08:52:05 2010
@@ -75,7 +75,7 @@
     gint input_video_format;
 
     gint output_video_format;
-    guint valid_output_video_format_mask[2];
+    guint valid_output_video_format_mask[3];
     
     gint output_data_format;
 

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkmultisample.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkmultisample.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkmultisample.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkmultisample.c Tue May 18 08:52:05 2010
@@ -1308,7 +1308,7 @@
         if (ctk_multisample->active_attributes & __FSAA_NONE) {
             ctk_help_term(b, &i, "Off");
             ctk_help_para(b, &i, "Disables antialiasing in OpenGL "
-                          "applications. "
+                          "applications.  "
                           "Select this option if you require maximum "
                           "performance in your applications.");
         }
@@ -1325,7 +1325,7 @@
             ctk_help_term(b, &i, "2x Quincunx");
             ctk_help_para(b, &i, "This enables the patented Quincunx "
                           "Antialiasing technique available in the GeForce "
-                          "GPU family. "
+                          "GPU family.  "
                           "Quincunx Antialiasing offers the quality of the "
                           "slower, 4x antialiasing mode, but at nearly the "
                           "performance of the faster, 2x mode.");
@@ -1341,7 +1341,7 @@
         if (ctk_multisample->active_attributes & __FSAA_2x2) {
             ctk_help_term(b, &i, "2 x 2 Supersampling");
             ctk_help_para(b, &i, "This enables antialiasing using the 2x2 "
-                          "Supersampling mode. This mode offers higher image "
+                          "Supersampling mode.  This mode offers higher image "
                           "quality at the expense of some performance in "
                           "OpenGL applications.");
         }
@@ -1349,7 +1349,7 @@
         if (ctk_multisample->active_attributes & __FSAA_4x) {
             ctk_help_term(b, &i, "4x (4xMS)");
             ctk_help_para(b, &i, "This enables antialiasing using the 4x (4xMS)"
-                          "Bilinear mode. This mode offers higher image "
+                          "Bilinear mode.  This mode offers higher image "
                           "quality at the expense of some performance in "
                           "OpenGL applications.");
         }
@@ -1357,7 +1357,7 @@
         if (ctk_multisample->active_attributes & __FSAA_4x_9t) {
             ctk_help_term(b, &i, "4x, 9-tap Gaussian");
             ctk_help_para(b, &i, "This enables antialiasing using the 4x, "
-                          "9-tap (Gaussian) mode. This mode offers higher "
+                          "9-tap (Gaussian) mode.  This mode offers higher "
                           "image quality but at the expense of some "
                           "performance in OpenGL applications.");
         }
@@ -1417,9 +1417,9 @@
         
         ctk_help_para(b, &i, "Anisotropic filtering is a technique used to "
                       "improve the quality of textures applied to the "
-                      "surfaces of 3D objects when drawn at a sharp angle. "
+                      "surfaces of 3D objects when drawn at a sharp angle.  "
                       "Use the Anisotropic filtering slider to set the degree "
-                      "of anisotropic filtering for improved image quality. "
+                      "of anisotropic filtering for improved image quality.  "
                       "Enabling this option improves image quality at the "
                       "expense of some performance.");
 

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkopengl.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkopengl.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkopengl.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkopengl.c Tue May 18 08:52:05 2010
@@ -105,7 +105,7 @@
 "This option allows Gamma-corrected "
 "antialiased lines to consider variances in the color "
 "display capabilities of output devices when rendering "
-"smooth lines. This option is applied to OpenGL applications "
+"smooth lines.  This option is applied to OpenGL applications "
 "that are started after this option is set.";
 
 static const char *__image_settings_slider_help =
@@ -114,7 +114,7 @@
 static const char *__force_stereo_help =
 "Enabling this option causes OpenGL to force "
 "stereo flipping even if a stereo drawable is "
-"not visible. This option is applied "
+"not visible.  This option is applied "
 "immediately.";
 
 static const char *__xinerama_stereo_help =
@@ -143,7 +143,7 @@
 #define __IMAGE_SETTINGS      (1 << 7)
 #define __XINERAMA_STEREO     (1 << 8)
 #define __SHOW_SLI_HUD        (1 << 9)
-#define __STEREO_EYES_EXCHANGE (1 << 9)
+#define __STEREO_EYES_EXCHANGE (1 << 10)
 
 
 

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkpowermizer.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkpowermizer.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkpowermizer.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkpowermizer.c Tue May 18 08:52:05 2010
@@ -62,7 +62,7 @@
 "This indicates the current Performance Mode of the GPU.";
 
 static const char *__performance_mode_help =
-"This indicates the current Performance Mode of the GPU. "
+"This indicates the current Performance Mode of the GPU.  "
 "Performance Mode can be either \"Desktop\" or "
 "\"Maximum Performance\".";
 

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkscreen.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkscreen.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkscreen.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkscreen.c Tue May 18 08:52:05 2010
@@ -439,10 +439,10 @@
     ctk_help_heading(b, &i, "Recovered GPU Errors");
     ctk_help_para(b, &i, "The GPU can encounter errors, either due to bugs in "
                   "the NVIDIA driver, or due to corruption of the command  "
-                  "stream as it is sent from the NVIDIA X driver to the GPU. "
+                  "stream as it is sent from the NVIDIA X driver to the GPU.  "
                   "When the GPU encounters one of these errors, it reports it "
                   "to the NVIDIA X driver and the NVIDIA X driver attempts to "
-                  "recover from the error. This reports how many errors the "
+                  "recover from the error.  This reports how many errors the "
                   "GPU received and the NVIDIA X driver successfully recovered "
                   "from.");
 

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkslimm.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkslimm.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkslimm.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkslimm.c Tue May 18 08:52:05 2010
@@ -1717,7 +1717,7 @@
     ctk_help_para(b, &i, "These two controls allow the user to specify the "
                   "Horizontal and Vertical Edge Overlap values.  The displays "
                   "will overlap by the specified number of pixels when forming "
-                  "the grid configuration. For example, 4 flat panel displays "
+                  "the grid configuration.  For example, 4 flat panel displays "
                   "forming a 2 x 2 grid in SLI Mosaic Mode with a resolution of "
                   "1600x1200 and a Horizontal and Vertical Edge overlap of 50 "
                   "will generate the following MetaMode: \"1600x1200+0+0,"

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkui.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkui.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkui.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkui.c Tue May 18 08:52:05 2010
@@ -64,9 +64,9 @@
                                       GTK_MESSAGE_WARNING,
                                       GTK_BUTTONS_OK,
                                       "You do not appear to be using the NVIDIA "
-                                      "X driver. Please edit your X configuration "
+                                      "X driver.  Please edit your X configuration "
                                       "file (just run `nvidia-xconfig` "
-                                      "as root), and restart the X server. ");
+                                      "as root), and restart the X server.");
         gtk_dialog_run(GTK_DIALOG(dlg));
         gtk_widget_destroy (dlg);
     }

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkutils.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkutils.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkutils.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkutils.c Tue May 18 08:52:05 2010
@@ -23,10 +23,33 @@
  */
  
 #include <gtk/gtk.h>
+#include <NvCtrlAttributes.h>
 #include "ctkutils.h"
 #include "msg.h"
 
 
+
+gchar* create_gpu_name_string(NvCtrlAttributeHandle *gpu_handle)
+{
+    gchar *gpu_name;
+    gchar *gpu_product_name;
+    ReturnStatus ret;
+    
+    ret = NvCtrlGetStringDisplayAttribute(gpu_handle, 0,
+                                          NV_CTRL_STRING_PRODUCT_NAME,
+                                          &gpu_product_name);
+    if (ret == NvCtrlSuccess && gpu_product_name) {
+        gpu_name = g_strdup_printf("GPU %d - (%s)",
+                                   NvCtrlGetTargetId(gpu_handle),
+                                   gpu_product_name);
+    } else {
+        gpu_name = g_strdup_printf("GPU %d - (Unknown)",
+                                   NvCtrlGetTargetId(gpu_handle));
+    }
+    g_free(gpu_product_name);
+    
+    return gpu_name;
+}
 
 
 GtkWidget *add_table_row(GtkWidget *table,

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkutils.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkutils.h?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkutils.h (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkutils.h Tue May 18 08:52:05 2010
@@ -26,9 +26,11 @@
 #define __CTK_UTILS_H__
 
 #include <gtk/gtk.h>
-
+#include <NvCtrlAttributes.h>
 
 G_BEGIN_DECLS
+
+gchar* create_gpu_name_string(NvCtrlAttributeHandle *gpu_handle);
 
 GtkWidget *add_table_row(GtkWidget *, const gint,
                          const gfloat, const gfloat, const gchar *,

Modified: packages/nvidia-settings/trunk/src/gtk+-2.x/ctkwindow.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/gtk%2B-2.x/ctkwindow.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/gtk+-2.x/ctkwindow.c (original)
+++ packages/nvidia-settings/trunk/src/gtk+-2.x/ctkwindow.c Tue May 18 08:52:05 2010
@@ -42,6 +42,7 @@
 #include "ctkgvo-sync.h"
 #include "ctkgvo-csc.h"
 #include "ctkconfig.h"
+#include "ctkutils.h"
 
 #include "ctkscreen.h"
 #include "ctkslimm.h"
@@ -65,6 +66,7 @@
 
 #include "ctkdisplayconfig.h"
 #include "ctkserver.h"
+#include "ctkecc.h"
 
 #include "ctkhelp.h"
 #include "ctkevent.h"
@@ -759,10 +761,8 @@
 
     for (i = 0; i < h->targets[GPU_TARGET].n; i++) {
         
-        gchar *gpu_product_name;
         gchar *gpu_name;
         GtkWidget *child;
-        ReturnStatus ret;
         NvCtrlAttributeHandle *gpu_handle = h->targets[GPU_TARGET].t[i].h;
         UpdateDisplaysData *data;
 
@@ -771,17 +771,7 @@
 
         /* create the gpu entry name */
 
-        ret = NvCtrlGetStringDisplayAttribute(gpu_handle, 0,
-                                              NV_CTRL_STRING_PRODUCT_NAME,
-                                              &gpu_product_name);
-        if (ret == NvCtrlSuccess && gpu_product_name) {
-            gpu_name = g_strdup_printf("GPU %d - (%s)",
-                                       NvCtrlGetTargetId(gpu_handle),
-                                       gpu_product_name);
-        } else {
-            gpu_name =  g_strdup_printf("GPU %d - (Unknown)",
-                                        NvCtrlGetTargetId(gpu_handle));
-        }
+        gpu_name = create_gpu_name_string(gpu_handle);
         if (!gpu_name) continue;
 
         /* create the object for receiving NV-CONTROL events */
@@ -799,7 +789,7 @@
                            CTK_WINDOW_WIDGET_COLUMN, child, -1);
         gtk_tree_store_set(ctk_window->tree_store, &iter,
                            CTK_WINDOW_HELP_COLUMN, 
-                           ctk_gpu_create_help(tag_table), -1);
+                           ctk_gpu_create_help(tag_table, CTK_GPU(child)), -1);
         gtk_tree_store_set(ctk_window->tree_store, &iter,
                            CTK_WINDOW_CONFIG_FILE_ATTRIBUTES_FUNC_COLUMN,
                            NULL, -1);
@@ -839,7 +829,13 @@
             add_page(child, help, ctk_window, &iter, NULL, "Clock Frequencies",
                      NULL, ctk_clocks_select, NULL);
         }
-
+        /* ECC Information */
+        child = ctk_ecc_new(gpu_handle, ctk_config, ctk_event);
+        if (child) {
+            help = ctk_ecc_create_help(tag_table, CTK_ECC(child));
+            add_page(child, help, ctk_window, &iter, NULL, "ECC Settings",
+                     NULL, ctk_ecc_start_timer, ctk_ecc_stop_timer);
+        }
         /* display devices */
         data = (UpdateDisplaysData *)calloc(1, sizeof(UpdateDisplaysData));
         data->window = ctk_window;
@@ -942,7 +938,7 @@
         gtk_tree_store_append(ctk_window->tree_store, &iter, NULL);
         gtk_tree_store_set(ctk_window->tree_store, &iter,
                            CTK_WINDOW_LABEL_COLUMN, gvi_name, -1);
-        child = ctk_gvi_new(gvi_handle, ctk_config);
+        child = ctk_gvi_new(gvi_handle, ctk_config, ctk_event);
         gtk_object_ref(GTK_OBJECT(child));
         gtk_tree_store_set(ctk_window->tree_store, &iter,
                            CTK_WINDOW_WIDGET_COLUMN, child, -1);

Modified: packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrl.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrl.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrl.c (original)
+++ packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrl.c Tue May 18 08:52:05 2010
@@ -347,8 +347,8 @@
         SyncHandle ();
         return False;
     }
-    if (value) *value = rep.value;
     exists = rep.flags;
+    if (exists && value) *value = rep.value;
     UnlockDisplay (dpy);
     SyncHandle ();
     return exists;
@@ -363,6 +363,46 @@
 ){
     return XNVCTRLQueryTargetAttribute(dpy, NV_CTRL_TARGET_TYPE_X_SCREEN,
                                        screen, display_mask, attribute, value);
+}
+
+
+Bool XNVCTRLQueryTargetAttribute64 (
+    Display *dpy,
+    int target_type,
+    int target_id,
+    unsigned int display_mask,
+    unsigned int attribute,
+    int64_t *value
+){
+    XExtDisplayInfo *info = find_display(dpy);
+    xnvCtrlQueryAttribute64Reply rep;
+    xnvCtrlQueryAttributeReq *req;
+    Bool exists;
+
+    if (!XextHasExtension(info))
+        return False;
+
+    XNVCTRLCheckExtension(dpy, info, False);
+    XNVCTRLCheckTargetData(dpy, info, &target_type, &target_id);
+
+    LockDisplay(dpy);
+    GetReq(nvCtrlQueryAttribute, req);
+    req->reqType = info->codes->major_opcode;
+    req->nvReqType = X_nvCtrlQueryAttribute64;
+    req->target_type = target_type;
+    req->target_id = target_id;
+    req->display_mask = display_mask;
+    req->attribute = attribute;
+    if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+    exists = rep.flags;
+    if (exists && value) *value = rep.value_64;
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return exists;
 }
 
 
@@ -404,8 +444,11 @@
     length = rep.length;
     numbytes = rep.n;
     slop = numbytes & 3;
-    *ptr = (char *) Xmalloc(numbytes);
-    if (! *ptr) {
+    exists = rep.flags;
+    if (exists) {
+        *ptr = (char *) Xmalloc(numbytes);
+    }
+    if (!exists || !*ptr) {
         _XEatData(dpy, length);
         UnlockDisplay (dpy);
         SyncHandle ();
@@ -414,7 +457,6 @@
         _XRead(dpy, (char *) *ptr, numbytes);
         if (slop) _XEatData(dpy, 4-slop);
     }
-    exists = rep.flags;
     UnlockDisplay (dpy);
     SyncHandle ();
     return exists;
@@ -491,26 +533,18 @@
 }
 
 
-Bool XNVCTRLQueryValidTargetAttributeValues (
-    Display *dpy,
+static Bool XNVCTRLQueryValidTargetAttributeValues32 (
+    Display *dpy,
+    XExtDisplayInfo *info,
     int target_type,
     int target_id,
     unsigned int display_mask,
     unsigned int attribute,                                 
     NVCTRLAttributeValidValuesRec *values
 ){
-    XExtDisplayInfo *info = find_display (dpy);
     xnvCtrlQueryValidAttributeValuesReply rep;
     xnvCtrlQueryValidAttributeValuesReq   *req;
     Bool exists;
-    
-    if (!values) return False;
-
-    if(!XextHasExtension(info))
-        return False;
-
-    XNVCTRLCheckExtension (dpy, info, False);
-    XNVCTRLCheckTargetData(dpy, info, &target_type, &target_id);
 
     LockDisplay (dpy);
     GetReq (nvCtrlQueryValidAttributeValues, req);
@@ -526,19 +560,153 @@
         return False;
     }
     exists = rep.flags;
-    values->type = rep.attr_type;
-    if (rep.attr_type == ATTRIBUTE_TYPE_RANGE) {
-        values->u.range.min = rep.min;
-        values->u.range.max = rep.max;
-    }
-    if (rep.attr_type == ATTRIBUTE_TYPE_INT_BITS) {
-        values->u.bits.ints = rep.bits;
-    }
-    values->permissions = rep.perms;
+    if (exists) {
+        values->type = rep.attr_type;
+        if (rep.attr_type == ATTRIBUTE_TYPE_RANGE) {
+            values->u.range.min = rep.min;
+            values->u.range.max = rep.max;
+        }
+        if (rep.attr_type == ATTRIBUTE_TYPE_INT_BITS) {
+            values->u.bits.ints = rep.bits;
+        }
+        values->permissions = rep.perms;
+    }
     UnlockDisplay (dpy);
     SyncHandle ();
     return exists;
 }
+
+
+Bool XNVCTRLQueryValidTargetStringAttributeValues (
+    Display *dpy,
+    int target_type,
+    int target_id,
+    unsigned int display_mask,
+    unsigned int attribute,
+    NVCTRLAttributeValidValuesRec *values
+){
+    XExtDisplayInfo *info = find_display(dpy);
+    Bool exists;
+    xnvCtrlQueryValidAttributeValuesReply rep;
+    xnvCtrlQueryValidAttributeValuesReq   *req;
+
+    if (!values) return False;
+
+    if (!XextHasExtension(info))
+        return False;
+
+    XNVCTRLCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq (nvCtrlQueryValidAttributeValues, req);
+    req->reqType = info->codes->major_opcode;
+    req->nvReqType = X_nvCtrlQueryValidStringAttributeValues;
+    req->target_type = target_type;
+    req->target_id = target_id;
+    req->display_mask = display_mask;
+    req->attribute = attribute;
+    if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+    exists = rep.flags;
+    if (exists) {
+        values->type = rep.attr_type;
+        values->permissions = rep.perms;
+    }
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return exists;
+}
+
+
+static Bool XNVCTRLQueryValidTargetAttributeValues64 (
+    Display *dpy,
+    XExtDisplayInfo *info,
+    int target_type,
+    int target_id,
+    unsigned int display_mask,
+    unsigned int attribute,
+    NVCTRLAttributeValidValuesRec *values
+){
+    xnvCtrlQueryValidAttributeValues64Reply rep;
+    xnvCtrlQueryValidAttributeValuesReq *req;
+    Bool exists;
+
+    LockDisplay(dpy);
+    GetReq(nvCtrlQueryValidAttributeValues, req);
+    req->reqType = info->codes->major_opcode;
+    req->nvReqType = X_nvCtrlQueryValidAttributeValues64;
+    req->target_type = target_type;
+    req->target_id = target_id;
+    req->display_mask = display_mask;
+    req->attribute = attribute;
+    if (!_XReply(dpy, (xReply *)&rep,
+                 sz_xnvCtrlQueryValidAttributeValues64Reply_extra,
+                 xTrue)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+    exists = rep.flags;
+    if (exists) {
+        values->type = rep.attr_type;
+        if (rep.attr_type == ATTRIBUTE_TYPE_RANGE) {
+            values->u.range.min = rep.min_64;
+            values->u.range.max = rep.max_64;
+        }
+        if (rep.attr_type == ATTRIBUTE_TYPE_INT_BITS) {
+            values->u.bits.ints = rep.bits_64;
+        }
+        values->permissions = rep.perms;
+    }
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return exists;
+}
+
+Bool XNVCTRLQueryValidTargetAttributeValues (
+    Display *dpy,
+    int target_type,
+    int target_id,
+    unsigned int display_mask,
+    unsigned int attribute,
+    NVCTRLAttributeValidValuesRec *values
+){
+    XExtDisplayInfo *info = find_display(dpy);
+    Bool exists;
+    int major, minor;
+
+    if (!values) return False;
+
+    if (!XextHasExtension(info))
+        return False;
+
+    XNVCTRLCheckExtension(dpy, info, False);
+    XNVCTRLCheckTargetData(dpy, info, &target_type, &target_id);
+
+    if (!XNVCTRLQueryVersion(dpy, &major, &minor))
+        return False;
+
+    if ((major > 1) || ((major == 1) && (minor > 20))) {
+        exists = XNVCTRLQueryValidTargetAttributeValues64(dpy, info,
+                                                          target_type,
+                                                          target_id,
+                                                          display_mask,
+                                                          attribute,
+                                                          values);
+    } else {
+        exists = XNVCTRLQueryValidTargetAttributeValues32(dpy, info,
+                                                          target_type,
+                                                          target_id,
+                                                          display_mask,
+                                                          attribute,
+                                                          values);
+    }
+    return exists;
+}
+
 
 Bool XNVCTRLQueryValidAttributeValues (
     Display *dpy,
@@ -733,8 +901,11 @@
     length = rep.length;
     numbytes = rep.n;
     slop = numbytes & 3;
-    *ptr = (unsigned char *) Xmalloc(numbytes);
-    if (! *ptr) {
+    exists = rep.flags;
+    if (exists) {
+        *ptr = (unsigned char *) Xmalloc(numbytes);
+    }
+    if (!exists || !*ptr) {
         _XEatData(dpy, length);
         UnlockDisplay (dpy);
         SyncHandle ();
@@ -743,7 +914,6 @@
         _XRead(dpy, (char *) *ptr, numbytes);
         if (slop) _XEatData(dpy, 4-slop);
     }
-    exists = rep.flags;
     if (len) *len = numbytes;
     UnlockDisplay (dpy);
     SyncHandle ();

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=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrl.h (original)
+++ packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrl.h Tue May 18 08:52:05 2010
@@ -24,6 +24,7 @@
 #ifndef __NVCTRL_H
 #define __NVCTRL_H
 
+#include <stdint.h>
 
 /**************************************************************************/
 
@@ -82,14 +83,18 @@
  *    target type via XNVCTRLQueryTargetAttribute().
  *
  * X: When Xinerama is enabled, this attribute is kept consistent across
- *    all Physical X Screens;  Assignment of this attribute will be
+ *    all Physical X Screens;  assignment of this attribute will be
  *    broadcast by the NVIDIA X Driver to all X Screens.
  *
  * V: The attribute may be queried using an NV_CTRL_TARGET_TYPE_VCSC
  *    target type via XNVCTRLQueryTargetAttribute().
- * 
+ *
  * I: The attribute may be queried using an NV_CTRL_TARGET_TYPE_GVI target type
  *    via XNVCTRLQueryTargetAttribute().
+ *
+ * Q: The attribute is a 64-bit integer attribute;  use the 64-bit versions
+ *    of the appropriate query interfaces.
+ *
  * 
  * C: The attribute may be queried using an NV_CTRL_TARGET_TYPE_COOLER target
  *    type via XNVCTRLQueryTargetAttribute().
@@ -883,9 +888,9 @@
  * NV_CTRL_GVO_SDI_SYNC_INPUT_DETECTED to detect what input syncs are
  * present.
  * 
- * (If no analog sync is detected but it is known that a valid
+ * (If no analog sync is detected but it is known that a valid
  * bi-level or tri-level sync is connected set
- * NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE appropriately and
+ * NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE appropriately and
  * retest with NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECTED).
  *
  * - if syncing to input sync, query the
@@ -984,10 +989,12 @@
  * values are reported as bits within a bitmask
  * (ATTRIBUTE_TYPE_INT_BITS); unfortunately, there are more valid
  * value bits than will fit in a single 32-bit value.  To solve this,
- * query the ValidValues for NV_CTRL_GVIO_OUTPUT_VIDEO_FORMAT to check
- * which of the first 31 VIDEO_FORMATS are valid, then query the
- * ValidValues for NV_CTRL_GVIO_OUTPUT_VIDEO_FORMAT2 to check which of
- * the VIDEO_FORMATS with value 32 and higher are valid.
+ * query the ValidValues for NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT to
+ * check which of the first 31 VIDEO_FORMATS are valid, query the
+ * ValidValues for NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT2 to check which
+ * of the 32-63 VIDEO_FORMATS are valid, and query the ValidValues of
+ * NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT3 to check which of the 64-95
+ * VIDEO_FORMATS are valid.
  */
 
 #define NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT                     70  /* RW--I */
@@ -1034,6 +1041,29 @@
 #define NV_CTRL_GVIO_VIDEO_FORMAT_1080P_50_00_3G_LEVEL_A_SMPTE274  39
 #define NV_CTRL_GVIO_VIDEO_FORMAT_1080P_59_94_3G_LEVEL_A_SMPTE274  40
 #define NV_CTRL_GVIO_VIDEO_FORMAT_1080P_60_00_3G_LEVEL_A_SMPTE274  41
+#define NV_CTRL_GVIO_VIDEO_FORMAT_1080P_60_00_3G_LEVEL_B_SMPTE274  42
+#define NV_CTRL_GVIO_VIDEO_FORMAT_1080I_60_00_3G_LEVEL_B_SMPTE274  43
+#define NV_CTRL_GVIO_VIDEO_FORMAT_2048I_60_00_3G_LEVEL_B_SMPTE372  44
+#define NV_CTRL_GVIO_VIDEO_FORMAT_1080P_50_00_3G_LEVEL_B_SMPTE274  45
+#define NV_CTRL_GVIO_VIDEO_FORMAT_1080I_50_00_3G_LEVEL_B_SMPTE274  46
+#define NV_CTRL_GVIO_VIDEO_FORMAT_2048I_50_00_3G_LEVEL_B_SMPTE372  47
+#define NV_CTRL_GVIO_VIDEO_FORMAT_1080P_30_00_3G_LEVEL_B_SMPTE274  48
+#define NV_CTRL_GVIO_VIDEO_FORMAT_2048P_30_00_3G_LEVEL_B_SMPTE372  49
+#define NV_CTRL_GVIO_VIDEO_FORMAT_1080P_25_00_3G_LEVEL_B_SMPTE274  50
+#define NV_CTRL_GVIO_VIDEO_FORMAT_2048P_25_00_3G_LEVEL_B_SMPTE372  51
+#define NV_CTRL_GVIO_VIDEO_FORMAT_1080P_24_00_3G_LEVEL_B_SMPTE274  52
+#define NV_CTRL_GVIO_VIDEO_FORMAT_2048P_24_00_3G_LEVEL_B_SMPTE372  53
+#define NV_CTRL_GVIO_VIDEO_FORMAT_1080I_48_00_3G_LEVEL_B_SMPTE274  54
+#define NV_CTRL_GVIO_VIDEO_FORMAT_2048I_48_00_3G_LEVEL_B_SMPTE372  55
+#define NV_CTRL_GVIO_VIDEO_FORMAT_1080P_59_94_3G_LEVEL_B_SMPTE274  56
+#define NV_CTRL_GVIO_VIDEO_FORMAT_1080I_59_94_3G_LEVEL_B_SMPTE274  57
+#define NV_CTRL_GVIO_VIDEO_FORMAT_2048I_59_94_3G_LEVEL_B_SMPTE372  58
+#define NV_CTRL_GVIO_VIDEO_FORMAT_1080P_29_97_3G_LEVEL_B_SMPTE274  59
+#define NV_CTRL_GVIO_VIDEO_FORMAT_2048P_29_97_3G_LEVEL_B_SMPTE372  60
+#define NV_CTRL_GVIO_VIDEO_FORMAT_1080P_23_98_3G_LEVEL_B_SMPTE274  61
+#define NV_CTRL_GVIO_VIDEO_FORMAT_2048P_23_98_3G_LEVEL_B_SMPTE372  62
+#define NV_CTRL_GVIO_VIDEO_FORMAT_1080I_47_96_3G_LEVEL_B_SMPTE274  63
+#define NV_CTRL_GVIO_VIDEO_FORMAT_2048I_47_96_3G_LEVEL_B_SMPTE372  64
 
 
 /* 
@@ -1255,7 +1285,7 @@
 /*
  * NV_CTRL_GVO_INPUT_VIDEO_FORMAT_REACQUIRE - must be set for a period
  * of about 2 seconds for the new InputVideoFormat to be properly
- * locked to.  In nvidia-settings, we do a reacquire whenever genlock
+ * locked to.  In nvidia-settings, we do a reacquire whenever genlock
  * or frame lock mode is entered into, when the user clicks the
  * "detect" button.  This value can be written, but always reads back
  * _FALSE.
@@ -1577,10 +1607,10 @@
 #define NV_CTRL_XV_SYNC_TO_DISPLAY                               226  /* RW- */
 
 /*
- * NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT2 - this attribute is only intended
- * to be used to query the ValidValues for
- * NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT above the first 31 VIDEO_FORMATS.
- * See NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT for details.
+ * NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT2 - this attribute is only
+ * intended to be used to query the ValidValues for
+ * NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT for VIDEO_FORMAT values between
+ * 31 and 63.  See NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT for details.
  */
 
 #define NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT2                    227  /* ---GI */
@@ -2557,7 +2587,6 @@
  * NV_CTRL_FRAMELOCK_SYNC_DELAY_RESOLUTION - Returns the number of nanoseconds
  * that one unit of NV_CTRL_FRAMELOCK_SYNC_DELAY corresponds to.
  */
-
 #define NV_CTRL_FRAMELOCK_SYNC_DELAY_RESOLUTION                 318 /* R-- */
 
 /*
@@ -2615,6 +2644,86 @@
          NV_CTRL_THERMAL_COOLER_TARGET_POWER_SUPPLY) 
 
 /*
+ * NV_CTRL_GPU_ECC_SUPPORTED - Reports whether ECC is supported by the
+ * targeted GPU.
+ */
+#define NV_CTRL_GPU_ECC_SUPPORTED                               324 /* R--G */
+#define NV_CTRL_GPU_ECC_SUPPORTED_FALSE                           0
+#define NV_CTRL_GPU_ECC_SUPPORTED_TRUE                            1
+
+/*
+ * NV_CTRL_GPU_ECC_STATUS - Returns the current hardware ECC setting
+ * for the targeted GPU.
+ */
+#define NV_CTRL_GPU_ECC_STATUS                                  325 /* R--G */
+#define NV_CTRL_GPU_ECC_STATUS_DISABLED                           0
+#define NV_CTRL_GPU_ECC_STATUS_ENABLED                            1
+
+/*
+ * NV_CTRL_GPU_ECC_CONFIGURATION - Reports whether ECC can be configured
+ * dynamically for the GPU in question.
+ */
+#define NV_CTRL_GPU_ECC_CONFIGURATION_SUPPORTED                 326 /* R--G */
+#define NV_CTRL_GPU_ECC_CONFIGURATION_SUPPORTED_FALSE             0
+#define NV_CTRL_GPU_ECC_CONFIGURATION_SUPPORTED_TRUE              1
+
+/*
+ * NV_CTRL_GPU_ECC_CONFIGURATION_SETTING - Returns the current ECC
+ * configuration setting or specifies new settings.  New settings do not
+ * take effect until the next POST.
+ */
+#define NV_CTRL_GPU_ECC_CONFIGURATION                           327 /* RW-G */
+#define NV_CTRL_GPU_ECC_CONFIGURATION_DISABLED                    0
+#define NV_CTRL_GPU_ECC_CONFIGURATION_ENABLED                     1
+
+/*
+ * NV_CTRL_GPU_ECC_DEFAULT_CONFIGURATION_SETTING - Returns the default
+ * ECC configuration setting.
+ */
+#define NV_CTRL_GPU_ECC_DEFAULT_CONFIGURATION                   328 /* R--G */
+#define NV_CTRL_GPU_ECC_DEFAULT_CONFIGURATION_DISABLED            0
+#define NV_CTRL_GPU_ECC_DEFAULT_CONFIGURATION_ENABLED             1
+
+/*
+ * NV_CTRL_GPU_ECC_SINGLE_BIT_ERRORS - Returns the number of single-bit
+ * ECC errors detected by the targeted GPU since the last POST.
+ * Note: this attribute is a 64-bit integer attribute.
+ */
+#define NV_CTRL_GPU_ECC_SINGLE_BIT_ERRORS                       329 /* R--GQ */
+
+/*
+ * NV_CTRL_GPU_ECC_DOUBLE_BIT_ERRORS - Returns the number of double-bit
+ * ECC errors detected by the targeted GPU since the last POST.
+ * Note: this attribute is a 64-bit integer attribute.
+ */
+#define NV_CTRL_GPU_ECC_DOUBLE_BIT_ERRORS                       330 /* R--GQ */
+
+/*
+ * NV_CTRL_GPU_ECC_AGGREGATE_SINGLE_BIT_ERRORS - Returns the number of
+ * single-bit ECC errors detected by the targeted GPU since the
+ * last counter reset.
+ * Note: this attribute is a 64-bit integer attribute.
+ */
+#define NV_CTRL_GPU_ECC_AGGREGATE_SINGLE_BIT_ERRORS             331 /* R--GQ */
+
+/*
+ * NV_CTRL_GPU_ECC_AGGREGATE_DOUBLE_BIT_ERRORS - Returns the number of
+ * double-bit ECC errors detected by the targeted GPU since the
+ * last counter reset.
+ * Note: this attribute is a 64-bit integer attribute.
+ */
+#define NV_CTRL_GPU_ECC_AGGREGATE_DOUBLE_BIT_ERRORS             332 /* R--GQ */
+
+/*
+ * NV_CTRL_GPU_ECC_RESET_ERROR_STATUS - Resets the volatile/aggregate
+ * single-bit and double-bit error counters.  This attribute is a
+ * bitmask attribute.
+ */
+#define NV_CTRL_GPU_ECC_RESET_ERROR_STATUS                      333 /* -W-G */
+#define NV_CTRL_GPU_ECC_RESET_ERROR_STATUS_VOLATILE             0x00000001
+#define NV_CTRL_GPU_ECC_RESET_ERROR_STATUS_AGGREGATE            0x00000002
+
+/*
  * NV_CTRL_GPU_POWER_MIZER_MODE - Provides a hint to the driver
  * as to how to manage the performance of the GPU.
  *
@@ -2683,8 +2792,70 @@
  */
 #define NV_CTRL_OVERSCAN_COMPENSATION                           339 /* RWDG */
 
-
-#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_OVERSCAN_COMPENSATION
+/*
+ * NV_CTRL_GPU_PCIE_GENERATION - Reports the current PCI-E generation.
+ */
+#define NV_CTRL_GPU_PCIE_GENERATION                             341 /* R--GI */
+#define NV_CTRL_GPU_PCIE_GENERATION1                            0x00000001
+#define NV_CTRL_GPU_PCIE_GENERATION2                            0x00000002
+
+/*
+ * NV_CTRL_GVI_BOUND_GPU - Returns the NV_CTRL_TARGET_TYPE_GPU target_id of
+ * the GPU currently bound to the GVI device.  Returns -1 if no GPU is
+ * currently bound to the GVI device.
+ */
+#define NV_CTRL_GVI_BOUND_GPU                                   342 /* R--I */
+
+
+/*
+ * NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT3 - this attribute is only
+ * intended to be used to query the ValidValues for
+ * NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT for VIDEO_FORMAT values between
+ * 64 and 95.  See NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT for details.
+ */
+
+#define NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT3                    343 /* ---GI */
+
+
+/*
+ * NV_CTRL_ACCELERATE_TRAPEZOIDS - Toggles RENDER Trapezoid acceleration
+ */
+
+#define NV_CTRL_ACCELERATE_TRAPEZOIDS                           344 /* RW- */
+#define NV_CTRL_ACCELERATE_TRAPEZOIDS_DISABLE                   0
+#define NV_CTRL_ACCELERATE_TRAPEZOIDS_ENABLE                    1
+
+
+/*
+ * NV_CTRL_GPU_CORES - Returns number of GPU cores supported by the graphics
+ * pipeline.
+ */
+
+#define NV_CTRL_GPU_CORES                                       345 /* R--G */
+
+
+/* 
+ * NV_CTRL_GPU_MEMORY_BUS_WIDTH - Returns memory bus bandwidth on the associated
+ * subdevice.
+ */
+
+#define NV_CTRL_GPU_MEMORY_BUS_WIDTH                            346 /* R--G */
+
+
+/*
+ * NV_CTRL_GVI_TEST_MODE - This attribute controls the GVI test mode.  When
+ * enabled, the GVI device will generate fake data as quickly as possible.  All
+ * GVI settings are still valid when this is enabled (e.g., the requested video
+ * format is honored and sets the video size).
+ * This may be used to test the pipeline.
+ */
+
+#define NV_CTRL_GVI_TEST_MODE                                   347 /* R--I */
+#define NV_CTRL_GVI_TEST_MODE_DISABLE                             0
+#define NV_CTRL_GVI_TEST_MODE_ENABLE                              1
+
+
+#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_GVI_TEST_MODE
 
 /**************************************************************************/
 
@@ -3703,6 +3874,8 @@
 #define ATTRIBUTE_TYPE_BOOL      3
 #define ATTRIBUTE_TYPE_RANGE     4
 #define ATTRIBUTE_TYPE_INT_BITS  5
+#define ATTRIBUTE_TYPE_64BIT_INTEGER  6
+#define ATTRIBUTE_TYPE_STRING         7
 
 #define ATTRIBUTE_TYPE_READ       0x001
 #define ATTRIBUTE_TYPE_WRITE      0x002
@@ -3719,8 +3892,8 @@
     int type;
     union {
         struct {
-            int min;
-            int max;
+            int64_t min;
+            int64_t max;
         } range;
         struct {
             unsigned int ints;

Modified: packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrlLib.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrlLib.h?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrlLib.h (original)
+++ packages/nvidia-settings/trunk/src/libXNVCtrl/NVCtrlLib.h Tue May 18 08:52:05 2010
@@ -238,6 +238,34 @@
 
 
 /*
+ * XNVCTRLQueryTargetAttribute64 -
+ *
+ *  Returns True if the attribute exists.  Returns False otherwise.
+ *  If XNVCTRLQueryTargetAttribute returns True, value will contain the
+ *  value of the specified attribute.
+ *
+ *  Not all attributes require the display_mask parameter; see
+ *  NVCtrl.h for details.
+ *
+ *  Note: this function behaves like XNVCTRLQueryTargetAttribute(),
+ *  but supports 64-bit integer attributes.
+ *
+ *  Possible errors:
+ *     BadValue - The target doesn't exist.
+ *     BadMatch - The NVIDIA driver does not control the target.
+ */
+
+Bool XNVCTRLQueryTargetAttribute64 (
+    Display *dpy,
+    int target_Type,
+    int target_id,
+    unsigned int display_mask,
+    unsigned int attribute,
+    int64_t *value
+);
+
+
+/*
  *  XNVCTRLQueryStringAttribute -
  *
  *  Returns True if the attribute exists.  Returns False otherwise.
@@ -366,6 +394,24 @@
     int target_id,
     unsigned int display_mask,
     unsigned int attribute,                                 
+    NVCTRLAttributeValidValuesRec *values
+);
+
+
+/*
+ * XNVCTRLQueryValidTargetStringAttributeValues -
+ *
+ * Returns True if the attribute exists.  Returns False otherwise.  If
+ * XNVCTRLQueryValidTargetStringAttributeValues returns True, values will
+ * indicate the valid values for the specified attribute.
+ */
+
+ Bool XNVCTRLQueryValidTargetStringAttributeValues (
+    Display *dpy,
+    int target_type,
+    int target_id,
+    unsigned int display_mask,
+    unsigned int attribute,
     NVCTRLAttributeValidValuesRec *values
 );
 

Modified: packages/nvidia-settings/trunk/src/libXNVCtrl/nv_control.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/libXNVCtrl/nv_control.h?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/libXNVCtrl/nv_control.h (original)
+++ packages/nvidia-settings/trunk/src/libXNVCtrl/nv_control.h Tue May 18 08:52:05 2010
@@ -43,7 +43,10 @@
  *             BadMatch, if an unknown TargetType is specified
  * 1.19        Added TargetType support for SetAttributeAndGetStatus and
  *             SetStringAttribute requests
- * 1.20        Added COOLER TargetType.
+ * 1.20        Added COOLER TargetType
+ * 1.21        Added initial 64-bit integer attribute support (read-only)
+ * 1.22        Added X_nvCtrlQueryValidStringAttributeValues to check
+ *             string attribute permissions. 
  */
 
 #ifndef __NVCONTROL_H
@@ -54,7 +57,7 @@
 #define NV_CONTROL_NAME "NV-CONTROL"
 
 #define NV_CONTROL_MAJOR 1
-#define NV_CONTROL_MINOR 20
+#define NV_CONTROL_MINOR 22
 
 #define X_nvCtrlQueryExtension                      0
 #define X_nvCtrlIsNv                                1
@@ -82,7 +85,10 @@
 #define X_nvCtrlSelectTargetNotify                  23
 #define X_nvCtrlQueryTargetCount                    24
 #define X_nvCtrlStringOperation                     25
-#define X_nvCtrlLastRequest  (X_nvCtrlStringOperation + 1)
+#define X_nvCtrlQueryValidAttributeValues64         26
+#define X_nvCtrlQueryAttribute64                    27
+#define X_nvCtrlQueryValidStringAttributeValues     28
+#define X_nvCtrlLastRequest (X_nvCtrlQueryValidStringAttributeValues + 1)
 
 
 /* Define 32 bit floats */
@@ -175,13 +181,26 @@
     CARD16 sequenceNumber B16;
     CARD32 length B32;
     CARD32 flags B32;
-    INT32  value B32;
+    INT32 value B32;
     CARD32 pad4 B32;
     CARD32 pad5 B32;
     CARD32 pad6 B32;
     CARD32 pad7 B32;
 } xnvCtrlQueryAttributeReply;
 #define sz_xnvCtrlQueryAttributeReply 32
+
+typedef struct {
+    BYTE type;
+    BYTE pad0;
+    CARD16 sequenceNumber B16;
+    CARD32 length B32;
+    CARD32 flags B32;
+    CARD32 pad3 B32;
+    int64_t value_64;
+    CARD32 pad6 B32;
+    CARD32 pad7 B32;
+} xnvCtrlQueryAttribute64Reply;
+#define sz_xnvCtrlQueryAttribute64Reply 32
 
 typedef struct {
     CARD8 reqType;
@@ -290,13 +309,29 @@
     CARD16 sequenceNumber B16;
     CARD32 length B32;
     CARD32 flags B32;
-    INT32  attr_type B32;
-    INT32  min B32;
-    INT32  max B32;
+    INT32 attr_type B32;
+    INT32 min B32;
+    INT32 max B32;
     CARD32 bits B32;
     CARD32 perms B32;
 } xnvCtrlQueryValidAttributeValuesReply;
 #define sz_xnvCtrlQueryValidAttributeValuesReply 32
+
+typedef struct {
+    BYTE type;
+    BYTE pad0;
+    CARD16 sequenceNumber B16;
+    CARD32 length B32;
+    CARD32 flags B32;
+    INT32 attr_type B32;
+    int64_t min_64;
+    int64_t max_64;
+    CARD64 bits_64;
+    CARD32 perms B32;
+    CARD32 pad1 B32;
+} xnvCtrlQueryValidAttributeValues64Reply;
+#define sz_xnvCtrlQueryValidAttributeValues64Reply 48
+#define sz_xnvCtrlQueryValidAttributeValues64Reply_extra ((48 - 32) >> 2)
 
 /* Set GVO Color Conversion request (deprecated) */
 typedef struct {

Modified: packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributes.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributes.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributes.c (original)
+++ packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributes.c Tue May 18 08:52:05 2010
@@ -486,6 +486,15 @@
 } /* NvCtrlSetAttribute() */
 
 
+ReturnStatus NvCtrlGetAttribute64(NvCtrlAttributeHandle *handle,
+                                  int attr, int64_t *val)
+{
+    if (!handle) return NvCtrlBadArgument;
+    return NvCtrlGetDisplayAttribute64(handle, 0, attr, val);
+
+} /* NvCtrlGetAttribute64() */
+
+
 ReturnStatus NvCtrlGetVoidAttribute(NvCtrlAttributeHandle *handle,
                                     int attr, void **ptr)
 {
@@ -524,10 +533,12 @@
 
 
 ReturnStatus
-NvCtrlGetDisplayAttribute(NvCtrlAttributeHandle *handle,
-                          unsigned int display_mask, int attr, int *val)
-{
-    NvCtrlAttributePrivateHandle *h;
+NvCtrlGetDisplayAttribute64(NvCtrlAttributeHandle *handle,
+                            unsigned int display_mask, int attr, int64_t *val)
+{
+    ReturnStatus status;
+    NvCtrlAttributePrivateHandle *h;
+    int value_32;
 
     h = (NvCtrlAttributePrivateHandle *) handle;
 
@@ -559,19 +570,34 @@
 
     if ((attr >= NV_CTRL_ATTR_XV_BASE) &&
         (attr <= NV_CTRL_ATTR_XV_LAST_ATTRIBUTE)) {
-        
-        return NvCtrlXvGetAttribute(h, attr, val);
+        status = NvCtrlXvGetAttribute(h, attr, &value_32);
+        *val = value_32;
+        return status;
     }
 
     if ((attr >= NV_CTRL_ATTR_XRANDR_BASE) &&
         (attr <= NV_CTRL_ATTR_XRANDR_LAST_ATTRIBUTE)) {
-        
-        return NvCtrlXrandrGetAttribute(h, attr, val);
-    }
-
+        status = NvCtrlXrandrGetAttribute(h, attr, &value_32);
+        *val = value_32;
+        return status;
+    }
 
     return NvCtrlNoAttribute;
     
+} /* NvCtrlGetDisplayAttribute64() */
+
+ReturnStatus
+NvCtrlGetDisplayAttribute(NvCtrlAttributeHandle *handle,
+                          unsigned int display_mask, int attr, int *val)
+{
+    ReturnStatus status;
+    int64_t value_64;
+
+    status = NvCtrlGetDisplayAttribute64(handle, display_mask, attr, &value_64);
+    *val = value_64;
+
+    return status;
+
 } /* NvCtrlGetDisplayAttribute() */
 
 
@@ -670,26 +696,86 @@
 
 
 /*
- * NvCtrlGetValidStringDisplayAttributeValues() -fill the
- * NVCTRLAttributeValidValuesRec strucure for String atrributes
- */
-
-ReturnStatus
-NvCtrlGetValidStringDisplayAttributeValues(NvCtrlAttributeHandle *handle,
-                                           unsigned int display_mask, int attr,
-                                           NVCTRLAttributeValidValuesRec *val)
-{
-    NvCtrlAttributePrivateHandle *h;
-    h = (NvCtrlAttributePrivateHandle *) handle;
-
+ * GetValidStringDisplayAttributeValuesExtraAttr() -fill the
+ * NVCTRLAttributeValidValuesRec strucure for extra string atrributes i.e.
+ * NvCtrlNvControl*, NvCtrlGlx*, NvCtrlXrandr*, NvCtrlVidMode*, or NvCtrlXv*.
+ */
+
+static ReturnStatus
+GetValidStringDisplayAttributeValuesExtraAttr(NVCTRLAttributeValidValuesRec
+                                                    *val)
+{
     if (val) {
         memset(val, 0, sizeof(NVCTRLAttributeValidValuesRec));
-        val->type = ATTRIBUTE_TYPE_UNKNOWN;
+        val->type = ATTRIBUTE_TYPE_STRING;
         val->permissions = ATTRIBUTE_TYPE_READ | ATTRIBUTE_TYPE_X_SCREEN;
         return NvCtrlSuccess;
     } else {
         return NvCtrlBadArgument;
     }
+} /* GetValidStringDisplayAttributeValuesExtraAttr() */
+
+
+/*
+ * NvCtrlGetValidStringDisplayAttributeValues() -fill the
+ * NVCTRLAttributeValidValuesRec strucure for String atrributes
+ */
+
+ReturnStatus
+NvCtrlGetValidStringDisplayAttributeValues(NvCtrlAttributeHandle *handle,
+                                           unsigned int display_mask, int attr,
+                                           NVCTRLAttributeValidValuesRec *val)
+{
+    NvCtrlAttributePrivateHandle *h;
+    h = (NvCtrlAttributePrivateHandle *) handle;
+
+    if ((attr >= 0) && (attr <= NV_CTRL_STRING_LAST_ATTRIBUTE)) {
+        if (!h->nv) return NvCtrlMissingExtension;
+        return NvCtrlNvControlGetValidStringDisplayAttributeValues(h,
+                                                                   display_mask,
+                                                                   attr, val);
+    }
+
+    /*
+     * The below string attributes are only available for X screen target
+     * types
+     */
+
+    if (h->target_type != NV_CTRL_TARGET_TYPE_X_SCREEN) {
+        return NvCtrlAttributeNotAvailable;
+    }
+    
+    if ((attr >= NV_CTRL_STRING_NV_CONTROL_BASE) &&
+        (attr <= NV_CTRL_STRING_NV_CONTROL_LAST_ATTRIBUTE)) {
+        if (!h->nv) return NvCtrlMissingExtension;
+        return GetValidStringDisplayAttributeValuesExtraAttr(val);
+    }
+
+    if ((attr >= NV_CTRL_STRING_GLX_BASE) &&
+        (attr <= NV_CTRL_STRING_GLX_LAST_ATTRIBUTE)) {
+        if (!h->glx) return NvCtrlMissingExtension;
+        return GetValidStringDisplayAttributeValuesExtraAttr(val);
+    }
+
+    if ((attr >= NV_CTRL_STRING_XRANDR_BASE) &&
+        (attr <= NV_CTRL_STRING_XRANDR_LAST_ATTRIBUTE)) {
+        if (!h->xrandr) return NvCtrlMissingExtension;
+        return GetValidStringDisplayAttributeValuesExtraAttr(val);
+    }
+
+    if ((attr >= NV_CTRL_STRING_XF86VIDMODE_BASE) &&
+        (attr <= NV_CTRL_STRING_XF86VIDMODE_LAST_ATTRIBUTE)) {
+        if (!h->vm) return NvCtrlMissingExtension;
+        return GetValidStringDisplayAttributeValuesExtraAttr(val);
+    }
+
+    if ((attr >= NV_CTRL_STRING_XV_BASE) &&
+        (attr <= NV_CTRL_STRING_XV_LAST_ATTRIBUTE)) {
+        if (!h->xv) return NvCtrlMissingExtension;
+        return GetValidStringDisplayAttributeValuesExtraAttr(val);
+    }
+
+    return NvCtrlNoAttribute;
 
 } /* NvCtrlGetValidStringDisplayAttributeValues() */
 

Modified: packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributes.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributes.h?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributes.h (original)
+++ packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributes.h Tue May 18 08:52:05 2010
@@ -370,7 +370,8 @@
  * Modifications made via SetAttribute() are made immediatedly.  The
  * attr argument is the attribute to query/modify; valid attributes
  * are those listed in NVCtrl.h and the NV_CTRL_ attributes #define'd
- * above.
+ * above.  NvCtrlGetAttribute64() behaves like NvCtrlGetAttribute(),
+ * but supports 64-bit integer attributes.
  */
 
 ReturnStatus NvCtrlGetAttribute (NvCtrlAttributeHandle *handle,
@@ -378,6 +379,10 @@
 
 ReturnStatus NvCtrlSetAttribute (NvCtrlAttributeHandle *handle,
                                  int attr, int val);
+
+ReturnStatus NvCtrlGetAttribute64 (NvCtrlAttributeHandle *handle,
+                                   int attr, int64_t *val);
+
 
 /*
  * NvCtrlGetVoidAttribute() - this function works like the
@@ -432,6 +437,10 @@
                            unsigned int display_mask, int attr, int val);
 
 ReturnStatus
+NvCtrlGetDisplayAttribute64 (NvCtrlAttributeHandle *handle,
+                             unsigned int display_mask, int attr, int64_t *val);
+
+ReturnStatus
 NvCtrlSetDisplayAttributeWithReply (NvCtrlAttributeHandle *handle,
                                     unsigned int display_mask,
                                     int attr, int val);

Modified: packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c (original)
+++ packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c Tue May 18 08:52:05 2010
@@ -150,11 +150,29 @@
 
 ReturnStatus NvCtrlNvControlGetAttribute (NvCtrlAttributePrivateHandle *h,
                                           unsigned int display_mask,
-                                          int attr, int *val)
-{
+                                          int attr, int64_t *val)
+{
+    ReturnStatus status;
+    int value_32;
+    int major, minor;
+
+    major = h->nv->major_version;
+    minor = h->nv->minor_version;
+
     if (attr <= NV_CTRL_LAST_ATTRIBUTE) {
-        if (XNVCTRLQueryTargetAttribute (h->dpy, h->target_type, h->target_id,
-                                         display_mask, attr, val)) {
+        if ((major > 1) || ((major == 1) && (minor > 20))) {
+            status = XNVCTRLQueryTargetAttribute64(h->dpy, h->target_type,
+                                                   h->target_id,
+                                                   display_mask, attr,
+                                                   val);
+        } else {
+            status = XNVCTRLQueryTargetAttribute(h->dpy, h->target_type,
+                                                 h->target_id,
+                                                 display_mask, attr,
+                                                 &value_32);
+            *val = value_32;
+        }
+        if (status) {
             return NvCtrlSuccess;
         } else {
             return NvCtrlAttributeNotAvailable;
@@ -168,10 +186,10 @@
 
         switch (attr) {
         case NV_CTRL_ATTR_NV_MAJOR_VERSION:
-            *val = h->nv->major_version;
+            *val = major;
             return NvCtrlSuccess;
         case NV_CTRL_ATTR_NV_MINOR_VERSION:
-            *val = h->nv->minor_version;
+            *val = minor;
             return NvCtrlSuccess;
         }
     }
@@ -249,6 +267,41 @@
     return NvCtrlNoAttribute;
 
 } /* NvCtrlNvControlGetValidAttributeValues() */
+
+
+ReturnStatus
+NvCtrlNvControlGetValidStringDisplayAttributeValues
+                                       (NvCtrlAttributePrivateHandle *h,
+                                        unsigned int display_mask,
+                                        int attr, NVCTRLAttributeValidValuesRec *val)
+{
+    if (attr <= NV_CTRL_STRING_LAST_ATTRIBUTE) {
+        if ((h->nv->major_version > 1) ||
+            ((h->nv->major_version == 1) && (h->nv->minor_version >= 22))) {
+            if (XNVCTRLQueryValidTargetStringAttributeValues (h->dpy,
+                                                              h->target_type,
+                                                              h->target_id,
+                                                              display_mask,
+                                                              attr, val)) {
+                return NvCtrlSuccess;
+            } else {
+                return NvCtrlAttributeNotAvailable;
+            }
+        } else {
+            if (val) {
+                memset(val, 0, sizeof(NVCTRLAttributeValidValuesRec));
+                val->type = ATTRIBUTE_TYPE_STRING;
+                val->permissions = ATTRIBUTE_TYPE_READ | ATTRIBUTE_TYPE_X_SCREEN;
+                return NvCtrlSuccess;
+            } else {
+                return NvCtrlBadArgument;
+            }
+        }
+    }
+
+    return NvCtrlNoAttribute;
+
+} /* NvCtrlNvControlGetValidStringDisplayAttributeValues() */
 
 
 ReturnStatus

Modified: packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h (original)
+++ packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h Tue May 18 08:52:05 2010
@@ -252,7 +252,7 @@
 
 ReturnStatus
 NvCtrlNvControlGetAttribute (NvCtrlAttributePrivateHandle *, unsigned int,
-                             int, int *);
+                             int, int64_t *);
 
 ReturnStatus
 NvCtrlNvControlSetAttribute (NvCtrlAttributePrivateHandle *, unsigned int,
@@ -266,6 +266,13 @@
 NvCtrlNvControlGetValidAttributeValues (NvCtrlAttributePrivateHandle *,
                                         unsigned int, int,
                                         NVCTRLAttributeValidValuesRec *);
+
+ReturnStatus
+NvCtrlNvControlGetValidStringDisplayAttributeValues
+                                      (NvCtrlAttributePrivateHandle *,
+                                       unsigned int, int,
+                                       NVCTRLAttributeValidValuesRec *);
+
 ReturnStatus
 NvCtrlNvControlGetStringAttribute (NvCtrlAttributePrivateHandle *,
                                    unsigned int, int, char **);

Modified: packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c (original)
+++ packages/nvidia-settings/trunk/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c Tue May 18 08:52:05 2010
@@ -40,8 +40,6 @@
 #define GREEN GREEN_CHANNEL_INDEX
 #define BLUE  BLUE_CHANNEL_INDEX
 
-
-#if defined(X_XF86VidModeGetGammaRampSize)
 
 /*
  * XXX The XF86VidMode extension can block remote clients.
@@ -72,9 +70,6 @@
     return 1;
 }
 
-#endif /* X_XF86VidModeGetGammaRampSize */
-
-
 
 
 NvCtrlVidModeAttributes *
@@ -88,8 +83,6 @@
     if (!h || !h->dpy || h->target_type != NV_CTRL_TARGET_TYPE_X_SCREEN) {
         goto failed;
     }
-
-#if defined(X_XF86VidModeGetGammaRampSize)
 
     ret = XF86VidModeQueryExtension(h->dpy, &event, &vidModeErrorBase);
     if (ret != True) goto failed;
@@ -190,12 +183,6 @@
     
     return (vm);
 
-#else
-    
-#warning Old xf86vmode.h; dynamic gamma ramp support will not be compiled.
-    
-#endif
-    
  blocked:
     
     nv_warning_msg("The VidMode extension is blocked for remote "
@@ -271,8 +258,6 @@
 {
     int i, ch;
     Bool ret;
-    
-#if defined(X_XF86VidModeGetGammaRampSize)
     
     NvCtrlAttributePrivateHandle *h;
 
@@ -340,10 +325,6 @@
     if (ret != True) return NvCtrlError;
 
     return NvCtrlSuccess;
-#else
-    return NvCtrlMissingExtension;
-
-#endif /* X_XF86VidModeGetGammaRampSize */
     
 } /* NvCtrlSetColorAttribute() */
 
@@ -353,8 +334,6 @@
                                 unsigned short **lut,
                                 int *n)
 {
-#if defined(X_XF86VidModeGetGammaRampSize)
-    
     NvCtrlAttributePrivateHandle *h;
 
     h = (NvCtrlAttributePrivateHandle *) handle;
@@ -375,9 +354,6 @@
     }
     
     return NvCtrlSuccess;
-#else
-    return NvCtrlMissingExtension;
-#endif
 }
 
 

Modified: packages/nvidia-settings/trunk/src/lscf.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/lscf.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/lscf.c (original)
+++ packages/nvidia-settings/trunk/src/lscf.c Tue May 18 08:52:05 2010
@@ -69,8 +69,8 @@
                     scf_handle_destroy(scf_handle);
     }
     if (!status) {
-        fmterr("Unable to set X server default depth through "
-               "Solaris Service Management Facility");
+        fprintf(stderr, "Unable to set X server default depth through Solaris "
+                "Service Management Facility");
     }
     return status;
 }

Modified: packages/nvidia-settings/trunk/src/parse.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-settings/trunk/src/parse.c?rev=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/parse.c (original)
+++ packages/nvidia-settings/trunk/src/parse.c Tue May 18 08:52:05 2010
@@ -70,7 +70,7 @@
     /* name                    constant                             flags                 description */
 
     /* Version information */
-    { "OperatingSystem",     NV_CTRL_OPERATING_SYSTEM,             N,   "The operating system on which the X server is running.  (0-Linux, 1-FreeBSD, 2-SunOS.)" },
+    { "OperatingSystem",     NV_CTRL_OPERATING_SYSTEM,             N,   "The operating system on which the X server is running.  0-Linux, 1-FreeBSD, 2-SunOS." },
     { "NvidiaDriverVersion", NV_CTRL_STRING_NVIDIA_DRIVER_VERSION, S|N, "The NVIDIA X driver version." },
     { "NvControlVersion",    NV_CTRL_STRING_NV_CONTROL_VERSION,    S|N, "The NV-CONTROL X driver extension version." },
     { "GLXServerVersion",    NV_CTRL_STRING_GLX_SERVER_VERSION,    S|N, "The GLX X server extension version." },
@@ -110,9 +110,10 @@
     { "XServerUniqueId",               NV_CTRL_X_SERVER_UNIQUE_ID,                N,     "Returns a pseudo-unique identification number for the X server." },
     { "PixmapCache",                   NV_CTRL_PIXMAP_CACHE,                      N,     "Controls whether pixmaps are allocated in a cache." },
     { "PixmapCacheRoundSizeKB",        NV_CTRL_PIXMAP_CACHE_ROUNDING_SIZE_KB,     N,     "Controls the number of kilobytes to add to the pixmap cache when there is not enough room." },
+    { "AccelerateTrapezoids",          NV_CTRL_ACCELERATE_TRAPEZOIDS,             N,     "Enable or disable GPU acceleration of RENDER Trapezoids." },
 
     /* OpenGL */
-    { "SyncToVBlank",               NV_CTRL_SYNC_TO_VBLANK,                   0,   "Enables sync to vertical blanking for OpenGL clients. This setting only takes effect on OpenGL clients started after it is set." },
+    { "SyncToVBlank",               NV_CTRL_SYNC_TO_VBLANK,                   0,   "Enables sync to vertical blanking for OpenGL clients.  This setting only takes effect on OpenGL clients started after it is set." },
     { "LogAniso",                   NV_CTRL_LOG_ANISO,                        0,   "Enables anisotropic filtering for OpenGL clients; on some NVIDIA hardware, this can only be enabled or disabled; on other hardware different levels of anisotropic filtering can be specified.  This setting only takes effect on OpenGL clients started after it is set." },
     { "FSAA",                       NV_CTRL_FSAA_MODE,                        0,   "The full screen antialiasing setting for OpenGL clients.  This setting only takes effect on OpenGL clients started after it is set." },
     { "TextureSharpen",             NV_CTRL_TEXTURE_SHARPEN,                  0,   "Enables texture sharpening for OpenGL clients.  This setting only takes effect on OpenGL clients started after it is set." },
@@ -136,6 +137,8 @@
     { "BusType",                NV_CTRL_BUS_TYPE,                      0,   "Returns the type of bus connecting the specified device to the computer.  If the target is an X screen, then it uses the GPU driving the X screen as the device." },
     { "VideoRam",               NV_CTRL_VIDEO_RAM,                     0,   "Returns the total amount of memory available to the specified GPU (or the GPU driving the specified X screen).  Note: if the GPU supports TurboCache(TM), the value reported may exceed the amount of video memory installed on the GPU.  The value reported for integrated GPUs may likewise exceed the amount of dedicated system memory set aside by the system BIOS for use by the integrated GPU." },
     { "Irq",                    NV_CTRL_IRQ,                           0,   "Returns the interrupt request line used by the specified device.  If the target is an X screen, then it uses the GPU driving the X screen as the device." },
+    { "CUDACores",              NV_CTRL_GPU_CORES,                     N,   "Returns number of CUDA cores supported by the graphics pipeline." },
+    { "GPUMemoryInterface",     NV_CTRL_GPU_MEMORY_BUS_WIDTH,          N,   "Returns bus bandwidth of the GPU's memory interface." },
     { "GPUCoreTemp",            NV_CTRL_GPU_CORE_TEMPERATURE,          N,   "Reports the current core temperature in Celsius of the GPU driving the X screen." },
     { "GPUAmbientTemp",         NV_CTRL_AMBIENT_TEMPERATURE,           N,   "Reports the current temperature in Celsius of the immediate neighborhood of the GPU driving the X screen." },
     { "GPUOverclockingState",   NV_CTRL_GPU_OVERCLOCKING_STATE,        N,   "The current overclocking state; the value of this attribute controls the availability of additional overclocking attributes.  Note that this attribute is unavailable unless overclocking support has been enabled by the system administrator." },
@@ -150,6 +153,7 @@
     { "PCIDevice",              NV_CTRL_PCI_DEVICE,                    N,   "Returns the PCI device number for the specified device." },
     { "PCIFunc",                NV_CTRL_PCI_FUNCTION,                  N,   "Returns the PCI function number for the specified device." },
     { "PCIID",                  NV_CTRL_PCI_ID,                        N|P, "Returns the PCI vendor and device ID of the specified device." },
+    { "PCIEGen",                NV_CTRL_GPU_PCIE_GENERATION,           N,   "Returns the current PCI-E Bus Generation." },
     { "GPUErrors",              NV_CTRL_NUM_GPU_ERRORS_RECOVERED,      N,   "Returns the number of GPU errors occurred." },
     { "GPUPowerSource",         NV_CTRL_GPU_POWER_SOURCE,              N,   "Reports the type of power source of the GPU." },
     { "GPUCurrentPerfMode",     NV_CTRL_GPU_CURRENT_PERFORMANCE_MODE,  N,   "Reports the current performance mode of the GPU driving the X screen.  Running a 3D app, for example, will change this performance mode if Adaptive Clocking is enabled." },
@@ -157,6 +161,13 @@
     { "GPUAdaptiveClockState",  NV_CTRL_GPU_ADAPTIVE_CLOCK_STATE,      N,   "Reports if Adaptive Clocking is Enabled on the GPU driving the X screen." },
     { "GPUPerfModes",           NV_CTRL_STRING_PERFORMANCE_MODES,      S|N, "Returns a string with all the performance modes defined for this GPU along with their associated NV Clock and Memory Clock values." },
     { "GPUPowerMizerMode",      NV_CTRL_GPU_POWER_MIZER_MODE,          0,   "Allows setting different GPU powermizer modes." },
+    { "ECCSupported",           NV_CTRL_GPU_ECC_SUPPORTED,             N,   "Reports whether the underlying GPU supports ECC.  All of the other ECC attributes are only applicable if this attribute indicates that ECC is supported." },
+    { "ECCStatus",              NV_CTRL_GPU_ECC_STATUS,                N,   "Reports whether ECC is enabled." },
+    { "ECCConfigurationSupported", NV_CTRL_GPU_ECC_CONFIGURATION_SUPPORTED, N,   "Reports whether ECC whether the ECC configuration setting can be changed." },
+    { "ECCConfiguration",            NV_CTRL_GPU_ECC_CONFIGURATION,               N, "Returns the current ECC configuration setting." },
+    { "ECCDefaultConfiguration",     NV_CTRL_GPU_ECC_DEFAULT_CONFIGURATION,       N, "Returns the default ECC configuration setting." },
+    { "ECCDoubleBitErrors",          NV_CTRL_GPU_ECC_DOUBLE_BIT_ERRORS,           N, "Returns the number of double-bit ECC errors detected by the targeted GPU since the last POST." },
+    { "ECCAggregateDoubleBitErrors", NV_CTRL_GPU_ECC_AGGREGATE_DOUBLE_BIT_ERRORS, N, "Returns the number of double-bit ECC errors detected by the targeted GPU since the last counter reset." },
     { "GPUFanControlState",     NV_CTRL_GPU_COOLER_MANUAL_CONTROL,        N,   "The current fan control state; the value of this attribute controls the availability of additional fan control attributes.  Note that this attribute is unavailable unless fan control support has been enabled by setting the \"Coolbits\" X config option." },
     { "GPUCurrentFanSpeed",     NV_CTRL_THERMAL_COOLER_LEVEL,             N,   "Returns the GPU fan's current speed." },
     { "GPUResetFanSpeed",       NV_CTRL_THERMAL_COOLER_LEVEL_SET_DEFAULT, N,   "Resets the GPU fan's speed to its default." },
@@ -178,14 +189,14 @@
     { "FrameLockTestSignal",   NV_CTRL_FRAMELOCK_TEST_SIGNAL,       N|F|G,   "To test the connections in the sync group, tell the master to enable a test signal, then query port[01] status and sync_ready on all slaves.  When done, tell the master to disable the test signal.  Test signal should only be manipulated while FrameLockEnable is enabled.  The FrameLockTestSignal is also used to reset the Universal Frame Count (as returned by the glXQueryFrameCountNV() function in the GLX_NV_swap_group extension).  Note: for best accuracy of the Universal Frame Count, it is recommended to toggle the FrameLockTestSignal on and off after enabling frame lock." },
     { "FrameLockEthDetected",  NV_CTRL_FRAMELOCK_ETHERNET_DETECTED, N|F|G,   "The frame lock boards are cabled together using regular cat5 cable, connecting to RJ45 ports on the backplane of the card.  There is some concern that users may think these are Ethernet ports and connect them to a router/hub/etc.  The hardware can detect this and will shut off to prevent damage (either to itself or to the router).  FrameLockEthDetected may be called to find out if Ethernet is connected to one of the RJ45 ports.  An appropriate error message should then be displayed." },
     { "FrameLockVideoMode",    NV_CTRL_FRAMELOCK_VIDEO_MODE,        N|F|G,   "Get/set what video mode is used to interpret the house sync signal.  This should only be set on the master." },
-    { "FrameLockSyncRate",     NV_CTRL_FRAMELOCK_SYNC_RATE,         N|F|G,   "Returns the refresh rate that the frame lock board is sending to the GPU, in mHz (Millihertz) (i.e. to get the refresh rate in Hz, divide the returned value by 1000.)" },
-    { "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." },
+    { "FrameLockSyncRate",     NV_CTRL_FRAMELOCK_SYNC_RATE,         N|F|G,   "Returns the refresh rate that the frame lock board is sending to the GPU, in mHz (Millihertz) (i.e., to get the refresh rate in Hz, divide the returned value by 1000)." },
+    { "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|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.)" },
+    { "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)." },
     { "FrameLockSyncDelayResolution", NV_CTRL_FRAMELOCK_SYNC_DELAY_RESOLUTION, N|F|G, "Returns the number of nanoseconds that one unit of FrameLockSyncDelay corresponds to." },
 
     /* GVO */
@@ -213,7 +224,7 @@
     { "GvoCapabilities",                 NV_CTRL_GVO_CAPABILITIES,                     I|N,   "Returns a description of the GVO capabilities that differ between NVIDIA SDI products.  This value is a bitmask where each bit indicates whether that capability is available." },
     { "GvoCompositeTermination",         NV_CTRL_GVO_COMPOSITE_TERMINATION,            I,     "Enable or disable 75 ohm termination of the SDI composite input signal." },
     { "GvoFlipQueueSize",                NV_CTRL_GVO_FLIP_QUEUE_SIZE,                  I,     "Sets/Returns the GVO flip queue size.  This value is used by the GLX_NV_video_out extension to determine the size of the internal flip queue when pbuffers are sent to the video device (via glXSendPbufferToVideoNV()).  This attribute is applied to GLX when glXGetVideoDeviceNV() is called by the application." },
-    { "GvoLockOwner",                    NV_CTRL_GVO_LOCK_OWNER,                       I|N,   "Indicates that the GVO device is available or in use (by GLX, Clone Mode, TwinView etc.)" },
+    { "GvoLockOwner",                    NV_CTRL_GVO_LOCK_OWNER,                       I|N,   "Indicates that the GVO device is available or in use (by GLX, Clone Mode, or TwinView)." },
     { "GvoOutputVideoLocked",            NV_CTRL_GVO_OUTPUT_VIDEO_LOCKED,              I|N,   "Returns whether or not the GVO output video is locked to the GPU output signal." },
     { "GvoSyncLockStatus",               NV_CTRL_GVO_SYNC_LOCK_STATUS,                 I|N,   "Returns whether or not the GVO device is locked to the input reference signal." },
     { "GvoANCTimeCodeGeneration",        NV_CTRL_GVO_ANC_TIME_CODE_GENERATION,         I,     "Controls whether the GVO device generates time codes in the ANC region of the SDI video output stream." },
@@ -240,6 +251,8 @@
     { "GviMaxChannelsPerJack",                NV_CTRL_GVI_MAX_CHANNELS_PER_JACK,                I|N, "Returns the maximum supported number of channels per single jack on a GVI device." },
     { "GviMaxStreams",                        NV_CTRL_GVI_MAX_STREAMS,                          I|N, "Returns the maximum supported number of streams that can be configured on a GVI device." },
     { "GviNumCaptureSurfaces",                NV_CTRL_GVI_NUM_CAPTURE_SURFACES,                 I|N, "Controls the number of capture buffers for storing incoming video from the GVI device." },
+    { "GviBoundGpu",                          NV_CTRL_GVI_BOUND_GPU,                            I|N, "Returns the target index of the GPU currently attached to the GVI device." },
+    { "GviTestMode",                          NV_CTRL_GVI_TEST_MODE,                            I|N, "Enable or disable GVI test mode." },
 
     /* Display */
     { "Brightness",                 BRIGHTNESS_VALUE|ALL_CHANNELS,         N|C|G, "Controls the overall brightness of the display." },
@@ -254,19 +267,19 @@
     { "RedGamma",                   GAMMA_VALUE|RED_CHANNEL,               C|G,   "Controls the gamma of the color red in the display." },
     { "GreenGamma",                 GAMMA_VALUE|GREEN_CHANNEL,             C|G,   "Controls the gamma of the color green in the display." },
     { "BlueGamma",                  GAMMA_VALUE|BLUE_CHANNEL,              C|G,   "Controls the gamma of the color blue in the display." },
-    { "FlatpanelDithering",         NV_CTRL_FLATPANEL_DITHERING,           0,     "This is the current state of flat panel dithering.  (This attribute has been deprecated.)" },
+    { "FlatpanelDithering",         NV_CTRL_FLATPANEL_DITHERING,           0,     "This is the current state of flat panel dithering.  This attribute has been deprecated." },
     { "DigitalVibrance",            NV_CTRL_DIGITAL_VIBRANCE,              0,     "Sets the digital vibrance level of the display device." },
     { "ImageSharpening",            NV_CTRL_IMAGE_SHARPENING,              0,     "Adjusts the sharpness of the display's image quality by amplifying high frequency content." },
     { "ImageSharpeningDefault",     NV_CTRL_IMAGE_SHARPENING_DEFAULT,      0,     "Returns default value of image sharpening." },
-    { "FrontendResolution",         NV_CTRL_FRONTEND_RESOLUTION,           N|P,   "Returns the dimensions of the frontend (current) resolution as determined by the NVIDIA X Driver. This attribute is a packed integer; the width is packed in the upper 16 bits and the height is packed in the lower 16-bits." },
+    { "FrontendResolution",         NV_CTRL_FRONTEND_RESOLUTION,           N|P,   "Returns the dimensions of the frontend (current) resolution as determined by the NVIDIA X Driver.  This attribute is a packed integer; the width is packed in the upper 16 bits and the height is packed in the lower 16-bits." },
     { "BackendResolution",          NV_CTRL_BACKEND_RESOLUTION,            N|P,   "Returns the dimensions of the backend resolution as determined by the NVIDIA X Driver.  The backend resolution is the resolution (supported by the display device) the GPU is set to scale to.  If this resolution matches the frontend resolution, GPU scaling will not be needed/used.  This attribute is a packed integer; the width is packed in the upper 16-bits and the height is packed in the lower 16-bits." },
     { "FlatpanelNativeResolution",  NV_CTRL_FLATPANEL_NATIVE_RESOLUTION,   N|P,   "Returns the dimensions of the native resolution of the flat panel as determined by the NVIDIA X Driver.  The native resolution is the resolution at which a flat panel must display any image.  All other resolutions must be scaled to this resolution through GPU scaling or the DFP's native scaling capabilities in order to be displayed.  This attribute is only valid for flat panel (DFP) display devices.  This attribute is a packed integer; the width is packed in the upper 16-bits and the height is packed in the lower 16-bits." },
     { "FlatpanelBestFitResolution", NV_CTRL_FLATPANEL_BEST_FIT_RESOLUTION, N|P,   "Returns the dimensions of the resolution, selected by the X driver, from the DFP's EDID that most closely matches the frontend resolution of the current mode.  The best fit resolution is selected on a per-mode basis.  This attribute is only valid for flat panel (DFP) display devices.  This attribute is a packed integer; the width is packed in the upper 16-bits and the height is packed in the lower 16-bits." },
     { "DFPScalingActive",           NV_CTRL_DFP_SCALING_ACTIVE,            N,     "Returns the current state of DFP scaling.  DFP scaling is mode-specific (meaning it may vary depending on which mode is currently set).  DFP scaling is active if the GPU is set to scale to the best fit resolution (GPUScaling is set to use FlatpanelBestFitResolution) and the best fit and native resolutions are different." },
     { "GPUScaling",                 NV_CTRL_GPU_SCALING,                   P,     "Controls what the GPU scales to and how.  This attribute is a packed integer; the scaling target (native/best fit) is packed in the upper 16-bits and the scaling method is packed in the lower 16-bits." },
     { "GPUScalingActive",           NV_CTRL_GPU_SCALING_ACTIVE,            N,     "Returns the current state of GPU scaling.  GPU scaling is mode-specific (meaning it may vary depending on which mode is currently set).  GPU scaling is active if the frontend timing (current resolution) is different than the target resolution.  The target resolution is either the native resolution of the flat panel or the best fit resolution supported by the flat panel.  What (and how) the GPU should scale to is controlled through the GPUScaling attribute." },
-    { "RefreshRate",                NV_CTRL_REFRESH_RATE,                  N|H,   "Returns the refresh rate of the specified display device in cHz (Centihertz) (i.e. to get the refresh rate in Hz, divide the returned value by 100.)" },
-    { "RefreshRate3",               NV_CTRL_REFRESH_RATE_3,                N|K,   "Returns the refresh rate of the specified display device in mHz (Millihertz) (i.e. to get the refresh rate in Hz, divide the returned value by 1000.)" },
+    { "RefreshRate",                NV_CTRL_REFRESH_RATE,                  N|H,   "Returns the refresh rate of the specified display device in cHz (Centihertz) (to get the refresh rate in Hz, divide the returned value by 100)." },
+    { "RefreshRate3",               NV_CTRL_REFRESH_RATE_3,                N|K,   "Returns the refresh rate of the specified display device in mHz (Millihertz) (to get the refresh rate in Hz, divide the returned value by 1000)." },
     { "OverscanCompensation",       NV_CTRL_OVERSCAN_COMPENSATION,         0,     "Adjust the amount of overscan compensation scaling, in pixels, to apply to the specified display device." },
 
     /* TV */
@@ -316,7 +329,7 @@
  * about.
  */
 
-#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_OVERSCAN_COMPENSATION
+#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_GVI_TEST_MODE
 #warning "Have you forgotten to add a new integer attribute to attributeTable?"
 #endif
 

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=886&op=diff
==============================================================================
--- packages/nvidia-settings/trunk/src/query-assign.c (original)
+++ packages/nvidia-settings/trunk/src/query-assign.c Tue May 18 08:52:05 2010
@@ -32,6 +32,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <inttypes.h>
 
 #include "parse.h"
 #include "msg.h"
@@ -667,6 +668,14 @@
 #define INDENT "    "
 
     switch (valid.type) {
+    case ATTRIBUTE_TYPE_STRING:
+        nv_msg(INDENT, "'%s' is a string attribute.", name);
+        break;
+
+    case ATTRIBUTE_TYPE_64BIT_INTEGER:
+        nv_msg(INDENT, "'%s' is a 64 bit integer attribute.", name);
+        break;
+
     case ATTRIBUTE_TYPE_INTEGER:
         if (flags & NV_PARSER_TYPE_PACKED_ATTRIBUTE) {
             nv_msg(INDENT, "'%s' is a packed integer attribute.", name);
@@ -687,12 +696,13 @@
     case ATTRIBUTE_TYPE_RANGE:
         if (flags & NV_PARSER_TYPE_PACKED_ATTRIBUTE) {
             nv_msg(INDENT, "The valid values for '%s' are in the ranges "
-                   "%d - %d, %d - %d (inclusive).", name,
-                   valid.u.range.min >> 16, valid.u.range.max >> 16,
+                   "%" PRId64 " - %" PRId64 ", %" PRId64 " - %" PRId64
+                   " (inclusive).",
+                   name, valid.u.range.min >> 16, valid.u.range.max >> 16,
                    valid.u.range.min & 0xffff, valid.u.range.max & 0xffff);
         } else {
             nv_msg(INDENT, "The valid values for '%s' are in the range "
-                   "%d - %d (inclusive).", name,
+                   "%" PRId64 " - %" PRId64 " (inclusive).", name,
                    valid.u.range.min, valid.u.range.max);
         }
         break;
@@ -919,9 +929,9 @@
 
 
 /*
- * query_all() - loop through all screens, and query all attributes
- * for those screens.  The current attribute values for all display
- * devices on all screens are printed, along with the valid values for
+ * query_all() - loop through all target types, and query all attributes
+ * for those targets.  The current attribute values for all display
+ * devices on all targets are printed, along with the valid values for
  * each attribute.
  *
  * If an error occurs, an error message is printed and NV_FALSE is
@@ -930,7 +940,8 @@
 
 static int query_all(const char *display_name)
 {
-    int bit, entry, screen, val;
+    int bit, entry, target_id, val;
+    int target_type;
     uint32 mask;
     ReturnStatus status;
     AttributeTableEntry *a;
@@ -943,129 +954,131 @@
 #define INDENT "  "
     
     /*
-     * For now, we only loop over X screen targets; we could loop over
-     * other target types, too, but that would likely be redundant
-     * with X screens.
+     * Loop through all target types.
      */
 
-    for (screen = 0; screen < h->targets[X_SCREEN_TARGET].n; screen++) {
-
-        t = &h->targets[X_SCREEN_TARGET].t[screen];
-
-        if (!t->h) continue;
-
-        nv_msg(NULL, "Attributes for %s:", t->name);
-
-        if (!__terse) nv_msg(NULL, "");
-
-        for (entry = 0; attributeTable[entry].name; entry++) {
-
-            a = &attributeTable[entry];
-            
-            /* skip the color attributes */
-
-            if (a->flags & NV_PARSER_TYPE_COLOR_ATTRIBUTE) continue;
-
-            /* skip attributes that shouldn't be queried here */
-
-            if (a->flags & NV_PARSER_TYPE_NO_QUERY_ALL) continue;
-
-            for (bit = 0; bit < 24; bit++) {
-                mask = 1 << bit;
-
-                /*
-                 * if this bit is not present in the screens's enabled
-                 * display device mask (and the X screen has enabled
-                 * display devices), skip to the next bit
-                 */
-
-                if (((t->d & mask) == 0x0) && (t->d)) continue;
-                
-                if (a->flags & NV_PARSER_TYPE_STRING_ATTRIBUTE) {
-                    char *tmp_str = NULL;
-
-                    status = NvCtrlGetValidStringDisplayAttributeValues(t->h, mask,
-                                                                        a->attr, &valid);
-
-                    if (status == NvCtrlAttributeNotAvailable) goto exit_bit_loop;
-
-                    if (status != NvCtrlSuccess) {
-                        nv_error_msg("Error while querying valid values for "
-                                     "attribute '%s' on %s (%s).",
-                                     a->name, t->name,
-                                     NvCtrlAttributesStrError(status));
-                        goto exit_bit_loop;
+    for (target_type = 0; target_type < MAX_TARGET_TYPES; target_type++) {
+        
+        for (target_id = 0; target_id < h->targets[target_type].n; target_id++) {
+
+            t = &h->targets[target_type].t[target_id];
+
+            if (!t->h) continue;
+
+            nv_msg(NULL, "Attributes queryable via %s:", t->name);
+
+            if (!__terse) nv_msg(NULL, "");
+
+            for (entry = 0; attributeTable[entry].name; entry++) {
+
+                a = &attributeTable[entry];
+
+                /* skip the color attributes */
+
+                if (a->flags & NV_PARSER_TYPE_COLOR_ATTRIBUTE) continue;
+
+                /* skip attributes that shouldn't be queried here */
+
+                if (a->flags & NV_PARSER_TYPE_NO_QUERY_ALL) continue;
+
+                for (bit = 0; bit < 24; bit++) {
+                    mask = 1 << bit;
+
+                    /*
+                     * if this bit is not present in the screens's enabled
+                     * display device mask (and the X screen has enabled
+                     * display devices), skip to the next bit
+                     */
+
+                    if (((t->d & mask) == 0x0) && (t->d)) continue;
+
+                    if (a->flags & NV_PARSER_TYPE_STRING_ATTRIBUTE) {
+                        char *tmp_str = NULL;
+
+                        status = NvCtrlGetValidStringDisplayAttributeValues(t->h, mask,
+                                                                            a->attr, &valid);
+                        if (status == NvCtrlAttributeNotAvailable) goto exit_bit_loop;
+
+                        if (status != NvCtrlSuccess) {
+                            nv_error_msg("Error while querying valid values for "
+                                         "attribute '%s' on %s (%s).",
+                                         a->name, t->name,
+                                         NvCtrlAttributesStrError(status));
+                            goto exit_bit_loop;
+                        }
+                        
+                        status = NvCtrlGetStringDisplayAttribute(t->h, mask, a->attr, &tmp_str);
+
+                        if (status == NvCtrlAttributeNotAvailable) goto exit_bit_loop;
+
+                        if (status != NvCtrlSuccess) {
+                            nv_error_msg("Error while querying attribute '%s' "
+                                         "on %s (%s).", a->name, t->name,
+                                         NvCtrlAttributesStrError(status));
+                            goto exit_bit_loop;
+                        }
+
+                        if (__terse) {
+                            nv_msg("  ", "%s: %s", a->name, tmp_str);
+                        } else {
+                            nv_msg("  ",  "Attribute '%s' (%s%s): %s ",
+                                   a->name, t->name, "", tmp_str);
+                        }
+                        free(tmp_str);
+                        tmp_str = NULL;
+
+                    } else {
+                        
+                        status = NvCtrlGetValidDisplayAttributeValues(t->h, mask, a->attr, &valid);
+
+                        if (status == NvCtrlAttributeNotAvailable) goto exit_bit_loop;
+
+                        if (status != NvCtrlSuccess) {
+                            nv_error_msg("Error while querying valid values for "
+                                         "attribute '%s' on %s (%s).",
+                                         a->name, t->name,
+                                         NvCtrlAttributesStrError(status));
+                            goto exit_bit_loop;
+                        }
+
+                        status = NvCtrlGetDisplayAttribute(t->h, mask, a->attr, &val);
+
+                        if (status == NvCtrlAttributeNotAvailable) goto exit_bit_loop;
+
+                        if (status != NvCtrlSuccess) {
+                            nv_error_msg("Error while querying attribute '%s' "
+                                         "on %s (%s).", a->name, t->name,
+                                         NvCtrlAttributesStrError(status));
+                            goto exit_bit_loop;
+                        }
+
+                        print_queried_value(t, &valid, val, a->flags, a->name,
+                                            mask, INDENT, __terse ?
+                                            VerboseLevelAbbreviated :
+                                            VerboseLevelVerbose);
+
                     }
-
-                    status = NvCtrlGetStringDisplayAttribute(t->h, mask, a->attr, &tmp_str);
-
-                    if (status == NvCtrlAttributeNotAvailable) goto exit_bit_loop;
-
-                    if (status != NvCtrlSuccess) {
-                        nv_error_msg("Error while querying attribute '%s' "
-                                     "on %s (%s).", a->name, t->name,
-                                     NvCtrlAttributesStrError(status));
-                        goto exit_bit_loop;
+                    print_valid_values(a->name, a->attr, a->flags, valid);
+
+                    if (!__terse) nv_msg(NULL,"");
+
+                    if (valid.permissions & ATTRIBUTE_TYPE_DISPLAY) {
+                        continue;
                     }
 
-                    if (__terse) {
-                        nv_msg("  ", "%s: %s", a->name, tmp_str);
-                    } else {
-                        nv_msg("  ",  "Attribute '%s' (%s%s): %s ",
-                               a->name, t->name, "", tmp_str);
-                    }
-                    free(tmp_str);
-                    tmp_str = NULL;
-
-                } else {
-                    status = NvCtrlGetValidDisplayAttributeValues(t->h, mask, a->attr, &valid);
-
-                    if (status == NvCtrlAttributeNotAvailable) goto exit_bit_loop;
-                
-                    if (status != NvCtrlSuccess) {
-                        nv_error_msg("Error while querying valid values for "
-                                     "attribute '%s' on %s (%s).",
-                                     a->name, t->name,
-                                     NvCtrlAttributesStrError(status));
-                        goto exit_bit_loop;
-                    }
-
-                    status = NvCtrlGetDisplayAttribute(t->h, mask, a->attr, &val);
-
-                    if (status == NvCtrlAttributeNotAvailable) goto exit_bit_loop;
-
-                    if (status != NvCtrlSuccess) {
-                        nv_error_msg("Error while querying attribute '%s' "
-                                     "on %s (%s).", a->name, t->name,
-                                     NvCtrlAttributesStrError(status));
-                        goto exit_bit_loop;
-                    }
-
-                    print_queried_value(t, &valid, val, a->flags, a->name,
-                                        mask, INDENT, __terse ?
-                                        VerboseLevelAbbreviated :
-                                        VerboseLevelVerbose);
-
-                    print_valid_values(a->name, a->attr, a->flags, valid);
-                }
-                
-                if (!__terse) nv_msg(NULL,"");
-                
-                if (valid.permissions & ATTRIBUTE_TYPE_DISPLAY) {
-                    continue;
-                }
-                
-                /* fall through to exit_bit_loop */
-                
-            exit_bit_loop:
-
-                bit = 25; /* XXX force us out of the display device loop */
-                
-            } /* bit */
-            
-        } /* entry */
-        
-    } /* screen */
+                    /* fall through to exit_bit_loop */
+
+exit_bit_loop:
+
+                    bit = 25; /* XXX force us out of the display device loop */
+
+                } /* bit */
+
+            } /* entry */
+
+        } /* target_id */
+
+    } /* target_type */
 
 #undef INDENT
 




More information about the Pkg-nvidia-devel mailing list