summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2013-08-05 10:50:23 -0700
committerAaron Plattner <aplattner@nvidia.com>2013-08-05 10:50:23 -0700
commitaa34a795fd35818d6a26e01f6d47278f2065e2de (patch)
tree4292f60993abe1d1a33d79d5a97aa7167570eae6
parent90b956556b1fb77ee07192ce329551602bd78680 (diff)
325.15325.15
-rw-r--r--doc/version.mk2
-rw-r--r--samples/version.mk2
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig-utils.c20
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig.c26
-rw-r--r--src/gtk+-2.x/ctkdisplaylayout.c2
-rw-r--r--src/gtk+-2.x/ctkpowermizer.c382
-rw-r--r--src/gtk+-2.x/ctkpowermizer.h4
-rw-r--r--src/libXNVCtrl/NVCtrl.h56
-rw-r--r--src/version.mk2
-rw-r--r--version.mk2
10 files changed, 395 insertions, 103 deletions
diff --git a/doc/version.mk b/doc/version.mk
index a8b6fa4..8a89afe 100644
--- a/doc/version.mk
+++ b/doc/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 325.08
+NVIDIA_VERSION = 325.15
diff --git a/samples/version.mk b/samples/version.mk
index a8b6fa4..8a89afe 100644
--- a/samples/version.mk
+++ b/samples/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 325.08
+NVIDIA_VERSION = 325.15
diff --git a/src/gtk+-2.x/ctkdisplayconfig-utils.c b/src/gtk+-2.x/ctkdisplayconfig-utils.c
index 5e33365..62fbfc5 100644
--- a/src/gtk+-2.x/ctkdisplayconfig-utils.c
+++ b/src/gtk+-2.x/ctkdisplayconfig-utils.c
@@ -1198,7 +1198,7 @@ static gchar *display_pick_config_name(nvDisplayPtr display,
gpu = display->gpu;
- /* If one of the Mosaic Modes is configured, and the X server supports
+ /* If one of the Mosaic modes is configured, and the X server supports
* GPU UUIDs, qualify the display device with the GPU UUID.
*/
if (screen->num_gpus >= 1 &&
@@ -1659,10 +1659,9 @@ void clamp_screen_size_rect(GdkRectangle *rect)
*
* Returns the maximum number of allowable enabled displays for the X screen.
* This is based on the screen's driving GPU's max number of enabled displays,
- * in conjunction with whether or not Mosaic mode is enabled and which type.
- * Limited Base Mosaic mode only supports up to 3 enabled display devices,
- * while other Mosaic Modes (Base Mosaic and SLI Mosaic) support unlimited
- * displays.
+ * in conjunction with whether or not Mosaic is enabled and which type.
+ * Surround (Base Mosaic) only supports up to 3 enabled display devices,
+ * while other modes (Base Mosaic and SLI Mosaic) support unlimited displays.
*
**/
@@ -2481,9 +2480,14 @@ void link_screen_to_gpu(nvScreenPtr screen, nvGpuPtr gpu)
screen->max_width = MIN(screen->max_width, gpu->max_width);
screen->max_height = MIN(screen->max_height, gpu->max_height);
- screen->max_displays = MIN(screen->max_displays, gpu->max_displays);
screen->allow_depth_30 = screen->allow_depth_30 && gpu->allow_depth_30;
+ if (screen->max_displays <= 0) {
+ screen->max_displays = gpu->max_displays;
+ } else if (gpu->max_displays > 0) {
+ screen->max_displays = MIN(screen->max_displays, gpu->max_displays);
+ }
+
/* Set the display owner GPU. */
if (screen->display_owner_gpu_id >= 0) {
/* Link to the multi GPU display owner, if it is specified */
@@ -3405,8 +3409,8 @@ static Bool link_screen_to_gpus(nvLayoutPtr layout, nvScreenPtr screen)
int scrnum = NvCtrlGetTargetId(screen->handle);
/* Link the screen to the display owner GPU. If there is no display owner,
- * which is the case when SLI Mosaic Mode is configured, link screen
- * to the first (multi gpu master possible) GPU we find.
+ * which is the case when SLI Mosaic is configured, link the screen to the
+ * first (multi gpu master possible) GPU we find.
*/
ret = NvCtrlGetAttribute(screen->handle, NV_CTRL_MULTIGPU_DISPLAY_OWNER,
&(screen->display_owner_gpu_id));
diff --git a/src/gtk+-2.x/ctkdisplayconfig.c b/src/gtk+-2.x/ctkdisplayconfig.c
index c9e7b39..723069f 100644
--- a/src/gtk+-2.x/ctkdisplayconfig.c
+++ b/src/gtk+-2.x/ctkdisplayconfig.c
@@ -187,14 +187,14 @@ static const char * __dpy_configuration_mnu_help =
"for the currently selected display device.";
static const char * __layout_sli_mosaic_button_help =
-"The Enable SLI Mosaic checkbox enables SLI Mosaic Mode for all GPUs";
+"The Enable SLI Mosaic checkbox enables SLI Mosaic for all GPUs";
-static const char * __layout_base_mosaic_limited_button_help =
-"The Enable Base Mosaic (Limited) checkbox enables Limited Base Mosaic Mode. "
-"In limited Base Mosaic, only 3 displays are supported.";
+static const char * __layout_base_mosaic_surround_button_help =
+"The Enable Base Mosaic (Surround) checkbox enables Surround, where up to 3 "
+"displays are supported.";
static const char * __layout_base_mosaic_full_button_help =
-"The Enable Base Mosaic checkbox enables Base Mosaic Mode.";
+"The Enable Base Mosaic checkbox enables Base Mosaic.";
static const char * __dpy_resolution_mnu_help =
"The Resolution drop-down allows you to select a desired resolution "
@@ -2134,6 +2134,14 @@ GtkWidget* ctk_display_config_new(NvCtrlAttributeHandle *handle,
}
+ /* If mosaic mode is enabled, start in advanced mode */
+ if (ctk_object->layout &&
+ ctk_object->layout->gpus &&
+ ctk_object->layout->gpus->mosaic_enabled) {
+ advanced_clicked(ctk_object->btn_advanced, ctk_object);
+ }
+
+
/* Show the GUI */
gtk_widget_show_all(GTK_WIDGET(ctk_object));
@@ -2321,15 +2329,15 @@ static void setup_mosaic_config(CtkDisplayConfig *ctk_object)
switch (gpu->mosaic_type) {
case MOSAIC_TYPE_SLI_MOSAIC:
tooltip = __layout_sli_mosaic_button_help;
- label = "Enable SLI Mosaic Mode";
+ label = "Enable SLI Mosaic";
break;
case MOSAIC_TYPE_BASE_MOSAIC:
tooltip = __layout_base_mosaic_full_button_help;
- label = "Enable Base Mosaic Mode";
+ label = "Enable Base Mosaic";
break;
case MOSAIC_TYPE_BASE_MOSAIC_LIMITED:
- tooltip = __layout_base_mosaic_limited_button_help;
- label = "Enable Base Mosaic Mode (Limited)";
+ tooltip = __layout_base_mosaic_surround_button_help;
+ label = "Enable Base Mosaic (Surround)";
break;
default:
gtk_widget_hide(ctk_object->chk_mosaic_enabled);
diff --git a/src/gtk+-2.x/ctkdisplaylayout.c b/src/gtk+-2.x/ctkdisplaylayout.c
index 82db694..d426a5b 100644
--- a/src/gtk+-2.x/ctkdisplaylayout.c
+++ b/src/gtk+-2.x/ctkdisplaylayout.c
@@ -3890,7 +3890,7 @@ void ctk_display_layout_set_display_reflection(CtkDisplayLayout *ctk_object,
nvDisplayPtr display,
Reflection reflection)
{
- Bool modified;
+ Bool modified = FALSE;
if (!display->cur_mode ||
diff --git a/src/gtk+-2.x/ctkpowermizer.c b/src/gtk+-2.x/ctkpowermizer.c
index 184a763..e84ac9f 100644
--- a/src/gtk+-2.x/ctkpowermizer.c
+++ b/src/gtk+-2.x/ctkpowermizer.c
@@ -146,6 +146,12 @@ typedef struct {
gint nvclock;
gint memclock;
gint processorclock;
+ gint nvclockmin;
+ gint nvclockmax;
+ gint memclockmin;
+ gint memclockmax;
+ gint processorclockmin;
+ gint processorclockmax;
} perfModeEntry, * perfModeEntryPtr;
@@ -157,10 +163,22 @@ static void apply_perf_mode_token(char *token, char *value, void *data)
pEntry->perf_level = atoi(value);
} else if (!strcasecmp("nvclock", token)) {
pEntry->nvclock = atoi(value);
+ } else if (!strcasecmp("nvclockmin", token)) {
+ pEntry->nvclockmin = atoi(value);
+ } else if (!strcasecmp("nvclockmax", token)) {
+ pEntry->nvclockmax = atoi(value);
} else if (!strcasecmp("memclock", token)) {
pEntry->memclock = atoi(value);
+ } else if (!strcasecmp("memclockmin", token)) {
+ pEntry->memclockmin = atoi(value);
+ } else if (!strcasecmp("memclockmax", token)) {
+ pEntry->memclockmax = atoi(value);
} else if (!strcasecmp("processorclock", token)) {
pEntry->processorclock = atoi(value);
+ } else if (!strcasecmp("processorclockmin", token)) {
+ pEntry->processorclockmin = atoi(value);
+ } else if (!strcasecmp("processorclockmax", token)) {
+ pEntry->processorclockmax = atoi(value);
} else {
nv_warning_msg("Unknown Perf Mode token value pair: %s=%s",
token, value);
@@ -174,97 +192,322 @@ static void update_perf_mode_table(CtkPowermizer *ctk_powermizer,
GtkWidget *table;
GtkWidget *label;
char *perf_modes = NULL;
+ char *tmp_perf_modes = NULL;
char *tokens;
char tmp_str[24];
- perfModeEntry entry;
gint ret;
- gint row_idx; /* Where to insert into the perf mode table */
+ gint row_idx = 0; /* Where to insert into the perf mode table */
gboolean active;
+ GtkWidget *vsep;
+ perfModeEntryPtr pEntry = NULL;
+ perfModeEntryPtr tmpEntry = NULL;
+ gint index = 0;
+ gint i = 0;
+
+ /* Get the current list of perf levels */
+
+ ret = NvCtrlGetStringAttribute(ctk_powermizer->attribute_handle,
+ NV_CTRL_STRING_PERFORMANCE_MODES,
+ &perf_modes);
+
+ if (ret != NvCtrlSuccess) {
+ /* Bail */
+ return;
+ }
+
+ /* Calculate the number of rows we needed vseparator in the table */
+ tmp_perf_modes = g_strdup(perf_modes);
+ for (tokens = strtok(tmp_perf_modes, ";");
+ tokens;
+ tokens = strtok(NULL, ";")) {
+
+ tmpEntry = realloc(pEntry, sizeof(*pEntry) * (index + 1));
+
+ if (!tmpEntry) {
+ continue;
+ }
+ pEntry = tmpEntry;
+ tmpEntry = NULL;
+
+ /* Invalidate perf mode entry */
+ memset(pEntry + index, -1, sizeof(*pEntry));
+
+ parse_token_value_pairs(tokens, apply_perf_mode_token,
+ (void *) &pEntry[index]);
+
+ /* Only add complete perf mode entries */
+ if ((pEntry[index].perf_level != -1) &&
+ (pEntry[index].nvclockmax != -1) &&
+ (pEntry[index].memclockmax != -1)) {
+ /* Set hasDecoupledClocks flag to decide new/old clock
+ * interface to show.
+ */
+ if (!ctk_powermizer->hasDecoupledClock &&
+ ((pEntry[index].nvclockmax != pEntry[index].nvclockmin) ||
+ (pEntry[index].memclockmax != pEntry[index].memclockmin) ||
+ (pEntry[index].processorclockmax !=
+ pEntry[index].processorclockmin))) {
+ ctk_powermizer->hasDecoupledClock = TRUE;
+ }
+ row_idx++;
+ }
+ index++;
+ }
+ g_free(tmp_perf_modes);
/* Since table cell management in GTK lacks, just remove and rebuild
* the table from scratch.
*/
-
+
/* Dump out the old table */
ctk_empty_container(ctk_powermizer->performance_table_hbox);
/* Generate a new table */
- table = gtk_table_new(1, 4, FALSE);
- 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);
+ if (ctk_powermizer->hasDecoupledClock) {
+ table = gtk_table_new(2, 15, FALSE);
+ row_idx = row_idx + 3;
+ 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);
- gtk_box_pack_start(GTK_BOX(ctk_powermizer->performance_table_hbox),
- table, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(ctk_powermizer->performance_table_hbox),
+ table, FALSE, FALSE, 0);
- if (ctk_powermizer->performance_level) {
- label = gtk_label_new("Performance Level");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
- }
+ if (ctk_powermizer->performance_level) {
+ label = gtk_label_new("Level");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+
+ /* Vertical separator */
+ vsep = gtk_vseparator_new();
+ gtk_table_attach(GTK_TABLE(table), vsep, 1, 2, 0, row_idx,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 0, 0);
+ }
- if (ctk_powermizer->gpu_clock && ctk_powermizer->memory_clock) {
- label = gtk_label_new("Graphics Clock");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 1, 2, 0, 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ if (ctk_powermizer->gpu_clock && ctk_powermizer->memory_clock) {
+ /* Graphics clock */
+ label = gtk_label_new("Graphics Clock");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 2, 5, 0, 1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ label = gtk_label_new("Current");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 2, 3, 1, 2,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ label = gtk_label_new("Min");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 3, 4, 1, 2,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ label = gtk_label_new("Max");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 4, 5, 1, 2,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
- label = gtk_label_new("Memory Clock");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 2, 3, 0, 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
- }
+ /* Vertical separator */
+ vsep = gtk_vseparator_new();
+ gtk_table_attach(GTK_TABLE(table), vsep, 5, 6, 0, row_idx,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 0, 0);
+
+ /* Memory clock */
+ label = gtk_label_new("Memory Clock");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 6, 9, 0, 1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ label = gtk_label_new("Current");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 6, 7, 1, 2,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ label = gtk_label_new("Min");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 7, 8, 1, 2,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ label = gtk_label_new("Max");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 8, 9, 1, 2,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+
+ /* Vertical separator */
+ vsep = gtk_vseparator_new();
+ gtk_table_attach(GTK_TABLE(table), vsep, 9, 10, 0, row_idx,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 0, 0);
+ }
+ if (ctk_powermizer->processor_clock) {
+ /* Processor clock */
+ label = gtk_label_new("Processor Clock");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 10, 11, 0, 1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ label = gtk_label_new("Current");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 11, 12, 1, 2,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ label = gtk_label_new("Min");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 12, 13, 1, 2,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ label = gtk_label_new("Max");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 13, 14, 1, 2,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+
+ /* Vertical separator */
+ vsep = gtk_vseparator_new();
+ gtk_table_attach(GTK_TABLE(table), vsep, 14, 15, 0, row_idx,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 0, 0);
+ }
+ } else {
- if (ctk_powermizer->processor_clock) {
- label = gtk_label_new("Processor Clock");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 3, 4, 0, 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
- }
- /* Get the current list of perf levels */
+ table = gtk_table_new(1, 4, FALSE);
+ 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);
- ret = NvCtrlGetStringAttribute(ctk_powermizer->attribute_handle,
- NV_CTRL_STRING_PERFORMANCE_MODES,
- &perf_modes);
+ gtk_box_pack_start(GTK_BOX(ctk_powermizer->performance_table_hbox),
+ table, FALSE, FALSE, 0);
- if (ret != NvCtrlSuccess) {
- gtk_widget_show_all(table);
- /* Bail */
- return;
+ if (ctk_powermizer->performance_level) {
+ label = gtk_label_new("Performance Level");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ }
+
+ if (ctk_powermizer->gpu_clock && ctk_powermizer->memory_clock) {
+ label = gtk_label_new("Graphics Clock");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 1, 2, 0, 1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+
+
+ label = gtk_label_new("Memory Clock");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 2, 3, 0, 1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ }
+
+ if (ctk_powermizer->processor_clock) {
+ label = gtk_label_new("Processor Clock");
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 3, 4, 0, 1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ }
}
/* Parse the perf levels and populate the table */
+ row_idx = 0; //reset value used to calculate vseparator.
+ row_idx = 3;
+ for (i = 0; i < index; i++) {
+ /* Only add complete perf mode entries */
+ if (ctk_powermizer->hasDecoupledClock &&
+ (pEntry[i].perf_level != -1) &&
+ (pEntry[i].nvclockmax != -1) &&
+ (pEntry[i].memclockmax != -1)) {
- row_idx = 1;
- for (tokens = strtok(perf_modes, ";");
- tokens;
- tokens = strtok(NULL, ";")) {
+ active = (pEntry[i].perf_level == perf_level);
- /* Invalidate perf mode entry */
- entry.perf_level = -1;
- entry.nvclock = -1;
- entry.memclock = -1;
- entry.processorclock = -1;
-
- parse_token_value_pairs(tokens, apply_perf_mode_token,
- &entry);
-
- /* Only add complete perf mode entries */
- if ((entry.perf_level != -1) &&
- (entry.nvclock != -1) &&
- (entry.memclock != -1)) {
-
- active = (entry.perf_level == perf_level);
+ /* XXX Assume the perf levels are sorted by the server */
+
+ gtk_table_resize(GTK_TABLE(table), row_idx+1, 10);
+
+ if (ctk_powermizer->performance_level) {
+ g_snprintf(tmp_str, 24, "%d", pEntry[i].perf_level);
+ label = gtk_label_new(tmp_str);
+ gtk_widget_set_sensitive(label, active);
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 0, 1,
+ row_idx, row_idx+1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ }
+
+ if (ctk_powermizer->gpu_clock && ctk_powermizer->memory_clock) {
+ if (active) {
+ g_snprintf(tmp_str, 24, "%d MHz", ctk_powermizer->nvclock);
+ label = gtk_label_new(tmp_str);
+ gtk_widget_set_sensitive(label, active);
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 2, 3,
+ row_idx, row_idx+1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ }
+ g_snprintf(tmp_str, 24, "%d MHz", pEntry[i].nvclockmin);
+ label = gtk_label_new(tmp_str);
+ gtk_widget_set_sensitive(label, active);
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 3, 4,
+ row_idx, row_idx+1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ g_snprintf(tmp_str, 24, "%d MHz", pEntry[i].nvclockmax);
+ label = gtk_label_new(tmp_str);
+ gtk_widget_set_sensitive(label, active);
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 4, 5,
+ row_idx, row_idx+1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+
+ if (active) {
+ g_snprintf(tmp_str, 24, "%d MHz", ctk_powermizer->memclock);
+ label = gtk_label_new(tmp_str);
+ gtk_widget_set_sensitive(label, active);
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 6, 7,
+ row_idx, row_idx+1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ }
+ g_snprintf(tmp_str, 24, "%d MHz", pEntry[i].memclockmin);
+ label = gtk_label_new(tmp_str);
+ gtk_widget_set_sensitive(label, active);
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 7, 8,
+ row_idx, row_idx+1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ g_snprintf(tmp_str, 24, "%d MHz", pEntry[i].memclockmax);
+ label = gtk_label_new(tmp_str);
+ gtk_widget_set_sensitive(label, active);
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 8, 9,
+ row_idx, row_idx+1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ }
+ if (ctk_powermizer->processor_clock) {
+ if (active) {
+ g_snprintf(tmp_str, 24, "%d MHz", ctk_powermizer->processorclock);
+ label = gtk_label_new(tmp_str);
+ gtk_widget_set_sensitive(label, active);
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 11, 12, row_idx, row_idx+1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ }
+ g_snprintf(tmp_str, 24, "%d MHz", pEntry[i].processorclockmin);
+ label = gtk_label_new(tmp_str);
+ gtk_widget_set_sensitive(label, active);
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 12, 13,
+ row_idx, row_idx+1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ g_snprintf(tmp_str, 24, "%d MHz", pEntry[i].processorclockmax);
+ label = gtk_label_new(tmp_str);
+ gtk_widget_set_sensitive(label, active);
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
+ gtk_table_attach(GTK_TABLE(table), label, 13, 14,
+ row_idx, row_idx+1,
+ GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
+ }
+ row_idx++;
+ } else if ((pEntry[i].perf_level != -1) &&
+ (pEntry[i].nvclock != -1) &&
+ (pEntry[i].memclock != -1)) {
+
+ active = (pEntry[i].perf_level == perf_level);
/* XXX Assume the perf levels are sorted by the server */
- gtk_table_resize(GTK_TABLE(table), row_idx+1, 4);
+ gtk_table_resize(GTK_TABLE(table), row_idx+1, 10);
if (ctk_powermizer->performance_level) {
- g_snprintf(tmp_str, 24, "%d", entry.perf_level);
+ g_snprintf(tmp_str, 24, "%d", pEntry[i].perf_level);
label = gtk_label_new(tmp_str);
gtk_widget_set_sensitive(label, active);
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
@@ -274,7 +517,7 @@ static void update_perf_mode_table(CtkPowermizer *ctk_powermizer,
}
if (ctk_powermizer->gpu_clock && ctk_powermizer->memory_clock) {
- g_snprintf(tmp_str, 24, "%d MHz", entry.nvclock);
+ g_snprintf(tmp_str, 24, "%d MHz", pEntry[i].nvclock);
label = gtk_label_new(tmp_str);
gtk_widget_set_sensitive(label, active);
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
@@ -282,7 +525,7 @@ static void update_perf_mode_table(CtkPowermizer *ctk_powermizer,
row_idx, row_idx+1,
GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
- g_snprintf(tmp_str, 24, "%d MHz", entry.memclock);
+ g_snprintf(tmp_str, 24, "%d MHz", pEntry[i].memclock);
label = gtk_label_new(tmp_str);
gtk_widget_set_sensitive(label, active);
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
@@ -291,7 +534,7 @@ static void update_perf_mode_table(CtkPowermizer *ctk_powermizer,
GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
}
if (ctk_powermizer->processor_clock) {
- g_snprintf(tmp_str, 24, "%d MHz", entry.processorclock);
+ g_snprintf(tmp_str, 24, "%d MHz", pEntry[i].processorclock);
label = gtk_label_new(tmp_str);
gtk_widget_set_sensitive(label, active);
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
@@ -302,14 +545,16 @@ static void update_perf_mode_table(CtkPowermizer *ctk_powermizer,
} else {
nv_warning_msg("Incomplete Perf Mode (perf=%d, nvclock=%d,"
" memclock=%d)",
- entry.perf_level, entry.nvclock,
- entry.memclock);
+ pEntry[i].perf_level, pEntry[i].nvclock,
+ pEntry[i].memclock);
}
}
gtk_widget_show_all(table);
XFree(perf_modes);
+ XFree(pEntry);
+ pEntry = NULL;
}
@@ -353,6 +598,9 @@ static gboolean update_powermizer_info(gpointer user_data)
memory_clock = clockret & 0x0000FFFF;
gpu_clock = (clockret >> 16);
+ ctk_powermizer->nvclock = gpu_clock;
+ ctk_powermizer->memclock = memory_clock;
+
s = g_strdup_printf("%d Mhz", gpu_clock);
gtk_label_set_text(GTK_LABEL(ctk_powermizer->gpu_clock), s);
g_free(s);
@@ -366,6 +614,7 @@ static gboolean update_powermizer_info(gpointer user_data)
NV_CTRL_GPU_CURRENT_PROCESSOR_CLOCK_FREQS,
&processor_clock);
if (ret == NvCtrlSuccess && ctk_powermizer->processor_clock) {
+ ctk_powermizer->processorclock = processor_clock;
s = g_strdup_printf("%d Mhz", processor_clock);
gtk_label_set_text(GTK_LABEL(ctk_powermizer->processor_clock), s);
g_free(s);
@@ -559,7 +808,7 @@ GtkWidget* ctk_powermizer_new(NvCtrlAttributeHandle *handle,
if (ret == NvCtrlSuccess) {
pcie_gen_queriable = TRUE;
}
-
+
/* return early if query to attributes fail */
if (!power_source_available && !perf_level_available &&
!adaptive_clock_state_available && clock_freqs_available &&
@@ -574,6 +823,7 @@ GtkWidget* ctk_powermizer_new(NvCtrlAttributeHandle *handle,
ctk_powermizer->attribute_handle = handle;
ctk_powermizer->ctk_config = ctk_config;
ctk_powermizer->pcie_gen_queriable = pcie_gen_queriable;
+ ctk_powermizer->hasDecoupledClock = FALSE;
/* set container properties for the CtkPowermizer widget */
diff --git a/src/gtk+-2.x/ctkpowermizer.h b/src/gtk+-2.x/ctkpowermizer.h
index 02a12d6..e1919e8 100644
--- a/src/gtk+-2.x/ctkpowermizer.h
+++ b/src/gtk+-2.x/ctkpowermizer.h
@@ -70,7 +70,11 @@ struct _CtkPowermizer
GtkWidget *configuration_button;
gboolean dp_enabled;
gboolean dp_toggle_warning_dlg_shown;
+ gboolean hasDecoupledClock;
gint attribute;
+ gint nvclock;
+ gint memclock;
+ gint processorclock;
GtkWidget *status;
GtkWidget *link_width;
diff --git a/src/libXNVCtrl/NVCtrl.h b/src/libXNVCtrl/NVCtrl.h
index ab644f1..e1ab891 100644
--- a/src/libXNVCtrl/NVCtrl.h
+++ b/src/libXNVCtrl/NVCtrl.h
@@ -3683,20 +3683,37 @@
* NV_CTRL_STRING_PERFORMANCE_MODES - returns a string with all the
* performance modes defined for this GPU along with their associated
* NV Clock and Memory Clock values.
+ * Not all tokens will be reported on all GPUs, and additional tokens
+ * may be added in the future.
+ * For backwards compatibility we still provide nvclock, memclock, and
+ * processorclock those are the same as nvclockmin, memclockmin and
+ * processorclockmin.
*
* Each performance modes are returned as a comma-separated list of
* "token=value" pairs. Each set of performance mode tokens are separated
* by a ";". Valid tokens:
*
- * Token Value
- * "perf" integer - the Performance level
- * "nvclock" integer - the GPU clocks (in MHz) for the perf level
- * "memclock" integer - the memory clocks (in MHz) for the perf level
- *
+ * Token Value
+ * "perf" integer - the Performance level
+ * "nvclock" integer - the GPU clocks (in MHz) for the perf level
+ * "nvclockmin" integer - the GPU clocks min (in MHz) for the perf level
+ * "nvclockmax" integer - the GPU clocks max (in MHz) for the perf level
+ * "memclock" integer - the memory clocks (in MHz) for the perf level
+ * "memclockmin" integer - the memory clocks min (in MHz) for the perf level
+ * "memclockmax" integer - the memory clocks max (in MHz) for the perf level
+ * "processorclock" integer - the processor clocks (in MHz)
+ * for the perf level
+ * "processorclockmin" integer - the processor clocks min (in MHz)
+ * for the perf level
+ * "processorclockmax" integer - the processor clocks max (in MHz)
+ * for the perf level
*
* Example:
*
- * perf=0, nvclock=500, memclock=505 ; perf=1, nvclock=650, memclock=505
+ * perf=0, nvclock=324, nvclockmin=324, nvclockmax=324, memclock=324,
+ * memclockmin=324, memclockmax=324 ;
+ * perf=1, nvclock=324, nvclockmin=324, nvclockmax=640, memclock=810,
+ * memclockmin=810, memclockmax=810 ;
*
* This attribute may be queried through XNVCTRLQueryTargetStringAttribute()
* using a NV_CTRL_TARGET_TYPE_GPU or NV_CTRL_TARGET_TYPE_X_SCREEN target.
@@ -3808,7 +3825,9 @@
* NV_CTRL_STRING_GPU_CURRENT_CLOCK_FREQS - returns a string with the
* associated NV Clock, Memory Clock and Processor Clock values.
*
- * Current valid tokens are "nvclock", "memclock", and "processorclock".
+ * Current valid tokens are "nvclock", "nvclockmin", "nvclockmax",
+ * "memclock", "memclockmin", "memclockmax", "processorclock",
+ * "processorclockmin" and "processorclockmax".
* Not all tokens will be reported on all GPUs, and additional tokens
* may be added in the future.
*
@@ -3816,17 +3835,24 @@
* "token=value" pairs.
* Valid tokens:
*
- * Token Value
- * "nvclock" integer - the GPU clocks (in MHz) for the current
- * perf level
- * "memclock" integer - the memory clocks (in MHz) for the current
- * perf level
- * "processorclock" integer - the processor clocks (in MHz) for the perf level
- *
+ * Token Value
+ * "nvclock" integer - the GPU clocks (in MHz) for the perf level
+ * "nvclockmin" integer - the GPU clocks min (in MHz) for the perf level
+ * "nvclockmax" integer - the GPU clocks max (in MHz) for the perf level
+ * "memclock" integer - the memory clocks (in MHz) for the perf level
+ * "memclockmin" integer - the memory clocks min (in MHz) for the perf level
+ * "memclockmax" integer - the memory clocks (max in MHz) for the perf level
+ * "processorclock" integer - the processor clocks (in MHz)
+ * for the perf level
+ * "processorclockmin" integer - the processor clocks min (in MHz)
+ * for the perf level
+ * "processorclockmax" integer - the processor clocks max (in MHz)
+ * for the perf level
*
* Example:
*
- * nvclock=459, memclock=400, processorclock=918
+ * nvclock=324, nvclockmin=324, nvclockmax=324,
+ * memclock=324, memclockmin=324, memclockmax=324
*
* This attribute may be queried through XNVCTRLQueryTargetStringAttribute()
* using an NV_CTRL_TARGET_TYPE_GPU or NV_CTRL_TARGET_TYPE_X_SCREEN target.
diff --git a/src/version.mk b/src/version.mk
index a8b6fa4..8a89afe 100644
--- a/src/version.mk
+++ b/src/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 325.08
+NVIDIA_VERSION = 325.15
diff --git a/version.mk b/version.mk
index a8b6fa4..8a89afe 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 325.08
+NVIDIA_VERSION = 325.15