summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Krishnia-INTERN <nkrishnia@nvidia.com>2017-11-15 02:55:23 -0800
committerAaron Plattner <aplattner@nvidia.com>2018-01-04 10:16:52 -0800
commit650de7502b68af05c8928b841fc9cd958b8c4ba3 (patch)
tree2259bec8ce4ee9e6a0b4873f8cf5ffbbcfd41517
parent05ab4acd06bc4612fd92b011794f9b701b29be80 (diff)
Setting feature type correctly on 'Manage GRID License' page creation.
Issue: When nvidia-settings is launched on a Quadro vDWS Edition licensed VM, the message shown on 'Manage GRID License' page as well as the one logged in /var/log/messages incorrectly states that the system has switched to Tesla (unlicensed) and user needs to reboot the system. Root cause and fix: Issue was observed because the feature type was not set correctly on page creation. Fixed it with this change. Testing done: Verified on NMOS and vGPU setup,correct feature type is displayed in the message over UI and in /var/log/messages as well.
-rw-r--r--src/gtk+-2.x/ctkgridlicense.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/gtk+-2.x/ctkgridlicense.c b/src/gtk+-2.x/ctkgridlicense.c
index 62af8d2..0100b08 100644
--- a/src/gtk+-2.x/ctkgridlicense.c
+++ b/src/gtk+-2.x/ctkgridlicense.c
@@ -1245,20 +1245,11 @@ GtkWidget* ctk_manage_grid_license_new(CtrlTarget *target,
/* set default value for feature type based on the user configured parameter or virtualization mode */
if (griddConfig) {
- if (strcmp(griddConfig->str[NV_GRIDD_FEATURE_TYPE], "0"))
- {
- ctk_manage_grid_license->feature_type = GRID_LICENSED_FEATURE_TYPE_TESLA;
- }
- else if (strcmp(griddConfig->str[NV_GRIDD_FEATURE_TYPE], "1"))
- {
- ctk_manage_grid_license->feature_type = GRID_LICENSED_FEATURE_TYPE_VGPU;
- }
- else if (strcmp(griddConfig->str[NV_GRIDD_FEATURE_TYPE], "2"))
- {
+ /* Check Feature type "2" for Quadro Virtual Datacenter Workstation. */
+ if (strcmp(griddConfig->str[NV_GRIDD_FEATURE_TYPE], "2") == 0) {
ctk_manage_grid_license->feature_type = GRID_LICENSED_FEATURE_TYPE_GVW;
}
- else
- {
+ else {
ctk_manage_grid_license->feature_type = GRID_LICENSED_FEATURE_TYPE_TESLA;
}
}
@@ -1532,7 +1523,7 @@ GtkWidget* ctk_manage_grid_license_new(CtrlTarget *target,
/* Set license edition toggle button active */
if (button2 && button1) {
- if (strcmp(griddConfig->str[NV_GRIDD_FEATURE_TYPE], "2") == 0) {
+ if (ctk_manage_grid_license->feature_type == GRID_LICENSED_FEATURE_TYPE_GVW) {
/* Set 'Quadro Virtual Datacenter Workstation' toggle button active */
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button1), TRUE);
}