summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2020-09-17 10:28:42 -0700
committerAaron Plattner <aplattner@nvidia.com>2020-09-17 10:28:42 -0700
commit60487406c710438b98c1cb9b8c052c387dfe9c3e (patch)
tree438182e46b9e9bc3aa5b989e647c5a5f79faf1ec
parente815a5d23c2be419dcd85ff03f10500bc8ac26a0 (diff)
parent3fac2b1bd245e109161a5efa9eac2a0fe811663b (diff)
Merge tag '455.23.04' into master
-rw-r--r--doc/version.mk2
-rw-r--r--samples/nv-control-events.c2
-rw-r--r--samples/nv-control-info.c2
-rw-r--r--samples/version.mk2
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig-utils.c15
-rw-r--r--src/gtk+-2.x/ctkdisplaydevice.c7
-rw-r--r--src/gtk+-2.x/ctkdisplaylayout.h1
-rw-r--r--src/gtk+-2.x/ctkevent.c5
-rw-r--r--src/gtk+-2.x/ctkgpu.c8
-rw-r--r--src/gtk+-2.x/ctkopengl.c202
-rw-r--r--src/gtk+-2.x/ctkvdpau.c242
-rw-r--r--src/libXNVCtrl/NVCtrl.h34
-rw-r--r--src/libXNVCtrl/version.mk2
-rw-r--r--src/nvml.h56
-rw-r--r--src/parse.c3
-rw-r--r--src/version.h2
-rw-r--r--src/version.mk2
-rw-r--r--version.mk2
18 files changed, 178 insertions, 411 deletions
diff --git a/doc/version.mk b/doc/version.mk
index b41f1a9..618e84a 100644
--- a/doc/version.mk
+++ b/doc/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 450.66
+NVIDIA_VERSION = 455.23.04
diff --git a/samples/nv-control-events.c b/samples/nv-control-events.c
index 3f0bbe0..1faca17 100644
--- a/samples/nv-control-events.c
+++ b/samples/nv-control-events.c
@@ -551,7 +551,6 @@ static AttrEntry attr_table[] = {
MAKE_ENTRY(NV_CTRL_XINERAMA),
MAKE_ENTRY(NV_CTRL_XINERAMA_STEREO),
MAKE_ENTRY(NV_CTRL_BUS_RATE),
- MAKE_ENTRY(NV_CTRL_SHOW_SLI_VISUAL_INDICATOR),
MAKE_ENTRY(NV_CTRL_XV_SYNC_TO_DISPLAY),
MAKE_ENTRY(NV_CTRL_ASSOCIATED_DISPLAY_DEVICES),
MAKE_ENTRY(NV_CTRL_FRAMELOCK_SLAVES),
@@ -629,7 +628,6 @@ static AttrEntry attr_table[] = {
MAKE_ENTRY(NV_CTRL_THERMAL_SENSOR_READING),
MAKE_ENTRY(NV_CTRL_THERMAL_SENSOR_PROVIDER),
MAKE_ENTRY(NV_CTRL_THERMAL_SENSOR_TARGET),
- MAKE_ENTRY(NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR),
MAKE_ENTRY(NV_CTRL_GPU_CURRENT_PROCESSOR_CLOCK_FREQS),
MAKE_ENTRY(NV_CTRL_GPU_PCIE_MAX_LINK_SPEED),
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_RESET_TRANSCEIVER_TO_FACTORY_SETTINGS),
diff --git a/samples/nv-control-info.c b/samples/nv-control-info.c
index 012f5d1..df9ac72 100644
--- a/samples/nv-control-info.c
+++ b/samples/nv-control-info.c
@@ -96,7 +96,6 @@ static const char *attr_int_table[NV_CTRL_LAST_ATTRIBUTE + 1] = {
MAKE_ENTRY(NV_CTRL_XINERAMA),
MAKE_ENTRY(NV_CTRL_XINERAMA_STEREO),
MAKE_ENTRY(NV_CTRL_BUS_RATE),
- MAKE_ENTRY(NV_CTRL_SHOW_SLI_VISUAL_INDICATOR),
MAKE_ENTRY(NV_CTRL_XV_SYNC_TO_DISPLAY),
MAKE_ENTRY(NV_CTRL_CURRENT_XV_SYNC_TO_DISPLAY_ID),
MAKE_ENTRY(NV_CTRL_PROBE_DISPLAYS),
@@ -163,7 +162,6 @@ static const char *attr_int_table[NV_CTRL_LAST_ATTRIBUTE + 1] = {
MAKE_ENTRY(NV_CTRL_THERMAL_SENSOR_READING),
MAKE_ENTRY(NV_CTRL_THERMAL_SENSOR_PROVIDER),
MAKE_ENTRY(NV_CTRL_THERMAL_SENSOR_TARGET),
- MAKE_ENTRY(NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR),
MAKE_ENTRY(NV_CTRL_GPU_CURRENT_PROCESSOR_CLOCK_FREQS),
MAKE_ENTRY(NV_CTRL_GPU_PCIE_MAX_LINK_SPEED),
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_RESET_TRANSCEIVER_TO_FACTORY_SETTINGS),
diff --git a/samples/version.mk b/samples/version.mk
index b41f1a9..618e84a 100644
--- a/samples/version.mk
+++ b/samples/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 450.66
+NVIDIA_VERSION = 455.23.04
diff --git a/src/gtk+-2.x/ctkdisplayconfig-utils.c b/src/gtk+-2.x/ctkdisplayconfig-utils.c
index 6e1c3b3..3139732 100644
--- a/src/gtk+-2.x/ctkdisplayconfig-utils.c
+++ b/src/gtk+-2.x/ctkdisplayconfig-utils.c
@@ -1719,7 +1719,7 @@ 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 is enabled and which type.
- * Surround (Base Mosaic) only supports up to 3 enabled display devices,
+ * Surround (Base Mosaic) only supports up to 5 enabled display devices,
* while other modes (Base Mosaic and SLI Mosaic) support unlimited displays.
*
**/
@@ -1733,7 +1733,7 @@ int get_screen_max_displays(nvScreenPtr screen)
*/
if (gpu->mosaic_enabled) {
if (gpu->mosaic_type == MOSAIC_TYPE_BASE_MOSAIC_LIMITED) {
- return 3;
+ return 5;
}
return -1; /* Not limited */
}
@@ -3584,7 +3584,7 @@ static Bool layout_add_screen_from_server(nvLayoutPtr layout,
gchar **err_str)
{
nvScreenPtr screen;
- int val, tmp;
+ int val;
ReturnStatus ret;
gchar *primary_str = NULL;
gchar *screen_info = NULL;
@@ -3657,14 +3657,7 @@ static Bool layout_add_screen_from_server(nvLayoutPtr layout,
goto fail;
}
- /* Query SLI status */
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_SHOW_SLI_VISUAL_INDICATOR,
- &tmp);
-
- screen->sli = (ret == NvCtrlSuccess);
-
- /* Query SLI mode */
+ /* Query SLI status and mode */
ret = NvCtrlGetStringAttribute(ctrl_target,
NV_CTRL_STRING_SLI_MODE,
&screen->sli_mode);
diff --git a/src/gtk+-2.x/ctkdisplaydevice.c b/src/gtk+-2.x/ctkdisplaydevice.c
index 86ee2fa..a067b7d 100644
--- a/src/gtk+-2.x/ctkdisplaydevice.c
+++ b/src/gtk+-2.x/ctkdisplaydevice.c
@@ -101,8 +101,8 @@ static const char *__info_link_help =
"connections, reports the bandwidth of the connection.";
static const char *__info_signal_help =
-"Report whether the flat panel is driven by an LVDS, TMDS, or DisplayPort "
-"signal.";
+"Report whether the flat panel is driven by an LVDS, TMDS, DisplayPort, "
+"or HDMI FRL (fixed-rate link) signal.";
static const char * __refresh_rate_help =
"The refresh rate displays the rate at which the screen is currently "
@@ -713,6 +713,9 @@ static gboolean update_signal_info(InfoEntry *entry)
case NV_CTRL_FLATPANEL_SIGNAL_DISPLAYPORT:
str = "DisplayPort";
break;
+ case NV_CTRL_FLATPANEL_SIGNAL_HDMI_FRL:
+ str = "HDMI FRL";
+ break;
default:
str = "Unknown";
break;
diff --git a/src/gtk+-2.x/ctkdisplaylayout.h b/src/gtk+-2.x/ctkdisplaylayout.h
index c710251..ab5c431 100644
--- a/src/gtk+-2.x/ctkdisplaylayout.h
+++ b/src/gtk+-2.x/ctkdisplaylayout.h
@@ -363,7 +363,6 @@ typedef struct nvScreenRec {
int x_offset; /* Offsets for relative positioning */
int y_offset;
- Bool sli;
char *sli_mode;
char *multigpu_mode;
Bool no_scanout; /* This screen has no display devices */
diff --git a/src/gtk+-2.x/ctkevent.c b/src/gtk+-2.x/ctkevent.c
index 25c36cf..734a951 100644
--- a/src/gtk+-2.x/ctkevent.c
+++ b/src/gtk+-2.x/ctkevent.c
@@ -177,7 +177,6 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_SIGNAL(NV_CTRL_IMAGE_SETTINGS);
MAKE_SIGNAL(NV_CTRL_XINERAMA_STEREO);
MAKE_SIGNAL(NV_CTRL_BUS_RATE);
- MAKE_SIGNAL(NV_CTRL_SHOW_SLI_VISUAL_INDICATOR);
MAKE_SIGNAL(NV_CTRL_XV_SYNC_TO_DISPLAY);
MAKE_SIGNAL(NV_CTRL_ASSOCIATED_DISPLAY_DEVICES);
MAKE_SIGNAL(NV_CTRL_FRAMELOCK_SLAVES);
@@ -248,7 +247,6 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_SIGNAL(NV_CTRL_THERMAL_SENSOR_READING);
MAKE_SIGNAL(NV_CTRL_THERMAL_SENSOR_PROVIDER);
MAKE_SIGNAL(NV_CTRL_THERMAL_SENSOR_TARGET);
- MAKE_SIGNAL(NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR);
MAKE_SIGNAL(NV_CTRL_GPU_CURRENT_PROCESSOR_CLOCK_FREQS);
MAKE_SIGNAL(NV_CTRL_GPU_PCIE_MAX_LINK_SPEED);
MAKE_SIGNAL(NV_CTRL_3D_VISION_PRO_TRANSCEIVER_CHANNEL);
@@ -302,6 +300,7 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_SIGNAL(NV_CTRL_DISPLAY_VRR_MODE);
MAKE_SIGNAL(NV_CTRL_DISPLAY_VRR_MIN_REFRESH_RATE);
MAKE_SIGNAL(NV_CTRL_DISPLAY_VRR_ENABLED);
+ MAKE_SIGNAL(NV_CTRL_PLATFORM_POWER_MODE);
#undef MAKE_SIGNAL
/*
@@ -311,7 +310,7 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
* knows about.
*/
-#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_GPU_MAX_OPERATING_THRESHOLD
+#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_PLATFORM_POWER_MODE
#warning "There are attributes that do not emit signals!"
#endif
diff --git a/src/gtk+-2.x/ctkgpu.c b/src/gtk+-2.x/ctkgpu.c
index 02c5d86..497cdcf 100644
--- a/src/gtk+-2.x/ctkgpu.c
+++ b/src/gtk+-2.x/ctkgpu.c
@@ -369,6 +369,7 @@ GtkWidget* ctk_gpu_new(CtrlTarget *ctrl_target,
screens = g_strdup("None");
} else {
CtrlTarget *screen_target;
+ char *sli_str = NULL;
if (xinerama_enabled) {
screens = g_strdup("Screen 0 (Xinerama)");
@@ -398,13 +399,14 @@ GtkWidget* ctk_gpu_new(CtrlTarget *ctrl_target,
X_SCREEN_TARGET, pData[1]);
}
- ret = NvCtrlGetAttribute(screen_target,
- NV_CTRL_SHOW_SLI_VISUAL_INDICATOR,
- &tmp);
+ ret = NvCtrlGetStringAttribute(screen_target,
+ NV_CTRL_STRING_SLI_MODE,
+ &sli_str);
if (ret == NvCtrlSuccess) {
tmp_str = g_strdup_printf("%s (SLI)", screens);
g_free(screens);
screens = tmp_str;
+ free(sli_str);
}
}
free(pData);
diff --git a/src/gtk+-2.x/ctkopengl.c b/src/gtk+-2.x/ctkopengl.c
index 39271ae..da27007 100644
--- a/src/gtk+-2.x/ctkopengl.c
+++ b/src/gtk+-2.x/ctkopengl.c
@@ -43,12 +43,6 @@ static void post_show_vrr_visual_indicator_button_toggled(CtkOpenGL *, gboolean)
static void post_force_stereo_button_toggled(CtkOpenGL *, gboolean);
-static void post_show_sli_visual_indicator_button_toggled(CtkOpenGL *,
- gboolean);
-
-static void post_show_multigpu_visual_indicator_button_toggled(CtkOpenGL *,
- gboolean);
-
static void post_show_graphics_visual_indicator_button_toggled(CtkOpenGL *,
gboolean);
static void post_xinerama_stereo_button_toggled(CtkOpenGL *, gboolean);
@@ -75,10 +69,6 @@ static void aa_line_gamma_toggled (GtkWidget *, gpointer);
static void use_conformant_clamping_button_toggled(GtkWidget *, gpointer);
-static void show_sli_visual_indicator_button_toggled (GtkWidget *, gpointer);
-
-static void show_multigpu_visual_indicator_button_toggled (GtkWidget *, gpointer);
-
static void show_graphics_visual_indicator_button_toggled (GtkWidget *, gpointer);
static void value_changed (GObject *, CtrlEvent *, gpointer);
@@ -171,20 +161,6 @@ static const char *__xinerama_stereo_help =
"stereo flipping on multiple X screens configured "
"with Xinerama. This option is applied immediately.";
-static const char *__show_sli_visual_indicator_help =
-"Enabling this option causes OpenGL to draw "
-"information about the current SLI mode on the "
-"screen. This option is applied to OpenGL "
-"applications that are started after this option is "
-"set.";
-
-static const char *__show_multigpu_visual_indicator_help =
-"Enabling this option causes OpenGL to draw "
-"information about the current Multi-GPU mode on the "
-"screen. This option is applied to OpenGL "
-"applications that are started after this option is "
-"set.";
-
static const char *__show_graphics_visual_indicator_help =
"Enabling this option causes the driver to draw "
"information about the graphics API in use, such as "
@@ -218,9 +194,7 @@ static const char *__show_vrr_visual_indicator_help =
#define __FORCE_STEREO (1 << 6)
#define __IMAGE_SETTINGS (1 << 7)
#define __XINERAMA_STEREO (1 << 8)
-#define __SHOW_SLI_VISUAL_INDICATOR (1 << 9)
#define __STEREO_EYES_EXCHANGE (1 << 10)
-#define __SHOW_MULTIGPU_VISUAL_INDICATOR (1 << 11)
#define __CONFORMANT_CLAMPING (1 << 12)
#define __ALLOW_VRR (1 << 13)
#define __SHOW_VRR_VISUAL_INDICATOR (1 << 14)
@@ -306,8 +280,6 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
gint image_settings_value = 0;
gint aa_line_gamma = 0;
gint use_conformant_clamping = 0;
- gint show_sli_visual_indicator = 0;
- gint show_multigpu_visual_indicator = 0;
gint show_graphics_visual_indicator = 0;
ReturnStatus ret_sync_to_vblank;
@@ -321,8 +293,6 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
ReturnStatus ret_image_settings;
ReturnStatus ret_aa_line_gamma;
ReturnStatus ret_use_conformant_clamping;
- ReturnStatus ret_show_sli_visual_indicator;
- ReturnStatus ret_show_multigpu_visual_indicator;
ReturnStatus ret_show_graphics_visual_indicator;
/* Query OpenGL settings */
@@ -390,16 +360,6 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
NV_CTRL_TEXTURE_CLAMPING,
&use_conformant_clamping);
- ret_show_sli_visual_indicator =
- NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_SHOW_SLI_VISUAL_INDICATOR,
- &show_sli_visual_indicator);
-
- ret_show_multigpu_visual_indicator =
- NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR,
- &show_multigpu_visual_indicator);
-
ret_show_graphics_visual_indicator =
NvCtrlGetAttribute(ctrl_target,
NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR,
@@ -417,8 +377,6 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
(ret_image_settings != NvCtrlSuccess) &&
(ret_aa_line_gamma != NvCtrlSuccess) &&
(ret_use_conformant_clamping != NvCtrlSuccess) &&
- (ret_show_sli_visual_indicator != NvCtrlSuccess) &&
- (ret_show_multigpu_visual_indicator != NvCtrlSuccess) &&
(ret_show_graphics_visual_indicator != NvCtrlSuccess)) {
return NULL;
}
@@ -853,62 +811,6 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
ctk_opengl->use_conformant_clamping_button = check_button;
}
-
- if (ret_show_sli_visual_indicator == NvCtrlSuccess) {
-
- label = gtk_label_new("Enable SLI Visual Indicator");
-
- check_button = gtk_check_button_new();
- gtk_container_add(GTK_CONTAINER(check_button), label);
-
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button),
- show_sli_visual_indicator);
-
- gtk_box_pack_start(GTK_BOX(vbox), check_button, FALSE, FALSE, 0);
-
- g_signal_connect(G_OBJECT(check_button), "toggled",
- G_CALLBACK(show_sli_visual_indicator_button_toggled),
- (gpointer) ctk_opengl);
-
- g_signal_connect(G_OBJECT(ctk_event),
- CTK_EVENT_NAME(NV_CTRL_SHOW_SLI_VISUAL_INDICATOR),
- G_CALLBACK(value_changed), (gpointer) ctk_opengl);
-
- ctk_config_set_tooltip(ctk_config,
- check_button, __show_sli_visual_indicator_help);
-
- ctk_opengl->active_attributes |= __SHOW_SLI_VISUAL_INDICATOR;
-
- ctk_opengl->show_sli_visual_indicator_button = check_button;
- }
-
- if (ret_show_multigpu_visual_indicator == NvCtrlSuccess) {
-
- label = gtk_label_new("Enable Multi-GPU Visual Indicator");
-
- check_button = gtk_check_button_new();
- gtk_container_add(GTK_CONTAINER(check_button), label);
-
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button),
- show_multigpu_visual_indicator);
-
- gtk_box_pack_start(GTK_BOX(vbox), check_button, FALSE, FALSE, 0);
-
- g_signal_connect(G_OBJECT(check_button), "toggled",
- G_CALLBACK(show_multigpu_visual_indicator_button_toggled),
- (gpointer) ctk_opengl);
-
- g_signal_connect(G_OBJECT(ctk_event),
- CTK_EVENT_NAME(NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR),
- G_CALLBACK(value_changed), (gpointer) ctk_opengl);
-
- ctk_config_set_tooltip(ctk_config, check_button,
- __show_multigpu_visual_indicator_help);
-
- ctk_opengl->active_attributes |= __SHOW_MULTIGPU_VISUAL_INDICATOR;
-
- ctk_opengl->show_multigpu_visual_indicator_button = check_button;
- }
if (ret_show_graphics_visual_indicator == NvCtrlSuccess) {
@@ -997,23 +899,6 @@ static void post_force_stereo_button_toggled(CtkOpenGL *ctk_opengl,
enabled ? "forced" : "not forced");
}
-static void post_show_sli_visual_indicator_button_toggled(CtkOpenGL *ctk_opengl,
- gboolean enabled)
-{
- ctk_config_statusbar_message(ctk_opengl->ctk_config,
- "OpenGL SLI Visual Indicator %s.",
- enabled ? "enabled" : "disabled");
-}
-
-static void
-post_show_multigpu_visual_indicator_button_toggled(CtkOpenGL *ctk_opengl,
- gboolean enabled)
-{
- ctk_config_statusbar_message(ctk_opengl->ctk_config,
- "OpenGL Multi-GPU Visual Indicator %s.",
- enabled ? "enabled" : "disabled");
-}
-
static void
post_show_graphics_visual_indicator_button_toggled(CtkOpenGL *ctk_opengl,
gboolean enabled)
@@ -1125,34 +1010,6 @@ static void force_stereo_button_toggled(GtkWidget *widget,
post_force_stereo_button_toggled(ctk_opengl, enabled);
}
-static void show_sli_visual_indicator_button_toggled(GtkWidget *widget,
- gpointer user_data)
-{
- CtkOpenGL *ctk_opengl = CTK_OPENGL(user_data);
- CtrlTarget *ctrl_target = ctk_opengl->ctrl_target;
- gboolean enabled;
-
- enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
-
- NvCtrlSetAttribute(ctrl_target,
- NV_CTRL_SHOW_SLI_VISUAL_INDICATOR, enabled);
- post_show_sli_visual_indicator_button_toggled(ctk_opengl, enabled);
-}
-
-static void show_multigpu_visual_indicator_button_toggled(GtkWidget *widget,
- gpointer user_data)
-{
- CtkOpenGL *ctk_opengl = CTK_OPENGL(user_data);
- CtrlTarget *ctrl_target = ctk_opengl->ctrl_target;
- gboolean enabled;
-
- enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
-
- NvCtrlSetAttribute(ctrl_target,
- NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR, enabled);
- post_show_multigpu_visual_indicator_button_toggled(ctk_opengl, enabled);
-}
-
static void show_graphics_visual_indicator_button_toggled(GtkWidget *widget,
gpointer user_data)
{
@@ -1302,17 +1159,6 @@ static void value_changed(GObject *object, CtrlEvent *event, gpointer user_data)
func = G_CALLBACK(use_conformant_clamping_button_toggled);
post_use_conformant_clamping_button_toggled(ctk_opengl, value);
break;
- case NV_CTRL_SHOW_SLI_VISUAL_INDICATOR:
- button = GTK_TOGGLE_BUTTON(ctk_opengl->show_sli_visual_indicator_button);
- func = G_CALLBACK(show_sli_visual_indicator_button_toggled);
- post_show_sli_visual_indicator_button_toggled(ctk_opengl, value);
- break;
- case NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR:
- button =
- GTK_TOGGLE_BUTTON(ctk_opengl->show_multigpu_visual_indicator_button);
- func = G_CALLBACK(show_multigpu_visual_indicator_button_toggled);
- post_show_multigpu_visual_indicator_button_toggled(ctk_opengl, value);
- break;
case NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR:
button =
GTK_TOGGLE_BUTTON(ctk_opengl->show_graphics_visual_indicator_button);
@@ -1921,54 +1767,6 @@ GtkTextBuffer *ctk_opengl_create_help(GtkTextTagTable *table,
ctk_help_para(b, &i, "%s", __use_conformant_clamping_help);
}
- if (ctk_opengl->active_attributes & __SHOW_SLI_VISUAL_INDICATOR) {
- ctk_help_heading(b, &i, "SLI Visual Indicator");
- ctk_help_para(b, &i, "This option draws information about the current "
- "SLI mode on top of OpenGL windows. Its behavior "
- "depends on which SLI mode is in use:");
- ctk_help_term(b, &i, "Alternate Frame Rendering");
- ctk_help_para(b, &i, "In AFR mode, a vertical green bar displays the "
- "amount of scaling currently being achieved. A longer "
- "bar indicates more scaling.");
- ctk_help_term(b, &i, "Split-Frame Rendering");
- ctk_help_para(b, &i, "In this mode, OpenGL draws a horizontal green "
- "line showing where the screen is split. Everything "
- "above the line is drawn on one GPU and everything "
- "below is drawn on the other.");
- ctk_help_term(b, &i, "SLI Antialiasing");
- ctk_help_para(b, &i, "In this mode, OpenGL draws a horizontal green "
- "line one third of the way across the screen. Above "
- "this line, the images from both GPUs are blended to "
- "produce the currently selected SLIAA mode. Below the "
- "line, the image from just one GPU is displayed without "
- "blending. This allows easy comparison between the "
- "SLIAA and single-GPU AA modes.");
- }
-
- if (ctk_opengl->active_attributes & __SHOW_MULTIGPU_VISUAL_INDICATOR) {
- ctk_help_heading(b, &i, "Multi-GPU Visual Indicator");
- ctk_help_para(b, &i, "This option draws information about the current "
- "Multi-GPU mode on top of OpenGL windows. Its behavior "
- "depends on which Multi-GPU mode is in use:");
- ctk_help_term(b, &i, "Alternate Frame Rendering");
- ctk_help_para(b, &i, "In AFR mode, a vertical green bar displays the "
- "amount of scaling currently being achieved. A longer "
- "bar indicates more scaling.");
- ctk_help_term(b, &i, "Split-Frame Rendering");
- ctk_help_para(b, &i, "In this mode, OpenGL draws a horizontal green "
- "line showing where the screen is split. Everything "
- "above the line is drawn on one GPU and everything "
- "below is drawn on the other.");
- ctk_help_term(b, &i, "Multi-GPU Antialiasing");
- ctk_help_para(b, &i, "In this mode, OpenGL draws a horizontal green "
- "line one third of the way across the screen. Above "
- "this line, the images from both GPUs are blended to "
- "produce the currently selected multi-GPU AA mode. Below the "
- "line, the image from just one GPU is displayed without "
- "blending. This allows easy comparison between the "
- "multi-GPU AA and single-GPU AA modes.");
- }
-
if (ctk_opengl->active_attributes & __SHOW_GRAPHICS_VISUAL_INDICATOR) {
ctk_help_heading(b, &i, "Graphics API Visual Indicator");
ctk_help_para(b, &i, "%s", __show_graphics_visual_indicator_help);
diff --git a/src/gtk+-2.x/ctkvdpau.c b/src/gtk+-2.x/ctkvdpau.c
index 0bf40d7..3d07408 100644
--- a/src/gtk+-2.x/ctkvdpau.c
+++ b/src/gtk+-2.x/ctkvdpau.c
@@ -103,7 +103,7 @@ const gchar* __video_mixer_parameter_help =
const gchar* __video_mixer_attribute_help =
"This shows the video mixer attributes and any applicable ranges.";
-static struct VDPAUDeviceImpl {
+struct VDPAUDeviceImpl {
VdpGetErrorString *GetErrorString;
VdpGetProcAddress *GetProcAddress;
@@ -124,53 +124,59 @@ static struct VDPAUDeviceImpl {
VdpVideoMixerQueryAttributeSupport *VideoMixerQueryAttributeSupport;
VdpVideoMixerQueryParameterValueRange *VideoMixerQueryParameterValueRange;
VdpVideoMixerQueryAttributeValueRange *VideoMixerQueryAttributeValueRange;
-} VDPAUDeviceFunctions;
+};
static int queryOutputSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
- VdpGetProcAddress *getProcAddress);
+ const struct VDPAUDeviceImpl *vdpau);
static int queryBitmapSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
- VdpGetProcAddress *getProcAddress);
-
-#define GETADDR(device, function_id, function_pointer) \
- getProcAddress(device, function_id, function_pointer)
-
-static void getAddressVDPAUDeviceFunctions(VdpDevice device,
- VdpGetProcAddress *getProcAddress)
+ const struct VDPAUDeviceImpl *vdpau);
+
+#define GETADDR(device, function_id, function_pointer) do { \
+ getProcAddress(device, function_id, (void**)(function_pointer)); \
+ if (!*(function_pointer)) { \
+ return FALSE; \
+ } \
+} while (0)
+
+static gboolean getAddressVDPAUDeviceFunctions(VdpDevice device,
+ VdpGetProcAddress *getProcAddress,
+ struct VDPAUDeviceImpl *vdpau)
{
GETADDR(device, VDP_FUNC_ID_GET_ERROR_STRING,
- (void**)&VDPAUDeviceFunctions.GetErrorString);
+ &vdpau->GetErrorString);
GETADDR(device, VDP_FUNC_ID_GET_PROC_ADDRESS,
- (void**)&VDPAUDeviceFunctions.GetProcAddress);
+ &vdpau->GetProcAddress);
GETADDR(device, VDP_FUNC_ID_GET_API_VERSION,
- (void**)&VDPAUDeviceFunctions.GetApiVersion);
+ &vdpau->GetApiVersion);
GETADDR(device, VDP_FUNC_ID_GET_INFORMATION_STRING,
- (void**)&VDPAUDeviceFunctions.GetInformationString);
+ &vdpau->GetInformationString);
GETADDR(device, VDP_FUNC_ID_VIDEO_SURFACE_QUERY_CAPABILITIES,
- (void**)&VDPAUDeviceFunctions.VideoSurfaceQueryCapabilities);
+ &vdpau->VideoSurfaceQueryCapabilities);
GETADDR(device, VDP_FUNC_ID_VIDEO_SURFACE_QUERY_GET_PUT_BITS_Y_CB_CR_CAPABILITIES,
- (void**)&VDPAUDeviceFunctions.VideoSurfaceQueryGetPutBitsYCbCrCapabilities);
+ &vdpau->VideoSurfaceQueryGetPutBitsYCbCrCapabilities);
GETADDR(device, VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_CAPABILITIES,
- (void**)&VDPAUDeviceFunctions.OutputSurfaceQueryCapabilities);
+ &vdpau->OutputSurfaceQueryCapabilities);
GETADDR(device, VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_GET_PUT_BITS_NATIVE_CAPABILITIES,
- (void**)&VDPAUDeviceFunctions.OutputSurfaceQueryGetPutBitsNativeCapabilities);
+ &vdpau->OutputSurfaceQueryGetPutBitsNativeCapabilities);
GETADDR(device, VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_Y_CB_CR_CAPABILITIES,
- (void**)&VDPAUDeviceFunctions.OutputSurfaceQueryPutBitsYCbCrCapabilities);
+ &vdpau->OutputSurfaceQueryPutBitsYCbCrCapabilities);
GETADDR(device, VDP_FUNC_ID_BITMAP_SURFACE_QUERY_CAPABILITIES,
- (void**)&VDPAUDeviceFunctions.BitmapSurfaceQueryCapabilities);
+ &vdpau->BitmapSurfaceQueryCapabilities);
GETADDR(device, VDP_FUNC_ID_DECODER_QUERY_CAPABILITIES,
- (void**)&VDPAUDeviceFunctions.DecoderQueryCapabilities);
+ &vdpau->DecoderQueryCapabilities);
GETADDR(device, VDP_FUNC_ID_VIDEO_MIXER_QUERY_FEATURE_SUPPORT,
- (void**)&VDPAUDeviceFunctions.VideoMixerQueryFeatureSupport);
+ &vdpau->VideoMixerQueryFeatureSupport);
GETADDR(device, VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_SUPPORT,
- (void**)&VDPAUDeviceFunctions.VideoMixerQueryParameterSupport);
+ &vdpau->VideoMixerQueryParameterSupport);
GETADDR(device, VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_SUPPORT,
- (void**)&VDPAUDeviceFunctions.VideoMixerQueryAttributeSupport);
+ &vdpau->VideoMixerQueryAttributeSupport);
GETADDR(device, VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_VALUE_RANGE,
- (void**)&VDPAUDeviceFunctions.VideoMixerQueryParameterValueRange);
+ &vdpau->VideoMixerQueryParameterValueRange);
GETADDR(device, VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_VALUE_RANGE,
- (void**)&VDPAUDeviceFunctions.VideoMixerQueryAttributeValueRange);
+ &vdpau->VideoMixerQueryAttributeValueRange);
+ return TRUE;
}
#undef GETADDR
@@ -181,7 +187,7 @@ static void getAddressVDPAUDeviceFunctions(VdpDevice device,
*/
static int queryBaseInfo(CtkVDPAU *ctk_vdpau, VdpDevice device,
- VdpGetProcAddress *getProcAddress)
+ const struct VDPAUDeviceImpl *vdpau)
{
static const Desc decoder_list[] = {
{"MPEG1", VDP_DECODER_PROFILE_MPEG1, 0x01},
@@ -234,8 +240,7 @@ static int queryBaseInfo(CtkVDPAU *ctk_vdpau, VdpDevice device,
int x, count = 0;
uint32_t decoder_mask = 0;
- if (VDPAUDeviceFunctions.GetApiVersion &&
- (VDPAUDeviceFunctions.GetApiVersion(&api) != VDP_STATUS_OK)) {
+ if (vdpau->GetApiVersion(&api) != VDP_STATUS_OK) {
return -1;
}
@@ -277,13 +282,13 @@ static int queryBaseInfo(CtkVDPAU *ctk_vdpau, VdpDevice device,
VdpStatus ret;
uint32_t max_level, max_macroblocks, max_width, max_height;
- ret = VDPAUDeviceFunctions.DecoderQueryCapabilities(device,
- decoder_list[x].id,
- &is_supported,
- &max_level,
- &max_macroblocks,
- &max_width,
- &max_height);
+ ret = vdpau->DecoderQueryCapabilities(device,
+ decoder_list[x].id,
+ &is_supported,
+ &max_level,
+ &max_macroblocks,
+ &max_width,
+ &max_height);
if (ret == VDP_STATUS_OK && is_supported) {
gchar *str;
@@ -352,7 +357,7 @@ static const size_t rgb_type_count = sizeof(rgb_types)/sizeof(Desc);
*/
static int queryVideoSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
- VdpGetProcAddress *getProcAddress)
+ const struct VDPAUDeviceImpl *vdpau)
{
static const Desc chroma_types[] = {
{"420", VDP_CHROMA_TYPE_420, 0},
@@ -376,13 +381,6 @@ static int queryVideoSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
GString *str1 = g_string_new("");
int count = 0;
- if ((VDPAUDeviceFunctions.VideoSurfaceQueryGetPutBitsYCbCrCapabilities ==
- NULL) ||
- (VDPAUDeviceFunctions.VideoSurfaceQueryGetPutBitsYCbCrCapabilities ==
- NULL)) {
- return -1;
- }
-
/* Add Video surface limits */
vbox = gtk_vbox_new(FALSE, 0);
@@ -456,10 +454,10 @@ static int queryVideoSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
VdpBool is_supported = FALSE;
uint32_t max_width, max_height;
- ret = VDPAUDeviceFunctions.VideoSurfaceQueryCapabilities(device,
- chroma_types[x].id,
- &is_supported,
- &max_width, &max_height);
+ ret = vdpau->VideoSurfaceQueryCapabilities(device,
+ chroma_types[x].id,
+ &is_supported,
+ &max_width, &max_height);
if (ret == VDP_STATUS_OK && is_supported) {
int y;
gchar *str = NULL;
@@ -496,10 +494,10 @@ static int queryVideoSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
for (y = 0; y < ycbcr_type_count; y++) {
is_supported = FALSE;
- ret =
- VDPAUDeviceFunctions.VideoSurfaceQueryGetPutBitsYCbCrCapabilities
- (device, chroma_types[x].id, ycbcr_types[y].id,
- &is_supported);
+ ret = vdpau->VideoSurfaceQueryGetPutBitsYCbCrCapabilities(device,
+ chroma_types[x].id,
+ ycbcr_types[y].id,
+ &is_supported);
if (ret == VDP_STATUS_OK && is_supported) {
const gchar* s = g_strdup_printf("%s ",
ycbcr_types[y].name);
@@ -516,8 +514,8 @@ static int queryVideoSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
}
g_string_free(str1, TRUE);
- queryOutputSurface(ctk_vdpau, device, getProcAddress);
- queryBitmapSurface(ctk_vdpau, device, getProcAddress);
+ queryOutputSurface(ctk_vdpau, device, vdpau);
+ queryBitmapSurface(ctk_vdpau, device, vdpau);
return 0;
} /* queryVideoSurface() */
@@ -531,7 +529,7 @@ static int queryVideoSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
*/
static int queryDecoderCaps(CtkVDPAU *ctk_vdpau, VdpDevice device,
- VdpGetProcAddress *getProcAddress)
+ const struct VDPAUDeviceImpl *vdpau)
{
static const Desc decoder_profiles[] = {
{"MPEG1", VDP_DECODER_PROFILE_MPEG1, 0},
@@ -589,10 +587,6 @@ static int queryDecoderCaps(CtkVDPAU *ctk_vdpau, VdpDevice device,
GtkWidget *label, *hseparator;
GtkWidget *eventbox;
- if (VDPAUDeviceFunctions.DecoderQueryCapabilities == NULL) {
- return -1;
- }
-
/* Add Decoder capabilities */
vbox = gtk_vbox_new(FALSE, 0);
@@ -661,11 +655,11 @@ static int queryDecoderCaps(CtkVDPAU *ctk_vdpau, VdpDevice device,
VdpBool is_supported = FALSE;
uint32_t max_level, max_macroblocks, max_width, max_height;
- ret = VDPAUDeviceFunctions.DecoderQueryCapabilities(device,
- decoder_profiles[x].id,
- &is_supported, &max_level,
- &max_macroblocks,
- &max_width, &max_height);
+ ret = vdpau->DecoderQueryCapabilities(device,
+ decoder_profiles[x].id,
+ &is_supported, &max_level,
+ &max_macroblocks,
+ &max_width, &max_height);
if (ret == VDP_STATUS_OK && is_supported) {
gchar *str = NULL;
@@ -722,7 +716,7 @@ static int queryDecoderCaps(CtkVDPAU *ctk_vdpau, VdpDevice device,
*/
static int queryOutputSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
- VdpGetProcAddress *getProcAddress)
+ const struct VDPAUDeviceImpl *vdpau)
{
VdpStatus ret;
int x, y, count = 0;
@@ -732,12 +726,6 @@ static int queryOutputSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
GtkWidget *label, *hseparator;
GtkWidget *eventbox;
- if ((VDPAUDeviceFunctions.OutputSurfaceQueryCapabilities == NULL) ||
- (VDPAUDeviceFunctions.OutputSurfaceQueryGetPutBitsNativeCapabilities
- == NULL)) {
- return -1;
- }
-
/* Add Output surface information */
vbox = ctk_vdpau->surfaceVbox;
@@ -800,12 +788,13 @@ static int queryOutputSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
VdpBool is_supported, native=FALSE;
uint32_t max_width, max_height;
- ret = VDPAUDeviceFunctions.OutputSurfaceQueryCapabilities(device,
- rgb_types[x].id,
- &is_supported, &max_width,
- &max_height);
- VDPAUDeviceFunctions.OutputSurfaceQueryGetPutBitsNativeCapabilities
- (device, rgb_types[x].id, &native);
+ ret = vdpau->OutputSurfaceQueryCapabilities(device,
+ rgb_types[x].id,
+ &is_supported, &max_width,
+ &max_height);
+ vdpau->OutputSurfaceQueryGetPutBitsNativeCapabilities(device,
+ rgb_types[x].id,
+ &native);
if (ret == VDP_STATUS_OK && is_supported) {
gchar *str = NULL;
@@ -850,9 +839,10 @@ static int queryOutputSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
is_supported = FALSE;
ret =
- VDPAUDeviceFunctions.OutputSurfaceQueryPutBitsYCbCrCapabilities
- (device, rgb_types[x].id, ycbcr_types[y].id,
- &is_supported);
+ vdpau->OutputSurfaceQueryPutBitsYCbCrCapabilities(device,
+ rgb_types[x].id,
+ ycbcr_types[y].id,
+ &is_supported);
if (ret == VDP_STATUS_OK && is_supported) {
gchar* s = g_strdup_printf("%s ", ycbcr_types[y].name);
str1 = g_string_append(str1, s);
@@ -876,7 +866,7 @@ static int queryOutputSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
*/
static int queryBitmapSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
- VdpGetProcAddress *getProcAddress)
+ const struct VDPAUDeviceImpl *vdpau)
{
VdpStatus ret;
int x, count = 0;
@@ -885,10 +875,6 @@ static int queryBitmapSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
GtkWidget *label, *hseparator;
GtkWidget *eventbox;
- if (VDPAUDeviceFunctions.BitmapSurfaceQueryCapabilities == NULL) {
- return -1;
- }
-
/* Add Bitmap surface information */
vbox = ctk_vdpau->surfaceVbox;
@@ -939,11 +925,11 @@ static int queryBitmapSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
VdpBool is_supported;
uint32_t max_width, max_height;
- ret = VDPAUDeviceFunctions.BitmapSurfaceQueryCapabilities(device,
- rgb_types[x].id,
- &is_supported,
- &max_width,
- &max_height);
+ ret = vdpau->BitmapSurfaceQueryCapabilities(device,
+ rgb_types[x].id,
+ &is_supported,
+ &max_width,
+ &max_height);
if (ret == VDP_STATUS_OK && is_supported) {
gchar *str = NULL;
@@ -1043,7 +1029,7 @@ static void display_range(GtkTable *table, gint x, uint32_t aux,
*/
static int queryVideoMixer(CtkVDPAU *ctk_vdpau, VdpDevice device,
- VdpGetProcAddress *getProcAddress)
+ const struct VDPAUDeviceImpl *vdpau)
{
static const Desc mixer_features[] = {
{"DEINTERLACE_TEMPORAL",
@@ -1116,10 +1102,6 @@ static int queryVideoMixer(CtkVDPAU *ctk_vdpau, VdpDevice device,
GtkWidget *eventbox;
GtkWidget *scrollWin, *event;
- if (VDPAUDeviceFunctions.VideoMixerQueryFeatureSupport == NULL) {
- return -1;
- }
-
/* Add Video mixer information */
vbox = gtk_vbox_new(FALSE, 0);
@@ -1194,8 +1176,9 @@ static int queryVideoMixer(CtkVDPAU *ctk_vdpau, VdpDevice device,
* is_supported is only set if the feature is not supported
*/
VdpBool is_supported = TRUE;
- ret = VDPAUDeviceFunctions.VideoMixerQueryFeatureSupport
- (device, mixer_features[x].id, &is_supported);
+ ret = vdpau->VideoMixerQueryFeatureSupport(device,
+ mixer_features[x].id,
+ &is_supported);
is_supported = (ret == VDP_STATUS_OK && is_supported);
gtk_table_resize(GTK_TABLE(table), count+4, 5);
@@ -1218,10 +1201,6 @@ static int queryVideoMixer(CtkVDPAU *ctk_vdpau, VdpDevice device,
}
- if (VDPAUDeviceFunctions.VideoMixerQueryParameterSupport == NULL) {
- return -1;
- }
-
/* Generate a new table */
count = 0;
@@ -1277,8 +1256,9 @@ static int queryVideoMixer(CtkVDPAU *ctk_vdpau, VdpDevice device,
VdpBool is_supported = FALSE;
gchar *str = NULL;
- ret = VDPAUDeviceFunctions.VideoMixerQueryParameterSupport
- (device, mixer_parameters[x].id, &is_supported);
+ ret = vdpau->VideoMixerQueryParameterSupport(device,
+ mixer_parameters[x].id,
+ &is_supported);
is_supported = (ret == VDP_STATUS_OK && is_supported);
gtk_table_resize(GTK_TABLE(table), count+4, 5);
@@ -1300,19 +1280,16 @@ static int queryVideoMixer(CtkVDPAU *ctk_vdpau, VdpDevice device,
count++;
if (is_supported && mixer_parameters[x].aux != DT_NONE) {
- ret = VDPAUDeviceFunctions.VideoMixerQueryParameterValueRange
- (device, mixer_parameters[x].id, (void*)&minval,
- (void*)&maxval);
+ ret = vdpau->VideoMixerQueryParameterValueRange(device,
+ mixer_parameters[x].id,
+ (void*)&minval,
+ (void*)&maxval);
display_range(GTK_TABLE(table), count-1,
mixer_parameters[x].aux,
minval, maxval);
}
}
- if (VDPAUDeviceFunctions.VideoMixerQueryAttributeSupport == NULL) {
- return -1;
- }
-
/* Generate a new table */
count = 0;
@@ -1369,8 +1346,9 @@ static int queryVideoMixer(CtkVDPAU *ctk_vdpau, VdpDevice device,
gchar *str = NULL;
uint32_t minval, maxval;
- ret = VDPAUDeviceFunctions.VideoMixerQueryAttributeSupport
- (device, mixer_attributes[x].id, &is_supported);
+ ret = vdpau->VideoMixerQueryAttributeSupport(device,
+ mixer_attributes[x].id,
+ &is_supported);
is_supported = (ret == VDP_STATUS_OK && is_supported);
gtk_table_resize(GTK_TABLE(table), count+4, 5);
@@ -1392,9 +1370,10 @@ static int queryVideoMixer(CtkVDPAU *ctk_vdpau, VdpDevice device,
count++;
if (is_supported && mixer_attributes[x].aux != DT_NONE) {
- ret = VDPAUDeviceFunctions.VideoMixerQueryAttributeValueRange
- (device, mixer_attributes[x].id,
- (void*)&minval, (void*)&maxval);
+ ret = vdpau->VideoMixerQueryAttributeValueRange(device,
+ mixer_attributes[x].id,
+ (void*)&minval,
+ (void*)&maxval);
display_range(GTK_TABLE(table), count-1, mixer_attributes[x].aux,
minval, maxval);
}
@@ -1451,6 +1430,7 @@ GtkWidget* ctk_vdpau_new(CtrlTarget *ctrl_target, CtkConfig *ctk_config,
VdpGetProcAddress *getProcAddress = NULL;
VdpStatus ret;
VdpDeviceCreateX11 *VDPAUDeviceCreateX11 = NULL;
+ struct VDPAUDeviceImpl VDPAUDeviceFunctions;
/* make sure we have a handle */
@@ -1490,28 +1470,8 @@ GtkWidget* ctk_vdpau_new(CtrlTarget *ctrl_target, CtkConfig *ctk_config,
goto fail;
}
- getAddressVDPAUDeviceFunctions(device, getProcAddress);
-
- /* Return early if any function is NULL */
- if (VDPAUDeviceFunctions.GetErrorString == NULL &&
- VDPAUDeviceFunctions.GetProcAddress == NULL &&
- VDPAUDeviceFunctions.GetApiVersion == NULL &&
- VDPAUDeviceFunctions.GetInformationString == NULL &&
- VDPAUDeviceFunctions.VideoSurfaceQueryCapabilities == NULL &&
- VDPAUDeviceFunctions.VideoSurfaceQueryGetPutBitsYCbCrCapabilities ==
- NULL &&
- VDPAUDeviceFunctions.OutputSurfaceQueryCapabilities == NULL &&
- VDPAUDeviceFunctions.OutputSurfaceQueryGetPutBitsNativeCapabilities ==
- NULL &&
- VDPAUDeviceFunctions.OutputSurfaceQueryPutBitsYCbCrCapabilities ==
- NULL &&
- VDPAUDeviceFunctions.BitmapSurfaceQueryCapabilities == NULL &&
- VDPAUDeviceFunctions.DecoderQueryCapabilities == NULL &&
- VDPAUDeviceFunctions.VideoMixerQueryFeatureSupport == NULL &&
- VDPAUDeviceFunctions.VideoMixerQueryParameterSupport == NULL &&
- VDPAUDeviceFunctions.VideoMixerQueryAttributeSupport == NULL &&
- VDPAUDeviceFunctions.VideoMixerQueryParameterValueRange == NULL &&
- VDPAUDeviceFunctions.VideoMixerQueryAttributeValueRange == NULL) {
+ if (!getAddressVDPAUDeviceFunctions(device, getProcAddress,
+ &VDPAUDeviceFunctions)) {
goto fail;
}
@@ -1544,10 +1504,10 @@ GtkWidget* ctk_vdpau_new(CtrlTarget *ctrl_target, CtkConfig *ctk_config,
ctk_vdpau->notebook = notebook;
/* Query and print VDPAU information */
- queryBaseInfo(ctk_vdpau, device, getProcAddress);
- queryVideoSurface(ctk_vdpau, device, getProcAddress);
- queryDecoderCaps(ctk_vdpau, device, getProcAddress);
- queryVideoMixer(ctk_vdpau, device, getProcAddress);
+ queryBaseInfo(ctk_vdpau, device, &VDPAUDeviceFunctions);
+ queryVideoSurface(ctk_vdpau, device, &VDPAUDeviceFunctions);
+ queryDecoderCaps(ctk_vdpau, device, &VDPAUDeviceFunctions);
+ queryVideoMixer(ctk_vdpau, device, &VDPAUDeviceFunctions);
gtk_widget_show_all(GTK_WIDGET(object));
diff --git a/src/libXNVCtrl/NVCtrl.h b/src/libXNVCtrl/NVCtrl.h
index 7d22d6a..562f4cc 100644
--- a/src/libXNVCtrl/NVCtrl.h
+++ b/src/libXNVCtrl/NVCtrl.h
@@ -1425,7 +1425,8 @@
/*
* NV_CTRL_FLATPANEL_SIGNAL - for the specified display device, report
- * whether the flat panel is driven by an LVDS, TMDS, or DisplayPort signal.
+ * whether the flat panel is driven by an LVDS, TMDS, DisplayPort, or
+ * HDMI FRL signal.
* This attribute is only available for flat panels.
*/
@@ -1433,6 +1434,7 @@
#define NV_CTRL_FLATPANEL_SIGNAL_LVDS 0
#define NV_CTRL_FLATPANEL_SIGNAL_TMDS 1
#define NV_CTRL_FLATPANEL_SIGNAL_DISPLAYPORT 2
+#define NV_CTRL_FLATPANEL_SIGNAL_HDMI_FRL 3
/*
@@ -1536,9 +1538,7 @@
#define NV_CTRL_GPU_PCIE_MAX_LINK_WIDTH NV_CTRL_BUS_RATE
/*
- * NV_CTRL_SHOW_SLI_HUD - when TRUE, OpenGL will draw information about the
- * current SLI mode.
- * Renamed this attribute to NV_CTRL_SHOW_SLI_VISUAL_INDICATOR
+ * NV_CTRL_SHOW_SLI_HUD - not supported
*/
#define NV_CTRL_SHOW_SLI_HUD NV_CTRL_SHOW_SLI_VISUAL_INDICATOR
@@ -1546,8 +1546,7 @@
#define NV_CTRL_SHOW_SLI_HUD_TRUE NV_CTRL_SHOW_SLI_VISUAL_INDICATOR_TRUE
/*
- * NV_CTRL_SHOW_SLI_VISUAL_INDICATOR - when TRUE, OpenGL will draw information
- * about the current SLI mode.
+ * NV_CTRL_SHOW_SLI_VISUAL_INDICATOR - not supported
*/
#define NV_CTRL_SHOW_SLI_VISUAL_INDICATOR 225 /* RW-X */
@@ -2841,8 +2840,7 @@
#define NV_CTRL_THERMAL_SENSOR_TARGET_UNKNOWN 0xFFFFFFFF
/*
- * NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR - when TRUE, OpenGL will
- * draw information about the current MULTIGPU mode.
+ * NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR - not supported
*/
#define NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR 358 /* RW-X */
#define NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR_FALSE 0
@@ -3591,8 +3589,26 @@
#define NV_CTRL_GPU_MAX_OPERATING_THRESHOLD 433 /* R--G */
+/*
+ * NV_CTRL_PLATFORM_POWER_MODE - Manage Platform Power modes on systems.
+ * This attribute's setting is applied when AC power is connected.
+ *
+ * Performance - Allows the notebook to run at higher power and
+ * thermal limits that are within the supported limits.
+ * Balanced - Default experience for best performance and acoustic
+ * trade-off.
+ * Quiet - Prefers acoustic and thermal instead of performance.
+ */
+
+#define NV_CTRL_PLATFORM_POWER_MODE 434 /* RW-G */
+#define NV_CTRL_PLATFORM_POWER_MODE_PERFORMANCE 0
+#define NV_CTRL_PLATFORM_POWER_MODE_BALANCED 1
+#define NV_CTRL_PLATFORM_POWER_MODE_QUIET 2
+
+
+#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_PLATFORM_POWER_MODE
+
-#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_GPU_MAX_OPERATING_THRESHOLD
/**************************************************************************/
diff --git a/src/libXNVCtrl/version.mk b/src/libXNVCtrl/version.mk
index b41f1a9..618e84a 100644
--- a/src/libXNVCtrl/version.mk
+++ b/src/libXNVCtrl/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 450.66
+NVIDIA_VERSION = 455.23.04
diff --git a/src/nvml.h b/src/nvml.h
index 51961c0..668f499 100644
--- a/src/nvml.h
+++ b/src/nvml.h
@@ -978,7 +978,7 @@ typedef struct nvmlGridLicensableFeature_st
{
nvmlGridLicenseFeatureCode_t featureCode; //!< Licensed feature code
unsigned int featureState; //!< Non-zero if feature is currently licensed, otherwise zero
- char licenseInfo[NVML_GRID_LICENSE_BUFFER_SIZE];
+ char licenseInfo[NVML_GRID_LICENSE_BUFFER_SIZE]; //!< Deprecated.
char productName[NVML_GRID_LICENSE_BUFFER_SIZE];
unsigned int featureEnabled; //!< Non-zero if feature is enabled, otherwise zero
} nvmlGridLicensableFeature_t;
@@ -2206,7 +2206,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetCount_v2(unsigned int *deviceCount);
*
* @note This API currently only supports MIG device handles.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
*
* @param device NVML device handle
@@ -4689,7 +4689,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetRetiredPagesPendingStatus(nvmlDevice_t device,
* @note On MIG-enabled GPUs with active instances, querying the number of
* remapped rows is not supported
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
*
* @param device The identifier of the target device
* @param corrRows Reference for number of rows remapped due to correctable errors
@@ -7062,7 +7062,7 @@ typedef struct nvmlComputeInstance_st* nvmlComputeInstance_t;
/**
* Set MIG mode for the device.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
* Requires root user.
*
@@ -7095,7 +7095,7 @@ nvmlReturn_t DECLDIR nvmlDeviceSetMigMode(nvmlDevice_t device, unsigned int mode
/**
* Get MIG mode for the device.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
*
* Changing MIG modes may require device unbind or reset. The "pending" MIG mode refers to the target mode following the
@@ -7120,7 +7120,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetMigMode(nvmlDevice_t device, unsigned int *cur
*
* Information provided by this API is immutable throughout the lifetime of a MIG mode.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
* Requires privileged user.
*
@@ -7144,7 +7144,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceProfileInfo(nvmlDevice_t device, un
* A placement represents the location of a GPU instance within a device. This API only returns all the possible
* placements for the given profile.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
* Requires privileged user.
*
@@ -7169,7 +7169,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstancePossiblePlacements(nvmlDevice_t dev
/**
* Get GPU instance profile capacity.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
* Requires privileged user.
*
@@ -7190,7 +7190,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceRemainingCapacity(nvmlDevice_t devi
/**
* Create GPU instance.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
* Requires privileged user.
*
@@ -7205,7 +7205,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceRemainingCapacity(nvmlDevice_t devi
* - \ref NVML_SUCCESS Upon success
* - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
* - \ref NVML_ERROR_INVALID_ARGUMENT If \a device, \a profile, \a profileId or \a gpuInstance are invalid
- * - \ref NVML_ERROR_NOT_SUPPORTED If \a device doesn't have MIG mode enabled
+ * - \ref NVML_ERROR_NOT_SUPPORTED If \a device doesn't have MIG mode enabled or in vGPU guest
* - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
* - \ref NVML_ERROR_INSUFFICIENT_RESOURCES If the requested GPU instance could not be created
*/
@@ -7215,7 +7215,7 @@ nvmlReturn_t DECLDIR nvmlDeviceCreateGpuInstance(nvmlDevice_t device, unsigned i
/**
* Destroy GPU instance.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
* Requires privileged user.
*
@@ -7225,7 +7225,7 @@ nvmlReturn_t DECLDIR nvmlDeviceCreateGpuInstance(nvmlDevice_t device, unsigned i
* - \ref NVML_SUCCESS Upon success
* - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
* - \ref NVML_ERROR_INVALID_ARGUMENT If \a gpuInstance is invalid
- * - \ref NVML_ERROR_NOT_SUPPORTED If \a device doesn't have MIG mode enabled
+ * - \ref NVML_ERROR_NOT_SUPPORTED If \a device doesn't have MIG mode enabled or in vGPU guest
* - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
* - \ref NVML_ERROR_IN_USE If the GPU instance is in use. This error would be returned if processes
* (e.g. CUDA application) or compute instances are active on the
@@ -7236,7 +7236,7 @@ nvmlReturn_t DECLDIR nvmlGpuInstanceDestroy(nvmlGpuInstance_t gpuInstance);
/**
* Get GPU instances for given profile ID.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
* Requires privileged user.
*
@@ -7260,7 +7260,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstances(nvmlDevice_t device, unsigned int
/**
* Get GPU instances for given instance ID.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
* Requires privileged user.
*
@@ -7281,7 +7281,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceById(nvmlDevice_t device, unsigned
/**
* Get GPU instance information.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
*
* @param gpuInstance The GPU instance handle
@@ -7300,7 +7300,7 @@ nvmlReturn_t DECLDIR nvmlGpuInstanceGetInfo(nvmlGpuInstance_t gpuInstance, nvmlG
*
* Information provided by this API is immutable throughout the lifetime of a MIG mode.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
* Requires privileged user.
*
@@ -7323,7 +7323,7 @@ nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstanceProfileInfo(nvmlGpuInstanc
/**
* Get compute instance profile capacity.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
* Requires privileged user.
*
@@ -7345,7 +7345,7 @@ nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstanceRemainingCapacity(nvmlGpuI
/**
* Create compute instance.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
* Requires privileged user.
*
@@ -7373,7 +7373,7 @@ nvmlReturn_t DECLDIR nvmlGpuInstanceCreateComputeInstance(nvmlGpuInstance_t gpuI
/**
* Destroy compute instance.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
* Requires privileged user.
*
@@ -7392,7 +7392,7 @@ nvmlReturn_t DECLDIR nvmlComputeInstanceDestroy(nvmlComputeInstance_t computeIns
/**
* Get compute instances for given profile ID.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
* Requires privileged user.
*
@@ -7418,7 +7418,7 @@ nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstances(nvmlGpuInstance_t gpuIns
/**
* Get compute instance for given instance ID.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
* Requires privileged user.
*
@@ -7440,7 +7440,7 @@ nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstanceById(nvmlGpuInstance_t gpu
/**
* Get compute instance information.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
*
* @param computeInstance The compute instance handle
@@ -7461,7 +7461,7 @@ nvmlReturn_t DECLDIR nvmlComputeInstanceGetInfo(nvmlComputeInstance_t computeIns
* These overloaded references can be used (with some restrictions) interchangeably
* with a GPU device handle to execute queries at a per-compute instance granularity.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
*
* @param device NVML handle to test
@@ -7481,7 +7481,7 @@ nvmlReturn_t DECLDIR nvmlDeviceIsMigDeviceHandle(nvmlDevice_t device, unsigned i
*
* GPU instance IDs are unique per device and remain valid until the GPU instance is destroyed.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
*
* @param device Target MIG device handle
@@ -7502,7 +7502,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceId(nvmlDevice_t device, unsigned in
* Compute instance IDs are unique per GPU instance and remain valid until the compute instance
* is destroyed.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
*
* @param device Target MIG device handle
@@ -7522,7 +7522,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetComputeInstanceId(nvmlDevice_t device, unsigne
*
* Returns zero if MIG is not supported or enabled.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
*
* @param device Target device handle
@@ -7545,7 +7545,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetMaxMigDeviceCount(nvmlDevice_t device, unsigne
* using this API. Handles may be reused and their properties can change in
* the process.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
*
* @param device Reference to the parent GPU device handle
@@ -7566,7 +7566,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetMigDeviceHandleByIndex(nvmlDevice_t device, un
/**
* Get parent device handle from a MIG device handle.
*
- * For newer than Volta &tm; fully supported devices.
+ * For Ampere &tm; or newer fully supported devices.
* Supported on Linux only.
*
* @param migDevice MIG device handle
diff --git a/src/parse.c b/src/parse.c
index e308463..c21da7c 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -210,6 +210,7 @@ const AttributeTableEntry attributeTable[] = {
{ "GPUSlowdownTempThreshold", NV_CTRL_GPU_SLOWDOWN_THRESHOLD, INT_ATTR, {0,0,0,1,0}, {}, "Returns the temperature above which the GPU will slowdown for hardware protection." },
{ "GPUShutdownTempThreshold", NV_CTRL_GPU_SHUTDOWN_THRESHOLD, INT_ATTR, {0,0,0,1,0}, {}, "Returns the temperature at which the GPU will shutdown for hardware protection." },
{ "GPUMaxOperatingTempThreshold", NV_CTRL_GPU_MAX_OPERATING_THRESHOLD, INT_ATTR, {0,0,0,1,0}, {}, "Returns the maximum temperature that will support normal GPU behavior." },
+ { "PlatformPowerMode", NV_CTRL_PLATFORM_POWER_MODE, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Allows setting different platform power modes." },
/* Framelock */
{ "FrameLockAvailable", NV_CTRL_FRAMELOCK, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether the underlying GPU supports Frame Lock. All of the other frame lock attributes are only applicable if this attribute is enabled (Supported)." },
@@ -346,7 +347,7 @@ const int attributeTableLen = ARRAY_LEN(attributeTable);
* the last attribute that the table knows about.
*/
-#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_GPU_MAX_OPERATING_THRESHOLD
+#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_PLATFORM_POWER_MODE
#warning "Have you forgotten to add a new integer attribute to attributeTable?"
#endif
diff --git a/src/version.h b/src/version.h
index 87ce2ba..e9b7758 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1 +1 @@
-#define NVIDIA_VERSION "450.66"
+#define NVIDIA_VERSION "455.23.04"
diff --git a/src/version.mk b/src/version.mk
index b41f1a9..618e84a 100644
--- a/src/version.mk
+++ b/src/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 450.66
+NVIDIA_VERSION = 455.23.04
diff --git a/version.mk b/version.mk
index b41f1a9..618e84a 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 450.66
+NVIDIA_VERSION = 455.23.04