summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiam Middlebrook <lmiddlebrook@nvidia.com>2019-01-30 10:33:13 -0800
committerLiam Middlebrook <lmiddlebrook@nvidia.com>2019-01-30 10:33:13 -0800
commitde6cbb6b68532a9786c64b3266eef3b0f35ede92 (patch)
tree0b0945ad7883258aa334eb71cfd5d671c5723b1c
parentfe86d26ead6cbd32afcb860f3553e84c266f1548 (diff)
418.30
-rw-r--r--doc/version.mk2
-rw-r--r--samples/nv-control-events.c6
-rw-r--r--samples/nv-control-info.c6
-rw-r--r--samples/version.mk2
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig-utils.c33
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig.c130
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig.h3
-rw-r--r--src/gtk+-2.x/ctkdisplaydevice.c47
-rw-r--r--src/gtk+-2.x/ctkdisplaylayout.c6
-rw-r--r--src/gtk+-2.x/ctkdisplaylayout.h3
-rw-r--r--src/gtk+-2.x/ctkevent.c8
-rw-r--r--src/gtk+-2.x/ctkgridlicense.c118
-rw-r--r--src/gtk+-2.x/ctkgridlicense.h9
-rw-r--r--src/gtk+-2.x/ctkopengl.c181
-rw-r--r--src/gtk+-2.x/ctkopengl.h4
-rw-r--r--src/libXNVCtrl/NVCtrl.h65
-rw-r--r--src/libXNVCtrl/version.mk2
-rw-r--r--src/libXNVCtrlAttributes/NvCtrlAttributesNvml.c2
-rw-r--r--src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h30
-rw-r--r--src/nvml.h37
-rw-r--r--src/parse.c10
-rw-r--r--src/version.h2
-rw-r--r--src/version.mk2
-rw-r--r--version.mk2
24 files changed, 511 insertions, 199 deletions
diff --git a/doc/version.mk b/doc/version.mk
index 303bdf6..fa0f583 100644
--- a/doc/version.mk
+++ b/doc/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 415.27
+NVIDIA_VERSION = 418.30
diff --git a/samples/nv-control-events.c b/samples/nv-control-events.c
index cd0f65f..d6ea84c 100644
--- a/samples/nv-control-events.c
+++ b/samples/nv-control-events.c
@@ -683,7 +683,7 @@ static AttrEntry attr_table[] = {
MAKE_ENTRY(NV_CTRL_GVI_TEST_MODE),
MAKE_ENTRY(NV_CTRL_COLOR_SPACE),
MAKE_ENTRY(NV_CTRL_COLOR_RANGE),
- MAKE_ENTRY(NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR),
+ MAKE_ENTRY(NV_CTRL_SHOW_VRR_VISUAL_INDICATOR),
MAKE_ENTRY(NV_CTRL_GPU_SCALING_DEFAULT_TARGET),
MAKE_ENTRY(NV_CTRL_GPU_SCALING_DEFAULT_METHOD),
MAKE_ENTRY(NV_CTRL_DITHERING_MODE),
@@ -736,6 +736,8 @@ static AttrEntry attr_table[] = {
MAKE_ENTRY(NV_CTRL_XV_SYNC_TO_DISPLAY_ID),
MAKE_ENTRY(NV_CTRL_CURRENT_XV_SYNC_TO_DISPLAY_ID),
MAKE_ENTRY(NV_CTRL_PALETTE_UPDATE_EVENT),
- MAKE_ENTRY(NV_CTRL_GSYNC_ALLOWED),
+ MAKE_ENTRY(NV_CTRL_VRR_ALLOWED),
+ MAKE_ENTRY(NV_CTRL_DISPLAY_VRR_MODE),
+ MAKE_ENTRY(NV_CTRL_DISPLAY_VRR_MIN_REFRESH_RATE),
{ -1, NULL, NULL }
};
diff --git a/samples/nv-control-info.c b/samples/nv-control-info.c
index 46f08ec..11073ab 100644
--- a/samples/nv-control-info.c
+++ b/samples/nv-control-info.c
@@ -265,7 +265,7 @@ static const char *attr_int_table[NV_CTRL_LAST_ATTRIBUTE + 1] = {
MAKE_ENTRY(NV_CTRL_THERMAL_COOLER_SPEED),
MAKE_ENTRY(NV_CTRL_PALETTE_UPDATE_EVENT),
MAKE_ENTRY(NV_CTRL_VIDEO_ENCODER_UTILIZATION),
- MAKE_ENTRY(NV_CTRL_GSYNC_ALLOWED),
+ MAKE_ENTRY(NV_CTRL_VRR_ALLOWED),
MAKE_ENTRY(NV_CTRL_GPU_NVCLOCK_OFFSET),
MAKE_ENTRY(NV_CTRL_GPU_MEM_TRANSFER_RATE_OFFSET),
MAKE_ENTRY(NV_CTRL_VIDEO_DECODER_UTILIZATION),
@@ -273,9 +273,11 @@ static const char *attr_int_table[NV_CTRL_LAST_ATTRIBUTE + 1] = {
MAKE_ENTRY(NV_CTRL_GPU_CURRENT_CORE_VOLTAGE),
MAKE_ENTRY(NV_CTRL_CURRENT_COLOR_SPACE),
MAKE_ENTRY(NV_CTRL_CURRENT_COLOR_RANGE),
- MAKE_ENTRY(NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR),
+ MAKE_ENTRY(NV_CTRL_SHOW_VRR_VISUAL_INDICATOR),
MAKE_ENTRY(NV_CTRL_THERMAL_COOLER_CURRENT_LEVEL),
MAKE_ENTRY(NV_CTRL_STEREO_SWAP_MODE),
+ MAKE_ENTRY(NV_CTRL_DISPLAY_VRR_MODE),
+ MAKE_ENTRY(NV_CTRL_DISPLAY_VRR_MIN_REFRESH_RATE),
};
// grep 'define.*\/\*' NVCtrl.h | grep -v NV_CTRL_TARGET_TYPE_ | grep -v "not supported" | grep -v "renamed" | grep -v "deprecated" | grep NV_CTRL_STRING_ | grep -v NV_CTRL_STRING_OPERATION_ | sed 's/.*define \([^ ]*\).*/ MAKE_ENTRY(\1),/'
diff --git a/samples/version.mk b/samples/version.mk
index 303bdf6..fa0f583 100644
--- a/samples/version.mk
+++ b/samples/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 415.27
+NVIDIA_VERSION = 418.30
diff --git a/src/gtk+-2.x/ctkdisplayconfig-utils.c b/src/gtk+-2.x/ctkdisplayconfig-utils.c
index 2d90ead..47be13a 100644
--- a/src/gtk+-2.x/ctkdisplayconfig-utils.c
+++ b/src/gtk+-2.x/ctkdisplayconfig-utils.c
@@ -681,6 +681,18 @@ static void apply_mode_attribute_token(char *token, char *value, void *data)
mode->allowGSYNC = False;
}
+ /* AllowGSYNCCompatible */
+ } else if (!strcasecmp("allowgsynccompatible", token)) {
+ mode->allowGSYNCCompatibleSpecified = True;
+ if (!strcasecmp("on", value)) {
+ mode->allowGSYNCCompatible = True;
+ } else {
+ mode->allowGSYNCCompatible = False;
+ }
+
+ /* VRRMinRefreshRate */
+ } else if (!strcasecmp("vrrminrefreshrate", token)) {
+ parse_read_integer(value, &(mode->vrrMinRefreshRate));
}
}
@@ -722,6 +734,9 @@ nvModePtr mode_parse(nvDisplayPtr display, const char *mode_str)
mode->passive_stereo_eye = PASSIVE_STEREO_EYE_NONE;
mode->position_type = CONF_ADJ_ABSOLUTE;
mode->allowGSYNC = True;
+ mode->allowGSYNCCompatibleSpecified = False;
+ mode->allowGSYNCCompatible = True;
+ mode->vrrMinRefreshRate = 0;
/* Read the mode name */
str = parse_read_name(str, &mode_name, 0);
@@ -1201,6 +1216,24 @@ static gchar *mode_get_str(nvLayoutPtr layout,
flags_str = tmp;
}
+ /* AllowGSYNCCompatible */
+ if (mode->allowGSYNCCompatibleSpecified) {
+ tmp = g_strdup_printf("%s, AllowGSYNCCompatible=%s",
+ (flags_str ? flags_str : ""),
+ mode->allowGSYNCCompatible ? "On" : "Off");
+ g_free(flags_str);
+ flags_str = tmp;
+ }
+
+ /* VRRMinRefreshRate */
+ if (mode->vrrMinRefreshRate) {
+ tmp = g_strdup_printf("%s, VRRMinRefreshRate=%d",
+ (flags_str ? flags_str : ""),
+ mode->vrrMinRefreshRate);
+ g_free(flags_str);
+ flags_str = tmp;
+ }
+
if (flags_str) {
tmp = g_strdup_printf("%s {%s}",
mode_str,
diff --git a/src/gtk+-2.x/ctkdisplayconfig.c b/src/gtk+-2.x/ctkdisplayconfig.c
index d78fc06..620ac2f 100644
--- a/src/gtk+-2.x/ctkdisplayconfig.c
+++ b/src/gtk+-2.x/ctkdisplayconfig.c
@@ -82,6 +82,8 @@ static void display_viewport_out_activate(GtkWidget *widget,
gpointer user_data);
static void display_panning_activate(GtkWidget *widget, gpointer user_data);
+static void update_force_gsync_button(CtkDisplayConfig *ctk_object);
+
static void setup_screen_page(CtkDisplayConfig *ctk_object);
static void screen_virtual_size_activate(GtkWidget *widget, gpointer user_data);
@@ -276,6 +278,10 @@ static const char * __dpy_forcefullcompositionpipeline_help =
"This option implicitly enables \"ForceCompositionPipeline\" and additionally "
"makes use of the composition pipeline to apply ViewPortOut scaling.";
+static const char * __dpy_force_allow_gsync_help =
+"This option allows enabling G-SYNC on displays that are not validated as "
+"G-SYNC Compatible.";
+
/* Screen tooltips */
static const char * __screen_virtual_size_help =
@@ -1181,6 +1187,33 @@ static void display_forcefullcompositionpipeline_toggled(GtkWidget *widget,
+/** display_gsync_compatible_toggled() ********************************
+ *
+ * Sets AllowGSYNCCompatible for a dpy.
+ *
+ **/
+static void display_gsync_compatible_toggled(GtkWidget *widget,
+ gpointer user_data)
+{
+ CtkDisplayConfig *ctk_object = CTK_DISPLAY_CONFIG(user_data);
+ gint enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+ nvDisplayPtr display = ctk_display_layout_get_selected_display
+ (CTK_DISPLAY_LAYOUT(ctk_object->obj_layout));
+
+ if (enabled) {
+ display->cur_mode->allowGSYNCCompatibleSpecified = TRUE;
+ display->cur_mode->allowGSYNCCompatible = TRUE;
+ } else {
+ display->cur_mode->allowGSYNCCompatibleSpecified = FALSE;
+ display->cur_mode->allowGSYNCCompatible = FALSE;
+ }
+
+ update_force_gsync_button(ctk_object);
+ user_changed_attributes(ctk_object);
+}
+
+
+
/** update_forcecompositionpipeline_buttons() *************************
*
* Updates the buttons for Force{Full,}CompositionPipeline to reflect their
@@ -1229,6 +1262,36 @@ static void update_forcecompositionpipeline_buttons(CtkDisplayConfig *ctk_object
+/** update_force_gsync_button() ***************************************
+ *
+ * Updates the button for AllowGSYNCCompatible to reflect its current
+ * state.
+ *
+ **/
+
+static void update_force_gsync_button(CtkDisplayConfig *ctk_object)
+{
+ nvDisplayPtr display = ctk_display_layout_get_selected_display
+ (CTK_DISPLAY_LAYOUT(ctk_object->obj_layout));
+
+ g_signal_handlers_block_by_func
+ (G_OBJECT(ctk_object->chk_force_allow_gsync),
+ G_CALLBACK(display_gsync_compatible_toggled),
+ (gpointer)ctk_object);
+
+ gtk_toggle_button_set_active
+ (GTK_TOGGLE_BUTTON(ctk_object->chk_force_allow_gsync),
+ display->cur_mode->allowGSYNCCompatibleSpecified &&
+ display->cur_mode->allowGSYNCCompatible);
+
+ g_signal_handlers_unblock_by_func
+ (G_OBJECT(ctk_object->chk_force_allow_gsync),
+ G_CALLBACK(display_gsync_compatible_toggled),
+ (gpointer)ctk_object);
+}
+
+
+
/** screen_primary_display_toggled() ******************************
*
* Sets the primary display for a screen.
@@ -2120,6 +2183,21 @@ GtkWidget* ctk_display_config_new(CtrlTarget *ctrl_target,
ctk_object->chk_forcefullcompositionpipeline_enabled,
TRUE, TRUE, 0);
+ /* checkbox for AllowGSYNCCompatible */
+ hbox = gtk_hbox_new(FALSE, 5);
+ gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0);
+ ctk_object->chk_force_allow_gsync =
+ gtk_check_button_new_with_label(
+ "Allow G-SYNC on monitor not validated as G-SYNC Compatible");
+ ctk_config_set_tooltip(ctk_config, ctk_object->chk_force_allow_gsync,
+ __dpy_force_allow_gsync_help);
+ g_signal_connect(G_OBJECT(ctk_object->chk_force_allow_gsync),
+ "toggled",
+ G_CALLBACK(display_gsync_compatible_toggled),
+ (gpointer) ctk_object);
+ gtk_box_pack_start(GTK_BOX(hbox), ctk_object->chk_force_allow_gsync,
+ TRUE, TRUE, 0);
+
/* Up the object ref count to make sure that the page and its widgets
* do not get freed if/when the page is removed from the notebook.
*/
@@ -2503,6 +2581,8 @@ GtkTextBuffer *ctk_display_config_create_help(GtkTextTagTable *table,
ctk_help_para(b, &i, "%s", __dpy_forcecompositionpipeline_help);
ctk_help_heading(b, &i, "Force Full Composition Pipeline");
ctk_help_para(b, &i, "%s", __dpy_forcefullcompositionpipeline_help);
+ ctk_help_heading(b, &i, "Allow G-SYNC on monitor not validated as G-SYNC Compatible");
+ ctk_help_para(b, &i, "%s", __dpy_force_allow_gsync_help);
ctk_help_para(b, &i, "");
@@ -4568,6 +4648,55 @@ static void setup_prime_display_page(CtkDisplayConfig *ctk_object)
}
+/** setup_force_gsync() ***********************************************
+ *
+ * Control whether to make visible the checkbox that allows enabling G-SYNC
+ * on displays not validated as G-SYNC compatible.
+ *
+ **/
+
+static void setup_force_gsync(CtkDisplayConfig *ctk_object)
+{
+ nvDisplayPtr display = ctk_display_layout_get_selected_display
+ (CTK_DISPLAY_LAYOUT(ctk_object->obj_layout));
+ ReturnStatus ret;
+ int val;
+
+ if (!display || !display->screen || !display->cur_mode ||
+ !ctk_object->advanced_mode) {
+ goto hide;
+ }
+
+ ret = NvCtrlGetAttribute(display->ctrl_target,
+ NV_CTRL_DISPLAY_VRR_MODE, &val);
+ if (ret != NvCtrlSuccess) {
+ goto hide;
+ }
+
+ /*
+ * Show the checkbox only in advanced mode, and only if the display is not
+ * validated as G-SYNC Compatible.
+ */
+ switch (val) {
+ case NV_CTRL_DISPLAY_VRR_MODE_GSYNC_COMPATIBLE_UNVALIDATED:
+ gtk_widget_show(ctk_object->chk_force_allow_gsync);
+ break;
+ case NV_CTRL_DISPLAY_VRR_MODE_GSYNC:
+ case NV_CTRL_DISPLAY_VRR_MODE_GSYNC_COMPATIBLE:
+ case NV_CTRL_DISPLAY_VRR_MODE_NONE:
+ default:
+ goto hide;
+ break;
+ }
+
+ update_force_gsync_button(ctk_object);
+ return;
+
+hide:
+ gtk_widget_hide(ctk_object->chk_force_allow_gsync);
+}
+
+
/** setup_display_page() ********************************************
*
* Updates the display frame to reflect the current state of the
@@ -4607,6 +4736,7 @@ static void setup_display_page(CtkDisplayConfig *ctk_object)
setup_display_panning(ctk_object);
setup_forcecompositionpipeline_buttons(ctk_object);
setup_primary_display(ctk_object);
+ setup_force_gsync(ctk_object);
} /* setup_display_page() */
diff --git a/src/gtk+-2.x/ctkdisplayconfig.h b/src/gtk+-2.x/ctkdisplayconfig.h
index 9858f29..c80200b 100644
--- a/src/gtk+-2.x/ctkdisplayconfig.h
+++ b/src/gtk+-2.x/ctkdisplayconfig.h
@@ -99,6 +99,8 @@ typedef struct _CtkDisplayConfig
GtkWidget *chk_forcecompositionpipeline_enabled;
GtkWidget *chk_forcefullcompositionpipeline_enabled;
+ GtkWidget *chk_force_allow_gsync;
+
GtkWidget *mnu_selected_item;
SelectableItem *selected_item_table;
int selected_item_table_len;
@@ -163,6 +165,7 @@ typedef struct _CtkDisplayConfig
GtkWidget *box_display_panning;
GtkWidget *txt_display_panning;
+
/* X Screen - Info */
GtkWidget *screen_page;
diff --git a/src/gtk+-2.x/ctkdisplaydevice.c b/src/gtk+-2.x/ctkdisplaydevice.c
index 500bdd4..2b32188 100644
--- a/src/gtk+-2.x/ctkdisplaydevice.c
+++ b/src/gtk+-2.x/ctkdisplaydevice.c
@@ -64,6 +64,7 @@ static gboolean update_refresh_rate(InfoEntry *entry);
static gboolean update_connector_type_info(InfoEntry *entry);
static gboolean update_multistream_info(InfoEntry *entry);
static gboolean update_audio_info(InfoEntry *entry);
+static gboolean update_vrr_type_info(InfoEntry *entry);
static gboolean register_link_events(InfoEntry *entry);
static gboolean unregister_link_events(InfoEntry *entry);
@@ -115,6 +116,10 @@ static const char * __multistream_help =
static const char * __audio_help =
"Report whether the configured DisplayPort display is capable of playing audio.";
+static const char * __vrr_type_help =
+"Report whether the configured display supports G-SYNC, G-SYNC Compatible, or "
+"neither.";
+
typedef gboolean (*InfoEntryFunc)(InfoEntry *entry);
typedef struct {
@@ -189,6 +194,13 @@ static InfoEntryData __info_entry_data[] = {
NULL,
NULL,
},
+ {
+ "G-SYNC Mode Available",
+ &__vrr_type_help,
+ update_vrr_type_info,
+ NULL,
+ NULL,
+ },
};
GType ctk_display_device_get_type(void)
@@ -837,6 +849,41 @@ static gboolean update_audio_info(InfoEntry *entry)
return TRUE;
}
+static gboolean update_vrr_type_info(InfoEntry *entry)
+{
+ CtkDisplayDevice *ctk_object = entry->ctk_object;
+ CtrlTarget *ctrl_target = ctk_object->ctrl_target;
+ ReturnStatus ret;
+ gint val;
+ const char *str;
+
+ ret = NvCtrlGetAttribute(ctrl_target,
+ NV_CTRL_DISPLAY_VRR_MODE, &val);
+ if (ret != NvCtrlSuccess) {
+ return FALSE;
+ }
+
+ switch (val) {
+ case NV_CTRL_DISPLAY_VRR_MODE_GSYNC:
+ str = "G-SYNC";
+ break;
+ case NV_CTRL_DISPLAY_VRR_MODE_GSYNC_COMPATIBLE:
+ str = "G-SYNC Compatible";
+ break;
+ case NV_CTRL_DISPLAY_VRR_MODE_GSYNC_COMPATIBLE_UNVALIDATED:
+ str = "G-SYNC Unvalidated";
+ break;
+ default:
+ case NV_CTRL_DISPLAY_VRR_MODE_NONE:
+ str = "None";
+ break;
+ }
+
+ gtk_label_set_text(GTK_LABEL(entry->txt), str);
+
+ return TRUE;
+}
+
diff --git a/src/gtk+-2.x/ctkdisplaylayout.c b/src/gtk+-2.x/ctkdisplaylayout.c
index 93a4ddd..8b6fcef 100644
--- a/src/gtk+-2.x/ctkdisplaylayout.c
+++ b/src/gtk+-2.x/ctkdisplaylayout.c
@@ -2351,6 +2351,9 @@ static void select_display(CtkDisplayLayout *ctk_object, nvDisplayPtr display)
/* Move the screen and its displays to the top of the Z order */
select_screen(ctk_object, display->screen);
+ /* Clear any previously selected PRIME display */
+ ctk_object->selected_prime_display = NULL;
+
/* Move the display to the top of the Z order */
for (i = 0; i < ctk_object->Zcount; i++) {
@@ -2396,6 +2399,9 @@ static void select_prime_display(CtkDisplayLayout *ctk_object, nvPrimeDisplayPtr
/* Move the screen and its displays to the top of the Z order */
select_screen(ctk_object, prime->screen);
+ /* Clear any previously selected display */
+ ctk_object->selected_display = NULL;
+
/* Move the display to the top of the Z order */
for (i = 0; i < ctk_object->Zcount; i++) {
diff --git a/src/gtk+-2.x/ctkdisplaylayout.h b/src/gtk+-2.x/ctkdisplaylayout.h
index 80cfc20..77b066a 100644
--- a/src/gtk+-2.x/ctkdisplaylayout.h
+++ b/src/gtk+-2.x/ctkdisplaylayout.h
@@ -228,6 +228,9 @@ typedef struct nvModeRec {
Bool forceCompositionPipeline;
Bool forceFullCompositionPipeline;
Bool allowGSYNC;
+ Bool allowGSYNCCompatibleSpecified;
+ Bool allowGSYNCCompatible;
+ int vrrMinRefreshRate;
} nvMode, *nvModePtr;
diff --git a/src/gtk+-2.x/ctkevent.c b/src/gtk+-2.x/ctkevent.c
index f3d27de..664a404 100644
--- a/src/gtk+-2.x/ctkevent.c
+++ b/src/gtk+-2.x/ctkevent.c
@@ -332,7 +332,7 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_SIGNAL(NV_CTRL_THERMAL_COOLER_SPEED);
MAKE_SIGNAL(NV_CTRL_PALETTE_UPDATE_EVENT);
MAKE_SIGNAL(NV_CTRL_VIDEO_ENCODER_UTILIZATION);
- MAKE_SIGNAL(NV_CTRL_GSYNC_ALLOWED);
+ MAKE_SIGNAL(NV_CTRL_VRR_ALLOWED);
MAKE_SIGNAL(NV_CTRL_GPU_NVCLOCK_OFFSET);
MAKE_SIGNAL(NV_CTRL_GPU_MEM_TRANSFER_RATE_OFFSET);
MAKE_SIGNAL(NV_CTRL_GPU_NVCLOCK_OFFSET_ALL_PERFORMANCE_LEVELS);
@@ -340,7 +340,7 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_SIGNAL(NV_CTRL_VIDEO_DECODER_UTILIZATION);
MAKE_SIGNAL(NV_CTRL_GPU_OVER_VOLTAGE_OFFSET);
MAKE_SIGNAL(NV_CTRL_GPU_CURRENT_CORE_VOLTAGE);
- MAKE_SIGNAL(NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR);
+ MAKE_SIGNAL(NV_CTRL_SHOW_VRR_VISUAL_INDICATOR);
MAKE_SIGNAL(NV_CTRL_THERMAL_COOLER_CURRENT_LEVEL);
MAKE_SIGNAL(NV_CTRL_STEREO_SWAP_MODE);
MAKE_SIGNAL(NV_CTRL_GPU_FRAMELOCK_FIRMWARE_UNSUPPORTED);
@@ -348,6 +348,8 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_SIGNAL(NV_CTRL_DISPLAYPORT_IS_MULTISTREAM);
MAKE_SIGNAL(NV_CTRL_DISPLAYPORT_SINK_IS_AUDIO_CAPABLE);
MAKE_SIGNAL(NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR);
+ MAKE_SIGNAL(NV_CTRL_DISPLAY_VRR_MODE);
+ MAKE_SIGNAL(NV_CTRL_DISPLAY_VRR_MIN_REFRESH_RATE);
#undef MAKE_SIGNAL
/*
@@ -357,7 +359,7 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
* knows about.
*/
-#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR
+#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_DISPLAY_VRR_MIN_REFRESH_RATE
#warning "There are attributes that do not emit signals!"
#endif
diff --git a/src/gtk+-2.x/ctkgridlicense.c b/src/gtk+-2.x/ctkgridlicense.c
index 6940ee2..4280b08 100644
--- a/src/gtk+-2.x/ctkgridlicense.c
+++ b/src/gtk+-2.x/ctkgridlicense.c
@@ -2,7 +2,7 @@
* nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
* and Linux systems.
*
- * Copyright (C) 2017 NVIDIA Corporation.
+ * Copyright (C) 2019 NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -43,17 +43,17 @@
#include <unistd.h>
#include <errno.h>
-#define DEFAULT_UPDATE_GRID_LICENSE_STATUS_INFO_TIME_INTERVAL 1000
-#define GRID_CONFIG_FILE "/etc/nvidia/gridd.conf"
-#define GRID_CONFIG_FILE_TEMPLATE "/etc/nvidia/gridd.conf.template"
+#define DEFAULT_UPDATE_GRID_LICENSE_STATUS_INFO_TIME_INTERVAL 1000
+#define GRID_CONFIG_FILE "/etc/nvidia/gridd.conf"
+#define GRID_CONFIG_FILE_TEMPLATE "/etc/nvidia/gridd.conf.template"
static const char * __manage_grid_licenses_help =
"Use the Manage GRID License page to obtain licenses "
-"for GRID vGPU or Quadro Virtual Datacenter Workstation on supported Tesla products.";
+"for GRID vGPU or Quadro Virtual Data Center Workstation on supported Tesla products.";
static const char * __grid_virtual_workstation_help =
-"Select this option to enable Quadro Virtual Datacenter Workstation license.";
+"Select this option to enable Quadro Virtual Data Center Workstation license.";
static const char * __grid_vapp_help =
-"Select this option to disable the Quadro Virtual Datacenter Workstation license.";
+"Select this option to disable the Quadro Virtual Data Center Workstation license.";
static const char * __license_edition_help =
"This section indicates the status of GRID licensing for the system.";
static const char * __license_server_help =
@@ -119,7 +119,7 @@ static gboolean allow_digits(GtkWidget *widget, GdkEvent *event, gpointer user_d
static gboolean enable_disable_ui_controls(GtkWidget *widget, GdkEvent *event, gpointer user_data);
static void update_gui_from_griddconfig(gpointer user_data);
static gboolean licenseStateQueryFailed = FALSE;
-static void get_licensed_feature_code(gpointer user_data);
+static void get_licensed_feature_information(gpointer user_data);
static gboolean is_restart_required(gpointer user_data);
static gboolean queryLicensedFeatureCode = TRUE;
int64_t licensedFeatureCode = NV_GRID_LICENSE_FEATURE_TYPE_VAPP;
@@ -739,16 +739,15 @@ done:
return ret;
}
-
/*
* update_manage_grid_license_state_info() - update manage_grid_license state
*/
-
static gboolean update_manage_grid_license_state_info(gpointer user_data)
{
CtkManageGridLicense *ctk_manage_grid_license = CTK_MANAGE_GRID_LICENSE(user_data);
gchar *licenseStatusMessage = "";
gboolean ret = TRUE;
+ char licenseStatusMsgTmp[GRID_MESSAGE_MAX_BUFFER_SIZE] = {0};
int licenseStatus = NV_GRID_UNLICENSED_VGPU;
int licenseState = NV_GRID_UNLICENSED;
@@ -844,7 +843,7 @@ static gboolean update_manage_grid_license_state_info(gpointer user_data)
break;
}
if (queryLicensedFeatureCode == TRUE) {
- get_licensed_feature_code(ctk_manage_grid_license);
+ get_licensed_feature_information(ctk_manage_grid_license);
queryLicensedFeatureCode = FALSE;
}
}
@@ -925,58 +924,47 @@ static gboolean update_manage_grid_license_state_info(gpointer user_data)
switch (licenseStatus) {
case NV_GRID_UNLICENSED_VGPU:
- licenseStatusMessage = "Your system does not have a valid GRID vGPU license.\n"
- "Enter license server details and apply.";
+ snprintf(licenseStatusMsgTmp, sizeof(licenseStatusMsgTmp), "Your system does not have a valid %s license.\n"
+ "Enter license server details and apply.", ctk_manage_grid_license->productName);
+ licenseStatusMessage = licenseStatusMsgTmp;
break;
case NV_GRID_UNLICENSED_VAPP:
- licenseStatusMessage = "Your system is currently configured for "
- "GRID Virtual Apps.";
+ snprintf(licenseStatusMsgTmp, sizeof(licenseStatusMsgTmp), "Your system is currently configured for %s.", GRID_VIRTUAL_APPLICATIONS);
+ licenseStatusMessage = licenseStatusMsgTmp;
break;
case NV_GRID_UNLICENSED_QDWS_SELECTED:
- licenseStatusMessage = "Your system is currently configured for GRID Virtual Apps.\n"
- "Enter license server details and apply.";
+ snprintf(licenseStatusMsgTmp, sizeof(licenseStatusMsgTmp), "Your system is currently configured for %s.\n"
+ "Enter license server details and apply.", GRID_VIRTUAL_APPLICATIONS);
+ licenseStatusMessage = licenseStatusMsgTmp;
break;
case NV_GRID_LICENSE_ACQUIRED_VGPU:
- licenseStatusMessage = "Your system is licensed for GRID vGPU.";
- break;
case NV_GRID_LICENSE_ACQUIRED_QDWS:
- licenseStatusMessage = "Your system is licensed for Quadro Virtual Datacenter "
- "Workstation.";
+ snprintf(licenseStatusMsgTmp, sizeof(licenseStatusMsgTmp), "Your system is licensed for %s.", ctk_manage_grid_license->productName);
+ licenseStatusMessage = licenseStatusMsgTmp;
break;
case NV_GRID_LICENSE_REQUESTING_VGPU:
- licenseStatusMessage = "Acquiring license for GRID vGPU.\n"
- "Your system does not have a valid GRID vGPU license.";
- break;
case NV_GRID_LICENSE_REQUESTING_QDWS:
- licenseStatusMessage = "Acquiring license for Quadro Virtual Datacenter "
- "Workstation.\n"
- " Your system is currently configured for GRID Virtual Apps.";
+ snprintf(licenseStatusMsgTmp, sizeof(licenseStatusMsgTmp), "Acquiring license for %s.", ctk_manage_grid_license->productName);
+ licenseStatusMessage = licenseStatusMsgTmp;
break;
case NV_GRID_LICENSE_FAILED_VGPU:
- licenseStatusMessage = "Failed to acquire GRID vGPU license.";
- break;
case NV_GRID_LICENSE_FAILED_QDWS:
- licenseStatusMessage = "Failed to acquire Quadro Virtual Datacenter "
- "Worstation license.\n"
- " Your system is currently configured for GRID Virtual Apps.";
+ snprintf(licenseStatusMsgTmp, sizeof(licenseStatusMsgTmp), "Failed to acquire %s license.", ctk_manage_grid_license->productName);
+ licenseStatusMessage = licenseStatusMsgTmp;
break;
case NV_GRID_LICENSE_EXPIRED_VGPU:
- licenseStatusMessage = "GRID vGPU license has expired.\n"
- "Your system does not have a valid GRID vGPU license.";
- break;
case NV_GRID_LICENSE_EXPIRED_QDWS:
- licenseStatusMessage = "License for Quadro Virtual Datacenter Workstation "
- "has expired.\n"
- "Your system does not have a valid Quadro Virtual Datacenter "
- "Workstation license.";
+ snprintf(licenseStatusMsgTmp, sizeof(licenseStatusMsgTmp), "%s license has expired.", ctk_manage_grid_license->productName);
+ licenseStatusMessage = licenseStatusMsgTmp;
break;
case NV_GRID_LICENSE_RESTART_REQUIRED:
- licenseStatusMessage = "Restart your system for GRID Virtual Apps.\n"
- "Your system is currently licensed for Quadro Virtual Datacenter "
- "Workstation.";
+ snprintf(licenseStatusMsgTmp, sizeof(licenseStatusMsgTmp), "Restart your system for %s.\n"
+ "Your system is currently licensed for %s.", GRID_VIRTUAL_APPLICATIONS, ctk_manage_grid_license->productName);
+ licenseStatusMessage = licenseStatusMsgTmp;
break;
case NV_GRID_LICENSE_RESTART_REQUIRED_VAPP:
- licenseStatusMessage = "Restart your system for GRID Virtual Apps.";
+ snprintf(licenseStatusMsgTmp, sizeof(licenseStatusMsgTmp), "Restart your system for %s.",GRID_VIRTUAL_APPLICATIONS);
+ licenseStatusMessage = licenseStatusMsgTmp;
break;
case NV_GRID_UNLICENSED_REQUEST_DETAILS:
default:
@@ -1010,7 +998,6 @@ static gboolean is_restart_required(gpointer user_data)
/*
* apply_clicked() - Called when the user clicks on the "Apply" button.
*/
-
static void apply_clicked(GtkWidget *widget, gpointer user_data)
{
CtkManageGridLicense *ctk_manage_grid_license = CTK_MANAGE_GRID_LICENSE(user_data);
@@ -1093,9 +1080,9 @@ static void apply_clicked(GtkWidget *widget, gpointer user_data)
}
/*
- * get_licensed_feature_code() - Get the feature code of the feature that is licensed on this system.
+ * get_licensed_feature_information() - Get the details of the feature that is licensed on this system.
*/
-static void get_licensed_feature_code(gpointer user_data)
+static void get_licensed_feature_information(gpointer user_data)
{
CtkManageGridLicense *ctk_manage_grid_license = CTK_MANAGE_GRID_LICENSE(user_data);
nvmlGridLicensableFeatures_t *gridLicensableFeatures;
@@ -1110,6 +1097,11 @@ static void get_licensed_feature_code(gpointer user_data)
for (i = 0; i < gridLicensableFeatures->licensableFeaturesCount; i++)
{
+ strncpy(ctk_manage_grid_license->productName,
+ gridLicensableFeatures->gridLicensableFeatures[i].productName,
+ sizeof(ctk_manage_grid_license->productName) - 1);
+ ctk_manage_grid_license->productName[sizeof(ctk_manage_grid_license->productName) - 1] = '\0';
+
if (gridLicensableFeatures->gridLicensableFeatures[i].featureState != 0)
{
licensedFeatureCode = gridLicensableFeatures->gridLicensableFeatures[i].featureCode;
@@ -1122,7 +1114,6 @@ static void get_licensed_feature_code(gpointer user_data)
/*
* cancel_clicked() - Called when the user clicks on the "Cancel" button.
*/
-
static void cancel_clicked(GtkWidget *widget, gpointer user_data)
{
CtkManageGridLicense *ctk_manage_grid_license = CTK_MANAGE_GRID_LICENSE(user_data);
@@ -1157,7 +1148,7 @@ static void update_gui_from_griddconfig(gpointer user_data)
gtk_entry_set_text(GTK_ENTRY(ctk_manage_grid_license->txt_secondary_server_port),
griddConfig->str[NV_GRIDD_BACKUP_SERVER_PORT]);
/* set default value for feature type based on the user configured parameter or virtualization mode */
- /* Check Feature type "2" for Quadro Virtual Datacenter Workstation. */
+ /* Check Feature type "2" for Quadro Virtual Data Center Workstation. */
if (strcmp(griddConfig->str[NV_GRIDD_FEATURE_TYPE], "2") == 0) {
ctk_manage_grid_license->feature_type = NV_GRID_LICENSE_FEATURE_TYPE_QDWS;
}
@@ -1174,11 +1165,11 @@ static void update_gui_from_griddconfig(gpointer user_data)
/* Set license edition toggle button active */
if (ctk_manage_grid_license->radio_btn_qdws && ctk_manage_grid_license->radio_btn_vapp) {
if (ctk_manage_grid_license->feature_type == NV_GRID_LICENSE_FEATURE_TYPE_QDWS) {
- /* Set 'Quadro Virtual Datacenter Workstation' toggle button active */
+ /* Set 'Quadro Virtual Data Center Workstation' toggle button active */
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ctk_manage_grid_license->radio_btn_qdws), TRUE);
}
else {
- /* Set 'GRID Virtual Apps' toggle button active */
+ /* Set 'GRID Virtual Applications' toggle button active */
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ctk_manage_grid_license->radio_btn_vapp), TRUE);
}
}
@@ -1216,6 +1207,7 @@ static void license_edition_toggled(GtkWidget *widget, gpointer user_data)
gboolean enabled;
gchar *statusBarMsg = "";
NvGriddConfigParams *griddConfig;
+ char licenseStatusMsgTmp[GRID_MESSAGE_MAX_BUFFER_SIZE] = {0};
const char *textBoxServerStr, *textBoxServerPortStr, *textBoxSecondaryServerStr, *textBoxSecondaryServerPortStr;
griddConfig = GetNvGriddConfigParams();
@@ -1237,7 +1229,8 @@ static void license_edition_toggled(GtkWidget *widget, gpointer user_data)
if (GPOINTER_TO_INT(user_data) == NV_GRID_LICENSE_FEATURE_TYPE_QDWS) {
gtk_widget_set_sensitive(ctk_manage_grid_license->box_server_info, TRUE);
- statusBarMsg = "You selected Quadro Virtual Datacenter Workstation Edition.";
+ snprintf(licenseStatusMsgTmp, sizeof(licenseStatusMsgTmp), "You selected %s", ctk_manage_grid_license->productName);
+ statusBarMsg = licenseStatusMsgTmp;
ctk_manage_grid_license->feature_type =
NV_GRID_LICENSE_FEATURE_TYPE_QDWS;
/* Enable Apply/Cancel button if the feature type selection has changed*/
@@ -1268,7 +1261,8 @@ static void license_edition_toggled(GtkWidget *widget, gpointer user_data)
gtk_widget_set_sensitive(ctk_manage_grid_license->box_server_info, FALSE);
ctk_manage_grid_license->feature_type =
NV_GRID_LICENSE_FEATURE_TYPE_VAPP;
- statusBarMsg = "You selected GRID Virtual Apps Edition.";
+ snprintf(licenseStatusMsgTmp, sizeof(licenseStatusMsgTmp), "You selected %s", GRID_VIRTUAL_APPLICATIONS);
+ statusBarMsg = licenseStatusMsgTmp;
/* Enable Apply/Cancel button if the feature type selection has changed*/
if (strcmp(griddConfig->str[NV_GRIDD_FEATURE_TYPE], "0") != 0) {
gtk_widget_set_sensitive(ctk_manage_grid_license->btn_apply, TRUE);
@@ -1451,11 +1445,9 @@ done:
if (configFile) {
fclose(configFile);
}
- return ret;
+ return ret;
}
-
-
GtkWidget* ctk_manage_grid_license_new(CtrlTarget *target,
CtkConfig *ctk_config)
{
@@ -1505,10 +1497,10 @@ GtkWidget* ctk_manage_grid_license_new(CtrlTarget *target,
}
/* GRID M6 is licensable gpu so we want to allow users to choose
- * Quadro Virtual Datacenter Workstation and GRID Virtual Apps on baremetal setup.
+ * Quadro Virtual Data Center Workstation and GRID Virtual Applications on baremetal setup.
* When virtualization mode is NV_CTRL_ATTR_NVML_GPU_VIRTUALIZATION_MODE_NONE
* treat it same way like NV_CTRL_ATTR_NVML_GPU_VIRTUALIZATION_MODE_PASSTHROUGH.
- * So that it will show the Quadro Virtual Datacenter Workstation interface in case of
+ * So that it will show the Quadro Virtual Data Center Workstation interface in case of
* baremetal setup.
*/
if (mode == NV_CTRL_ATTR_NVML_GPU_VIRTUALIZATION_MODE_NONE) {
@@ -1566,6 +1558,8 @@ GtkWidget* ctk_manage_grid_license_new(CtrlTarget *target,
gtk_box_set_spacing(GTK_BOX(ctk_manage_grid_license), 5);
+ get_licensed_feature_information(ctk_manage_grid_license);
+
/* banner */
banner = ctk_banner_image_new(BANNER_ARTWORK_SERVER_LICENSING);
@@ -1594,7 +1588,7 @@ GtkWidget* ctk_manage_grid_license_new(CtrlTarget *target,
gtk_container_set_border_width(GTK_CONTAINER(vbox3), 5);
ctk_manage_grid_license->radio_btn_qdws = gtk_radio_button_new_with_label(NULL,
- "Quadro Virtual Datacenter Workstation");
+ ctk_manage_grid_license->productName);
slist = gtk_radio_button_get_group(GTK_RADIO_BUTTON(ctk_manage_grid_license->radio_btn_qdws));
gtk_box_pack_start(GTK_BOX(vbox3), ctk_manage_grid_license->radio_btn_qdws, FALSE, FALSE, 0);
g_object_set_data(G_OBJECT(ctk_manage_grid_license->radio_btn_qdws), "button_id",
@@ -1603,7 +1597,7 @@ GtkWidget* ctk_manage_grid_license_new(CtrlTarget *target,
G_CALLBACK(license_edition_toggled),
(gpointer) ctk_manage_grid_license);
- ctk_manage_grid_license->radio_btn_vapp = gtk_radio_button_new_with_label(slist, "GRID Virtual Apps");
+ ctk_manage_grid_license->radio_btn_vapp = gtk_radio_button_new_with_label(slist, GRID_VIRTUAL_APPLICATIONS);
gtk_box_pack_start(GTK_BOX(vbox3), ctk_manage_grid_license->radio_btn_vapp, FALSE, FALSE, 0);
g_object_set_data(G_OBJECT(ctk_manage_grid_license->radio_btn_vapp), "button_id",
GINT_TO_POINTER(NV_GRID_LICENSE_FEATURE_TYPE_VAPP));
@@ -1785,8 +1779,6 @@ GtkWidget* ctk_manage_grid_license_new(CtrlTarget *target,
/* Update GUI with information from the nvidia-gridd config file */
update_gui_from_griddconfig(ctk_manage_grid_license);
- get_licensed_feature_code(ctk_manage_grid_license);
-
/* Set the license feature type fetched from nvidia-gridd */
ctk_manage_grid_license->gridd_feature_type = ctk_manage_grid_license->feature_type;
@@ -1835,10 +1827,10 @@ GtkTextBuffer *ctk_manage_grid_license_create_help(GtkTextTagTable *table,
if (ctk_manage_grid_license->license_edition_state ==
NV_CTRL_ATTR_NVML_GPU_VIRTUALIZATION_MODE_PASSTHROUGH) {
- ctk_help_heading(b, &i, "Quadro Virtual Datacenter Workstation");
+ ctk_help_heading(b, &i, "%s", ctk_manage_grid_license->productName);
ctk_help_para(b, &i, "%s", __grid_virtual_workstation_help);
- ctk_help_heading(b, &i, "GRID Virtual Apps");
+ ctk_help_heading(b, &i, "%s", GRID_VIRTUAL_APPLICATIONS);
ctk_help_para(b, &i, "%s", __grid_vapp_help);
}
diff --git a/src/gtk+-2.x/ctkgridlicense.h b/src/gtk+-2.x/ctkgridlicense.h
index 42178dc..07e27ed 100644
--- a/src/gtk+-2.x/ctkgridlicense.h
+++ b/src/gtk+-2.x/ctkgridlicense.h
@@ -39,6 +39,10 @@ G_BEGIN_DECLS
#define CTK_MANAGE_GRID_LICENSE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), CTK_TYPE_MANAGE_GRID_LICENSE, CtkMANAGE_GRID_LICENSEClass))
+#define GRID_LICENSE_INFO_MAX_LENGTH 128
+#define GRID_MESSAGE_MAX_BUFFER_SIZE 512
+#define GRID_VIRTUAL_APPLICATIONS "GRID Virtual Applications"
+
typedef struct _CtkManageGridLicense CtkManageGridLicense;
typedef struct _CtkManageGridLicenseClass CtkManageGridLicenseClass;
@@ -64,8 +68,9 @@ struct _CtkManageGridLicense
DbusData *dbusData;
CtrlTarget *target;
gint license_edition_state;
- gint feature_type; // Feature type from UI/gridd.conf.
- int gridd_feature_type; // Feature type fetched from nvidia-gridd.
+ gint feature_type; // Feature type from UI/gridd.conf.
+ int gridd_feature_type; // Feature type fetched from nvidia-gridd.
+ char productName[GRID_LICENSE_INFO_MAX_LENGTH]; // GRID product name fetched from nvml.
};
/*
diff --git a/src/gtk+-2.x/ctkopengl.c b/src/gtk+-2.x/ctkopengl.c
index 132ed82..07d91c6 100644
--- a/src/gtk+-2.x/ctkopengl.c
+++ b/src/gtk+-2.x/ctkopengl.c
@@ -37,9 +37,9 @@ static void post_vblank_sync_button_toggled(CtkOpenGL *, gboolean);
static void post_allow_flipping_button_toggled(CtkOpenGL *, gboolean);
-static void post_allow_gsync_button_toggled(CtkOpenGL *, gboolean);
+static void post_allow_vrr_button_toggled(CtkOpenGL *, gboolean);
-static void post_show_gsync_visual_indicator_button_toggled(CtkOpenGL *, gboolean);
+static void post_show_vrr_visual_indicator_button_toggled(CtkOpenGL *, gboolean);
static void post_force_stereo_button_toggled(CtkOpenGL *, gboolean);
@@ -61,9 +61,9 @@ static void post_use_conformant_clamping_button_toggled(CtkOpenGL *, gint);
static void allow_flipping_button_toggled(GtkWidget *, gpointer);
-static void allow_gsync_button_toggled(GtkWidget *, gpointer);
+static void allow_vrr_button_toggled(GtkWidget *, gpointer);
-static void show_gsync_visual_indicator_button_toggled(GtkWidget *, gpointer);
+static void show_vrr_visual_indicator_button_toggled(GtkWidget *, gpointer);
static void force_stereo_button_toggled (GtkWidget *, gpointer);
@@ -206,11 +206,11 @@ static const char *__use_conformant_clamping_help =
"seams at the edges of textures in some older games such as "
"Quake 3.";
-static const char *__show_gsync_visual_indicator_help =
+static const char *__show_vrr_visual_indicator_help =
"Enabling this option causes OpenGL to draw an indicator showing whether "
-"G-SYNC is in use, when an application is swapping using flipping. This "
-"option is applied to OpenGL applications that are started after this option "
-"is set.";
+"G-SYNC/G-SYNC Compatible is in use, when an application is swapping using "
+"flipping. This option is applied to OpenGL applications that are started "
+"after this option is set.";
#define __SYNC_TO_VBLANK (1 << 1)
#define __ALLOW_FLIPPING (1 << 2)
@@ -224,8 +224,8 @@ static const char *__show_gsync_visual_indicator_help =
#define __STEREO_EYES_EXCHANGE (1 << 10)
#define __SHOW_MULTIGPU_VISUAL_INDICATOR (1 << 11)
#define __CONFORMANT_CLAMPING (1 << 12)
-#define __ALLOW_GSYNC (1 << 13)
-#define __SHOW_GSYNC_VISUAL_INDICATOR (1 << 14)
+#define __ALLOW_VRR (1 << 13)
+#define __SHOW_VRR_VISUAL_INDICATOR (1 << 14)
#define __STEREO_SWAP_MODE (1 << 15)
#define __SHOW_GRAPHICS_VISUAL_INDICATOR (1 << 16)
@@ -299,8 +299,8 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
gint sync_to_vblank = 0;
gint flipping_allowed = 0;
- gint gsync_allowed = 0;
- gint show_gsync_visual_indicator = 0;
+ gint vrr_allowed = 0;
+ gint show_vrr_visual_indicator = 0;
gint force_stereo = 0;
gint xinerama_stereo = 0;
gint stereo_eyes_exchange = 0;
@@ -315,8 +315,8 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
ReturnStatus ret_sync_to_vblank;
ReturnStatus ret_flipping_allowed;
- ReturnStatus ret_gsync_allowed;
- ReturnStatus ret_show_gsync_visual_indicator;
+ ReturnStatus ret_vrr_allowed;
+ ReturnStatus ret_show_vrr_visual_indicator;
ReturnStatus ret_force_stereo;
ReturnStatus ret_xinerama_stereo;
ReturnStatus ret_stereo_eyes_exchange;
@@ -340,15 +340,15 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
NV_CTRL_FLIPPING_ALLOWED,
&flipping_allowed);
- ret_gsync_allowed =
+ ret_vrr_allowed =
NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GSYNC_ALLOWED,
- &gsync_allowed);
+ NV_CTRL_VRR_ALLOWED,
+ &vrr_allowed);
- ret_show_gsync_visual_indicator =
+ ret_show_vrr_visual_indicator =
NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR,
- &show_gsync_visual_indicator);
+ NV_CTRL_SHOW_VRR_VISUAL_INDICATOR,
+ &show_vrr_visual_indicator);
ret_force_stereo =
NvCtrlGetAttribute(ctrl_target,
@@ -411,8 +411,8 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
/* There are no OpenGL settings to change (OpenGL disabled?) */
if ((ret_sync_to_vblank != NvCtrlSuccess) &&
(ret_flipping_allowed != NvCtrlSuccess) &&
- (ret_gsync_allowed != NvCtrlSuccess) &&
- (ret_show_gsync_visual_indicator != NvCtrlSuccess) &&
+ (ret_vrr_allowed != NvCtrlSuccess) &&
+ (ret_show_vrr_visual_indicator != NvCtrlSuccess) &&
(ret_force_stereo != NvCtrlSuccess) &&
(ret_xinerama_stereo != NvCtrlSuccess) &&
(ret_stereo_eyes_exchange != NvCtrlSuccess) &&
@@ -530,70 +530,70 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
}
/*
- * allow G-SYNC
+ * allow G-SYNC/G-SYNC Compatible
*
* Always create the checkbox, but only show it if the attribute starts out
* available.
*/
- label = gtk_label_new("Allow G-SYNC");
+ label = gtk_label_new("Allow G-SYNC/G-SYNC Compatible");
check_button = gtk_check_button_new();
gtk_container_add(GTK_CONTAINER(check_button), label);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button),
- gsync_allowed);
+ vrr_allowed);
gtk_box_pack_start(GTK_BOX(vbox), check_button, FALSE, FALSE, 0);
g_signal_connect(G_OBJECT(check_button), "toggled",
- G_CALLBACK(allow_gsync_button_toggled),
+ G_CALLBACK(allow_vrr_button_toggled),
(gpointer) ctk_opengl);
g_signal_connect(G_OBJECT(ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GSYNC_ALLOWED),
+ CTK_EVENT_NAME(NV_CTRL_VRR_ALLOWED),
G_CALLBACK(value_changed), (gpointer) ctk_opengl);
ctk_config_set_tooltip(ctk_config, check_button,
"Enabling this option allows OpenGL to flip "
- "using G-SYNC when possible. This option is "
- "applied immediately.");
+ "using G-SYNC/G-SYNC Compatible when possible. "
+ "This option is applied immediately.");
- ctk_opengl->active_attributes |= __ALLOW_GSYNC;
+ ctk_opengl->active_attributes |= __ALLOW_VRR;
- ctk_opengl->allow_gsync_button = check_button;
+ ctk_opengl->allow_vrr_button = check_button;
/*
- * show G-SYNC visual indicator
+ * show G-SYNC/G-SYNC Compatible visual indicator
*
* Always create the checkbox, but only show it if the attribute starts out
* available.
*/
- label = gtk_label_new("Enable G-SYNC Visual Indicator");
+ label = gtk_label_new("Enable G-SYNC/G-SYNC Compatible 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_gsync_visual_indicator);
+ show_vrr_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_gsync_visual_indicator_button_toggled),
+ G_CALLBACK(show_vrr_visual_indicator_button_toggled),
(gpointer) ctk_opengl);
g_signal_connect(G_OBJECT(ctk_event),
- CTK_EVENT_NAME(NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR),
+ CTK_EVENT_NAME(NV_CTRL_SHOW_VRR_VISUAL_INDICATOR),
G_CALLBACK(value_changed), (gpointer) ctk_opengl);
ctk_config_set_tooltip(ctk_config, check_button,
- __show_gsync_visual_indicator_help);
+ __show_vrr_visual_indicator_help);
- ctk_opengl->active_attributes |= __SHOW_GSYNC_VISUAL_INDICATOR;
+ ctk_opengl->active_attributes |= __SHOW_VRR_VISUAL_INDICATOR;
- ctk_opengl->show_gsync_visual_indicator_button = check_button;
+ ctk_opengl->show_vrr_visual_indicator_button = check_button;
if (ret_force_stereo == NvCtrlSuccess) {
@@ -920,14 +920,14 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
gtk_widget_show_all(GTK_WIDGET(object));
/*
- * If GSYNC is not currently available, start out with the GSYNC button
- * hidden.
+ * If G-SYNC/G-SYNC Compatible is not currently available, start out with
+ * the button hidden.
*/
- if (ret_gsync_allowed != NvCtrlSuccess) {
- gtk_widget_hide(GTK_WIDGET(ctk_opengl->allow_gsync_button));
+ if (ret_vrr_allowed != NvCtrlSuccess) {
+ gtk_widget_hide(GTK_WIDGET(ctk_opengl->allow_vrr_button));
}
- if (ret_show_gsync_visual_indicator != NvCtrlSuccess) {
- gtk_widget_hide(GTK_WIDGET(ctk_opengl->show_gsync_visual_indicator_button));
+ if (ret_show_vrr_visual_indicator != NvCtrlSuccess) {
+ gtk_widget_hide(GTK_WIDGET(ctk_opengl->show_vrr_visual_indicator_button));
}
return GTK_WIDGET(object);
@@ -952,20 +952,20 @@ static void post_allow_flipping_button_toggled(CtkOpenGL *ctk_opengl,
enabled ? "allowed" : "not allowed");
}
-static void post_allow_gsync_button_toggled(CtkOpenGL *ctk_opengl,
- gboolean enabled)
+static void post_allow_vrr_button_toggled(CtkOpenGL *ctk_opengl,
+ gboolean enabled)
{
ctk_config_statusbar_message(ctk_opengl->ctk_config,
- "G-SYNC %s.",
+ "G-SYNC/G-SYNC Compatible %s.",
enabled ? "allowed" : "not allowed");
}
-static void post_show_gsync_visual_indicator_button_toggled(CtkOpenGL *ctk_opengl,
- gboolean enabled)
+static void post_show_vrr_visual_indicator_button_toggled(CtkOpenGL *ctk_opengl,
+ gboolean enabled)
{
ctk_config_statusbar_message(ctk_opengl->ctk_config,
- "G-SYNC visual indicator %s.",
- enabled ? "enabled" : "disabled");
+ "G-SYNC/G-SYNC Compatible visual indicator "
+ "%s.", enabled ? "enabled" : "disabled");
}
static void post_force_stereo_button_toggled(CtkOpenGL *ctk_opengl,
@@ -1065,8 +1065,8 @@ static void allow_flipping_button_toggled(GtkWidget *widget,
post_allow_flipping_button_toggled(ctk_opengl, enabled);
}
-static void allow_gsync_button_toggled(GtkWidget *widget,
- gpointer user_data)
+static void allow_vrr_button_toggled(GtkWidget *widget,
+ gpointer user_data)
{
CtkOpenGL *ctk_opengl = CTK_OPENGL(user_data);
CtrlTarget *ctrl_target = ctk_opengl->ctrl_target;
@@ -1074,12 +1074,12 @@ static void allow_gsync_button_toggled(GtkWidget *widget,
enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- NvCtrlSetAttribute(ctrl_target, NV_CTRL_GSYNC_ALLOWED, enabled);
- post_allow_gsync_button_toggled(ctk_opengl, enabled);
+ NvCtrlSetAttribute(ctrl_target, NV_CTRL_VRR_ALLOWED, enabled);
+ post_allow_vrr_button_toggled(ctk_opengl, enabled);
}
-static void show_gsync_visual_indicator_button_toggled(GtkWidget *widget,
- gpointer user_data)
+static void show_vrr_visual_indicator_button_toggled(GtkWidget *widget,
+ gpointer user_data)
{
CtkOpenGL *ctk_opengl = CTK_OPENGL(user_data);
CtrlTarget *ctrl_target = ctk_opengl->ctrl_target;
@@ -1087,8 +1087,8 @@ static void show_gsync_visual_indicator_button_toggled(GtkWidget *widget,
enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- NvCtrlSetAttribute(ctrl_target, NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR, enabled);
- post_show_gsync_visual_indicator_button_toggled(ctk_opengl, enabled);
+ NvCtrlSetAttribute(ctrl_target, NV_CTRL_SHOW_VRR_VISUAL_INDICATOR, enabled);
+ post_show_vrr_visual_indicator_button_toggled(ctk_opengl, enabled);
}
static void force_stereo_button_toggled(GtkWidget *widget,
@@ -1242,16 +1242,16 @@ static void value_changed(GObject *object, CtrlEvent *event, gpointer user_data)
func = G_CALLBACK(allow_flipping_button_toggled);
post_allow_flipping_button_toggled(ctk_opengl, value);
break;
- case NV_CTRL_GSYNC_ALLOWED:
- button = GTK_TOGGLE_BUTTON(ctk_opengl->allow_gsync_button);
- func = G_CALLBACK(allow_gsync_button_toggled);
- post_allow_gsync_button_toggled(ctk_opengl, value);
+ case NV_CTRL_VRR_ALLOWED:
+ button = GTK_TOGGLE_BUTTON(ctk_opengl->allow_vrr_button);
+ func = G_CALLBACK(allow_vrr_button_toggled);
+ post_allow_vrr_button_toggled(ctk_opengl, value);
check_available = TRUE;
break;
- case NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR:
- button = GTK_TOGGLE_BUTTON(ctk_opengl->show_gsync_visual_indicator_button);
- func = G_CALLBACK(show_gsync_visual_indicator_button_toggled);
- post_show_gsync_visual_indicator_button_toggled(ctk_opengl, value);
+ case NV_CTRL_SHOW_VRR_VISUAL_INDICATOR:
+ button = GTK_TOGGLE_BUTTON(ctk_opengl->show_vrr_visual_indicator_button);
+ func = G_CALLBACK(show_vrr_visual_indicator_button_toggled);
+ post_show_vrr_visual_indicator_button_toggled(ctk_opengl, value);
check_available = TRUE;
break;
case NV_CTRL_FORCE_STEREO:
@@ -1801,37 +1801,44 @@ GtkTextBuffer *ctk_opengl_create_help(GtkTextTagTable *table,
"after the option is set.");
}
- if (ctk_opengl->active_attributes & __ALLOW_GSYNC) {
- ctk_help_heading(b, &i, "Allow G-SYNC");
- ctk_help_para(b, &i, "Enabling this option allows OpenGL to use G-SYNC "
- "when available. G-SYNC is a technology that allows a "
- "monitor to delay updating the screen until the GPU is "
- "ready to display a new frame. Without G-SYNC, the GPU "
- "waits for the display to be ready to accept a new frame "
- "instead.");
+ if (ctk_opengl->active_attributes & __ALLOW_VRR) {
+ ctk_help_heading(b, &i, "Allow G-SYNC/G-SYNC Compatible");
+ ctk_help_para(b, &i, "Enabling this option allows OpenGL to use "
+ "G-SYNC/G-SYNC Compatible when available. G-SYNC and "
+ "G-SYNC Compatible are technologies that allow monitors "
+ "to delay updating the screen until the GPU is ready to "
+ "display a new frame. Without G-SYNC or G-SYNC "
+ "Compatible, the GPU waits for the display to be ready "
+ "to accept a new frame instead.");
ctk_help_para(b, &i, "Note that this option is applied immediately, "
"unlike most other OpenGL options which are only "
"applied to OpenGL applications that are started "
"after the option is set.");
- ctk_help_para(b, &i, "When G-SYNC is active and \"Sync to VBlank\" is "
- "disabled, applications rendering faster than the "
- "maximum refresh rate will tear. This eliminates tearing "
- "for frame rates below the monitor's maximum refresh "
- "rate while minimizing latency for frame rates above it. "
- "When \"Sync to VBlank\" is enabled, the frame rate is "
+ ctk_help_para(b, &i, "When G-SYNC is active on a G-SYNC or G-SYNC "
+ "Compatible display and \"Sync to VBlank\" is disabled, "
+ "applications rendering faster than the maximum refresh "
+ "rate will tear. This eliminates tearing for frame rates "
+ "below the monitor's maximum refresh rate while "
+ "minimizing latency for frame rates above it. When "
+ "\"Sync to VBlank\" is enabled, the frame rate is "
"limited to the monitor's maximum refresh rate to "
- "eliminate tearing completely.");
+ "eliminate tearing completely. When a G-SYNC Compatible "
+ "display is in use, applications rendering slower than "
+ "the minimum refresh rate may tear when "
+ "\"Sync to VBlank\" is disabled, and their swaps may "
+ "not complete until the next vblank when \"Sync to "
+ "VBlank\" is enabled.");
ctk_help_para(b, &i, "This option can be overridden on a "
- "per-application basis using the GLGSYNCAllowed "
+ "per-application basis using the GLVRRAllowed "
"application profile key.");
}
- if (ctk_opengl->active_attributes & __SHOW_GSYNC_VISUAL_INDICATOR) {
- ctk_help_heading(b, &i, "G-SYNC Visual Indicator");
- ctk_help_para(b, &i, "%s", __show_gsync_visual_indicator_help);
+ if (ctk_opengl->active_attributes & __SHOW_VRR_VISUAL_INDICATOR) {
+ ctk_help_heading(b, &i, "G-SYNC/G-SYNC Compatible Visual Indicator");
+ ctk_help_para(b, &i, "%s", __show_vrr_visual_indicator_help);
}
if (ctk_opengl->active_attributes & __FORCE_STEREO) {
diff --git a/src/gtk+-2.x/ctkopengl.h b/src/gtk+-2.x/ctkopengl.h
index b7d2a5b..71e6ffe 100644
--- a/src/gtk+-2.x/ctkopengl.h
+++ b/src/gtk+-2.x/ctkopengl.h
@@ -57,8 +57,8 @@ struct _CtkOpenGL
GtkWidget *sync_to_vblank_button;
GtkWidget *allow_flipping_button;
- GtkWidget *allow_gsync_button;
- GtkWidget *show_gsync_visual_indicator_button;
+ GtkWidget *allow_vrr_button;
+ GtkWidget *show_vrr_visual_indicator_button;
GtkWidget *use_conformant_clamping_button;
GtkWidget *force_stereo_button;
GtkWidget *xinerama_stereo_button;
diff --git a/src/libXNVCtrl/NVCtrl.h b/src/libXNVCtrl/NVCtrl.h
index 9a06f2d..3721fd9 100644
--- a/src/libXNVCtrl/NVCtrl.h
+++ b/src/libXNVCtrl/NVCtrl.h
@@ -3281,13 +3281,24 @@
#define NV_CTRL_VIDEO_ENCODER_UTILIZATION 407 /* R--G */
/*
- * NV_CTRL_GSYNC_ALLOWED - when TRUE, OpenGL will enable G-SYNC when possible;
- * when FALSE, OpenGL will always use a fixed monitor refresh rate.
+ * NV_CTRL_VRR_ALLOWED - when TRUE, OpenGL will enable G-SYNC and Adaptive-Sync
+ * when possible; when FALSE, OpenGL will always use a fixed monitor refresh
+ * rate.
*/
-#define NV_CTRL_GSYNC_ALLOWED 408 /* RW-X */
-#define NV_CTRL_GSYNC_ALLOWED_FALSE 0
-#define NV_CTRL_GSYNC_ALLOWED_TRUE 1
+#define NV_CTRL_VRR_ALLOWED 408 /* RW-X */
+#define NV_CTRL_VRR_ALLOWED_FALSE 0
+#define NV_CTRL_VRR_ALLOWED_TRUE 1
+
+/*
+ * NV_CTRL_GSYNC_ALLOWED - renamed
+ *
+ * NV_CTRL_VRR_ALLOWED should be used instead.
+ */
+
+#define NV_CTRL_GSYNC_ALLOWED NV_CTRL_VRR_ALLOWED
+#define NV_CTRL_GSYNC_ALLOWED_FALSE NV_CTRL_VRR_ALLOWED_FALSE
+#define NV_CTRL_GSYNC_ALLOWED_TRUE NV_CTRL_VRR_ALLOWED_TRUE
/*
* NV_CTRL_GPU_NVCLOCK_OFFSET - This attribute controls the GPU clock offsets
@@ -3379,13 +3390,26 @@
#define NV_CTRL_CURRENT_COLOR_RANGE_LIMITED 1
/*
- * NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR - when TRUE, OpenGL will indicate when
- * G-SYNC is in use for full-screen applications.
+ * NV_CTRL_SHOW_VRR_VISUAL_INDICATOR - when TRUE, OpenGL will indicate when
+ * G-SYNC or G-SYNC Compatible is in use for full-screen applications.
+ */
+
+#define NV_CTRL_SHOW_VRR_VISUAL_INDICATOR 416 /* RW-X */
+#define NV_CTRL_SHOW_VRR_VISUAL_INDICATOR_FALSE 0
+#define NV_CTRL_SHOW_VRR_VISUAL_INDICATOR_TRUE 1
+
+/*
+ * NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR - renamed
+ *
+ * NV_CTRL_SHOW_VRR_VISUAL_INDICATOR should be used instead.
*/
-#define NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR 416 /* RW-X */
-#define NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR_FALSE 0
-#define NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR_TRUE 1
+#define NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR \
+ NV_CTRL_SHOW_VRR_VISUAL_INDICATOR
+#define NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR_FALSE \
+ NV_CTRL_SHOW_VRR_VISUAL_INDICATOR_FALSE
+#define NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR_TRUE \
+ NV_CTRL_SHOW_VRR_VISUAL_INDICATOR_TRUE
/*
* NV_CTRL_THERMAL_COOLER_CURRENT_LEVEL - Returns cooler's current
@@ -3522,7 +3546,26 @@
#define NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR_FALSE 0
#define NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR_TRUE 1
-#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR
+/*
+ * NV_CTRL_DISPLAY_VRR_MODE - Indicates whether the specified display device
+ * supports G-SYNC, G-SYNC Compatible (validated or unvalidated), or none of
+ * the above.
+ */
+
+#define NV_CTRL_DISPLAY_VRR_MODE 429 /* R-D- */
+#define NV_CTRL_DISPLAY_VRR_MODE_NONE 0
+#define NV_CTRL_DISPLAY_VRR_MODE_GSYNC 1
+#define NV_CTRL_DISPLAY_VRR_MODE_GSYNC_COMPATIBLE 2
+#define NV_CTRL_DISPLAY_VRR_MODE_GSYNC_COMPATIBLE_UNVALIDATED 3
+
+/*
+ * NV_CTRL_DISPLAY_VRR_MIN_REFRESH_RATE - Indicates the minimum refresh rate for
+ * the specified VRR display device.
+ */
+
+#define NV_CTRL_DISPLAY_VRR_MIN_REFRESH_RATE 430 /* R-D- */
+
+#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_DISPLAY_VRR_MIN_REFRESH_RATE
/**************************************************************************/
diff --git a/src/libXNVCtrl/version.mk b/src/libXNVCtrl/version.mk
index 303bdf6..fa0f583 100644
--- a/src/libXNVCtrl/version.mk
+++ b/src/libXNVCtrl/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 415.27
+NVIDIA_VERSION = 418.30
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributesNvml.c b/src/libXNVCtrlAttributes/NvCtrlAttributesNvml.c
index 63db318..569cff6 100644
--- a/src/libXNVCtrlAttributes/NvCtrlAttributesNvml.c
+++ b/src/libXNVCtrlAttributes/NvCtrlAttributesNvml.c
@@ -206,7 +206,7 @@ static Bool LoadNvml(NvCtrlNvmlAttributes *nvml)
#define GET_SYMBOL_OPTIONAL(_proc, _name) \
nvml->lib._proc = dlsym(nvml->lib.handle, _name);
- GET_SYMBOL_OPTIONAL(deviceGetGridLicensableFeatures, "nvmlDeviceGetGridLicensableFeatures");
+ GET_SYMBOL_OPTIONAL(deviceGetGridLicensableFeatures, "nvmlDeviceGetGridLicensableFeatures_v2");
#undef GET_SYMBOL_OPTIONAL
ret = nvml->lib.init();
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h b/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h
index 407fc41..2d1f097 100644
--- a/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h
+++ b/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h
@@ -164,21 +164,21 @@ struct __NvCtrlNvmlAttributes {
struct {
void *handle;
- typeof(nvmlInit) (*init);
- typeof(nvmlShutdown) (*shutdown);
- typeof(nvmlDeviceGetHandleByIndex) (*deviceGetHandleByIndex);
- typeof(nvmlDeviceGetUUID) (*deviceGetUUID);
- typeof(nvmlDeviceGetCount) (*deviceGetCount);
- typeof(nvmlDeviceGetTemperature) (*deviceGetTemperature);
- typeof(nvmlDeviceGetFanSpeed) (*deviceGetFanSpeed);
- typeof(nvmlDeviceGetName) (*deviceGetName);
- typeof(nvmlDeviceGetVbiosVersion) (*deviceGetVbiosVersion);
- typeof(nvmlDeviceGetMemoryInfo) (*deviceGetMemoryInfo);
- typeof(nvmlDeviceGetPciInfo) (*deviceGetPciInfo);
- typeof(nvmlDeviceGetMaxPcieLinkGeneration) (*deviceGetMaxPcieLinkGeneration);
- typeof(nvmlDeviceGetMaxPcieLinkWidth) (*deviceGetMaxPcieLinkWidth);
- typeof(nvmlDeviceGetVirtualizationMode) (*deviceGetVirtualizationMode);
- typeof(nvmlDeviceGetGridLicensableFeatures) (*deviceGetGridLicensableFeatures);
+ typeof(nvmlInit) (*init);
+ typeof(nvmlShutdown) (*shutdown);
+ typeof(nvmlDeviceGetHandleByIndex) (*deviceGetHandleByIndex);
+ typeof(nvmlDeviceGetUUID) (*deviceGetUUID);
+ typeof(nvmlDeviceGetCount) (*deviceGetCount);
+ typeof(nvmlDeviceGetTemperature) (*deviceGetTemperature);
+ typeof(nvmlDeviceGetFanSpeed) (*deviceGetFanSpeed);
+ typeof(nvmlDeviceGetName) (*deviceGetName);
+ typeof(nvmlDeviceGetVbiosVersion) (*deviceGetVbiosVersion);
+ typeof(nvmlDeviceGetMemoryInfo) (*deviceGetMemoryInfo);
+ typeof(nvmlDeviceGetPciInfo) (*deviceGetPciInfo);
+ typeof(nvmlDeviceGetMaxPcieLinkGeneration) (*deviceGetMaxPcieLinkGeneration);
+ typeof(nvmlDeviceGetMaxPcieLinkWidth) (*deviceGetMaxPcieLinkWidth);
+ typeof(nvmlDeviceGetVirtualizationMode) (*deviceGetVirtualizationMode);
+ typeof(nvmlDeviceGetGridLicensableFeatures_v2) (*deviceGetGridLicensableFeatures);
} lib;
diff --git a/src/nvml.h b/src/nvml.h
index ba754fe..bda23cc 100644
--- a/src/nvml.h
+++ b/src/nvml.h
@@ -715,6 +715,7 @@ typedef enum nvmlInforomObject_enum
*/
typedef enum nvmlReturn_enum
{
+ // cppcheck-suppress *
NVML_SUCCESS = 0, //!< The operation was successful
NVML_ERROR_UNINITIALIZED = 1, //!< NVML was not first initialized with nvmlInit()
NVML_ERROR_INVALID_ARGUMENT = 2, //!< A supplied argument is invalid
@@ -3059,6 +3060,32 @@ nvmlReturn_t DECLDIR nvmlDeviceSetDefaultAutoBoostedClocksEnabled(nvmlDevice_t d
*/
nvmlReturn_t DECLDIR nvmlDeviceGetFanSpeed(nvmlDevice_t device, unsigned int *speed);
+
+/**
+ * Retrieves the intended operating speed of the device's specified fan.
+ *
+ * Note: The reported speed is the intended fan speed. If the fan is physically blocked and unable to spin, the
+ * output will not match the actual fan speed.
+ *
+ * For all discrete products with dedicated fans.
+ *
+ * The fan speed is expressed as a percentage of the maximum, i.e. full speed is 100%
+ *
+ * @param device The identifier of the target device
+ * @param fan The index of the target fan, zero indexed.
+ * @param speed Reference in which to return the fan speed percentage
+ *
+ * @return
+ * - \ref NVML_SUCCESS if \a speed has been set
+ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a fan is not an acceptable index, or \a speed is NULL
+ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not have a fan or is newer than Maxwell
+ * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible
+ * - \ref NVML_ERROR_UNKNOWN on any unexpected error
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetFanSpeed_v2(nvmlDevice_t device, unsigned int fan, unsigned int * speed);
+
+
/**
* Retrieves the current temperature readings for the device, in degrees C.
*
@@ -4344,6 +4371,12 @@ nvmlReturn_t DECLDIR nvmlUnitSetLedState(nvmlUnit_t unit, nvmlLedColor_t color);
*
* See \ref nvmlEnableState_t for available modes.
*
+ * After calling this API with mode set to NVML_FEATURE_DISABLED on a device that has its own NUMA
+ * memory, the given device handle will no longer be valid, and to continue to interact with this
+ * device, a new handle should be obtained from one of the nvmlDeviceGetHandleBy*() APIs. This
+ * limitation is currently only applicable to devices that have a coherent NVLink connection to
+ * system memory.
+ *
* @param device The identifier of the target device
* @param mode The target persistence mode
*
@@ -5337,7 +5370,7 @@ nvmlReturn_t DECLDIR nvmlDeviceSetVirtualizationMode(nvmlDevice_t device, nvmlGp
* - \ref NVML_ERROR_INVALID_ARGUMENT if \a vgpuCount is NULL or \a device is invalid
* - \ref NVML_ERROR_NOT_SUPPORTED if vGPU is not supported by the device
* - \ref NVML_ERROR_VGPU_ECC_NOT_SUPPORTED if ECC is enabled on the device
- * - \ref NVML_ERROR_UNKNOWN on any unexpected error
+ * - \ref NVML_ERROR_UNKNOWN on any unexpected error
*/
nvmlReturn_t DECLDIR nvmlDeviceGetSupportedVgpus(nvmlDevice_t device, unsigned int *vgpuCount, nvmlVgpuTypeId_t *vgpuTypeIds);
@@ -6191,7 +6224,7 @@ typedef struct nvmlVgpuPgpuCompatibility_st
*
* nvmlVgpuInstanceGetMetadata() may be called at any time for a vGPU instance. Some fields in the returned structure are
* dependent on information obtained from the guest VM, which may not yet have reached a state where that information
- * is available. The current state of these dependent fields is reflected in the info structure's \ref guestInfoState field.
+ * is available. The current state of these dependent fields is reflected in the info structure's \ref nvmlVgpuGuestInfoState_t field.
*
* The VMM may choose to read and save the vGPU's VM info as persistent metadata associated with the VM, and provide
* it to GRID Virtual GPU Manager when creating a vGPU for subsequent instances of the VM.
diff --git a/src/parse.c b/src/parse.c
index 90ba2ee..551dbcd 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -129,8 +129,10 @@ const AttributeTableEntry attributeTable[] = {
{ "SliMosaicModeAvailable", NV_CTRL_SLI_MOSAIC_MODE_AVAILABLE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether or not SLI Mosaic Mode is supported." },
{ "SLIMode", NV_CTRL_STRING_SLI_MODE, STR_ATTR, {0,0,0,0,1,0}, {}, "Returns a string describing the current SLI mode, if any." },
{ "MultiGpuMode", NV_CTRL_STRING_MULTIGPU_MODE, STR_ATTR, {0,0,0,0,1,0}, {}, "Returns a string describing the current MultiGPU mode, if any." },
- { "AllowGSYNC", NV_CTRL_GSYNC_ALLOWED, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enables or disables the use of G-SYNC when available." },
- { "ShowGSYNCVisualIndicator", NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "If this is enabled (1), the driver will draw an indicator showing whether G-SYNC is in use, when an application is swapping using flipping." },
+ { "AllowGSYNC", NV_CTRL_GSYNC_ALLOWED, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "DEPRECATED: use \"AllowVRR\" instead." },
+ { "AllowVRR", NV_CTRL_VRR_ALLOWED, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enables or disables the use of G-SYNC and G-SYNC Compatible when available." },
+ { "ShowGSYNCVisualIndicator", NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "DEPRECATED: use \"ShowVRRVisualIndicator\" instead." },
+ { "ShowVRRVisualIndicator", NV_CTRL_SHOW_VRR_VISUAL_INDICATOR, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "If this is enabled (1), the driver will draw an indicator showing whether G-SYNC or G-SYNC Compatible is in use, when an application is swapping using flipping." },
{ "StereoSwapMode", NV_CTRL_STEREO_SWAP_MODE, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the swap mode when Quad-Buffered stereo is used." },
{ "ShowGraphicsVisualIndicator", NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "If this is enabled (1), the driver will draw information about the graphics API in use into a \"visual indicator\" inside application windows. This setting only takes effect on clients started after it is set." },
@@ -340,6 +342,8 @@ const AttributeTableEntry attributeTable[] = {
{ "DisplayPortConnectorType", NV_CTRL_DISPLAYPORT_CONNECTOR_TYPE, INT_ATTR, {0,0,0,0,1,0}, {}, "Returns the DisplayPort connector type."},
{ "DisplayPortIsMultiStream", NV_CTRL_DISPLAYPORT_IS_MULTISTREAM, INT_ATTR, {0,0,0,0,1,0}, {}, "Returns 1 if the DisplayPort display is a MultiStream device, and 0 otherwise."},
{ "DisplayPortSinkIsAudioCapable", NV_CTRL_DISPLAYPORT_SINK_IS_AUDIO_CAPABLE, INT_ATTR, {0,0,0,0,1,0}, {}, "Returns 1 if the DisplayPort display is capable of playing audio, and 0 otherwise."},
+ { "DisplayVRRMode", NV_CTRL_DISPLAY_VRR_MODE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Whether the specified display device is G-SYNC or G-SYNC Compatible." },
+ { "DisplayVRRMinRefreshRate", NV_CTRL_DISPLAY_VRR_MIN_REFRESH_RATE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The minimum refresh rate for the specified VRR display device." },
/* TV */
{ "TVOverScan", NV_CTRL_TV_OVERSCAN, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjusts the amount of overscan on the specified display device." },
@@ -393,7 +397,7 @@ const int attributeTableLen = ARRAY_LEN(attributeTable);
* the last attribute that the table knows about.
*/
-#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR
+#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_DISPLAY_VRR_MIN_REFRESH_RATE
#warning "Have you forgotten to add a new integer attribute to attributeTable?"
#endif
diff --git a/src/version.h b/src/version.h
index 88f1f46..e64aee3 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1 +1 @@
-#define NVIDIA_VERSION "415.27"
+#define NVIDIA_VERSION "418.30"
diff --git a/src/version.mk b/src/version.mk
index 303bdf6..fa0f583 100644
--- a/src/version.mk
+++ b/src/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 415.27
+NVIDIA_VERSION = 418.30
diff --git a/version.mk b/version.mk
index 303bdf6..fa0f583 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 415.27
+NVIDIA_VERSION = 418.30