summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2010-02-03 10:15:51 -0800
committerAaron Plattner <aplattner@nvidia.com>2010-02-03 10:15:51 -0800
commit7856cfbd4523191f87e2f41952f6ac88565a9142 (patch)
tree1fd89bab03d78aea6ac328e61f6c14e0672b8f11
parentd5d8479137dc5f1b9cb60b77297c577db3df3226 (diff)
195.36.03195.36.03
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig.c4
-rw-r--r--src/gtk+-2.x/ctkevent.c3
-rw-r--r--src/libXNVCtrl/NVCtrl.c2
-rw-r--r--src/libXNVCtrl/NVCtrl.h16
-rw-r--r--src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c2
-rw-r--r--src/parse.c11
-rw-r--r--src/query-assign.c12
7 files changed, 39 insertions, 11 deletions
diff --git a/src/gtk+-2.x/ctkdisplayconfig.c b/src/gtk+-2.x/ctkdisplayconfig.c
index 2fdb9f5..7947005 100644
--- a/src/gtk+-2.x/ctkdisplayconfig.c
+++ b/src/gtk+-2.x/ctkdisplayconfig.c
@@ -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 @@ typedef struct SwitchModeCallbackInfoRec {
#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 ***********************************************************/
@@ -3134,6 +3135,7 @@ static void setup_screen_depth_dropdown(CtkDisplayConfig *ctk_object)
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);
diff --git a/src/gtk+-2.x/ctkevent.c b/src/gtk+-2.x/ctkevent.c
index 80f08c9..babe9e1 100644
--- a/src/gtk+-2.x/ctkevent.c
+++ b/src/gtk+-2.x/ctkevent.c
@@ -299,6 +299,7 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
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
@@ -309,7 +310,7 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
* knows about.
*/
-#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_GPU_MEMORY_BUS_WIDTH
+#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_GVI_TEST_MODE
#warning "There are attributes that do not emit signals!"
#endif
diff --git a/src/libXNVCtrl/NVCtrl.c b/src/libXNVCtrl/NVCtrl.c
index 0de10e1..097909c 100644
--- a/src/libXNVCtrl/NVCtrl.c
+++ b/src/libXNVCtrl/NVCtrl.c
@@ -689,7 +689,7 @@ Bool XNVCTRLQueryValidTargetAttributeValues (
if (!XNVCTRLQueryVersion(dpy, &major, &minor))
return False;
- if ((major > 1) || ((major == 1) && (minor >= 20))) {
+ if ((major > 1) || ((major == 1) && (minor > 20))) {
exists = XNVCTRLQueryValidTargetAttributeValues64(dpy, info,
target_type,
target_id,
diff --git a/src/libXNVCtrl/NVCtrl.h b/src/libXNVCtrl/NVCtrl.h
index 0fd4211..d7cfe4c 100644
--- a/src/libXNVCtrl/NVCtrl.h
+++ b/src/libXNVCtrl/NVCtrl.h
@@ -2841,7 +2841,21 @@
#define NV_CTRL_GPU_MEMORY_BUS_WIDTH 346 /* R--G */
-#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_GPU_MEMORY_BUS_WIDTH
+
+/*
+ * 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
/**************************************************************************/
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c b/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c
index 0733163..ccbb9ba 100644
--- a/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c
+++ b/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c
@@ -160,7 +160,7 @@ ReturnStatus NvCtrlNvControlGetAttribute (NvCtrlAttributePrivateHandle *h,
minor = h->nv->minor_version;
if (attr <= NV_CTRL_LAST_ATTRIBUTE) {
- if ((major > 1) || ((major == 1) && (minor >= 20))) {
+ if ((major > 1) || ((major == 1) && (minor > 20))) {
status = XNVCTRLQueryTargetAttribute64(h->dpy, h->target_type,
h->target_id,
display_mask, attr,
diff --git a/src/parse.c b/src/parse.c
index 724ff3f..952b209 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -164,8 +164,12 @@ AttributeTableEntry attributeTable[] = {
{ "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." },
+ { "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." },
+ { "ECCSingleBitErrors", NV_CTRL_GPU_ECC_SINGLE_BIT_ERRORS, N, "Returns the number of single-bit ECC errors detected by the targeted GPU since the last POST." },
+ { "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." },
+ { "ECCAggregateSingleBitErrors", NV_CTRL_GPU_ECC_AGGREGATE_SINGLE_BIT_ERRORS, N, "Returns the number of double-bit ECC errors detected by the targeted GPU since the last counter reset." },
+ { "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." },
@@ -250,6 +254,7 @@ AttributeTableEntry attributeTable[] = {
{ "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." },
@@ -326,7 +331,7 @@ AttributeTableEntry attributeTable[] = {
* about.
*/
-#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_GPU_MEMORY_BUS_WIDTH
+#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_GVI_TEST_MODE
#warning "Have you forgotten to add a new integer attribute to attributeTable?"
#endif
diff --git a/src/query-assign.c b/src/query-assign.c
index 31cc01c..7502b75 100644
--- a/src/query-assign.c
+++ b/src/query-assign.c
@@ -32,6 +32,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <inttypes.h>
#include "parse.h"
#include "msg.h"
@@ -671,6 +672,10 @@ static void print_valid_values(char *name, int attr, uint32 flags,
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);
@@ -691,12 +696,13 @@ static void print_valid_values(char *name, int attr, uint32 flags,
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;