summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/XF86Config-parser/Device.c6
-rw-r--r--src/XF86Config-parser/Generate.c2
-rw-r--r--src/XF86Config-parser/xf86Parser.h2
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig-utils.c28
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig.c6
-rw-r--r--src/gtk+-2.x/ctkdisplaylayout.h8
-rw-r--r--src/gtk+-2.x/ctkevent.c3
-rw-r--r--src/gtk+-2.x/ctkgpu.c177
-rw-r--r--src/gtk+-2.x/ctkgpu.h11
-rw-r--r--src/gtk+-2.x/ctkthermal.c1
-rw-r--r--src/gtk+-2.x/ctkwindow.c11
-rw-r--r--src/libXNVCtrl/NVCtrl.h53
-rw-r--r--src/parse.c5
-rw-r--r--version.mk2
14 files changed, 228 insertions, 87 deletions
diff --git a/src/XF86Config-parser/Device.c b/src/XF86Config-parser/Device.c
index 10a9c17..b730228 100644
--- a/src/XF86Config-parser/Device.c
+++ b/src/XF86Config-parser/Device.c
@@ -505,12 +505,12 @@ int xconfigParsePciBusString(const char *busID,
* of PCI domain & accordingly formats the busid string.
*/
void xconfigFormatPciBusString(char *str, int len,
- int domain, int bus, int device)
+ int domain, int bus, int device, int func)
{
if (domain) {
- snprintf(str, len, "PCI:%d@%d:%d:0", bus, domain, device);
+ snprintf(str, len, "PCI:%d@%d:%d:%d", bus, domain, device, func);
} else {
- snprintf(str, len, "PCI:%d:%d:0", bus, device);
+ snprintf(str, len, "PCI:%d:%d:%d", bus, device, func);
}
str[len - 1] = '\0';
}
diff --git a/src/XF86Config-parser/Generate.c b/src/XF86Config-parser/Generate.c
index 5137d6f..efc79cf 100644
--- a/src/XF86Config-parser/Generate.c
+++ b/src/XF86Config-parser/Generate.c
@@ -477,7 +477,7 @@ static XConfigDevicePtr add_device(XConfigPtr config, int bus, int domain,
if (bus != -1 && domain != -1 && slot != -1) {
device->busid = xconfigAlloc(32);
- xconfigFormatPciBusString(device->busid, 32, domain, bus, slot);
+ xconfigFormatPciBusString(device->busid, 32, domain, bus, slot, 0);
}
if (boardname) device->board = xconfigStrdup(boardname);
diff --git a/src/XF86Config-parser/xf86Parser.h b/src/XF86Config-parser/xf86Parser.h
index bbbbf9b..65855dc 100644
--- a/src/XF86Config-parser/xf86Parser.h
+++ b/src/XF86Config-parser/xf86Parser.h
@@ -711,7 +711,7 @@ void xconfigPrintOptionList(FILE *fp, XConfigOptionPtr list, int tabs);
int xconfigParsePciBusString(const char *busID,
int *bus, int *device, int *func);
void xconfigFormatPciBusString(char *str, int len,
- int domain, int bus, int device);
+ int domain, int bus, int device, int func);
void xconfigAddDisplay(XConfigDisplayPtr *pHead, const int depth);
diff --git a/src/gtk+-2.x/ctkdisplayconfig-utils.c b/src/gtk+-2.x/ctkdisplayconfig-utils.c
index 81280e6..2ec51c1 100644
--- a/src/gtk+-2.x/ctkdisplayconfig-utils.c
+++ b/src/gtk+-2.x/ctkdisplayconfig-utils.c
@@ -41,6 +41,7 @@
#include "ctkdisplayconfig-utils.h"
#include "ctkutils.h"
+#include "ctkgpu.h"
static void xconfig_update_buffer(GtkWidget *widget, gpointer user_data);
@@ -2304,6 +2305,7 @@ static void gpu_free(nvGpuPtr gpu)
gpu_remove_screens(gpu);
gpu_remove_displays(gpu);
XFree(gpu->name);
+ g_free(gpu->pci_bus_id);
if (gpu->handle) {
NvCtrlAttributeClose(gpu->handle);
}
@@ -2393,32 +2395,8 @@ static Bool layout_add_gpu_from_server(nvLayoutPtr layout, unsigned int gpu_id,
goto fail;
}
- ret = NvCtrlGetAttribute(gpu->handle, NV_CTRL_PCI_BUS,
- (int *)&(gpu->pci_bus));
- if (ret != NvCtrlSuccess) {
- *err_str = g_strdup_printf("Failed to query PCI BUS on GPU-%d '%s'.",
- gpu_id, gpu->name);
- nv_error_msg(*err_str);
- goto fail;
- }
-
- ret = NvCtrlGetAttribute(gpu->handle, NV_CTRL_PCI_DEVICE,
- (int *)&(gpu->pci_device));
- if (ret != NvCtrlSuccess) {
- *err_str = g_strdup_printf("Failed to query PCI DEVICE on "
- "GPU-%d '%s'.", gpu_id, gpu->name);
- nv_error_msg(*err_str);
- goto fail;
- }
+ get_bus_related_info(gpu->handle, NULL, &(gpu->pci_bus_id));
- ret = NvCtrlGetAttribute(gpu->handle, NV_CTRL_PCI_FUNCTION,
- (int *)&(gpu->pci_func));
- if (ret != NvCtrlSuccess) {
- *err_str = g_strdup_printf("Failed to query PCI FUNCTION on "
- "GPU-%d '%s'.", gpu_id, gpu->name);
- nv_error_msg(*err_str);
- goto fail;
- }
ret = NvCtrlGetAttribute(gpu->handle, NV_CTRL_MAX_SCREEN_WIDTH,
(int *)&(gpu->max_width));
diff --git a/src/gtk+-2.x/ctkdisplayconfig.c b/src/gtk+-2.x/ctkdisplayconfig.c
index 7e19d33..f8c5250 100644
--- a/src/gtk+-2.x/ctkdisplayconfig.c
+++ b/src/gtk+-2.x/ctkdisplayconfig.c
@@ -6808,10 +6808,8 @@ static XConfigDevicePtr add_device_to_xconfig(nvGpuPtr gpu, XConfigPtr config,
device->vendor = xconfigStrdup("NVIDIA Corporation");
device->board = xconfigStrdup(gpu->name);
- if (print_bus_id) {
- device->busid = (char *)malloc(32);
- snprintf(device->busid, 32, "PCI:%d:%d:0",
- gpu->pci_bus, gpu->pci_device);
+ if (print_bus_id && gpu->pci_bus_id) {
+ device->busid = strdup(gpu->pci_bus_id);
}
device->chipid = -1;
diff --git a/src/gtk+-2.x/ctkdisplaylayout.h b/src/gtk+-2.x/ctkdisplaylayout.h
index 10ea728..63b44c9 100644
--- a/src/gtk+-2.x/ctkdisplaylayout.h
+++ b/src/gtk+-2.x/ctkdisplaylayout.h
@@ -289,13 +289,11 @@ typedef struct nvGpuRec {
Bool allow_depth_30;
char *name; /* Name of the GPU */
-
+
unsigned int connected_displays; /* Bitmask of connected displays */
- int pci_bus;
- int pci_device;
- int pci_func;
-
+ gchar *pci_bus_id;
+
GvoModeData *gvo_mode_data; /* Information about GVO modes available */
unsigned int num_gvo_modes;
diff --git a/src/gtk+-2.x/ctkevent.c b/src/gtk+-2.x/ctkevent.c
index b3a673b..c3e369e 100644
--- a/src/gtk+-2.x/ctkevent.c
+++ b/src/gtk+-2.x/ctkevent.c
@@ -305,6 +305,7 @@ 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_GPU_PCIE_MAX_LINK_SPEED);
#undef MAKE_SIGNAL
@@ -315,7 +316,7 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
* knows about.
*/
-#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_THERMAL_SENSOR_TARGET
+#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_GPU_PCIE_MAX_LINK_SPEED
#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 4568159..c03e302 100644
--- a/src/gtk+-2.x/ctkgpu.c
+++ b/src/gtk+-2.x/ctkgpu.c
@@ -36,10 +36,12 @@
#include "ctkhelp.h"
#include "ctkutils.h"
+#include "XF86Config-parser/xf86Parser.h"
static void probe_displays_received(GtkObject *object, gpointer arg1,
gpointer user_data);
#define ARRAY_ELEMENTS 16
+#define DEFAULT_UPDATE_PCIE_INFO_TIME_INTERVAL 1000
GType ctk_gpu_get_type(
void
@@ -120,17 +122,11 @@ static gchar *make_display_device_list(NvCtrlAttributeHandle *handle,
} /* make_display_device_list() */
-
-void get_bus_related_info(NvCtrlAttributeHandle *handle,
- gchar **bus,
- gchar **pci_bus_id)
+static void get_bus_type_str(NvCtrlAttributeHandle *handle,
+ gchar **bus)
{
int tmp, ret, bus_type;
- int pci_domain, pci_bus, pci_device, pci_func;
- gchar *bus_type_str, *bus_rate, *pcie_gen, *bus_id;
- gchar *__pci_bus_id_unknown = "?@?:?:?";
-
- /* NV_CTRL_BUS_TYPE */
+ gchar *bus_type_str, *bus_rate, *pcie_gen;
bus_type = 0xffffffff;
bus_type_str = "Unknown";
@@ -174,53 +170,95 @@ void get_bus_related_info(NvCtrlAttributeHandle *handle,
if (bus_rate || pcie_gen) {
*bus = g_strdup_printf("%s %s%s%s", bus_type_str,
- bus_rate ? bus_rate : "",
- bus_rate ? " " : "",
- pcie_gen ? pcie_gen : "");
+ bus_rate ? bus_rate : "",
+ bus_rate ? " " : "",
+ pcie_gen ? pcie_gen : "");
g_free(bus_rate);
g_free(pcie_gen);
} else {
*bus = g_strdup(bus_type_str);
}
+}
+
+void get_bus_related_info(NvCtrlAttributeHandle *handle,
+ gchar **bus,
+ gchar **pci_bus_id)
+{
+ int ret;
+ int pci_domain, pci_bus, pci_device, pci_func;
+ gchar *bus_id;
+ const gchar *__pci_bus_id_unknown = "?@?:?:?";
+ if (bus) {
+ get_bus_type_str(handle, bus);
+ }
+
/* NV_CTRL_PCI_DOMAIN & NV_CTRL_PCI_BUS &
* NV_CTRL_PCI_DEVICE & NV__CTRL_PCI_FUNCTION
*/
bus_id = NULL;
ret = NvCtrlGetAttribute(handle, NV_CTRL_PCI_DOMAIN, &pci_domain);
- if (ret != NvCtrlSuccess) bus_id = __pci_bus_id_unknown;
+ if (ret != NvCtrlSuccess) goto bus_id_fallback;
ret = NvCtrlGetAttribute(handle, NV_CTRL_PCI_BUS, &pci_bus);
- if (ret != NvCtrlSuccess) bus_id = __pci_bus_id_unknown;
+ if (ret != NvCtrlSuccess) goto bus_id_fallback;
ret = NvCtrlGetAttribute(handle, NV_CTRL_PCI_DEVICE, &pci_device);
- if (ret != NvCtrlSuccess) bus_id = __pci_bus_id_unknown;
+ if (ret != NvCtrlSuccess) goto bus_id_fallback;
ret = NvCtrlGetAttribute(handle, NV_CTRL_PCI_FUNCTION, &pci_func);
- if (ret != NvCtrlSuccess) bus_id = __pci_bus_id_unknown;
+ if (ret != NvCtrlSuccess) goto bus_id_fallback;
+
+ bus_id = malloc(32);
+ if (bus_id) {
+ xconfigFormatPciBusString(bus_id, 32, pci_domain, pci_bus,
+ pci_device, pci_func);
+ }
+
+ bus_id_fallback:
if (!bus_id) {
- if (pci_domain == 0) {
- bus_id = g_strdup_printf("%d:%d:%d", pci_bus, pci_device,
- pci_func);
- } else {
- bus_id = g_strdup_printf("%d@%d:%d:%d", pci_bus, pci_domain,
- pci_device, pci_func);
- }
- } else {
bus_id = g_strdup(__pci_bus_id_unknown);
}
*pci_bus_id = bus_id;
}
+static gboolean update_pcie_info(gpointer user_data)
+{
+ gchar *bus;
+ gint link_speed;
+ gchar *link_speed_str;
+ ReturnStatus ret;
+
+ CtkGpu *ctk_gpu = (CtkGpu *) user_data;
+ get_bus_type_str(ctk_gpu->handle, &bus);
+ gtk_label_set_text(GTK_LABEL(ctk_gpu->bus_label), bus);
+
+ if (ctk_gpu->pcie_gen_queriable) {
+ ret = NvCtrlGetAttribute(ctk_gpu->handle, NV_CTRL_GPU_PCIE_MAX_LINK_SPEED,
+ &link_speed);
+ if (ret != NvCtrlSuccess) {
+ link_speed_str = g_strdup_printf("Unknown");
+ }
+ else {
+ link_speed_str = g_strdup_printf("%d", link_speed);
+ }
+ gtk_label_set_text(GTK_LABEL(ctk_gpu->link_speed_label), link_speed_str);
+ g_free(link_speed_str);
+ }
+ g_free(bus);
+ return TRUE;
+}
+
GtkWidget* ctk_gpu_new(
NvCtrlAttributeHandle *handle,
CtrlHandleTarget *t,
- CtkEvent *ctk_event
+ CtkEvent *ctk_event,
+ CtkConfig *ctk_config
)
{
GObject *object;
@@ -233,7 +271,7 @@ GtkWidget* ctk_gpu_new(
GtkWidget *table;
char *product_name, *vbios_version, *video_ram, *irq;
- gchar *bus;
+ gchar *s;
gchar *pci_bus_id;
gchar pci_device_id[ARRAY_ELEMENTS];
gchar pci_vendor_id[ARRAY_ELEMENTS];
@@ -279,7 +317,7 @@ GtkWidget* ctk_gpu_new(
/* Get Bus related information */
- get_bus_related_info(handle, &bus, &pci_bus_id);
+ get_bus_related_info(handle, NULL, &pci_bus_id);
/* NV_CTRL_PCI_ID */
@@ -411,6 +449,8 @@ GtkWidget* ctk_gpu_new(
ctk_gpu->handle = handle;
ctk_gpu->gpu_cores = (gpu_cores != NULL) ? 1 : 0;
ctk_gpu->memory_interface = (memory_interface != NULL) ? 1 : 0;
+ ctk_gpu->ctk_config = ctk_config;
+ ctk_gpu->pcie_gen_queriable = FALSE;
/* set container properties of the object */
@@ -420,7 +460,13 @@ GtkWidget* ctk_gpu_new(
banner = ctk_banner_image_new(BANNER_ARTWORK_GPU);
gtk_box_pack_start(GTK_BOX(ctk_gpu), banner, FALSE, FALSE, 0);
-
+
+ /* NV_CTRL_GPU_PCIE_GENERATION */
+
+ ret = NvCtrlGetAttribute(handle, NV_CTRL_GPU_PCIE_GENERATION, &tmp);
+ if (ret == NvCtrlSuccess)
+ ctk_gpu->pcie_gen_queriable = TRUE;
+
/*
* GPU information: TOP->MIDDLE - LEFT->RIGHT
*
@@ -470,9 +516,10 @@ GtkWidget* ctk_gpu_new(
}
/* spacing */
row += 3;
- add_table_row(table, row++,
- 0, 0.5, "Bus Type:",
- 0, 0.5, bus);
+ ctk_gpu->bus_label =
+ add_table_row(table, row++,
+ 0, 0.5, "Bus Type:",
+ 0, 0.5, NULL);
add_table_row(table, row++,
0, 0.5, "Bus ID:",
0, 0.5, pci_bus_id);
@@ -485,6 +532,16 @@ GtkWidget* ctk_gpu_new(
add_table_row(table, row++,
0, 0.5, "IRQ:",
0, 0.5, irq);
+ if (ctk_gpu->pcie_gen_queriable) {
+ /* spacing */
+ row += 3;
+ ctk_gpu->link_speed_label =
+ add_table_row(table, row++,
+ 0, 0.5, "PCI-E Max Link Speed:",
+ 0, 0.5, NULL);
+ row++;
+ }
+
/* spacing */
row += 3;
add_table_row(table, row++,
@@ -500,7 +557,6 @@ GtkWidget* ctk_gpu_new(
XFree(product_name);
XFree(vbios_version);
g_free(video_ram);
- g_free(bus);
g_free(gpu_cores);
g_free(memory_interface);
g_free(pci_bus_id);
@@ -509,6 +565,20 @@ GtkWidget* ctk_gpu_new(
g_free(displays);
gtk_widget_show_all(GTK_WIDGET(object));
+
+ /* update PCI-E info */
+ update_pcie_info((gpointer) ctk_gpu);
+
+ /* Register a timer callback to update the PCI-E info */
+ s = g_strdup_printf("Graphics Card (GPU %d)",
+ NvCtrlGetTargetId(handle));
+
+ ctk_config_add_timer(ctk_config,
+ DEFAULT_UPDATE_PCIE_INFO_TIME_INTERVAL,
+ s,
+ (GSourceFunc) update_pcie_info,
+ (gpointer) ctk_gpu);
+ g_free(s);
/* Handle events */
@@ -573,12 +643,12 @@ GtkTextBuffer *ctk_gpu_create_help(GtkTextTagTable *table,
ctk_help_heading(b, &i, "Bus ID");
ctk_help_para(b, &i, "This is the GPU's PCI identification string, "
- "reported in the form 'bus:device:function'. It uniquely "
- "identifies the GPU's location in the host system. "
- "This string can be used as-is with the 'BusID' X "
- "configuration file option to unambiguously associate "
- "Device sections with this GPU.");
-
+ "in X configuration file 'BusID' format: "
+ "\"bus:device:function\", or, if the PCI domain of the GPU "
+ "is non-zero, \"bus@domain:device:function\". Note "
+ "that all values are in decimal (as opposed to hexidecimal, "
+ "which is how `lspci` formats its BusID values).");
+
ctk_help_heading(b, &i, "PCI Device ID");
ctk_help_para(b, &i, "This is the PCI Device ID of the GPU.");
@@ -589,6 +659,11 @@ GtkTextBuffer *ctk_gpu_create_help(GtkTextTagTable *table,
ctk_help_para(b, &i, "This is the interrupt request line assigned to "
"this GPU.");
+ if (ctk_gpu->pcie_gen_queriable) {
+ ctk_help_heading(b, &i, "PCI-E Max Link Speed");
+ ctk_help_para(b, &i, "This is the maximum PCI-E link speed.");
+ }
+
ctk_help_heading(b, &i, "X Screens");
ctk_help_para(b, &i, "This is the list of X Screens driven by this GPU.");
@@ -604,17 +679,39 @@ GtkTextBuffer *ctk_gpu_create_help(GtkTextTagTable *table,
static void probe_displays_received(GtkObject *object, gpointer arg1,
- gpointer user_data)
+ gpointer user_data)
{
CtkEventStruct *event_struct = (CtkEventStruct *) arg1;
CtkGpu *ctk_object = CTK_GPU(user_data);
unsigned int probed_displays = event_struct->value;
gchar *str;
-
str = make_display_device_list(ctk_object->handle, probed_displays);
gtk_label_set_text(GTK_LABEL(ctk_object->displays), str);
g_free(str);
}
+
+void ctk_gpu_start_timer(GtkWidget *widget)
+{
+ CtkGpu *ctk_gpu = CTK_GPU(widget);
+
+ /* Start the GPU timer */
+
+ ctk_config_start_timer(ctk_gpu->ctk_config,
+ (GSourceFunc) update_pcie_info,
+ (gpointer) ctk_gpu);
+}
+
+void ctk_gpu_stop_timer(GtkWidget *widget)
+{
+ CtkGpu *ctk_gpu = CTK_GPU(widget);
+
+ /* Stop the GPU timer */
+
+ ctk_config_stop_timer(ctk_gpu->ctk_config,
+ (GSourceFunc) update_pcie_info,
+ (gpointer) ctk_gpu);
+}
+
diff --git a/src/gtk+-2.x/ctkgpu.h b/src/gtk+-2.x/ctkgpu.h
index d6fe47e..723d4e0 100644
--- a/src/gtk+-2.x/ctkgpu.h
+++ b/src/gtk+-2.x/ctkgpu.h
@@ -29,6 +29,7 @@
#include <query-assign.h>
#include "ctkevent.h"
+#include "ctkconfig.h"
#include "NvCtrlAttributes.h"
@@ -60,10 +61,14 @@ struct _CtkGpu
GtkVBox parent;
NvCtrlAttributeHandle *handle;
+ CtkConfig *ctk_config;
+ GtkWidget *bus_label;
+ GtkWidget *link_speed_label;
GtkWidget *displays;
gint gpu_cores;
gint memory_interface;
+ gboolean pcie_gen_queriable;
};
struct _CtkGpuClass
@@ -74,7 +79,8 @@ struct _CtkGpuClass
GType ctk_gpu_get_type (void) G_GNUC_CONST;
GtkWidget* ctk_gpu_new (NvCtrlAttributeHandle *handle,
CtrlHandleTarget *t,
- CtkEvent *ctk_event);
+ CtkEvent *ctk_event,
+ CtkConfig *ctk_config);
void get_bus_related_info(NvCtrlAttributeHandle *handle,
gchar **bus,
@@ -83,7 +89,8 @@ void get_bus_related_info(NvCtrlAttributeHandle *handle,
GtkTextBuffer *ctk_gpu_create_help(GtkTextTagTable *,
CtkGpu *);
-
+void ctk_gpu_start_timer(GtkWidget *widget);
+void ctk_gpu_stop_timer(GtkWidget *widget);
G_END_DECLS
diff --git a/src/gtk+-2.x/ctkthermal.c b/src/gtk+-2.x/ctkthermal.c
index 40c2052..4b5782c 100644
--- a/src/gtk+-2.x/ctkthermal.c
+++ b/src/gtk+-2.x/ctkthermal.c
@@ -1185,6 +1185,7 @@ GtkWidget* ctk_thermal_new(NvCtrlAttributeHandle *handle,
&value);
if ( ret != NvCtrlSuccess ) {
ctk_thermal->show_fan_control_frame = FALSE;
+ value = NV_CTRL_GPU_COOLER_MANUAL_CONTROL_FALSE;
}
cooler_control_enabled =
diff --git a/src/gtk+-2.x/ctkwindow.c b/src/gtk+-2.x/ctkwindow.c
index 95d7219..d14b6bf 100644
--- a/src/gtk+-2.x/ctkwindow.c
+++ b/src/gtk+-2.x/ctkwindow.c
@@ -783,7 +783,10 @@ GtkWidget *ctk_window_new(ParsedAttribute *p, ConfigProperties *conf,
gtk_tree_store_append(ctk_window->tree_store, &iter, NULL);
gtk_tree_store_set(ctk_window->tree_store, &iter,
CTK_WINDOW_LABEL_COLUMN, gpu_name, -1);
- child = ctk_gpu_new(gpu_handle, h->targets[X_SCREEN_TARGET].t, ctk_event);
+
+ child = ctk_gpu_new(gpu_handle, h->targets[X_SCREEN_TARGET].t, ctk_event,
+ ctk_config);
+
gtk_object_ref(GTK_OBJECT(child));
gtk_tree_store_set(ctk_window->tree_store, &iter,
CTK_WINDOW_WIDGET_COLUMN, child, -1);
@@ -793,6 +796,12 @@ GtkWidget *ctk_window_new(ParsedAttribute *p, ConfigProperties *conf,
gtk_tree_store_set(ctk_window->tree_store, &iter,
CTK_WINDOW_CONFIG_FILE_ATTRIBUTES_FUNC_COLUMN,
NULL, -1);
+ gtk_tree_store_set(ctk_window->tree_store, &iter,
+ CTK_WINDOW_SELECT_WIDGET_FUNC_COLUMN,
+ ctk_gpu_start_timer, -1);
+ gtk_tree_store_set(ctk_window->tree_store, &iter,
+ CTK_WINDOW_UNSELECT_WIDGET_FUNC_COLUMN,
+ ctk_gpu_stop_timer, -1);
/* power savings */
diff --git a/src/libXNVCtrl/NVCtrl.h b/src/libXNVCtrl/NVCtrl.h
index ed94ce7..180b4c7 100644
--- a/src/libXNVCtrl/NVCtrl.h
+++ b/src/libXNVCtrl/NVCtrl.h
@@ -2917,7 +2917,58 @@
#define NV_CTRL_THERMAL_SENSOR_TARGET_BOARD 8
#define NV_CTRL_THERMAL_SENSOR_TARGET_UNKNOWN 0xFFFFFFFF
-#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_THERMAL_SENSOR_TARGET
+/*
+ * NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR - when TRUE, OpenGL will
+ * draw information about the current MULTIGPU mode.
+ */
+#define NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR 358 /* RW-X */
+#define NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR_FALSE 0
+#define NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR_TRUE 1
+
+/*
+ * NV_CTRL_GPU_CURRENT_PROCESSOR_CLOCK_FREQS - Returns GPU's processor
+ * clock freqs.
+ */
+#define NV_CTRL_GPU_CURRENT_PROCESSOR_CLOCK_FREQS 359 /* RW-G */
+
+/*
+ * NV_CTRL_GVIO_VIDEO_FORMAT_FLAGS - query the flags (various information
+ * for the specified NV_CTRL_GVIO_VIDEO_FORMAT_*. So that this can be
+ * queried with existing interfaces, the video format should be specified
+ * in the display_mask field; eg:
+ *
+ * XNVCTRLQueryTargetAttribute(dpy,
+ * NV_CTRL_TARGET_TYPE_GVI,
+ * gvi,
+ * NV_CTRL_GVIO_VIDEO_FORMAT_720P_60_00_SMPTE296,
+ * NV_CTRL_GVIO_VIDEO_FORMAT_FLAGS,
+ * &flags);
+ *
+ * Note: The NV_CTRL_GVIO_VIDEO_FORMAT_FLAGS_3G_1080P_NO_12BPC flag is set
+ * for those 1080P 3G modes (level A and B) that do not support
+ * 12 bits per component (when configuring a GVI stream.)
+ */
+
+#define NV_CTRL_GVIO_VIDEO_FORMAT_FLAGS 360 /* R--I */
+#define NV_CTRL_GVIO_VIDEO_FORMAT_FLAGS_NONE 0x00000000
+#define NV_CTRL_GVIO_VIDEO_FORMAT_FLAGS_INTERLACED 0x00000001
+#define NV_CTRL_GVIO_VIDEO_FORMAT_FLAGS_PROGRESSIVE 0x00000002
+#define NV_CTRL_GVIO_VIDEO_FORMAT_FLAGS_PSF 0x00000004
+#define NV_CTRL_GVIO_VIDEO_FORMAT_FLAGS_3G_LEVEL_A 0x00000008
+#define NV_CTRL_GVIO_VIDEO_FORMAT_FLAGS_3G_LEVEL_B 0x00000010
+#define NV_CTRL_GVIO_VIDEO_FORMAT_FLAGS_3G \
+ ((NV_CTRL_GVIO_VIDEO_FORMAT_FLAGS_3G_LEVEL_A) | \
+ (NV_CTRL_GVIO_VIDEO_FORMAT_FLAGS_3G_LEVEL_B))
+#define NV_CTRL_GVIO_VIDEO_FORMAT_FLAGS_3G_1080P_NO_12BPC 0x00000020
+
+
+/*
+ * NV_CTRL_GPU_PCIE_MAX_LINK_SPEED - returns maximum PCI-E link speed.
+ */
+
+#define NV_CTRL_GPU_PCIE_MAX_LINK_SPEED 361 /* R--GI */
+
+#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_GPU_PCIE_MAX_LINK_SPEED
/**************************************************************************/
diff --git a/src/parse.c b/src/parse.c
index 828cb8a..3e66013 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -135,6 +135,7 @@ AttributeTableEntry attributeTable[] = {
/* GPU */
{ "BusType", NV_CTRL_BUS_TYPE, 0, "Returns the type of bus connecting the specified device to the computer. If the target is an X screen, then it uses the GPU driving the X screen as the device." },
+ { "PCIEMaxLinkSpeed", NV_CTRL_GPU_PCIE_MAX_LINK_SPEED, 0, "Returns the maximum PCI-E link speed" },
{ "VideoRam", NV_CTRL_VIDEO_RAM, 0, "Returns the total amount of memory available to the specified GPU (or the GPU driving the specified X screen). Note: if the GPU supports TurboCache(TM), the value reported may exceed the amount of video memory installed on the GPU. The value reported for integrated GPUs may likewise exceed the amount of dedicated system memory set aside by the system BIOS for use by the integrated GPU." },
{ "Irq", NV_CTRL_IRQ, 0, "Returns the interrupt request line used by the specified device. If the target is an X screen, then it uses the GPU driving the X screen as the device." },
{ "CUDACores", NV_CTRL_GPU_CORES, N, "Returns number of CUDA cores supported by the graphics pipeline." },
@@ -153,7 +154,7 @@ AttributeTableEntry attributeTable[] = {
{ "PCIDevice", NV_CTRL_PCI_DEVICE, N, "Returns the PCI device number for the specified device." },
{ "PCIFunc", NV_CTRL_PCI_FUNCTION, N, "Returns the PCI function number for the specified device." },
{ "PCIID", NV_CTRL_PCI_ID, N|P, "Returns the PCI vendor and device ID of the specified device." },
- { "PCIEGen", NV_CTRL_GPU_PCIE_GENERATION, N, "Returns the current PCI-E Bus Generation." },
+ { "PCIEGen", NV_CTRL_GPU_PCIE_GENERATION, N, "Returns the current PCI-E Bus Generation." },
{ "GPUErrors", NV_CTRL_NUM_GPU_ERRORS_RECOVERED, N, "Returns the number of GPU errors occurred." },
{ "GPUPowerSource", NV_CTRL_GPU_POWER_SOURCE, N, "Reports the type of power source of the GPU." },
{ "GPUCurrentPerfMode", NV_CTRL_GPU_CURRENT_PERFORMANCE_MODE, N, "Reports the current performance mode of the GPU driving the X screen. Running a 3D app, for example, will change this performance mode if Adaptive Clocking is enabled." },
@@ -333,7 +334,7 @@ AttributeTableEntry attributeTable[] = {
* about.
*/
-#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_THERMAL_SENSOR_TARGET
+#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_GPU_PCIE_MAX_LINK_SPEED
#warning "Have you forgotten to add a new integer attribute to attributeTable?"
#endif
diff --git a/version.mk b/version.mk
index 9378557..00dde01 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 256.38.02
+NVIDIA_VERSION = 256.44