summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2013-10-01 14:46:07 -0700
committerAaron Plattner <aplattner@nvidia.com>2013-10-01 14:54:46 -0700
commitd6e26b709016651e35d2be0cb0c0371d63516c01 (patch)
tree063b64d1456edffcb949eee6bc2698e2499443c6
parent7d4721c52eaa9315e9675d94f459f459931ff40c (diff)
319.60319.60
-rw-r--r--doc/version.mk2
-rw-r--r--samples/version.mk2
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig-utils.c4
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig.c3
-rw-r--r--src/gtk+-2.x/ctkslimm.c122
-rw-r--r--src/version.mk2
-rw-r--r--version.mk2
7 files changed, 99 insertions, 38 deletions
diff --git a/doc/version.mk b/doc/version.mk
index b483dd1..8768990 100644
--- a/doc/version.mk
+++ b/doc/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 319.49
+NVIDIA_VERSION = 319.60
diff --git a/samples/version.mk b/samples/version.mk
index b483dd1..8768990 100644
--- a/samples/version.mk
+++ b/samples/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 319.49
+NVIDIA_VERSION = 319.60
diff --git a/src/gtk+-2.x/ctkdisplayconfig-utils.c b/src/gtk+-2.x/ctkdisplayconfig-utils.c
index b5a53fa..c48db9a 100644
--- a/src/gtk+-2.x/ctkdisplayconfig-utils.c
+++ b/src/gtk+-2.x/ctkdisplayconfig-utils.c
@@ -3342,7 +3342,7 @@ static Bool layout_add_screen_from_server(nvLayoutPtr layout,
*err_str = g_strdup_printf("Failed to query Dynamic TwinView for "
"screen %d.",
screen_id);
- nv_warning_msg("%s", *err_str);
+ nv_warning_msg(*err_str);
goto fail;
}
screen->dynamic_twinview = !!val;
@@ -3368,7 +3368,7 @@ static Bool layout_add_screen_from_server(nvLayoutPtr layout,
"support scanout screens (%d) that have "
"dynamic twinview disabled.",
screen_id);
- nv_warning_msg("%s", *err_str);
+ nv_warning_msg(*err_str);
goto fail;
}
diff --git a/src/gtk+-2.x/ctkdisplayconfig.c b/src/gtk+-2.x/ctkdisplayconfig.c
index 9845e5b..b360920 100644
--- a/src/gtk+-2.x/ctkdisplayconfig.c
+++ b/src/gtk+-2.x/ctkdisplayconfig.c
@@ -2210,6 +2210,7 @@ GtkTextBuffer *ctk_display_config_create_help(GtkTextTagTable *table,
"be moved by holding CONTROL-Click and dragging.");
ctk_help_heading(b, &i, "Layout Hidden Label");
ctk_help_para(b, &i, "%s", __layout_hidden_label_help);
+
ctk_help_heading(b, &i, "Enable Xinerama");
ctk_help_para(b, &i, "%s This setting is only available when multiple "
"X screens are present.", __layout_xinerama_button_help);
@@ -5856,7 +5857,7 @@ static void display_config_changed(GtkWidget *widget, gpointer user_data)
"", &tokens);
update = TRUE;
if (!display_add_modelines_from_server(display, display->gpu, &err_str)) {
- nv_warning_msg("%s", err_str);
+ nv_warning_msg(err_str);
g_free(err_str);
return;
}
diff --git a/src/gtk+-2.x/ctkslimm.c b/src/gtk+-2.x/ctkslimm.c
index 15afce4..0790cef 100644
--- a/src/gtk+-2.x/ctkslimm.c
+++ b/src/gtk+-2.x/ctkslimm.c
@@ -1236,6 +1236,19 @@ static nvDisplayPtr intersect_modelines(nvLayoutPtr layout)
return display;
}
+#define STEREO_IS_3D_VISION(stereo) \
+ (((stereo) == NV_CTRL_STEREO_3D_VISION) || \
+ ((stereo) == NV_CTRL_STEREO_3D_VISION_PRO))
+
+static int get_display_stereo_mode(nvDisplayPtr display)
+{
+ if ((display->screen == NULL) ||
+ (display->screen->stereo_supported == FALSE)) {
+ return NV_CTRL_STEREO_OFF;
+ } else {
+ return display->screen->stereo;
+ }
+}
GtkWidget* ctk_slimm_new(NvCtrlAttributeHandle *handle,
CtkEvent *ctk_event, CtkConfig *ctk_config)
@@ -1256,6 +1269,7 @@ GtkWidget* ctk_slimm_new(NvCtrlAttributeHandle *handle,
CtkDropDownMenu *menu;
gchar *err_str = NULL;
+ gchar *str;
gchar *tmp;
gchar *sli_mode = NULL;
ReturnStatus ret;
@@ -1392,41 +1406,66 @@ GtkWidget* ctk_slimm_new(NvCtrlAttributeHandle *handle,
/* If we failed to load, tell the user why */
if (err_str || !layout) {
- gchar *str;
+ goto slimm_fail;
+ }
- if (!err_str) {
- str = g_strdup("Unable to load SLI Mosaic Mode Settings page.");
- } else {
- str = g_strdup_printf("Unable to load SLI Mosaic Mode Settings "
- "page:\n\n%s", err_str);
- g_free(err_str);
- }
+ display = intersect_modelines(layout);
- label = gtk_label_new(str);
- g_free(str);
- gtk_label_set_selectable(GTK_LABEL(label), TRUE);
- gtk_container_add(GTK_CONTAINER(object), label);
+ if (display == NULL) {
+ err_str = g_strdup("Unable to find active display with "
+ "intersected modelines.");
+ goto slimm_fail;
+ } else if ((display->modelines == NULL) &&
+ (display->cur_mode->modeline == NULL)) {
+ /* The modepool for the active display did not have any modes in
+ * its modepool matching any of the modes on the modepool of any
+ * other display in the layout, causing intersect_modelines to
+ * remove every mode from the list of available modes for SLI mosaic
+ * mode.
+ *
+ * This can happen if one display had its modepool trimmed and modified
+ * to support 3D vision, while other displays (either on X screens
+ * without stereo currently enabled, or on screenless GPUs) did not.
+ * Find if that is the case, and display an informative message if so.
+ */
+ nvGpuPtr gpu;
+ nvDisplayPtr d;
+ int stereo = get_display_stereo_mode(display);
- /* Show the GUI */
- gtk_widget_show_all(GTK_WIDGET(ctk_object));
+ for (gpu = layout->gpus; gpu; gpu = gpu->next_in_layout) {
+ for (d = gpu->displays; d; d = d->next_on_gpu) {
+ int other_stereo;
- return GTK_WIDGET(ctk_object);
- }
+ if (display == d) {
+ continue;
+ }
- display = intersect_modelines(layout);
+ other_stereo = get_display_stereo_mode(d);
- if (display == NULL) {
- gchar *str = g_strdup("Unable to find active display with "
- "intersected modelines.");
- label = gtk_label_new(str);
- g_free(str);
- gtk_label_set_selectable(GTK_LABEL(label), TRUE);
- gtk_container_add(GTK_CONTAINER(object), label);
+ if ((STEREO_IS_3D_VISION(stereo) &&
+ !STEREO_IS_3D_VISION(other_stereo)) ||
+ (!STEREO_IS_3D_VISION(stereo) &&
+ STEREO_IS_3D_VISION(other_stereo))) {
- /* Show the GUI */
- gtk_widget_show_all(GTK_WIDGET(ctk_object));
+ err_str = g_strdup("Unable to find common modelines between\n"
+ "all connected displays due to 3D vision\n"
+ "being enabled on some displays and not\n"
+ "others. Please make sure that 3D vision\n"
+ "is enabled on all connected displays\n"
+ "before enabling SLI mosaic mode.");
- return GTK_WIDGET(ctk_object);
+ goto slimm_fail;
+ }
+ }
+ }
+
+ /* The intersected modepool was empty, but not because of a mismatch
+ * in 3D Vision settings.
+ */
+ err_str = g_strdup("Unable to find find common modelines between "
+ "all connected displays.");
+
+ goto slimm_fail;
}
@@ -1434,11 +1473,8 @@ GtkWidget* ctk_slimm_new(NvCtrlAttributeHandle *handle,
ctk_object->modelines = display->modelines;
if (display->cur_mode->modeline) {
ctk_object->cur_modeline = display->cur_mode->modeline;
- } else if (ctk_object->modelines) {
- ctk_object->cur_modeline = ctk_object->modelines;
} else {
- /* This is an error. */
- return NULL;
+ ctk_object->cur_modeline = ctk_object->modelines;
}
ctk_object->num_modelines = display->num_modelines;
@@ -1712,6 +1748,30 @@ GtkWidget* ctk_slimm_new(NvCtrlAttributeHandle *handle,
gtk_widget_show_all(GTK_WIDGET(object));
return GTK_WIDGET(object);
+
+slimm_fail:
+
+ if (layout) {
+ layout_free(layout);
+ }
+
+ if (!err_str) {
+ str = g_strdup("Unable to load SLI Mosaic Mode Settings page.");
+ } else {
+ str = g_strdup_printf("Unable to load SLI Mosaic Mode Settings "
+ "page:\n\n%s", err_str);
+ g_free(err_str);
+ }
+
+ label = gtk_label_new(str);
+ g_free(str);
+ gtk_label_set_selectable(GTK_LABEL(label), TRUE);
+ gtk_container_add(GTK_CONTAINER(object), label);
+
+ /* Show the GUI */
+ gtk_widget_show_all(GTK_WIDGET(ctk_object));
+
+ return GTK_WIDGET(ctk_object);
}
diff --git a/src/version.mk b/src/version.mk
index b483dd1..8768990 100644
--- a/src/version.mk
+++ b/src/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 319.49
+NVIDIA_VERSION = 319.60
diff --git a/version.mk b/version.mk
index b483dd1..8768990 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 319.49
+NVIDIA_VERSION = 319.60