summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2020-06-24 14:14:01 -0700
committerAaron Plattner <aplattner@nvidia.com>2020-06-24 14:14:01 -0700
commit41e5172b57007b51b3c6a31b2077ac737a6fabbc (patch)
treefd4f3c973daf594ff7680e9b5ceea24e61969c55
parent31b847f0e49c1952476b309a71d10bfcdb8d4ca3 (diff)
450.51450.51
-rw-r--r--doc/nvidia-settings.1.m46
-rw-r--r--doc/version.mk2
-rw-r--r--samples/nv-control-events.c66
-rw-r--r--samples/nv-control-info.c78
-rw-r--r--samples/nv-control-targets.c28
-rw-r--r--samples/version.mk2
-rw-r--r--src/command-line.c7
-rw-r--r--src/config-file.c4
-rw-r--r--src/gtk+-2.x/ctkbanner.c8
-rw-r--r--src/gtk+-2.x/ctkbanner.h4
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig-utils.c218
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig.c10
-rw-r--r--src/gtk+-2.x/ctkdisplaylayout.c6
-rw-r--r--src/gtk+-2.x/ctkdisplaylayout.h14
-rw-r--r--src/gtk+-2.x/ctkevent.c63
-rw-r--r--src/gtk+-2.x/ctkgridlicense.c44
-rw-r--r--src/gtk+-2.x/ctkgridlicense.h3
-rw-r--r--src/gtk+-2.x/ctkgvi.c806
-rw-r--r--src/gtk+-2.x/ctkgvi.h84
-rw-r--r--src/gtk+-2.x/ctkgvo-banner.c917
-rw-r--r--src/gtk+-2.x/ctkgvo-banner.h110
-rw-r--r--src/gtk+-2.x/ctkgvo-csc.c1306
-rw-r--r--src/gtk+-2.x/ctkgvo-csc.h105
-rw-r--r--src/gtk+-2.x/ctkgvo-sync.c1553
-rw-r--r--src/gtk+-2.x/ctkgvo-sync.h118
-rw-r--r--src/gtk+-2.x/ctkgvo.c807
-rw-r--r--src/gtk+-2.x/ctkgvo.h109
-rw-r--r--src/gtk+-2.x/ctkslimm.c5
-rw-r--r--src/gtk+-2.x/ctkvcs.c859
-rw-r--r--src/gtk+-2.x/ctkvcs.h109
-rw-r--r--src/gtk+-2.x/ctkvdpau.c24
-rw-r--r--src/gtk+-2.x/ctkwindow.c149
-rw-r--r--src/image_data/gvi.pngbin10075 -> 0 bytes
-rw-r--r--src/image_data/sdi.pngbin12369 -> 0 bytes
-rw-r--r--src/image_data/sdi_shared_sync_bnc.pngbin7586 -> 0 bytes
-rw-r--r--src/image_data/vcs.pngbin14419 -> 0 bytes
-rw-r--r--src/jansson/jansson_private_config.h2
-rw-r--r--src/libXNVCtrl/NVCtrl.h1
-rw-r--r--src/libXNVCtrl/version.mk2
-rw-r--r--src/libXNVCtrlAttributes/NvCtrlAttributes.c35
-rw-r--r--src/libXNVCtrlAttributes/NvCtrlAttributes.h20
-rw-r--r--src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c72
-rw-r--r--src/libXNVCtrlAttributes/NvCtrlAttributesNvml.c5
-rw-r--r--src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h1
-rw-r--r--src/libXNVCtrlAttributes/NvCtrlAttributesUtils.c25
-rw-r--r--src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c2
-rw-r--r--src/libXNVCtrlAttributes/NvCtrlAttributesXrandr.c2
-rw-r--r--src/libXNVCtrlAttributes/NvCtrlAttributesXv.c2
-rw-r--r--src/nvml.h1339
-rw-r--r--src/option-table.h8
-rw-r--r--src/parse.c617
-rw-r--r--src/parse.h13
-rw-r--r--src/query-assign.c146
-rw-r--r--src/src.mk16
-rw-r--r--src/version.h2
-rw-r--r--src/version.mk2
-rw-r--r--version.mk2
57 files changed, 1569 insertions, 8369 deletions
diff --git a/doc/nvidia-settings.1.m4 b/doc/nvidia-settings.1.m4
index 61e0dc5..d62a5cc 100644
--- a/doc/nvidia-settings.1.m4
+++ b/doc/nvidia-settings.1.m4
@@ -242,7 +242,7 @@ If no X screen is specified, then the attribute value will be queried for all va
.PP
Attributes can be addressed through "target types".
A target type indicates the object that is queried when you query an attribute.
-The default target type is an X screen, but other possible target types are GPUs, Frame Lock devices, Visual Computing Systems, SDI Input Devices, fans, thermal sensors, 3D Vision Pro Transceivers and display devices.
+The default target type is an X screen, but other possible target types are GPUs, Frame Lock devices, Visual Computing Systems, fans, thermal sensors, 3D Vision Pro Transceivers and display devices.
.PP
Target types give you different granularities with which to perform queries and assignments.
Since X screens can span multiple GPUs (in the case of Xinerama, or SLI), and multiple X screens can exist on the same GPU, it is sometimes useful to address attributes by GPU rather than X screen.
@@ -252,8 +252,6 @@ The target type name can be one of
.B screen,
.B gpu,
.B framelock,
-.B vcs,
-.B gvi,
.B fan,
.B thermalsensor,
.B svp,
@@ -339,7 +337,7 @@ for what targets types can be used with each attribute.
See the output of
.nf
- nvidia\-settings \-\-query screens \-\-query gpus \-\-query framelocks \-\-query vcs \-\-query gvis \-\-query fans \-\-query thermalsensors \-\-query svps \-\-query dpys
+ nvidia\-settings \-\-query screens \-\-query gpus \-\-query framelocks \-\-query fans \-\-query thermalsensors \-\-query svps \-\-query dpys
.fi
for lists of targets for each target type.
diff --git a/doc/version.mk b/doc/version.mk
index 7a63ce9..38f9fbf 100644
--- a/doc/version.mk
+++ b/doc/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 440.100
+NVIDIA_VERSION = 450.51
diff --git a/samples/nv-control-events.c b/samples/nv-control-events.c
index d6ea84c..3f0bbe0 100644
--- a/samples/nv-control-events.c
+++ b/samples/nv-control-events.c
@@ -80,8 +80,6 @@ int main(int argc, char **argv)
{ .type = NV_CTRL_TARGET_TYPE_GPU },
{ .type = NV_CTRL_TARGET_TYPE_DISPLAY },
{ .type = NV_CTRL_TARGET_TYPE_FRAMELOCK },
- { .type = NV_CTRL_TARGET_TYPE_VCSC },
- { .type = NV_CTRL_TARGET_TYPE_GVI },
{ .type = NV_CTRL_TARGET_TYPE_COOLER },
{ .type = NV_CTRL_TARGET_TYPE_THERMAL_SENSOR },
{ .type = NV_CTRL_TARGET_TYPE_3D_VISION_PRO_TRANSCEIVER },
@@ -426,10 +424,6 @@ static const char *target2str(int n)
return "Display";
case NV_CTRL_TARGET_TYPE_FRAMELOCK:
return "Frame Lock";
- case NV_CTRL_TARGET_TYPE_VCSC:
- return "VCS";
- case NV_CTRL_TARGET_TYPE_GVI:
- return "GVI";
case NV_CTRL_TARGET_TYPE_COOLER:
return "Cooler";
case NV_CTRL_TARGET_TYPE_THERMAL_SENSOR:
@@ -546,24 +540,6 @@ static AttrEntry attr_table[] = {
MAKE_ENTRY(NV_CTRL_AMBIENT_TEMPERATURE),
MAKE_ENTRY(NV_CTRL_PBUFFER_SCANOUT_SUPPORTED),
MAKE_ENTRY(NV_CTRL_PBUFFER_SCANOUT_XID),
- MAKE_ENTRY(NV_CTRL_GVO_SUPPORTED),
- MAKE_ENTRY(NV_CTRL_GVO_SYNC_MODE),
- MAKE_ENTRY(NV_CTRL_GVO_SYNC_SOURCE),
- MAKE_ENTRY(NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT),
- MAKE_ENTRY(NV_CTRL_GVIO_DETECTED_VIDEO_FORMAT),
- MAKE_ENTRY(NV_CTRL_GVO_DATA_FORMAT),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECTED),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE),
- MAKE_ENTRY(NV_CTRL_GVO_SDI_SYNC_INPUT_DETECTED),
- MAKE_ENTRY(NV_CTRL_GVO_VIDEO_OUTPUTS),
- MAKE_ENTRY(NV_CTRL_GVO_FIRMWARE_VERSION),
- MAKE_ENTRY(NV_CTRL_GVO_SYNC_DELAY_PIXELS),
- MAKE_ENTRY(NV_CTRL_GVO_SYNC_DELAY_LINES),
- MAKE_ENTRY(NV_CTRL_GVO_INPUT_VIDEO_FORMAT_REACQUIRE),
- MAKE_ENTRY(NV_CTRL_GVO_GLX_LOCKED),
- MAKE_ENTRY(NV_CTRL_GVIO_VIDEO_FORMAT_WIDTH),
- MAKE_ENTRY(NV_CTRL_GVIO_VIDEO_FORMAT_HEIGHT),
- MAKE_ENTRY(NV_CTRL_GVIO_VIDEO_FORMAT_REFRESH_RATE),
MAKE_ENTRY(NV_CTRL_GPU_CURRENT_CLOCK_FREQS),
MAKE_ENTRY(NV_CTRL_FLATPANEL_CHIP_LOCATION),
MAKE_ENTRY(NV_CTRL_FLATPANEL_LINK),
@@ -577,16 +553,11 @@ static AttrEntry attr_table[] = {
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_GVIO_REQUESTED_VIDEO_FORMAT2),
- MAKE_ENTRY(NV_CTRL_GVO_OVERRIDE_HW_CSC),
- MAKE_ENTRY(NV_CTRL_GVO_CAPABILITIES),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_TERMINATION),
MAKE_ENTRY(NV_CTRL_ASSOCIATED_DISPLAY_DEVICES),
MAKE_ENTRY(NV_CTRL_FRAMELOCK_SLAVES),
MAKE_ENTRY(NV_CTRL_FRAMELOCK_MASTERABLE),
MAKE_ENTRY(NV_CTRL_PROBE_DISPLAYS),
MAKE_ENTRY(NV_CTRL_REFRESH_RATE),
- MAKE_ENTRY(NV_CTRL_GVO_FLIP_QUEUE_SIZE),
MAKE_ENTRY(NV_CTRL_CURRENT_SCANLINE),
MAKE_ENTRY(NV_CTRL_INITIAL_PIXMAP_PLACEMENT),
MAKE_ENTRY(NV_CTRL_PCI_BUS),
@@ -600,7 +571,6 @@ static AttrEntry attr_table[] = {
MAKE_ENTRY(NV_CTRL_MULTIGPU_DISPLAY_OWNER),
MAKE_ENTRY(NV_CTRL_FSAA_APPLICATION_ENHANCED),
MAKE_ENTRY(NV_CTRL_FRAMELOCK_SYNC_RATE_4),
- MAKE_ENTRY(NV_CTRL_GVO_LOCK_OWNER),
MAKE_ENTRY(NV_CTRL_HWOVERLAY),
MAKE_ENTRY(NV_CTRL_NUM_GPU_ERRORS_RECOVERED),
MAKE_ENTRY(NV_CTRL_REFRESH_RATE_3),
@@ -609,49 +579,23 @@ static AttrEntry attr_table[] = {
MAKE_ENTRY(NV_CTRL_GLYPH_CACHE),
MAKE_ENTRY(NV_CTRL_GPU_CURRENT_PERFORMANCE_LEVEL),
MAKE_ENTRY(NV_CTRL_GPU_ADAPTIVE_CLOCK_STATE),
- MAKE_ENTRY(NV_CTRL_GVO_OUTPUT_VIDEO_LOCKED),
- MAKE_ENTRY(NV_CTRL_GVO_SYNC_LOCK_STATUS),
- MAKE_ENTRY(NV_CTRL_GVO_ANC_TIME_CODE_GENERATION),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_ALPHA_KEY),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_LUMA_KEY_RANGE),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_CR_KEY_RANGE),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_CB_KEY_RANGE),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_NUM_KEY_RANGES),
MAKE_ENTRY(NV_CTRL_SWITCH_TO_DISPLAYS),
MAKE_ENTRY(NV_CTRL_NOTEBOOK_DISPLAY_CHANGE_LID_EVENT),
MAKE_ENTRY(NV_CTRL_NOTEBOOK_INTERNAL_LCD),
MAKE_ENTRY(NV_CTRL_DEPTH_30_ALLOWED),
MAKE_ENTRY(NV_CTRL_MODE_SET_EVENT),
MAKE_ENTRY(NV_CTRL_OPENGL_AA_LINE_GAMMA_VALUE),
- MAKE_ENTRY(NV_CTRL_VCSC_HIGH_PERF_MODE),
MAKE_ENTRY(NV_CTRL_DISPLAYPORT_LINK_RATE),
MAKE_ENTRY(NV_CTRL_STEREO_EYES_EXCHANGE),
MAKE_ENTRY(NV_CTRL_NO_SCANOUT),
- MAKE_ENTRY(NV_CTRL_GVO_CSC_CHANGED_EVENT),
MAKE_ENTRY(NV_CTRL_FRAMELOCK_SLAVEABLE ),
- MAKE_ENTRY(NV_CTRL_GVO_SYNC_TO_DISPLAY),
MAKE_ENTRY(NV_CTRL_X_SERVER_UNIQUE_ID),
MAKE_ENTRY(NV_CTRL_PIXMAP_CACHE),
MAKE_ENTRY(NV_CTRL_PIXMAP_CACHE_ROUNDING_SIZE_KB),
- MAKE_ENTRY(NV_CTRL_IS_GVO_DISPLAY),
MAKE_ENTRY(NV_CTRL_PCI_ID),
- MAKE_ENTRY(NV_CTRL_GVO_FULL_RANGE_COLOR),
MAKE_ENTRY(NV_CTRL_SLI_MOSAIC_MODE_AVAILABLE),
- MAKE_ENTRY(NV_CTRL_GVO_ENABLE_RGB_DATA),
MAKE_ENTRY(NV_CTRL_IMAGE_SHARPENING_DEFAULT),
MAKE_ENTRY(NV_CTRL_PCI_DOMAIN),
- MAKE_ENTRY(NV_CTRL_GVI_NUM_JACKS),
- MAKE_ENTRY(NV_CTRL_GVI_MAX_LINKS_PER_STREAM),
- MAKE_ENTRY(NV_CTRL_GVI_DETECTED_CHANNEL_BITS_PER_COMPONENT),
- MAKE_ENTRY(NV_CTRL_GVI_REQUESTED_STREAM_BITS_PER_COMPONENT),
- MAKE_ENTRY(NV_CTRL_GVI_DETECTED_CHANNEL_COMPONENT_SAMPLING),
- MAKE_ENTRY(NV_CTRL_GVI_REQUESTED_STREAM_COMPONENT_SAMPLING),
- MAKE_ENTRY(NV_CTRL_GVI_REQUESTED_STREAM_CHROMA_EXPAND),
- MAKE_ENTRY(NV_CTRL_GVI_DETECTED_CHANNEL_COLOR_SPACE),
- MAKE_ENTRY(NV_CTRL_GVI_DETECTED_CHANNEL_LINK_ID),
- MAKE_ENTRY(NV_CTRL_GVI_DETECTED_CHANNEL_SMPTE352_IDENTIFIER),
- MAKE_ENTRY(NV_CTRL_GVI_GLOBAL_IDENTIFIER),
MAKE_ENTRY(NV_CTRL_FRAMELOCK_SYNC_DELAY_RESOLUTION),
MAKE_ENTRY(NV_CTRL_GPU_COOLER_MANUAL_CONTROL),
MAKE_ENTRY(NV_CTRL_THERMAL_COOLER_LEVEL),
@@ -669,18 +613,11 @@ static AttrEntry attr_table[] = {
MAKE_ENTRY(NV_CTRL_GPU_ECC_AGGREGATE_DOUBLE_BIT_ERRORS),
MAKE_ENTRY(NV_CTRL_GPU_ECC_RESET_ERROR_STATUS),
MAKE_ENTRY(NV_CTRL_GPU_POWER_MIZER_MODE),
- MAKE_ENTRY(NV_CTRL_GVI_SYNC_OUTPUT_FORMAT),
- MAKE_ENTRY(NV_CTRL_GVI_MAX_CHANNELS_PER_JACK),
- MAKE_ENTRY(NV_CTRL_GVI_MAX_STREAMS ),
- MAKE_ENTRY(NV_CTRL_GVI_NUM_CAPTURE_SURFACES),
MAKE_ENTRY(NV_CTRL_OVERSCAN_COMPENSATION),
MAKE_ENTRY(NV_CTRL_GPU_PCIE_GENERATION),
- MAKE_ENTRY(NV_CTRL_GVI_BOUND_GPU),
- MAKE_ENTRY(NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT3),
MAKE_ENTRY(NV_CTRL_ACCELERATE_TRAPEZOIDS),
MAKE_ENTRY(NV_CTRL_GPU_CORES),
MAKE_ENTRY(NV_CTRL_GPU_MEMORY_BUS_WIDTH),
- MAKE_ENTRY(NV_CTRL_GVI_TEST_MODE),
MAKE_ENTRY(NV_CTRL_COLOR_SPACE),
MAKE_ENTRY(NV_CTRL_COLOR_RANGE),
MAKE_ENTRY(NV_CTRL_SHOW_VRR_VISUAL_INDICATOR),
@@ -694,7 +631,6 @@ static AttrEntry attr_table[] = {
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_GVIO_VIDEO_FORMAT_FLAGS),
MAKE_ENTRY(NV_CTRL_GPU_PCIE_MAX_LINK_SPEED),
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_RESET_TRANSCEIVER_TO_FACTORY_SETTINGS),
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_TRANSCEIVER_CHANNEL),
@@ -713,12 +649,10 @@ static AttrEntry attr_table[] = {
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_GLASSES_MISSED_SYNC_CYCLES),
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_GLASSES_BATTERY_LEVEL),
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_GLASSES_BATTERY_LEVEL),
- MAKE_ENTRY(NV_CTRL_GVO_ANC_PARITY_COMPUTATION),
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_GLASSES_PAIR_EVENT),
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_GLASSES_UNPAIR_EVENT),
MAKE_ENTRY(NV_CTRL_GPU_PCIE_CURRENT_LINK_WIDTH),
MAKE_ENTRY(NV_CTRL_GPU_PCIE_CURRENT_LINK_SPEED),
- MAKE_ENTRY(NV_CTRL_GVO_AUDIO_BLANKING),
MAKE_ENTRY(NV_CTRL_CURRENT_METAMODE_ID),
MAKE_ENTRY(NV_CTRL_DISPLAY_ENABLED),
MAKE_ENTRY(NV_CTRL_FRAMELOCK_INCOMING_HOUSE_SYNC_RATE),
diff --git a/samples/nv-control-info.c b/samples/nv-control-info.c
index 11073ab..012f5d1 100644
--- a/samples/nv-control-info.c
+++ b/samples/nv-control-info.c
@@ -85,22 +85,6 @@ static const char *attr_int_table[NV_CTRL_LAST_ATTRIBUTE + 1] = {
MAKE_ENTRY(NV_CTRL_GPU_DEFAULT_CORE_THRESHOLD),
MAKE_ENTRY(NV_CTRL_GPU_MAX_CORE_THRESHOLD),
MAKE_ENTRY(NV_CTRL_AMBIENT_TEMPERATURE),
- MAKE_ENTRY(NV_CTRL_GVO_SUPPORTED),
- MAKE_ENTRY(NV_CTRL_GVO_SYNC_MODE),
- MAKE_ENTRY(NV_CTRL_GVO_SYNC_SOURCE),
- MAKE_ENTRY(NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT),
- MAKE_ENTRY(NV_CTRL_GVIO_DETECTED_VIDEO_FORMAT),
- MAKE_ENTRY(NV_CTRL_GVO_DATA_FORMAT),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECTED),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE),
- MAKE_ENTRY(NV_CTRL_GVO_SDI_SYNC_INPUT_DETECTED),
- MAKE_ENTRY(NV_CTRL_GVO_VIDEO_OUTPUTS),
- MAKE_ENTRY(NV_CTRL_GVO_SYNC_DELAY_PIXELS),
- MAKE_ENTRY(NV_CTRL_GVO_SYNC_DELAY_LINES),
- MAKE_ENTRY(NV_CTRL_GVO_INPUT_VIDEO_FORMAT_REACQUIRE),
- MAKE_ENTRY(NV_CTRL_GVIO_VIDEO_FORMAT_WIDTH),
- MAKE_ENTRY(NV_CTRL_GVIO_VIDEO_FORMAT_HEIGHT),
- MAKE_ENTRY(NV_CTRL_GVIO_VIDEO_FORMAT_REFRESH_RATE),
MAKE_ENTRY(NV_CTRL_GPU_CURRENT_CLOCK_FREQS),
MAKE_ENTRY(NV_CTRL_FLATPANEL_CHIP_LOCATION),
MAKE_ENTRY(NV_CTRL_FLATPANEL_LINK),
@@ -115,13 +99,8 @@ static const char *attr_int_table[NV_CTRL_LAST_ATTRIBUTE + 1] = {
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_GVIO_REQUESTED_VIDEO_FORMAT2),
- MAKE_ENTRY(NV_CTRL_GVO_OVERRIDE_HW_CSC),
- MAKE_ENTRY(NV_CTRL_GVO_CAPABILITIES),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_TERMINATION),
MAKE_ENTRY(NV_CTRL_PROBE_DISPLAYS),
MAKE_ENTRY(NV_CTRL_REFRESH_RATE),
- MAKE_ENTRY(NV_CTRL_GVO_FLIP_QUEUE_SIZE),
MAKE_ENTRY(NV_CTRL_CURRENT_SCANLINE),
MAKE_ENTRY(NV_CTRL_INITIAL_PIXMAP_PLACEMENT),
MAKE_ENTRY(NV_CTRL_PCI_BUS),
@@ -135,7 +114,6 @@ static const char *attr_int_table[NV_CTRL_LAST_ATTRIBUTE + 1] = {
MAKE_ENTRY(NV_CTRL_MULTIGPU_DISPLAY_OWNER),
MAKE_ENTRY(NV_CTRL_FSAA_APPLICATION_ENHANCED),
MAKE_ENTRY(NV_CTRL_FRAMELOCK_SYNC_RATE_4),
- MAKE_ENTRY(NV_CTRL_GVO_LOCK_OWNER),
MAKE_ENTRY(NV_CTRL_HWOVERLAY),
MAKE_ENTRY(NV_CTRL_NUM_GPU_ERRORS_RECOVERED),
MAKE_ENTRY(NV_CTRL_REFRESH_RATE_3),
@@ -143,45 +121,19 @@ static const char *attr_int_table[NV_CTRL_LAST_ATTRIBUTE + 1] = {
MAKE_ENTRY(NV_CTRL_GLYPH_CACHE),
MAKE_ENTRY(NV_CTRL_GPU_CURRENT_PERFORMANCE_LEVEL),
MAKE_ENTRY(NV_CTRL_GPU_ADAPTIVE_CLOCK_STATE),
- MAKE_ENTRY(NV_CTRL_GVO_OUTPUT_VIDEO_LOCKED),
- MAKE_ENTRY(NV_CTRL_GVO_SYNC_LOCK_STATUS),
- MAKE_ENTRY(NV_CTRL_GVO_ANC_TIME_CODE_GENERATION),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_ALPHA_KEY),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_LUMA_KEY_RANGE),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_CR_KEY_RANGE),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_CB_KEY_RANGE),
- MAKE_ENTRY(NV_CTRL_GVO_COMPOSITE_NUM_KEY_RANGES),
MAKE_ENTRY(NV_CTRL_DEPTH_30_ALLOWED),
MAKE_ENTRY(NV_CTRL_MODE_SET_EVENT),
MAKE_ENTRY(NV_CTRL_OPENGL_AA_LINE_GAMMA_VALUE),
- MAKE_ENTRY(NV_CTRL_VCSC_HIGH_PERF_MODE),
MAKE_ENTRY(NV_CTRL_DISPLAYPORT_LINK_RATE),
MAKE_ENTRY(NV_CTRL_STEREO_EYES_EXCHANGE),
MAKE_ENTRY(NV_CTRL_NO_SCANOUT),
- MAKE_ENTRY(NV_CTRL_GVO_CSC_CHANGED_EVENT),
- MAKE_ENTRY(NV_CTRL_GVO_SYNC_TO_DISPLAY),
MAKE_ENTRY(NV_CTRL_X_SERVER_UNIQUE_ID),
MAKE_ENTRY(NV_CTRL_PIXMAP_CACHE),
MAKE_ENTRY(NV_CTRL_PIXMAP_CACHE_ROUNDING_SIZE_KB),
- MAKE_ENTRY(NV_CTRL_IS_GVO_DISPLAY),
MAKE_ENTRY(NV_CTRL_PCI_ID),
- MAKE_ENTRY(NV_CTRL_GVO_FULL_RANGE_COLOR),
MAKE_ENTRY(NV_CTRL_SLI_MOSAIC_MODE_AVAILABLE),
- MAKE_ENTRY(NV_CTRL_GVO_ENABLE_RGB_DATA),
MAKE_ENTRY(NV_CTRL_IMAGE_SHARPENING_DEFAULT),
MAKE_ENTRY(NV_CTRL_PCI_DOMAIN),
- MAKE_ENTRY(NV_CTRL_GVI_NUM_JACKS),
- MAKE_ENTRY(NV_CTRL_GVI_MAX_LINKS_PER_STREAM),
- MAKE_ENTRY(NV_CTRL_GVI_DETECTED_CHANNEL_BITS_PER_COMPONENT),
- MAKE_ENTRY(NV_CTRL_GVI_REQUESTED_STREAM_BITS_PER_COMPONENT),
- MAKE_ENTRY(NV_CTRL_GVI_DETECTED_CHANNEL_COMPONENT_SAMPLING),
- MAKE_ENTRY(NV_CTRL_GVI_REQUESTED_STREAM_COMPONENT_SAMPLING),
- MAKE_ENTRY(NV_CTRL_GVI_REQUESTED_STREAM_CHROMA_EXPAND),
- MAKE_ENTRY(NV_CTRL_GVI_DETECTED_CHANNEL_COLOR_SPACE),
- MAKE_ENTRY(NV_CTRL_GVI_DETECTED_CHANNEL_LINK_ID),
- MAKE_ENTRY(NV_CTRL_GVI_DETECTED_CHANNEL_SMPTE352_IDENTIFIER),
- MAKE_ENTRY(NV_CTRL_GVI_GLOBAL_IDENTIFIER),
MAKE_ENTRY(NV_CTRL_FRAMELOCK_SYNC_DELAY_RESOLUTION),
MAKE_ENTRY(NV_CTRL_GPU_COOLER_MANUAL_CONTROL),
MAKE_ENTRY(NV_CTRL_THERMAL_COOLER_LEVEL),
@@ -199,17 +151,10 @@ static const char *attr_int_table[NV_CTRL_LAST_ATTRIBUTE + 1] = {
MAKE_ENTRY(NV_CTRL_GPU_ECC_AGGREGATE_DOUBLE_BIT_ERRORS),
MAKE_ENTRY(NV_CTRL_GPU_ECC_RESET_ERROR_STATUS),
MAKE_ENTRY(NV_CTRL_GPU_POWER_MIZER_MODE),
- MAKE_ENTRY(NV_CTRL_GVI_SYNC_OUTPUT_FORMAT),
- MAKE_ENTRY(NV_CTRL_GVI_MAX_CHANNELS_PER_JACK),
- MAKE_ENTRY(NV_CTRL_GVI_MAX_STREAMS),
- MAKE_ENTRY(NV_CTRL_GVI_NUM_CAPTURE_SURFACES),
MAKE_ENTRY(NV_CTRL_GPU_PCIE_GENERATION),
- MAKE_ENTRY(NV_CTRL_GVI_BOUND_GPU),
- MAKE_ENTRY(NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT3),
MAKE_ENTRY(NV_CTRL_ACCELERATE_TRAPEZOIDS),
MAKE_ENTRY(NV_CTRL_GPU_CORES),
MAKE_ENTRY(NV_CTRL_GPU_MEMORY_BUS_WIDTH),
- MAKE_ENTRY(NV_CTRL_GVI_TEST_MODE),
MAKE_ENTRY(NV_CTRL_COLOR_SPACE),
MAKE_ENTRY(NV_CTRL_COLOR_RANGE),
MAKE_ENTRY(NV_CTRL_DITHERING_MODE),
@@ -220,7 +165,6 @@ static const char *attr_int_table[NV_CTRL_LAST_ATTRIBUTE + 1] = {
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_GVIO_VIDEO_FORMAT_FLAGS),
MAKE_ENTRY(NV_CTRL_GPU_PCIE_MAX_LINK_SPEED),
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_RESET_TRANSCEIVER_TO_FACTORY_SETTINGS),
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_TRANSCEIVER_CHANNEL),
@@ -238,12 +182,10 @@ static const char *attr_int_table[NV_CTRL_LAST_ATTRIBUTE + 1] = {
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_GLASSES_SYNC_CYCLE),
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_GLASSES_MISSED_SYNC_CYCLES),
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_GLASSES_BATTERY_LEVEL),
- MAKE_ENTRY(NV_CTRL_GVO_ANC_PARITY_COMPUTATION),
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_GLASSES_PAIR_EVENT),
MAKE_ENTRY(NV_CTRL_3D_VISION_PRO_GLASSES_UNPAIR_EVENT),
MAKE_ENTRY(NV_CTRL_GPU_PCIE_CURRENT_LINK_WIDTH),
MAKE_ENTRY(NV_CTRL_GPU_PCIE_CURRENT_LINK_SPEED),
- MAKE_ENTRY(NV_CTRL_GVO_AUDIO_BLANKING),
MAKE_ENTRY(NV_CTRL_CURRENT_METAMODE_ID),
MAKE_ENTRY(NV_CTRL_DISPLAY_ENABLED),
MAKE_ENTRY(NV_CTRL_FRAMELOCK_INCOMING_HOUSE_SYNC_RATE),
@@ -286,21 +228,12 @@ static const char *attr_str_table[NV_CTRL_STRING_LAST_ATTRIBUTE + 1] = {
MAKE_ENTRY(NV_CTRL_STRING_VBIOS_VERSION),
MAKE_ENTRY(NV_CTRL_STRING_NVIDIA_DRIVER_VERSION),
MAKE_ENTRY(NV_CTRL_STRING_DISPLAY_DEVICE_NAME),
- MAKE_ENTRY(NV_CTRL_STRING_GVIO_FIRMWARE_VERSION),
MAKE_ENTRY(NV_CTRL_STRING_CURRENT_MODELINE),
MAKE_ENTRY(NV_CTRL_STRING_ADD_MODELINE),
MAKE_ENTRY(NV_CTRL_STRING_DELETE_MODELINE),
MAKE_ENTRY(NV_CTRL_STRING_CURRENT_METAMODE),
MAKE_ENTRY(NV_CTRL_STRING_ADD_METAMODE),
MAKE_ENTRY(NV_CTRL_STRING_DELETE_METAMODE),
- MAKE_ENTRY(NV_CTRL_STRING_VCSC_PRODUCT_NAME),
- MAKE_ENTRY(NV_CTRL_STRING_VCSC_PRODUCT_ID),
- MAKE_ENTRY(NV_CTRL_STRING_VCSC_SERIAL_NUMBER),
- MAKE_ENTRY(NV_CTRL_STRING_VCSC_BUILD_DATE),
- MAKE_ENTRY(NV_CTRL_STRING_VCSC_FIRMWARE_VERSION),
- MAKE_ENTRY(NV_CTRL_STRING_VCSC_FIRMWARE_REVISION),
- MAKE_ENTRY(NV_CTRL_STRING_VCSC_HARDWARE_VERSION),
- MAKE_ENTRY(NV_CTRL_STRING_VCSC_HARDWARE_REVISION),
MAKE_ENTRY(NV_CTRL_STRING_MOVE_METAMODE),
MAKE_ENTRY(NV_CTRL_STRING_VALID_HORIZ_SYNC_RANGES),
MAKE_ENTRY(NV_CTRL_STRING_VALID_VERT_REFRESH_RANGES),
@@ -308,10 +241,6 @@ static const char *attr_str_table[NV_CTRL_STRING_LAST_ATTRIBUTE + 1] = {
MAKE_ENTRY(NV_CTRL_STRING_NVIDIA_XINERAMA_INFO_ORDER),
MAKE_ENTRY(NV_CTRL_STRING_SLI_MODE),
MAKE_ENTRY(NV_CTRL_STRING_PERFORMANCE_MODES),
- MAKE_ENTRY(NV_CTRL_STRING_VCSC_FAN_STATUS),
- MAKE_ENTRY(NV_CTRL_STRING_VCSC_TEMPERATURES),
- MAKE_ENTRY(NV_CTRL_STRING_VCSC_PSU_INFO),
- MAKE_ENTRY(NV_CTRL_STRING_GVIO_VIDEO_FORMAT_NAME),
MAKE_ENTRY(NV_CTRL_STRING_GPU_CURRENT_CLOCK_FREQS),
MAKE_ENTRY(NV_CTRL_STRING_3D_VISION_PRO_TRANSCEIVER_HARDWARE_REVISION),
MAKE_ENTRY(NV_CTRL_STRING_3D_VISION_PRO_TRANSCEIVER_FIRMWARE_VERSION_A),
@@ -345,8 +274,6 @@ static const char *attr_bin_table[NV_CTRL_BINARY_DATA_LAST_ATTRIBUTE + 1] = {
MAKE_ENTRY(NV_CTRL_BINARY_DATA_GPUS_USING_FRAMELOCK),
MAKE_ENTRY(NV_CTRL_BINARY_DATA_DISPLAY_VIEWPORT),
MAKE_ENTRY(NV_CTRL_BINARY_DATA_FRAMELOCKS_USED_BY_GPU),
- MAKE_ENTRY(NV_CTRL_BINARY_DATA_GPUS_USING_VCSC),
- MAKE_ENTRY(NV_CTRL_BINARY_DATA_VCSCS_USED_BY_GPU),
MAKE_ENTRY(NV_CTRL_BINARY_DATA_COOLERS_USED_BY_GPU),
MAKE_ENTRY(NV_CTRL_BINARY_DATA_GPUS_USED_BY_LOGICAL_XSCREEN),
MAKE_ENTRY(NV_CTRL_BINARY_DATA_THERMAL_SENSORS_USED_BY_GPU),
@@ -366,7 +293,6 @@ static const char *attr_strop_table[NV_CTRL_STRING_OPERATION_LAST_ATTRIBUTE + 1]
MAKE_ENTRY(NV_CTRL_STRING_OPERATION_GTF_MODELINE),
MAKE_ENTRY(NV_CTRL_STRING_OPERATION_CVT_MODELINE),
MAKE_ENTRY(NV_CTRL_STRING_OPERATION_BUILD_MODEPOOL),
- MAKE_ENTRY(NV_CTRL_STRING_OPERATION_GVI_CONFIGURE_STREAMS),
MAKE_ENTRY(NV_CTRL_STRING_OPERATION_PARSE_METAMODE),
};
@@ -380,8 +306,6 @@ static void print_perms(NVCTRLAttributePermissionsRec *perms)
printf("%c", (perms->permissions & ATTRIBUTE_TYPE_FRAMELOCK) ? 'F' : '_');
printf("%c", (perms->permissions & ATTRIBUTE_TYPE_X_SCREEN) ? 'X' : '_');
printf("%c", (perms->permissions & ATTRIBUTE_TYPE_XINERAMA) ? 'I' : '_');
- printf("%c", (perms->permissions & ATTRIBUTE_TYPE_VCSC) ? 'V' : '_');
- printf("%c", (perms->permissions & ATTRIBUTE_TYPE_GVI) ? 'S' : '_');
printf("%c", (perms->permissions & ATTRIBUTE_TYPE_COOLER) ? 'C' : '_');
printf("%c", (perms->permissions & ATTRIBUTE_TYPE_THERMAL_SENSOR) ? 'T' : '_');
printf("%c", (perms->permissions & ATTRIBUTE_TYPE_3D_VISION_PRO_TRANSCEIVER) ? '3' : '_');
@@ -421,7 +345,7 @@ static void print_table_entry(NVCTRLAttributePermissionsRec *perms,
* and the attribute table was missing an entry for the attribute.
* Either condition by itself is acceptable:
*
- * - Event-only attributes (e.g., NV_CTRL_GVO_CSC_CHANGED_EVENT)
+ * - Event-only attributes (e.g., NV_CTRL_MODE_SET_EVENT)
* don't have any permissions.
*
* - A missing table entry could just mean the table is stale
diff --git a/samples/nv-control-targets.c b/samples/nv-control-targets.c
index 4cdee93..d5660ee 100644
--- a/samples/nv-control-targets.c
+++ b/samples/nv-control-targets.c
@@ -82,8 +82,6 @@ int main(int argc, char *argv[])
int major, minor;
int num_gpus, num_screens, num_syncs;
- int num_vcs;
- int num_gvis;
int num_coolers;
int num_thermal_sensors;
int gpu, screen;
@@ -179,32 +177,6 @@ int main(int argc, char *argv[])
printf(" number of Frame Lock Devices: %d\n", num_syncs);
- /* Get the number of Visual Computing System devices in
- * the system
- */
-
- ret = XNVCTRLQueryTargetCount(dpy, NV_CTRL_TARGET_TYPE_VCSC,
- &num_vcs);
- if (!ret) {
- fprintf(stderr, "Failed to query number of VCS\n");
- return 1;
- }
- printf(" number of Visual Computing System Devices: %d\n",
- num_vcs);
-
-
- /* Get the number of GVI devices in the system */
-
- ret = XNVCTRLQueryTargetCount(dpy, NV_CTRL_TARGET_TYPE_GVI,
- &num_gvis);
- if (!ret) {
- fprintf(stderr, "Failed to query number of GVIs\n");
- return 1;
- }
- printf(" number of Graphics Video Input Devices: %d\n",
- num_gvis);
-
-
/* Get the number of Cooler devices in the system */
ret = XNVCTRLQueryTargetCount(dpy, NV_CTRL_TARGET_TYPE_COOLER,
diff --git a/samples/version.mk b/samples/version.mk
index 7a63ce9..38f9fbf 100644
--- a/samples/version.mk
+++ b/samples/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 440.100
+NVIDIA_VERSION = 450.51
diff --git a/src/command-line.c b/src/command-line.c
index c81f388..69f065a 100644
--- a/src/command-line.c
+++ b/src/command-line.c
@@ -105,9 +105,6 @@ static void print_attribute_help(const char *attr)
case CTRL_ATTRIBUTE_TYPE_COLOR:
nv_msg(NULL, " - Attribute value is a color.");
break;
- case CTRL_ATTRIBUTE_TYPE_SDI_CSC:
- nv_msg(NULL, " - Attribute value is a SDI CSC matrix.");
- break;
}
/* Attribute flags (common) */
@@ -118,9 +115,6 @@ static void print_attribute_help(const char *attr)
if (entry->flags.is_framelock_attribute) {
nv_msg(NULL, " - Is Frame Lock attribute.");
}
- if (entry->flags.is_sdi_attribute) {
- nv_msg(NULL, " - Is SDI attribute.");
- }
if (entry->flags.no_config_write) {
nv_msg(NULL, " - Attribute is not written to the rc file.");
}
@@ -158,7 +152,6 @@ static void print_attribute_help(const char *attr)
break;
case CTRL_ATTRIBUTE_TYPE_STRING:
case CTRL_ATTRIBUTE_TYPE_COLOR:
- case CTRL_ATTRIBUTE_TYPE_SDI_CSC:
case CTRL_ATTRIBUTE_TYPE_STRING_OPERATION:
case CTRL_ATTRIBUTE_TYPE_BINARY_DATA:
/* Nothing specific to report for these */
diff --git a/src/config-file.c b/src/config-file.c
index 74cb388..ecf2227 100644
--- a/src/config-file.c
+++ b/src/config-file.c
@@ -355,7 +355,7 @@ int nv_write_config_file(const char *filename, const CtrlSystem *system,
continue;
}
- /* Only write out integer attributes, string and SDI CSC attributes
+ /* Only write out integer attributes, string attributes
* aren't written here.
*/
if (a->type != CTRL_ATTRIBUTE_TYPE_INTEGER) {
@@ -455,7 +455,7 @@ int nv_write_config_file(const char *filename, const CtrlSystem *system,
continue;
}
- /* Only write out integer attributes, string and SDI CSC attributes
+ /* Only write out integer attributes, string attributes
* aren't written here.
*/
if (a->type != CTRL_ATTRIBUTE_TYPE_INTEGER) {
diff --git a/src/gtk+-2.x/ctkbanner.c b/src/gtk+-2.x/ctkbanner.c
index 8ea57f6..0479272 100644
--- a/src/gtk+-2.x/ctkbanner.c
+++ b/src/gtk+-2.x/ctkbanner.c
@@ -48,14 +48,10 @@
#include "help.png.h"
#include "opengl.png.h"
#include "penguin.png.h"
-#include "gvi.png.h"
-#include "sdi.png.h"
-#include "sdi_shared_sync_bnc.png.h"
#include "server_licensing.png.h"
#include "slimm.png.h"
#include "solaris.png.h"
#include "thermal.png.h"
-#include "vcs.png.h"
#include "vdpau.png.h"
#include "x.png.h"
#include "xvideo.png.h"
@@ -422,17 +418,13 @@ static GdkPixbuf* select_artwork(BannerArtworkType artwork,
{ BANNER_ARTWORK_FRAMELOCK, FALSE, 16, PNG(framelock) },
{ BANNER_ARTWORK_GPU, FALSE, 16, PNG(gpu) },
{ BANNER_ARTWORK_GRAPHICS, FALSE, 16, PNG(graphics) },
- { BANNER_ARTWORK_GVI, FALSE, 16, PNG(gvi) },
{ BANNER_ARTWORK_HELP, FALSE, 16, PNG(help) },
{ BANNER_ARTWORK_OPENGL, FALSE, 16, PNG(opengl) },
{ BANNER_ARTWORK_PENGUIN, TRUE, 16, PNG(penguin) },
- { BANNER_ARTWORK_SDI, FALSE, 16, PNG(sdi) },
- { BANNER_ARTWORK_SDI_SHARED_SYNC_BNC, FALSE, 16, PNG(sdi_shared_sync_bnc) },
{ BANNER_ARTWORK_SERVER_LICENSING, FALSE, 16, PNG(server_licensing) },
{ BANNER_ARTWORK_SLIMM, FALSE, 16, PNG(slimm) },
{ BANNER_ARTWORK_SOLARIS, TRUE, 16, PNG(solaris) },
{ BANNER_ARTWORK_THERMAL, FALSE, 16, PNG(thermal) },
- { BANNER_ARTWORK_VCS, FALSE, 16, PNG(vcs) },
{ BANNER_ARTWORK_VDPAU, FALSE, 16, PNG(vdpau) },
{ BANNER_ARTWORK_X, FALSE, 16, PNG(x) },
{ BANNER_ARTWORK_XVIDEO, FALSE, 16, PNG(xvideo) },
diff --git a/src/gtk+-2.x/ctkbanner.h b/src/gtk+-2.x/ctkbanner.h
index 9cc5284..9d4dd4e 100644
--- a/src/gtk+-2.x/ctkbanner.h
+++ b/src/gtk+-2.x/ctkbanner.h
@@ -55,17 +55,13 @@ typedef enum {
BANNER_ARTWORK_FRAMELOCK,
BANNER_ARTWORK_GPU,
BANNER_ARTWORK_GRAPHICS,
- BANNER_ARTWORK_GVI,
BANNER_ARTWORK_HELP,
BANNER_ARTWORK_OPENGL,
BANNER_ARTWORK_PENGUIN,
- BANNER_ARTWORK_SDI,
- BANNER_ARTWORK_SDI_SHARED_SYNC_BNC,
BANNER_ARTWORK_SERVER_LICENSING,
BANNER_ARTWORK_SLIMM,
BANNER_ARTWORK_SOLARIS,
BANNER_ARTWORK_THERMAL,
- BANNER_ARTWORK_VCS,
BANNER_ARTWORK_VDPAU,
BANNER_ARTWORK_X,
BANNER_ARTWORK_XVIDEO,
diff --git a/src/gtk+-2.x/ctkdisplayconfig-utils.c b/src/gtk+-2.x/ctkdisplayconfig-utils.c
index b8acec4..6e1c3b3 100644
--- a/src/gtk+-2.x/ctkdisplayconfig-utils.c
+++ b/src/gtk+-2.x/ctkdisplayconfig-utils.c
@@ -339,62 +339,44 @@ static nvModeLinePtr modeline_parse(nvDisplayPtr display,
}
free(tmp);
- modeline->refresh_rate = 0;
- if (display->is_sdi && gpu->num_gvo_modes) {
- /* Fetch the SDI refresh rate of the mode from the gvo mode table */
- int i;
- for (i = 0; i < gpu->num_gvo_modes; i++) {
- if (gpu->gvo_mode_data[i].id &&
- gpu->gvo_mode_data[i].name &&
- !strcmp(gpu->gvo_mode_data[i].name,
- modeline->data.identifier)) {
- modeline->refresh_rate = gpu->gvo_mode_data[i].rate;
- modeline->refresh_rate /= 1000.0;
- break;
- }
- }
- }
-
- if (modeline->refresh_rate == 0) {
- /*
- * Calculate the vertical refresh rate of the modeline in Hz;
- * divide by two for double scan modes (if the double scan
- * modeline isn't broken; i.e., already has a correct vtotal), and
- * multiply by two for interlaced modes (so that we report the
- * field rate, rather than the frame rate)
- */
-
- htotal = (double) modeline->data.htotal;
- vtotal = (double) modeline->data.vtotal;
+ /*
+ * Calculate the vertical refresh rate of the modeline in Hz;
+ * divide by two for double scan modes (if the double scan
+ * modeline isn't broken; i.e., already has a correct vtotal), and
+ * multiply by two for interlaced modes (so that we report the
+ * field rate, rather than the frame rate)
+ */
- /*
- * Use g_ascii_strtod(), so that we do not have to change the locale
- * to "C".
- */
- pclk = g_ascii_strtod((const gchar *)modeline->data.clock,
- (gchar **)&nptr);
+ htotal = (double) modeline->data.htotal;
+ vtotal = (double) modeline->data.vtotal;
- if ((pclk == 0.0) || !nptr || *nptr != '\0' || ((htotal * vtotal) == 0)) {
- nv_warning_msg("Failed to compute the refresh rate "
- "for the modeline '%s'", str);
- goto fail;
- }
+ /*
+ * Use g_ascii_strtod(), so that we do not have to change the locale
+ * to "C".
+ */
+ pclk = g_ascii_strtod((const gchar *)modeline->data.clock,
+ (gchar **)&nptr);
- modeline->refresh_rate = (pclk * 1000000.0) / (htotal * vtotal);
+ if ((pclk == 0.0) || !nptr || *nptr != '\0' || ((htotal * vtotal) == 0)) {
+ nv_warning_msg("Failed to compute the refresh rate "
+ "for the modeline '%s'", str);
+ goto fail;
+ }
- factor = 1.0;
+ modeline->refresh_rate = (pclk * 1000000.0) / (htotal * vtotal);
- if ((modeline->data.flags & V_DBLSCAN) && !broken_doublescan_modelines) {
- factor *= 0.5;
- }
+ factor = 1.0;
- if (modeline->data.flags & V_INTERLACE) {
- factor *= 2.0;
- }
+ if ((modeline->data.flags & V_DBLSCAN) && !broken_doublescan_modelines) {
+ factor *= 0.5;
+ }
- modeline->refresh_rate *= factor;
+ if (modeline->data.flags & V_INTERLACE) {
+ factor *= 2.0;
}
+ modeline->refresh_rate *= factor;
+
return modeline;
@@ -2728,49 +2710,6 @@ static void gpu_add_display(nvGpuPtr gpu, nvDisplayPtr display)
-/** gpu_query_gvo_mode_info() ****************************************
- *
- * Adds GVO mode information to the GPU's gvo mode data table at
- * the given table index.
- *
- **/
-static Bool gpu_query_gvo_mode_info(nvGpuPtr gpu, int mode_id, int table_idx)
-{
- ReturnStatus ret1, ret2;
- GvoModeData *data;
- int rate;
- char *name;
-
-
- if (!gpu || table_idx >= gpu->num_gvo_modes) {
- return FALSE;
- }
-
- data = &(gpu->gvo_mode_data[table_idx]);
-
- ret1 = NvCtrlGetDisplayAttribute(gpu->ctrl_target,
- mode_id,
- NV_CTRL_GVIO_VIDEO_FORMAT_REFRESH_RATE,
- &rate);
-
- ret2 = NvCtrlGetStringDisplayAttribute(gpu->ctrl_target,
- mode_id,
- NV_CTRL_STRING_GVIO_VIDEO_FORMAT_NAME,
- &name);
-
- if ((ret1 == NvCtrlSuccess) && (ret2 == NvCtrlSuccess)) {
- data->id = mode_id;
- data->rate = rate;
- data->name = name;
- return TRUE;
- }
-
- free(name);
- return FALSE;
-}
-
-
-
/** display_add_name_from_server() ***********************************
*
* Queries and adds the NV-CONTROL name to the display device.
@@ -2835,7 +2774,6 @@ static nvDisplayPtr gpu_add_display_from_server(nvGpuPtr gpu,
CtrlTarget *ctrl_target,
gchar **err_str)
{
- ReturnStatus ret;
nvDisplayPtr display;
int i;
@@ -2855,103 +2793,6 @@ static nvDisplayPtr gpu_add_display_from_server(nvGpuPtr gpu,
}
}
-
- /* Query if this display is an SDI display */
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_IS_GVO_DISPLAY,
- &(display->is_sdi));
- if (ret != NvCtrlSuccess) {
- nv_warning_msg("Failed to query if display device\n"
- "%d connected to GPU-%d '%s' is an\n"
- "SDI device.",
- NvCtrlGetTargetId(ctrl_target),
- NvCtrlGetTargetId(gpu->ctrl_target),
- gpu->name);
- display->is_sdi = FALSE;
- }
-
-
- /* Load the SDI mode table so we can report accurate refresh rates. */
- if (display->is_sdi && !gpu->gvo_mode_data) {
- unsigned int valid1 = 0;
- unsigned int valid2 = 0;
- unsigned int valid3 = 0;
- CtrlAttributeValidValues valid;
-
- ret = NvCtrlGetValidAttributeValues(gpu->ctrl_target,
- NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT,
- &valid);
- if ((ret != NvCtrlSuccess) ||
- (valid.valid_type != CTRL_ATTRIBUTE_VALID_TYPE_INT_BITS)) {
- valid1 = 0;
- } else {
- valid1 = valid.allowed_ints;
- }
-
- ret = NvCtrlGetValidAttributeValues(gpu->ctrl_target,
- NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT2,
- &valid);
- if ((ret != NvCtrlSuccess) ||
- (valid.valid_type != CTRL_ATTRIBUTE_VALID_TYPE_INT_BITS)) {
- valid2 = 0;
- } else {
- valid2 = valid.allowed_ints;
- }
-
- ret = NvCtrlGetValidAttributeValues(gpu->ctrl_target,
- NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT3,
- &valid);
- if ((ret != NvCtrlSuccess) ||
- (valid.valid_type != CTRL_ATTRIBUTE_VALID_TYPE_INT_BITS)) {
- valid3 = 0;
- } else {
- valid3 = valid.allowed_ints;
- }
-
- /* Count the number of valid modes there are */
- gpu->num_gvo_modes = count_number_of_bits(valid1);
- gpu->num_gvo_modes += count_number_of_bits(valid2);
- gpu->num_gvo_modes += count_number_of_bits(valid3);
- if (gpu->num_gvo_modes > 0) {
- gpu->gvo_mode_data = calloc(gpu->num_gvo_modes, sizeof(GvoModeData));
- }
- if (!gpu->gvo_mode_data) {
- gpu->num_gvo_modes = 0;
- } else {
- // Gather all the bits and dump them into the array
- int idx = 0; // Index into gvo_mode_data.
- int id = 0; // Mode ID
- while (valid1) {
- if (valid1 & 1) {
- if (gpu_query_gvo_mode_info(gpu, id, idx)) {
- idx++;
- }
- }
- valid1 >>= 1;
- id++;
- }
- while (valid2) {
- if (valid2 & 1) {
- if (gpu_query_gvo_mode_info(gpu, id, idx)) {
- idx++;
- }
- }
- valid2 >>= 1;
- id++;
- }
- while (valid3) {
- if (valid3 & 1) {
- if (gpu_query_gvo_mode_info(gpu, id, idx)) {
- idx++;
- }
- }
- valid3 >>= 1;
- id++;
- }
- }
- }
-
-
/* Query the modelines for the display device */
if (!display_add_modelines_from_server(display, gpu, err_str)) {
nv_warning_msg("Failed to add modelines to display device %d "
@@ -3069,7 +2910,6 @@ static void gpu_free(nvGpuPtr gpu)
free(gpu->uuid);
free(gpu->flags_memory);
g_free(gpu->pci_bus_id);
- free(gpu->gvo_mode_data);
free(gpu);
}
diff --git a/src/gtk+-2.x/ctkdisplayconfig.c b/src/gtk+-2.x/ctkdisplayconfig.c
index 4145e8e..515264e 100644
--- a/src/gtk+-2.x/ctkdisplayconfig.c
+++ b/src/gtk+-2.x/ctkdisplayconfig.c
@@ -978,7 +978,7 @@ static GtkWidget * create_validation_dialog(CtkDisplayConfig *ctk_object)
dialog = gtk_dialog_new_with_buttons
("Layout Inconsistencie(s)",
GTK_WINDOW(gtk_widget_get_parent(GTK_WIDGET(ctk_object))),
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, NULL);
+ GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, NULL, NULL);
/* Main horizontal box */
hbox = gtk_hbox_new(FALSE, 5);
@@ -1079,7 +1079,7 @@ static GtkWidget * create_validation_apply_dialog(CtkDisplayConfig *ctk_object)
GTK_WINDOW(gtk_widget_get_parent(GTK_WIDGET(ctk_object))),
GTK_DIALOG_MODAL |
GTK_DIALOG_DESTROY_WITH_PARENT,
- NULL);
+ NULL, NULL);
ctk_object->dlg_validation_apply = dialog;
/* Main horizontal box */
@@ -1545,7 +1545,7 @@ GtkWidget* ctk_display_config_new(CtrlTarget *ctrl_target,
ctk_object->dlg_display_disable = gtk_dialog_new_with_buttons
("Disable Display Device",
GTK_WINDOW(gtk_widget_get_parent(GTK_WIDGET(ctk_object))),
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, NULL);
+ GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, NULL, NULL);
ctk_object->btn_display_disable_off =
gtk_dialog_add_button(GTK_DIALOG(ctk_object->dlg_display_disable),
"Remove",
@@ -3233,7 +3233,7 @@ static void setup_display_refresh_dropdown(CtkDisplayConfig *ctk_object)
continue;
}
- name = g_strdup_printf("%0.*f Hz", (display->is_sdi ? 3 : 0),
+ name = g_strdup_printf("%0.0f Hz",
modeline->refresh_rate);
/* Get a unique number for this modeline */
@@ -3261,7 +3261,7 @@ static void setup_display_refresh_dropdown(CtkDisplayConfig *ctk_object)
}
/* Is default refresh rate for resolution */
- if (!ctk_object->refresh_table_len && !display->is_sdi) {
+ if (!ctk_object->refresh_table_len) {
auto_modeline = modeline;
g_free(name);
name = g_strdup("Auto");
diff --git a/src/gtk+-2.x/ctkdisplaylayout.c b/src/gtk+-2.x/ctkdisplaylayout.c
index 8b6fcef..f623637 100644
--- a/src/gtk+-2.x/ctkdisplaylayout.c
+++ b/src/gtk+-2.x/ctkdisplaylayout.c
@@ -2552,11 +2552,10 @@ static char *get_display_tooltip(nvDisplayPtr display, Bool advanced)
/* Display has mode/modeline */
} else {
float ref = display->cur_mode->modeline->refresh_rate;
- tip = g_strdup_printf("%s : %dx%d @ %.*f Hz",
+ tip = g_strdup_printf("%s : %dx%d @ %.0f Hz",
display->logName,
display->cur_mode->modeline->data.hdisplay,
display->cur_mode->modeline->data.vdisplay,
- (display->is_sdi ? 3 : 0),
ref);
}
@@ -2582,12 +2581,11 @@ static char *get_display_tooltip(nvDisplayPtr display, Bool advanced)
/* Display has mode/modeline */
} else {
float ref = display->cur_mode->modeline->refresh_rate;
- tip = g_strdup_printf("%s : %dx%d @ %.*f Hz\n(X Screen %d)\n"
+ tip = g_strdup_printf("%s : %dx%d @ %.0f Hz\n(X Screen %d)\n"
"(GPU: %s)",
display->logName,
display->cur_mode->modeline->data.hdisplay,
display->cur_mode->modeline->data.vdisplay,
- (display->is_sdi ? 3 : 0),
ref,
display->screen->scrnum,
display->gpu->name);
diff --git a/src/gtk+-2.x/ctkdisplaylayout.h b/src/gtk+-2.x/ctkdisplaylayout.h
index 77b066a..c710251 100644
--- a/src/gtk+-2.x/ctkdisplaylayout.h
+++ b/src/gtk+-2.x/ctkdisplaylayout.h
@@ -255,8 +255,6 @@ typedef struct nvDisplayRec {
char *targetIdName; /* e.g. "DPY-3" */
char *randrName; /* e.g. "VGA-1", "DVI-I-2" */
- Bool is_sdi; /* Is an SDI display */
-
nvModeLinePtr modelines; /* Modelines validated by X */
int num_modelines;
@@ -378,15 +376,6 @@ typedef struct nvScreenRec {
-/* GVO Mode information */
-typedef struct GvoModeDataRec {
- unsigned int id; /* NV-CONTROL ID */
- char *name;
- unsigned int rate; /* Refresh rate */
-} GvoModeData;
-
-
-
/* GPU (Device) */
typedef struct nvGpuRec {
struct nvGpuRec *next_in_layout; /* List of all GPUs */
@@ -410,9 +399,6 @@ typedef struct nvGpuRec {
gchar *pci_bus_id;
- GvoModeData *gvo_mode_data; /* Information about GVO modes available */
- unsigned int num_gvo_modes;
-
unsigned int *flags_memory; /* Pointer to memory alloced for flags */
unsigned int *flags; /* Array of flags queried from the X server */
int num_flags;
diff --git a/src/gtk+-2.x/ctkevent.c b/src/gtk+-2.x/ctkevent.c
index a29d6f9..25c36cf 100644
--- a/src/gtk+-2.x/ctkevent.c
+++ b/src/gtk+-2.x/ctkevent.c
@@ -172,24 +172,6 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_SIGNAL(NV_CTRL_GPU_DEFAULT_CORE_THRESHOLD);
MAKE_SIGNAL(NV_CTRL_GPU_MAX_CORE_THRESHOLD);
MAKE_SIGNAL(NV_CTRL_AMBIENT_TEMPERATURE);
- MAKE_SIGNAL(NV_CTRL_GVO_SUPPORTED);
- MAKE_SIGNAL(NV_CTRL_GVO_SYNC_MODE);
- MAKE_SIGNAL(NV_CTRL_GVO_SYNC_SOURCE);
- MAKE_SIGNAL(NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT);
- MAKE_SIGNAL(NV_CTRL_GVIO_DETECTED_VIDEO_FORMAT);
- MAKE_SIGNAL(NV_CTRL_GVO_DATA_FORMAT);
- MAKE_SIGNAL(NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECTED);
- MAKE_SIGNAL(NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE);
- MAKE_SIGNAL(NV_CTRL_GVO_SDI_SYNC_INPUT_DETECTED);
- MAKE_SIGNAL(NV_CTRL_GVO_VIDEO_OUTPUTS);
- MAKE_SIGNAL(NV_CTRL_GVO_FIRMWARE_VERSION);
- MAKE_SIGNAL(NV_CTRL_GVO_SYNC_DELAY_PIXELS);
- MAKE_SIGNAL(NV_CTRL_GVO_SYNC_DELAY_LINES);
- MAKE_SIGNAL(NV_CTRL_GVO_INPUT_VIDEO_FORMAT_REACQUIRE);
- MAKE_SIGNAL(NV_CTRL_GVO_GLX_LOCKED);
- MAKE_SIGNAL(NV_CTRL_GVIO_VIDEO_FORMAT_WIDTH);
- MAKE_SIGNAL(NV_CTRL_GVIO_VIDEO_FORMAT_HEIGHT);
- MAKE_SIGNAL(NV_CTRL_GVIO_VIDEO_FORMAT_REFRESH_RATE);
MAKE_SIGNAL(NV_CTRL_FLATPANEL_LINK);
MAKE_SIGNAL(NV_CTRL_USE_HOUSE_SYNC);
MAKE_SIGNAL(NV_CTRL_IMAGE_SETTINGS);
@@ -197,8 +179,6 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
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_GVO_OVERRIDE_HW_CSC);
- MAKE_SIGNAL(NV_CTRL_GVO_COMPOSITE_TERMINATION);
MAKE_SIGNAL(NV_CTRL_ASSOCIATED_DISPLAY_DEVICES);
MAKE_SIGNAL(NV_CTRL_FRAMELOCK_SLAVES);
MAKE_SIGNAL(NV_CTRL_FRAMELOCK_MASTERABLE);
@@ -227,15 +207,8 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_SIGNAL(NV_CTRL_DFP_SCALING_ACTIVE);
MAKE_SIGNAL(NV_CTRL_FSAA_APPLICATION_ENHANCED);
MAKE_SIGNAL(NV_CTRL_FRAMELOCK_SYNC_RATE_4);
- MAKE_SIGNAL(NV_CTRL_GVO_LOCK_OWNER);
MAKE_SIGNAL(NV_CTRL_NUM_GPU_ERRORS_RECOVERED);
MAKE_SIGNAL(NV_CTRL_REFRESH_RATE_3);
- MAKE_SIGNAL(NV_CTRL_GVO_OUTPUT_VIDEO_LOCKED);
- MAKE_SIGNAL(NV_CTRL_GVO_SYNC_LOCK_STATUS);
- MAKE_SIGNAL(NV_CTRL_GVO_ANC_TIME_CODE_GENERATION);
- MAKE_SIGNAL(NV_CTRL_GVO_COMPOSITE);
- MAKE_SIGNAL(NV_CTRL_GVO_COMPOSITE_ALPHA_KEY);
- MAKE_SIGNAL(NV_CTRL_GVO_COMPOSITE_NUM_KEY_RANGES);
MAKE_SIGNAL(NV_CTRL_NOTEBOOK_DISPLAY_CHANGE_LID_EVENT);
MAKE_SIGNAL(NV_CTRL_MODE_SET_EVENT);
MAKE_SIGNAL(NV_CTRL_OPENGL_AA_LINE_GAMMA_VALUE);
@@ -243,27 +216,12 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_SIGNAL(NV_CTRL_DISPLAYPORT_LINK_RATE);
MAKE_SIGNAL(NV_CTRL_STEREO_EYES_EXCHANGE);
MAKE_SIGNAL(NV_CTRL_NO_SCANOUT);
- MAKE_SIGNAL(NV_CTRL_GVO_CSC_CHANGED_EVENT);
MAKE_SIGNAL(NV_CTRL_X_SERVER_UNIQUE_ID);
MAKE_SIGNAL(NV_CTRL_PIXMAP_CACHE);
MAKE_SIGNAL(NV_CTRL_PIXMAP_CACHE_ROUNDING_SIZE_KB);
- MAKE_SIGNAL(NV_CTRL_IS_GVO_DISPLAY);
MAKE_SIGNAL(NV_CTRL_PCI_ID);
- MAKE_SIGNAL(NV_CTRL_GVO_FULL_RANGE_COLOR);
MAKE_SIGNAL(NV_CTRL_SLI_MOSAIC_MODE_AVAILABLE);
- MAKE_SIGNAL(NV_CTRL_GVO_ENABLE_RGB_DATA);
MAKE_SIGNAL(NV_CTRL_IMAGE_SHARPENING_DEFAULT);
- MAKE_SIGNAL(NV_CTRL_GVI_NUM_JACKS);
- MAKE_SIGNAL(NV_CTRL_GVI_MAX_LINKS_PER_STREAM);
- MAKE_SIGNAL(NV_CTRL_GVI_DETECTED_CHANNEL_BITS_PER_COMPONENT);
- MAKE_SIGNAL(NV_CTRL_GVI_REQUESTED_STREAM_BITS_PER_COMPONENT);
- MAKE_SIGNAL(NV_CTRL_GVI_DETECTED_CHANNEL_COMPONENT_SAMPLING);
- MAKE_SIGNAL(NV_CTRL_GVI_REQUESTED_STREAM_COMPONENT_SAMPLING);
- MAKE_SIGNAL(NV_CTRL_GVI_REQUESTED_STREAM_CHROMA_EXPAND);
- MAKE_SIGNAL(NV_CTRL_GVI_DETECTED_CHANNEL_COLOR_SPACE);
- MAKE_SIGNAL(NV_CTRL_GVI_DETECTED_CHANNEL_LINK_ID);
- MAKE_SIGNAL(NV_CTRL_GVI_DETECTED_CHANNEL_SMPTE352_IDENTIFIER);
- MAKE_SIGNAL(NV_CTRL_GVI_GLOBAL_IDENTIFIER);
MAKE_SIGNAL(NV_CTRL_FRAMELOCK_SYNC_DELAY_RESOLUTION);
MAKE_SIGNAL(NV_CTRL_GPU_COOLER_MANUAL_CONTROL);
MAKE_SIGNAL(NV_CTRL_THERMAL_COOLER_LEVEL);
@@ -272,17 +230,11 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_SIGNAL(NV_CTRL_THERMAL_COOLER_TARGET);
MAKE_SIGNAL(NV_CTRL_GPU_ECC_CONFIGURATION);
MAKE_SIGNAL(NV_CTRL_GPU_POWER_MIZER_MODE);
- MAKE_SIGNAL(NV_CTRL_GVI_SYNC_OUTPUT_FORMAT);
- MAKE_SIGNAL(NV_CTRL_GVI_MAX_CHANNELS_PER_JACK);
- MAKE_SIGNAL(NV_CTRL_GVI_MAX_STREAMS);
- MAKE_SIGNAL(NV_CTRL_GVI_NUM_CAPTURE_SURFACES);
MAKE_SIGNAL(NV_CTRL_OVERSCAN_COMPENSATION);
MAKE_SIGNAL(NV_CTRL_GPU_PCIE_GENERATION);
- MAKE_SIGNAL(NV_CTRL_GVI_BOUND_GPU);
MAKE_SIGNAL(NV_CTRL_ACCELERATE_TRAPEZOIDS);
MAKE_SIGNAL(NV_CTRL_GPU_CORES);
MAKE_SIGNAL(NV_CTRL_GPU_MEMORY_BUS_WIDTH);
- MAKE_SIGNAL(NV_CTRL_GVI_TEST_MODE);
MAKE_SIGNAL(NV_CTRL_COLOR_SPACE);
MAKE_SIGNAL(NV_CTRL_COLOR_RANGE);
MAKE_SIGNAL(NV_CTRL_CURRENT_COLOR_SPACE);
@@ -298,20 +250,17 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
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_GVIO_VIDEO_FORMAT_FLAGS);
MAKE_SIGNAL(NV_CTRL_GPU_PCIE_MAX_LINK_SPEED);
MAKE_SIGNAL(NV_CTRL_3D_VISION_PRO_TRANSCEIVER_CHANNEL);
MAKE_SIGNAL(NV_CTRL_3D_VISION_PRO_TRANSCEIVER_MODE);
MAKE_SIGNAL(NV_CTRL_SYNCHRONOUS_PALETTE_UPDATES);
MAKE_SIGNAL(NV_CTRL_3D_VISION_PRO_TRANSCEIVER_CHANNEL_QUALITY);
MAKE_SIGNAL(NV_CTRL_3D_VISION_PRO_GLASSES_MISSED_SYNC_CYCLES);
- MAKE_SIGNAL(NV_CTRL_GVO_ANC_PARITY_COMPUTATION);
MAKE_SIGNAL(NV_CTRL_3D_VISION_PRO_GLASSES_PAIR_EVENT);
MAKE_SIGNAL(NV_CTRL_3D_VISION_PRO_GLASSES_UNPAIR_EVENT);
MAKE_SIGNAL(NV_CTRL_GPU_PCIE_MAX_LINK_WIDTH);
MAKE_SIGNAL(NV_CTRL_GPU_PCIE_CURRENT_LINK_WIDTH);
MAKE_SIGNAL(NV_CTRL_GPU_PCIE_CURRENT_LINK_SPEED);
- MAKE_SIGNAL(NV_CTRL_GVO_AUDIO_BLANKING);
MAKE_SIGNAL(NV_CTRL_CURRENT_METAMODE_ID);
MAKE_SIGNAL(NV_CTRL_DISPLAY_ENABLED);
MAKE_SIGNAL(NV_CTRL_FRAMELOCK_INCOMING_HOUSE_SYNC_RATE);
@@ -381,21 +330,12 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_STRING_SIGNAL(NV_CTRL_STRING_NVIDIA_DRIVER_VERSION);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_DISPLAY_DEVICE_NAME);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_TV_ENCODER_NAME);
- MAKE_STRING_SIGNAL(NV_CTRL_STRING_GVIO_FIRMWARE_VERSION);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_CURRENT_MODELINE);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_ADD_MODELINE);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_DELETE_MODELINE);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_CURRENT_METAMODE);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_ADD_METAMODE);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_DELETE_METAMODE);
- MAKE_STRING_SIGNAL(NV_CTRL_STRING_VCSC_PRODUCT_NAME);
- MAKE_STRING_SIGNAL(NV_CTRL_STRING_VCSC_PRODUCT_ID);
- MAKE_STRING_SIGNAL(NV_CTRL_STRING_VCSC_SERIAL_NUMBER);
- MAKE_STRING_SIGNAL(NV_CTRL_STRING_VCSC_BUILD_DATE);
- MAKE_STRING_SIGNAL(NV_CTRL_STRING_VCSC_FIRMWARE_VERSION);
- MAKE_STRING_SIGNAL(NV_CTRL_STRING_VCSC_FIRMWARE_REVISION);
- MAKE_STRING_SIGNAL(NV_CTRL_STRING_VCSC_HARDWARE_VERSION);
- MAKE_STRING_SIGNAL(NV_CTRL_STRING_VCSC_HARDWARE_REVISION);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_MOVE_METAMODE);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_VALID_HORIZ_SYNC_RANGES);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_VALID_VERT_REFRESH_RANGES);
@@ -403,7 +343,6 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_STRING_SIGNAL(NV_CTRL_STRING_NVIDIA_XINERAMA_INFO_ORDER);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_SLI_MODE);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_PERFORMANCE_MODES);
- MAKE_STRING_SIGNAL(NV_CTRL_STRING_GVIO_VIDEO_FORMAT_NAME);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_GPU_CURRENT_CLOCK_FREQS);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_3D_VISION_PRO_GLASSES_NAME);
MAKE_STRING_SIGNAL(NV_CTRL_STRING_CURRENT_METAMODE_VERSION_2);
@@ -440,8 +379,6 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_BINARY_SIGNAL(NV_CTRL_BINARY_DATA_GPUS_USING_FRAMELOCK);
MAKE_BINARY_SIGNAL(NV_CTRL_BINARY_DATA_DISPLAY_VIEWPORT);
MAKE_BINARY_SIGNAL(NV_CTRL_BINARY_DATA_FRAMELOCKS_USED_BY_GPU);
- MAKE_BINARY_SIGNAL(NV_CTRL_BINARY_DATA_GPUS_USING_VCSC);
- MAKE_BINARY_SIGNAL(NV_CTRL_BINARY_DATA_VCSCS_USED_BY_GPU);
MAKE_BINARY_SIGNAL(NV_CTRL_BINARY_DATA_COOLERS_USED_BY_GPU);
MAKE_BINARY_SIGNAL(NV_CTRL_BINARY_DATA_GPUS_USED_BY_LOGICAL_XSCREEN);
MAKE_BINARY_SIGNAL(NV_CTRL_BINARY_DATA_THERMAL_SENSORS_USED_BY_GPU);
diff --git a/src/gtk+-2.x/ctkgridlicense.c b/src/gtk+-2.x/ctkgridlicense.c
index 540767f..2c30094 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) 2019 NVIDIA Corporation.
+ * Copyright (C) 2020 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,
@@ -127,8 +127,8 @@ static gboolean licenseStateQueryFailed = FALSE;
static void get_licensable_feature_information(gpointer user_data);
static gboolean is_feature_supported(gpointer user_data, int featureType);
static gboolean is_restart_required(gpointer user_data);
-static gboolean queryLicensedFeatureCode = TRUE;
-int64_t licensedFeatureCode = NV_GRID_LICENSE_FEATURE_TYPE_VAPP;
+static gboolean queryEnabledFeatureCode = TRUE;
+int64_t enabledFeatureCode = NV_GRID_LICENSE_FEATURE_TYPE_VAPP;
GType ctk_manage_grid_license_get_type(void)
{
@@ -835,7 +835,7 @@ static gboolean update_manage_grid_license_state_info(gpointer user_data)
ctk_manage_grid_license->gridd_feature_type = griddFeatureType;
if (licenseState == NV_GRID_UNLICENSED) {
- queryLicensedFeatureCode = TRUE;
+ queryEnabledFeatureCode = TRUE;
switch (ctk_manage_grid_license->feature_type) {
case NV_GRID_LICENSE_FEATURE_TYPE_VAPP:
ctk_manage_grid_license->licenseStatus = NV_GRID_UNLICENSED_VAPP;
@@ -844,19 +844,13 @@ static gboolean update_manage_grid_license_state_info(gpointer user_data)
}
break;
case NV_GRID_LICENSE_FEATURE_TYPE_QDWS:
- ctk_manage_grid_license->licenseStatus = NV_GRID_UNLICENSED_FEATURE_SELECTED;
- if (licensedFeatureCode == NV_GRID_LICENSE_FEATURE_TYPE_QDWS) {
- ctk_manage_grid_license->licenseStatus = NV_GRID_UNLICENSED_REQUEST_DETAILS_QDWS;
- }
+ ctk_manage_grid_license->licenseStatus = NV_GRID_UNLICENSED_REQUEST_DETAILS_QDWS;
if (is_restart_required(ctk_manage_grid_license)) {
ctk_manage_grid_license->licenseStatus = NV_GRID_LICENSE_RESTART_REQUIRED_QDWS;
}
break;
case NV_GRID_LICENSE_FEATURE_TYPE_VCOMPUTE:
- ctk_manage_grid_license->licenseStatus = NV_GRID_UNLICENSED_FEATURE_SELECTED;
- if (licensedFeatureCode == NV_GRID_LICENSE_FEATURE_TYPE_VCOMPUTE) {
- ctk_manage_grid_license->licenseStatus = NV_GRID_UNLICENSED_REQUEST_DETAILS_VCOMPUTE;
- }
+ ctk_manage_grid_license->licenseStatus = NV_GRID_UNLICENSED_REQUEST_DETAILS_VCOMPUTE;
if (is_restart_required(ctk_manage_grid_license)) {
ctk_manage_grid_license->licenseStatus = NV_GRID_LICENSE_RESTART_REQUIRED_VCOMPUTE;
}
@@ -899,9 +893,9 @@ static gboolean update_manage_grid_license_state_info(gpointer user_data)
default:
break;
}
- if (queryLicensedFeatureCode == TRUE) {
+ if (queryEnabledFeatureCode == TRUE) {
get_licensable_feature_information(ctk_manage_grid_license);
- queryLicensedFeatureCode = FALSE;
+ queryEnabledFeatureCode = FALSE;
}
}
else if (licenseState == NV_GRID_LICENSE_REQUESTING) {
@@ -966,10 +960,6 @@ static gboolean update_manage_grid_license_state_info(gpointer user_data)
case NV_GRID_UNLICENSED_VAPP:
snprintf(licenseStatusMsgTmp, sizeof(licenseStatusMsgTmp), "Your system is currently configured for %s.", GRID_VIRTUAL_APPLICATIONS);
break;
- case NV_GRID_UNLICENSED_FEATURE_SELECTED:
- snprintf(licenseStatusMsgTmp, sizeof(licenseStatusMsgTmp), "Your system is currently configured for %s.\n"
- "Enter license server details and apply.", GRID_VIRTUAL_APPLICATIONS);
- break;
case NV_GRID_LICENSE_STATUS_ACQUIRED:
snprintf(licenseStatusMsgTmp, sizeof(licenseStatusMsgTmp), "Your system is licensed for %s.", ctk_manage_grid_license->productName);
break;
@@ -1033,8 +1023,8 @@ static gboolean is_restart_required(gpointer user_data)
/* Once licensed, system reboot required if there is mismatch between feature type
updated from UI/gridd.conf and feature code of the feature that is licensed on this system. */
- if ((licensedFeatureCode) &&
- (licensedFeatureCode != ctk_manage_grid_license->feature_type)) {
+ if ((enabledFeatureCode) &&
+ (enabledFeatureCode != ctk_manage_grid_license->feature_type)) {
ret = TRUE;
}
return ret;
@@ -1123,7 +1113,7 @@ static void apply_clicked(GtkWidget *widget, gpointer user_data)
gtk_widget_set_sensitive(ctk_manage_grid_license->btn_apply, FALSE);
gtk_widget_set_sensitive(ctk_manage_grid_license->btn_cancel, FALSE);
- if (licensedFeatureCode == NV_GRID_LICENSE_FEATURE_TYPE_VAPP) {
+ if (enabledFeatureCode == NV_GRID_LICENSE_FEATURE_TYPE_VAPP) {
get_licensable_feature_information(ctk_manage_grid_license);
}
}
@@ -1137,6 +1127,10 @@ static void get_licensable_feature_information(gpointer user_data)
nvmlGridLicensableFeatures_t *gridLicensableFeatures;
gint ret, i;
+ // Add delay of 1 second to allow sometime for recently applied feature to
+ // get enabled and set corresponding properties in RM before querying them
+ sleep(1);
+
ret = NvCtrlNvmlGetGridLicenseAttributes(ctk_manage_grid_license->target,
NV_CTRL_ATTR_NVML_GPU_GRID_LICENSABLE_FEATURES,
&gridLicensableFeatures);
@@ -1146,8 +1140,8 @@ static void get_licensable_feature_information(gpointer user_data)
for (i = 0; i < gridLicensableFeatures->licensableFeaturesCount; i++)
{
- if (gridLicensableFeatures->gridLicensableFeatures[i].featureState != 0) {
- licensedFeatureCode = gridLicensableFeatures->gridLicensableFeatures[i].featureCode;
+ if (gridLicensableFeatures->gridLicensableFeatures[i].featureEnabled != 0) {
+ enabledFeatureCode = gridLicensableFeatures->gridLicensableFeatures[i].featureCode;
// Save product name of enabled feature
strncpy(ctk_manage_grid_license->productName,
@@ -1155,9 +1149,9 @@ static void get_licensable_feature_information(gpointer user_data)
sizeof(ctk_manage_grid_license->productName) - 1);
ctk_manage_grid_license->productName[sizeof(ctk_manage_grid_license->productName) - 1] = '\0';
}
- else if (gridLicensableFeatures->gridLicensableFeatures[i].featureState == 0) {
+ else if (gridLicensableFeatures->gridLicensableFeatures[i].featureEnabled == 0) {
if ((ctk_manage_grid_license->feature_type == gridLicensableFeatures->gridLicensableFeatures[i].featureCode) &&
- !licensedFeatureCode) {
+ !enabledFeatureCode) {
// Save product name of feature applied from UI
strncpy(ctk_manage_grid_license->productName,
gridLicensableFeatures->gridLicensableFeatures[i].productName,
diff --git a/src/gtk+-2.x/ctkgridlicense.h b/src/gtk+-2.x/ctkgridlicense.h
index 45c5bf6..ed9ad0f 100644
--- a/src/gtk+-2.x/ctkgridlicense.h
+++ b/src/gtk+-2.x/ctkgridlicense.h
@@ -2,7 +2,7 @@
* nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
* and Linux systems.
*
- * Copyright (C) 2019 NVIDIA Corporation.
+ * Copyright (C) 2020 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,
@@ -87,7 +87,6 @@ typedef enum
{
NV_GRID_UNLICENSED_VGPU = 0,
NV_GRID_UNLICENSED_VAPP,
- NV_GRID_UNLICENSED_FEATURE_SELECTED,
NV_GRID_LICENSE_STATUS_ACQUIRED,
NV_GRID_LICENSE_STATUS_REQUESTING,
NV_GRID_LICENSE_STATUS_FAILED,
diff --git a/src/gtk+-2.x/ctkgvi.c b/src/gtk+-2.x/ctkgvi.c
deleted file mode 100644
index d30167b..0000000
--- a/src/gtk+-2.x/ctkgvi.c
+++ /dev/null
@@ -1,806 +0,0 @@
-/*
- * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
- * and Linux systems.
- *
- * Copyright (C) 2009 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,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses>.
- */
-
-#include <stdlib.h>
-#include <string.h>
-
-#include <gtk/gtk.h>
-#include <NvCtrlAttributes.h>
-
-#include "msg.h"
-
-#include "ctkutils.h"
-#include "ctkhelp.h"
-#include "ctkgvo.h"
-#include "ctkgvi.h"
-#include "ctkgpu.h"
-#include "ctkbanner.h"
-#include "ctkdropdownmenu.h"
-
-#define DEFAULT_UPDATE_VIDEO_FORMAT_INFO_TIME_INTERVAL 1000
-
-static gboolean update_sdi_input_info(gpointer);
-
-GType ctk_gvi_get_type(void)
-{
- static GType ctk_gvi_type = 0;
-
- if (!ctk_gvi_type) {
- static const GTypeInfo ctk_gvi_info = {
- sizeof (CtkGviClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- NULL, /* constructor */
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (CtkGvi),
- 0, /* n_preallocs */
- NULL, /* instance_init */
- NULL /* value_table */
- };
-
- ctk_gvi_type =
- g_type_register_static(GTK_TYPE_VBOX, "CtkGvi",
- &ctk_gvi_info, 0);
- }
-
- return ctk_gvi_type;
-
-} /* ctk_gvi_get_type() */
-
-static const GvioFormatName samplingFormatNames[] = {
- { NV_CTRL_GVI_COMPONENT_SAMPLING_4444, "4:4:4:4"},
- { NV_CTRL_GVI_COMPONENT_SAMPLING_4224, "4:2:2:4"},
- { NV_CTRL_GVI_COMPONENT_SAMPLING_444, "4:4:4" },
- { NV_CTRL_GVI_COMPONENT_SAMPLING_422, "4:2:2" },
- { NV_CTRL_GVI_COMPONENT_SAMPLING_420, "4:2:0" },
- { -1, NULL },
-};
-
-static const GvioFormatName bitFormatNames[] = {
- { NV_CTRL_GVI_BITS_PER_COMPONENT_8, "8 bpc" },
- { NV_CTRL_GVI_BITS_PER_COMPONENT_10, "10 bpc"},
- { NV_CTRL_GVI_BITS_PER_COMPONENT_12, "12 bpc"},
- { -1, NULL },
-};
-
-static const GvioFormatName colorSpaceFormatNames[] = {
- { NV_CTRL_GVI_COLOR_SPACE_GBR, "GBR" },
- { NV_CTRL_GVI_COLOR_SPACE_GBRA, "GBRA" },
- { NV_CTRL_GVI_COLOR_SPACE_GBRD, "GBRD" },
- { NV_CTRL_GVI_COLOR_SPACE_YCBCR, "YCbCr" },
- { NV_CTRL_GVI_COLOR_SPACE_YCBCRA, "YCbCrA"},
- { NV_CTRL_GVI_COLOR_SPACE_YCBCRD, "YCbCrD"},
- { -1, NULL },
-};
-
-extern const GvioFormatName videoFormatNames[];
-
-
-static gboolean update_sdi_input_info(gpointer user_data);
-
-/*
- * ctk_gvio_get_format_name() - retrun name of format.
- */
-static const char *ctk_gvio_get_format_name(const GvioFormatName *formatTable,
- const gint format)
-{
- int i;
- for (i = 0; formatTable[i].name; i++) {
- if (formatTable[i].format == format) {
- return formatTable[i].name;
- }
- }
- return "Unknown";
-}
-
-
-
-/*
- * update_sdi_input_info() - Update SDI input information.
- */
-
-typedef struct {
- int video_format;
- int component_sampling;
- int color_space;
- int bpc;
- int link_id;
- int smpte352_id;
-} ChannelInfo;
-
-
-static void query_channel_info(CtkGvi *ctk_gvi, int jack, int channel, ChannelInfo *channel_info)
-{
- CtrlTarget *ctrl_target = ctk_gvi->ctrl_target;
- gint ret;
- unsigned int jack_channel = ((channel & 0xFFFF) << 16);
- jack_channel |= (jack & 0xFFFF);
-
-
- ret = NvCtrlGetDisplayAttribute(ctrl_target,
- jack_channel,
- NV_CTRL_GVIO_DETECTED_VIDEO_FORMAT,
- &(channel_info->video_format));
- if (ret != NvCtrlSuccess) {
- channel_info->video_format = NV_CTRL_GVIO_VIDEO_FORMAT_NONE;
- }
-
- ret = NvCtrlGetDisplayAttribute(ctrl_target,
- jack_channel,
- NV_CTRL_GVI_DETECTED_CHANNEL_COMPONENT_SAMPLING,
- &(channel_info->component_sampling));
- if (ret != NvCtrlSuccess) {
- channel_info->component_sampling =
- NV_CTRL_GVI_COMPONENT_SAMPLING_UNKNOWN;
- }
-
- ret = NvCtrlGetDisplayAttribute(ctrl_target,
- jack_channel,
- NV_CTRL_GVI_DETECTED_CHANNEL_COLOR_SPACE,
- &(channel_info->color_space));
- if (ret != NvCtrlSuccess) {
- channel_info->color_space = NV_CTRL_GVI_COLOR_SPACE_UNKNOWN;
- }
-
- ret = NvCtrlGetDisplayAttribute(ctrl_target,
- jack_channel,
- NV_CTRL_GVI_DETECTED_CHANNEL_BITS_PER_COMPONENT,
- &(channel_info->bpc));
- if (ret != NvCtrlSuccess) {
- channel_info->bpc = NV_CTRL_GVI_BITS_PER_COMPONENT_UNKNOWN;
- }
-
- ret = NvCtrlGetDisplayAttribute(ctrl_target,
- jack_channel,
- NV_CTRL_GVI_DETECTED_CHANNEL_LINK_ID,
- &(channel_info->link_id));
- if (ret != NvCtrlSuccess) {
- channel_info->link_id = NV_CTRL_GVI_LINK_ID_UNKNOWN;
- }
-
- ret = NvCtrlGetDisplayAttribute(ctrl_target,
- jack_channel,
- NV_CTRL_GVI_DETECTED_CHANNEL_SMPTE352_IDENTIFIER,
- &(channel_info->smpte352_id));
- if (ret != NvCtrlSuccess) {
- channel_info->smpte352_id = 0x0;
- }
-}
-
-
-static void update_sdi_input_info_simple(CtkGvi *ctk_gvi)
-{
- GtkBox *vbox = GTK_BOX(ctk_gvi->input_info_vbox);
- GtkWidget *label;
- gchar *label_str;
- gint jack;
- gint channel;
- const char *vidfmt_str;
- GtkWidget *box = NULL;
-
-
- /* If not showing detailed information,
- * Show single entry for active jack/channel pairs as:
- *
- * Jack #, Channel #: VIDEO FORMAT
- */
-
- for (jack = 0; jack < ctk_gvi->num_jacks; jack++) {
- ChannelInfo channel_infos[ctk_gvi->max_channels_per_jack];
- ChannelInfo *channel_info;
- int num_active_channels = 0;
- int show_channel = 0; /* When 0 or 1 active channel detected */
-
- /* Get information for each channel in the jack. */
- for (channel = 0; channel < ctk_gvi->max_channels_per_jack;
- channel++) {
-
- channel_info = channel_infos + channel;
- query_channel_info(ctk_gvi, jack, channel, channel_info);
- if (channel_info->video_format != NV_CTRL_GVIO_VIDEO_FORMAT_NONE) {
- show_channel = channel;
- num_active_channels++;
- }
- }
-
- /* Populate the info table */
-
- if (num_active_channels > 1) {
- box = gtk_vbox_new(FALSE, 0);
- gtk_box_pack_start(vbox, box, FALSE, FALSE, 0);
-
- label_str = g_strdup_printf("Jack %d:", jack+1);
- label = gtk_label_new(label_str);
- g_free(label_str);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);
- }
-
- for (channel = 0; channel < ctk_gvi->max_channels_per_jack;
- channel++) {
- channel_info = channel_infos + channel;
-
- vidfmt_str = ctk_gvio_get_format_name(videoFormatNames,
- channel_info->video_format);
-
- if (num_active_channels <= 1) {
- if (channel != show_channel) continue;
- label_str = g_strdup_printf("Jack %d: %s", jack+1, vidfmt_str);
- label = gtk_label_new(label_str);
- g_free(label_str);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_box_pack_start(vbox, label, FALSE, FALSE, 0);
-
- } else {
- label_str = g_strdup_printf("Channel %d: %s",
- channel+1, vidfmt_str);
- label = gtk_label_new(label_str);
- g_free(label_str);
- gtk_misc_set_padding(GTK_MISC(label), 5, 0);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);
- }
- }
- }
-}
-
-
-static void jack_channel_changed(GtkWidget *widget,
- gpointer user_data)
-{
- CtkGvi *ctk_gvi = CTK_GVI(user_data);
- CtkDropDownMenu *menu = CTK_DROP_DOWN_MENU(widget);
- gint idx;
-
- /* Track new selection */
- idx = ctk_drop_down_menu_get_current_value(menu);
-
- ctk_gvi->cur_jack_channel = ctk_gvi->jack_channel_table[idx];
-
- update_sdi_input_info(ctk_gvi);
-}
-
-
-static GtkWidget *create_jack_channel_menu(CtkGvi *ctk_gvi)
-{
- CtkDropDownMenu *menu;
- gint idx;
- gchar *label_str;
- gint jack;
- gint channel;
- unsigned int jack_channel;
- gint selected_idx = 0;
-
- /* Create the menu */
-
- menu = (CtkDropDownMenu *)
- ctk_drop_down_menu_new(CTK_DROP_DOWN_MENU_FLAG_READONLY);
-
- /* Just show all jack/channel pairs in dropdown */
-
- idx = 0;
- for (jack = 0; jack < ctk_gvi->num_jacks; jack++) {
- for (channel = 0; channel < ctk_gvi->max_channels_per_jack;
- channel++) {
-
- jack_channel = ((channel & 0xFFFF) << 16);
- jack_channel |= (jack & 0xFFFF);
-
-
- label_str = g_strdup_printf("Jack %d, Channel %d",
- jack+1, channel+1);
- ctk_drop_down_menu_append_item(menu, label_str, idx);
- g_free(label_str);
-
- ctk_gvi->jack_channel_table[idx] = jack_channel;
-
- if (jack_channel == ctk_gvi->cur_jack_channel) {
- selected_idx = idx;
- }
-
- idx++;
- }
- }
-
- ctk_drop_down_menu_set_current_value(menu, selected_idx);
-
- g_signal_connect(G_OBJECT(menu), "changed",
- G_CALLBACK(jack_channel_changed),
- (gpointer) ctk_gvi);
-
- return GTK_WIDGET(menu);
-}
-
-
-static void update_sdi_input_info_all(CtkGvi *ctk_gvi)
-{
- GtkBox *vbox = GTK_BOX(ctk_gvi->input_info_vbox);
- GtkWidget *box;
- GtkWidget *label;
- gchar *label_str;
- GtkWidget *table;
- gint jack;
- gint channel;
- const char *str;
-
- ChannelInfo channel_info;
-
- jack = ctk_gvi->cur_jack_channel & 0xFFFF;
- channel = (ctk_gvi->cur_jack_channel >> 16) & 0xFFFF;
-
- query_channel_info(ctk_gvi, jack, channel, &channel_info);
-
- box = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(vbox), box, FALSE, FALSE, 0);
-
- table = gtk_table_new(6, 2, FALSE);
- gtk_table_set_row_spacings(GTK_TABLE(table), 5);
- gtk_table_set_col_spacings(GTK_TABLE(table), 5);
-
- gtk_box_pack_start(GTK_BOX(box), table, FALSE, FALSE, 0);
-
- /* Show channel's information in table format */
-
- label = gtk_label_new("Video Format:");
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1);
-
- str = ctk_gvio_get_format_name(videoFormatNames,
- channel_info.video_format);
- label_str = g_strdup_printf("%s", str);
- label = gtk_label_new(label_str);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 0, 1);
- g_free(label_str);
-
-
- label = gtk_label_new("Component Sampling:");
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2);
-
- str = ctk_gvio_get_format_name(samplingFormatNames,
- channel_info.component_sampling);
- label_str = g_strdup_printf("%s", str);
- label = gtk_label_new(label_str);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 1, 2);
- g_free(label_str);
-
-
- label = gtk_label_new("Color Space:");
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 2, 3);
-
- str = ctk_gvio_get_format_name(colorSpaceFormatNames,
- channel_info.color_space);
- label_str = g_strdup_printf("%s", str);
- label = gtk_label_new(label_str);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 2, 3);
- g_free(label_str);
-
-
- label = gtk_label_new("Bits Per Component:");
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 3, 4);
-
- str = ctk_gvio_get_format_name(bitFormatNames,
- channel_info.bpc);
- label_str = g_strdup_printf("%s", str);
- label = gtk_label_new(label_str);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 3, 4);
- g_free(label_str);
-
-
- label = gtk_label_new("Link ID:");
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 4, 5);
-
- if (channel_info.link_id == NV_CTRL_GVI_LINK_ID_UNKNOWN) {
- label_str = g_strdup_printf("Unknown");
- } else {
- label_str = g_strdup_printf("%d", channel_info.link_id);
- }
- label = gtk_label_new(label_str);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 4, 5);
- g_free(label_str);
-
- label = gtk_label_new("SMPTE 352 Payload Identifier:");
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 5, 6);
-
- label_str = g_strdup_printf("0x%08x",
- (unsigned int) channel_info.smpte352_id);
- label = gtk_label_new(label_str);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 5, 6);
- g_free(label_str);
-}
-
-
-static gboolean update_sdi_input_info(gpointer user_data)
-{
- CtkGvi *ctk_gvi = CTK_GVI(user_data);
- gboolean show_detailed_info;
-
- show_detailed_info =
- gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
- (ctk_gvi->show_detailed_info_btn));
-
- /* Dump out the old list */
-
- ctk_empty_container(ctk_gvi->input_info_vbox);
-
- if (!show_detailed_info) {
- gtk_widget_hide(GTK_WIDGET(ctk_gvi->jack_channel_omenu));
- update_sdi_input_info_simple(ctk_gvi);
- } else {
- gtk_widget_show_all(GTK_WIDGET(ctk_gvi->jack_channel_omenu));
- update_sdi_input_info_all(ctk_gvi);
- }
-
- gtk_widget_show_all(ctk_gvi->input_info_vbox);
- return TRUE;
-}
-
-
-static void show_detailed_info_button_toggled(GtkWidget *button,
- gpointer user_data)
-{
- CtkGvi *ctk_gvi = CTK_GVI(user_data);
- gboolean active;
-
- active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button));
-
- if (active) {
- gtk_button_set_label(GTK_BUTTON(button), "Show Condensed Input Info");
- } else {
- gtk_button_set_label(GTK_BUTTON(button), "Show Detailed Input Info");
- }
-
- update_sdi_input_info(ctk_gvi);
-}
-
-static gchar* gpu_name_string(gint gpu_id, CtrlSystem *system)
-{
- gchar *gpu_name;
- CtrlTarget *ctrl_target;
-
- ctrl_target = NvCtrlGetTarget(system, GPU_TARGET, gpu_id);
-
- if (ctrl_target == NULL) {
- gpu_name = g_strdup_printf("None");
- } else {
- gpu_name = create_gpu_name_string(ctrl_target);
- }
-
- return gpu_name;
-}
-
-static void bound_gpu_changed(GObject *object,
- CtrlEvent *event,
- gpointer user_data)
-{
- CtkGvi *ctk_gvi = (CtkGvi *) user_data;
- gchar *gpu_name;
-
- if (event->type != CTRL_EVENT_TYPE_INTEGER_ATTRIBUTE) {
- return;
- }
-
- gpu_name = gpu_name_string(event->int_attr.value,
- ctk_gvi->ctk_config->pCtrlSystem);
-
- gtk_label_set_label(GTK_LABEL(ctk_gvi->gpu_name), gpu_name);
-}
-
-GtkWidget* ctk_gvi_new(CtrlTarget *ctrl_target,
- CtkConfig *ctk_config,
- CtkEvent *ctk_event)
-{
- GObject *object;
- CtkGvi *ctk_gvi;
- GtkWidget *hbox, *vbox, *hsep, *hseparator, *table, *button;
- GtkWidget *banner, *label;
- gchar *bus, *pci_bus_id, *irq, *gpu_name;
- int tmp;
- ReturnStatus ret;
- gchar *firmware_version;
- gchar *s;
-
- /* make sure we have a target */
-
- g_return_val_if_fail((ctrl_target != NULL) &&
- (ctrl_target->h != NULL), NULL);
-
- /*
- * get the static data that we will display below
- */
-
- /* Firmware Version */
-
- ret = NvCtrlGetStringAttribute(ctrl_target,
- NV_CTRL_STRING_GVIO_FIRMWARE_VERSION,
- &firmware_version);
- if (ret != NvCtrlSuccess) {
- firmware_version = g_strdup("Unable to determine");
- }
-
- /* Get Bus related information */
-
- get_bus_type_str(ctrl_target, &bus);
- pci_bus_id = get_bus_id_str(ctrl_target);
-
- /* NV_CTRL_IRQ */
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_IRQ, &tmp);
- if (ret != NvCtrlSuccess) {
- irq = NULL;
- } else {
- irq = g_strdup_printf("%d", tmp);
- }
-
- /* NV_CTRL_GVI_BOUND_GPU */
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVI_BOUND_GPU, &tmp);
- if (ret != NvCtrlSuccess) {
- tmp = -1;
- }
- gpu_name = gpu_name_string(tmp, ctk_config->pCtrlSystem);
-
- /* create the CtkGvi object */
-
- object = g_object_new(CTK_TYPE_GVI, NULL);
-
- ctk_gvi = CTK_GVI(object);
- ctk_gvi->ctrl_target = ctrl_target;
- ctk_gvi->ctk_config = ctk_config;
-
- /* Query static GVI properties */
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVI_NUM_JACKS,
- &(ctk_gvi->num_jacks));
- if (ret != NvCtrlSuccess) {
- ctk_gvi->num_jacks = 0;
- }
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVI_MAX_CHANNELS_PER_JACK,
- &(ctk_gvi->max_channels_per_jack));
- if (ret != NvCtrlSuccess) {
- ctk_gvi->max_channels_per_jack = 0;
- }
-
- /* set container properties for the CtkGvi widget */
-
- gtk_box_set_spacing(GTK_BOX(ctk_gvi), 5);
-
- /* banner */
-
- banner = ctk_banner_image_new(BANNER_ARTWORK_GVI);
- gtk_box_pack_start(GTK_BOX(object), banner, FALSE, FALSE, 0);
-
-
- vbox = gtk_vbox_new(FALSE, 5);
- gtk_box_pack_start(GTK_BOX(object), vbox, TRUE, TRUE, 0);
-
- hbox = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
-
- label = gtk_label_new("GVI Device Information");
- gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
-
- hseparator = gtk_hseparator_new();
- gtk_box_pack_start(GTK_BOX(hbox), hseparator, TRUE, TRUE, 5);
-
- table = gtk_table_new(8, 2, FALSE);
- gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
- gtk_table_set_row_spacings(GTK_TABLE(table), 3);
- gtk_table_set_col_spacings(GTK_TABLE(table), 15);
- gtk_container_set_border_width(GTK_CONTAINER(table), 5);
-
- add_table_row(table, 0,
- 0, 0.5, "Firmware Version:",
- 0, 0.5, firmware_version);
- /* spacing */
- add_table_row(table, 2,
- 0, 0.5, "Bus Type:",
- 0, 0.5, bus);
- add_table_row(table, 3,
- 0, 0.5, "Bus ID:",
- 0, 0.5, pci_bus_id);
- /* spacing */
- add_table_row(table, 5,
- 0, 0.5, "IRQ:",
- 0, 0.5, irq);
-
- label = gtk_label_new("Bound GPU:");
- gtk_label_set_selectable(GTK_LABEL(label), TRUE);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 7, 8,
- GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
- label = gtk_label_new(gpu_name);
- gtk_label_set_selectable(GTK_LABEL(label), TRUE);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach(GTK_TABLE(table), label, 1, 2, 7, 8,
- GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
- ctk_gvi->gpu_name = label;
-
- g_free(firmware_version);
- g_free(bus);
- g_free(pci_bus_id);
- g_free(irq);
- g_free(gpu_name);
-
-
- hbox = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
-
- label = gtk_label_new("Input Information");
- gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
-
- hsep = gtk_hseparator_new();
- gtk_box_pack_start(GTK_BOX(hbox), hsep, TRUE, TRUE, 5);
-
- /* Create look up table to store jack chanel */
- if (ctk_gvi->jack_channel_table) {
- free(ctk_gvi->jack_channel_table);
- }
- ctk_gvi->jack_channel_table =
- calloc(ctk_gvi->max_channels_per_jack * ctk_gvi->num_jacks,
- sizeof(unsigned int));
-
- /* Jack+Channel selection dropdown (hidden in condensed view) */
-
- ctk_gvi->jack_channel_omenu = create_jack_channel_menu(ctk_gvi);
- gtk_box_pack_start(GTK_BOX(vbox),
- ctk_gvi->jack_channel_omenu, FALSE, FALSE, 0);
-
- /* Jack input info box */
-
- ctk_gvi->input_info_vbox = gtk_vbox_new(FALSE, 10);
- gtk_container_set_border_width(GTK_CONTAINER(ctk_gvi->input_info_vbox), 5);
- gtk_box_pack_start(GTK_BOX(vbox),
- ctk_gvi->input_info_vbox, FALSE, FALSE, 0);
-
- /* Register a timer callback to update the video format info */
- s = g_strdup_printf("Graphics Video In (GVI %d)",
- NvCtrlGetTargetId(ctrl_target));
-
- ctk_config_add_timer(ctk_gvi->ctk_config,
- DEFAULT_UPDATE_VIDEO_FORMAT_INFO_TIME_INTERVAL,
- s,
- (GSourceFunc) update_sdi_input_info,
- (gpointer) ctk_gvi);
- g_free(s);
-
- /* Condensed/Detailed view toggle button */
-
- button = gtk_toggle_button_new_with_label("Show Detailed Input Info");
- ctk_gvi->show_detailed_info_btn = button;
-
- hbox = gtk_hbox_new(FALSE, 5);
-
- gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 5);
- gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
-
- g_signal_connect(G_OBJECT(button), "toggled",
- G_CALLBACK(show_detailed_info_button_toggled),
- G_OBJECT(ctk_gvi));
-
- g_signal_connect(G_OBJECT(ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVI_BOUND_GPU),
- G_CALLBACK(bound_gpu_changed),
- (gpointer) ctk_gvi);
-
- gtk_widget_show_all(GTK_WIDGET(ctk_gvi));
-
- update_sdi_input_info(ctk_gvi);
-
- return GTK_WIDGET(ctk_gvi);
-}
-
-GtkTextBuffer *ctk_gvi_create_help(GtkTextTagTable *table,
- CtkGvi *ctk_gvi)
-{
- GtkTextIter i;
- GtkTextBuffer *b;
-
- b = gtk_text_buffer_new(table);
-
- gtk_text_buffer_get_iter_at_offset(b, &i, 0);
-
- ctk_help_title(b, &i, "GVI Device Information Help");
- ctk_help_para(b, &i, "This page in the NVIDIA "
- "X Server Control Panel describes basic "
- "information about the Graphics Video In "
- "(GVI) device.");
-
- ctk_help_heading(b, &i, "Firmware Version");
- ctk_help_para(b, &i, "The Firmware Version reports the version "
- "of the firmware running on the GVI device.");
-
- ctk_help_heading(b, &i, "Bus Type");
- ctk_help_para(b, &i, "This is the bus type which is "
- "used to connect the NVIDIA GVI device to the rest of "
- "your computer; possible values are AGP, PCI, "
- "PCI Express and Integrated.");
-
- ctk_help_heading(b, &i, "Bus ID");
- ctk_help_para(b, &i, "This is the GVI device's PCI identification string, "
- "reported in the form 'bus:device:function'. It uniquely "
- "identifies the GVI device's location in the host system.");
-
- ctk_help_heading(b, &i, "IRQ");
- ctk_help_para(b, &i, "This is the interrupt request line assigned to "
- "this GVI device.");
-
- ctk_help_heading(b, &i, "Bound GPU");
- ctk_help_para(b, &i, "An OpenGL application can bind a GVI device to a "
- "GPU using the GL_NV_video_capture OpenGL extension. The "
- "Bound GPU field reports if an OpenGL application has "
- "currently bound this GVI device to a GPU.");
-
- ctk_help_heading(b, &i, "Input Information");
- ctk_help_para(b, &i, "This section shows the detected video format(s) on "
- "each jack of the GVI device. When condensed mode is "
- "selected, the detected video format is shown for each "
- "jack (and channel). When detailed mode is selected, "
- "information pertaining to the selected jack is reported. "
- "Note that the GVI device can only detect the following "
- "information if the incoming signal has a non-zero SMPTE "
- "352 payload identifier, which not all SDI devices provide.");
-
- ctk_help_para(b, &i, "Video Format: The detected SMPTE video format.");
- ctk_help_para(b, &i, "Component Sampling: The detected composition of the "
- "channel.");
- ctk_help_para(b, &i, "Color Space: The detected color space.");
- ctk_help_para(b, &i, "Bites Per Component: The detected number of bits "
- "per component.");
- ctk_help_para(b, &i, "Link ID: The detected link ID of the channel.");
-
- ctk_help_finish(b);
-
- return b;
-}
-
-void ctk_gvi_start_timer(GtkWidget *widget)
-{
- CtkGvi *ctk_gvi = CTK_GVI(widget);
-
- /* Start the GVI timer */
-
- ctk_config_start_timer(ctk_gvi->ctk_config,
- (GSourceFunc) update_sdi_input_info,
- (gpointer) ctk_gvi);
-}
-
-void ctk_gvi_stop_timer(GtkWidget *widget)
-{
- CtkGvi *ctk_gvi = CTK_GVI(widget);
-
- /* Stop the GVI timer */
-
- ctk_config_stop_timer(ctk_gvi->ctk_config,
- (GSourceFunc) update_sdi_input_info,
- (gpointer) ctk_gvi);
-}
diff --git a/src/gtk+-2.x/ctkgvi.h b/src/gtk+-2.x/ctkgvi.h
deleted file mode 100644
index fba7469..0000000
--- a/src/gtk+-2.x/ctkgvi.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
- * and Linux systems.
- *
- * Copyright (C) 2009 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,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses>.
- */
-
-#ifndef __CTK_GVI_H__
-#define __CTK_GVI_H__
-
-#include "ctkevent.h"
-#include "ctkconfig.h"
-
-G_BEGIN_DECLS
-
-#define CTK_TYPE_GVI (ctk_gvi_get_type())
-
-#define CTK_GVI(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), CTK_TYPE_GVI, CtkGvi))
-
-#define CTK_GVI_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), CTK_TYPE_GVI, CtkGviClass))
-
-#define CTK_IS_GVI(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CTK_TYPE_GVI))
-
-#define CTK_IS_GVI_CLASS(class) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), CTK_TYPE_GVI))
-
-#define CTK_GVI_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), CTK_TYPE_GVI, CtkGviClass))
-
-
-typedef struct _CtkGvi CtkGvi;
-typedef struct _CtkGviClass CtkGviClass;
-
-struct _CtkGvi
-{
- GtkVBox parent;
-
- CtrlTarget *ctrl_target;
- CtkConfig *ctk_config;
-
- int num_jacks;
- int max_channels_per_jack;
-
- GtkWidget *gpu_name;
-
- GtkWidget *jack_channel_omenu;
-
- GtkWidget *input_info_vbox;
-
- GtkWidget *show_detailed_info_btn;
- unsigned int cur_jack_channel;
- unsigned int *jack_channel_table;
-};
-
-struct _CtkGviClass
-{
- GtkVBoxClass parent_class;
-};
-
-GType ctk_gvi_get_type (void) G_GNUC_CONST;
-GtkWidget* ctk_gvi_new (CtrlTarget *, CtkConfig *, CtkEvent *);
-GtkTextBuffer* ctk_gvi_create_help (GtkTextTagTable *, CtkGvi *);
-
-void ctk_gvi_start_timer (GtkWidget *);
-void ctk_gvi_stop_timer (GtkWidget *);
-
-G_END_DECLS
-
-#endif /* __CTK_GVI_H__ */
diff --git a/src/gtk+-2.x/ctkgvo-banner.c b/src/gtk+-2.x/ctkgvo-banner.c
deleted file mode 100644
index 4a34767..0000000
--- a/src/gtk+-2.x/ctkgvo-banner.c
+++ /dev/null
@@ -1,917 +0,0 @@
-/*
- * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
- * and Linux systems.
- *
- * Copyright (C) 2004 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,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses>.
- */
-
-/*
- * The CtkGvoBanner widget is in charge of displaying the GVO Banner image.
- * The LEDs are drawn based on the state currently set by the
- * ctk_gvo_banner_update_video_output() and
- * ctk_gvo_banner_update_video_input() functions. It is the caller's
- * job to set the appropriate state so that the banner can be drawn correctly.
- */
-
-#include <gtk/gtk.h>
-#include <string.h>
-
-#include "NvCtrlAttributes.h"
-
-#include "ctkhelp.h"
-#include "ctkgvo-banner.h"
-#include "ctkutils.h"
-#include "ctkbanner.h"
-
-#include "msg.h"
-
-
-
-/* values for controlling LED state */
-
-#define GVO_LED_VID_OUT_NOT_IN_USE 0
-#define GVO_LED_VID_OUT_HD_MODE 1
-#define GVO_LED_VID_OUT_SD_MODE 2
-
-#define GVO_LED_SDI_SYNC_NONE 0
-#define GVO_LED_SDI_SYNC_HD 1
-#define GVO_LED_SDI_SYNC_SD 2
-#define GVO_LED_SDI_SYNC_ERROR 3
-
-#define GVO_LED_COMP_SYNC_NONE 0
-#define GVO_LED_COMP_SYNC_SYNC 1
-
-/* LED colors */
-
-#define LED_GREY 0
-#define LED_GREEN 1
-#define LED_YELLOW 2
-#define LED_RED 3
-
-/* How often the LEDs in the banner should be updated */
-
-#define UPDATE_GVO_BANNER_TIME_INTERVAL 200
-#define DEFAULT_GVO_PROBE_TIME_INTERVAL 1000
-
-
-
-
-/* Position of LEDs relative to the SDI image, used for drawing LEDs */
-
-static int __led_pos_x[] = { 74, 101, 128, 156 }; // From sdi.png
-static int __led_pos_y = 36; // From sdi.png
-
-
-
-/* local prototypes */
-
-static void composite_callback(CtkBanner *ctk_banner, void *data);
-
-static gboolean update_gvo_banner_led_images(gpointer data);
-static gboolean update_gvo_banner_led_images_shared_sync_bnc(gpointer data);
-
-static void update_gvo_banner_led_state(CtkGvoBanner *ctk_gvo_banner);
-
-static void gvo_event_received(GObject *object,
- CtrlEvent *event,
- gpointer user_data);
-
-static void ctk_gvo_banner_class_init(CtkGvoBannerClass *ctk_object_class);
-static void ctk_gvo_banner_finalize(GObject *object);
-
-
-
-/*
- * ctk_gvo_banner_get_type() - Returns the GType for a CtkGvoBanner object
- */
-
-GType ctk_gvo_banner_get_type(void)
-{
- static GType ctk_gvo_banner_type = 0;
-
- if (!ctk_gvo_banner_type) {
- static const GTypeInfo ctk_gvo_banner_info = {
- sizeof (CtkGvoBannerClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) ctk_gvo_banner_class_init, /* class_init, */
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (CtkGvoBanner),
- 0, /* n_preallocs */
- NULL, /* instance_init */
- NULL /* value_table */
- };
-
- ctk_gvo_banner_type =
- g_type_register_static(GTK_TYPE_VBOX, "CtkGvoBanner",
- &ctk_gvo_banner_info, 0);
- }
-
- return ctk_gvo_banner_type;
-
-} /* ctk_gvo_banner_get_type() */
-
-
-
-static void ctk_gvo_banner_class_init(CtkGvoBannerClass *ctk_object_class)
-{
- GObjectClass *gobject_class = (GObjectClass *)ctk_object_class;
- gobject_class->finalize = ctk_gvo_banner_finalize;
-}
-
-
-
-static void ctk_gvo_banner_finalize(GObject *object)
-{
- CtkGvoBanner *ctk_object = CTK_GVO_BANNER(object);
-
- g_signal_handlers_disconnect_matched(G_OBJECT(ctk_object->ctk_event),
- G_SIGNAL_MATCH_DATA,
- 0,
- 0,
- NULL,
- NULL,
- (gpointer) ctk_object);
-}
-
-
-
-/*
- * ctk_gvo_banner_new() - constructor for the CtkGvoBanner widget
- */
-
-GtkWidget* ctk_gvo_banner_new(CtrlTarget *ctrl_target,
- CtkConfig *ctk_config,
- CtkEvent *ctk_event)
-{
- GObject *object;
- CtkGvoBanner *ctk_gvo_banner;
- ReturnStatus ret;
- gint val;
- gint caps;
-
-
- /* make sure we have a valid target */
-
- g_return_val_if_fail((ctrl_target != NULL) &&
- (ctrl_target->h != NULL), NULL);
-
- /* check if this screen supports GVO */
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_SUPPORTED, &val);
- if ((ret != NvCtrlSuccess) || (val != NV_CTRL_GVO_SUPPORTED_TRUE)) {
- /* GVO not available */
- return NULL;
- }
-
- /* get the GVO capabilities */
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_CAPABILITIES, &caps);
- if (ret != NvCtrlSuccess) {
- return NULL;
- }
-
- /* create the CtkGvoBanner object */
-
- object = g_object_new(CTK_TYPE_GVO_BANNER, NULL);
-
- /* initialize fields in the CtkGvoBanner object */
-
- ctk_gvo_banner = CTK_GVO_BANNER(object);
- ctk_gvo_banner->ctrl_target = ctrl_target;
- ctk_gvo_banner->ctk_config = ctk_config;
- ctk_gvo_banner->ctk_event = ctk_event;
- ctk_gvo_banner->parent_box = NULL;
-
- /* handle GVO devices that share the sync input differently */
-
- ctk_gvo_banner->shared_sync_bnc =
- !!(caps & NV_CTRL_GVO_CAPABILITIES_SHARED_SYNC_BNC);
-
- /* create the banner image */
-
- if (ctk_gvo_banner->shared_sync_bnc) {
- ctk_gvo_banner->image =
- ctk_banner_image_new_with_callback
- (BANNER_ARTWORK_SDI_SHARED_SYNC_BNC,
- composite_callback,
- ctk_gvo_banner);
- } else {
- ctk_gvo_banner->image =
- ctk_banner_image_new_with_callback(BANNER_ARTWORK_SDI,
- composite_callback,
- ctk_gvo_banner);
- }
-
- g_object_ref(ctk_gvo_banner->image);
-
- gtk_box_pack_start(GTK_BOX(ctk_gvo_banner), ctk_gvo_banner->image,
- FALSE, FALSE, 0);
-
- ctk_gvo_banner->ctk_banner = NULL;
-
- /* initialize LED state */
-
- ctk_gvo_banner->state[GVO_BANNER_VID1] = GVO_LED_VID_OUT_NOT_IN_USE;
- ctk_gvo_banner->state[GVO_BANNER_VID2] = GVO_LED_VID_OUT_NOT_IN_USE;
- ctk_gvo_banner->state[GVO_BANNER_SDI] = GVO_LED_SDI_SYNC_NONE;
- ctk_gvo_banner->state[GVO_BANNER_COMP] = GVO_LED_COMP_SYNC_NONE;
-
- ctk_gvo_banner->img[GVO_BANNER_VID1] = LED_GREY;
- ctk_gvo_banner->img[GVO_BANNER_VID2] = LED_GREY;
- ctk_gvo_banner->img[GVO_BANNER_SDI] = LED_GREY;
- ctk_gvo_banner->img[GVO_BANNER_COMP] = LED_GREY;
-
- /* Get the current GVO state */
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_LOCK_OWNER, &val);
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_LOCK_OWNER_NONE;
- }
- ctk_gvo_banner->gvo_lock_owner = val;
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_SYNC_MODE, &val);
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_SYNC_MODE_FREE_RUNNING;
- }
- ctk_gvo_banner->sync_mode = val;
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_SYNC_SOURCE, &val);
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_SYNC_SOURCE_COMPOSITE;
- }
- ctk_gvo_banner->sync_source = val;
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT, &val);
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVIO_VIDEO_FORMAT_NONE;
- }
- ctk_gvo_banner->output_video_format = val;
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_DATA_FORMAT, &val);
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_DATA_FORMAT_R8G8B8_TO_YCRCB444;
- }
- ctk_gvo_banner->output_data_format = val;
-
- /* Update the current LED state */
-
- update_gvo_banner_led_state(ctk_gvo_banner);
-
- /*
- * register a timeout function (directly with glib, not through
- * ctk_config) to update the LEDs
- */
-
- if (ctk_gvo_banner->shared_sync_bnc) {
- g_timeout_add(UPDATE_GVO_BANNER_TIME_INTERVAL,
- update_gvo_banner_led_images_shared_sync_bnc,
- ctk_gvo_banner);
- } else {
- g_timeout_add(UPDATE_GVO_BANNER_TIME_INTERVAL,
- update_gvo_banner_led_images,
- ctk_gvo_banner);
- }
-
- /* Add a timer so we can probe the hardware */
-
- ctk_config_add_timer(ctk_gvo_banner->ctk_config,
- DEFAULT_GVO_PROBE_TIME_INTERVAL,
- "Graphics To Video Probe",
- (GSourceFunc) ctk_gvo_banner_probe,
- (gpointer) ctk_gvo_banner);
-
- /* Listen for events */
-
- g_signal_connect(G_OBJECT(ctk_gvo_banner->ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVO_LOCK_OWNER),
- G_CALLBACK(gvo_event_received),
- (gpointer) ctk_gvo_banner);
-
- g_signal_connect(G_OBJECT(ctk_gvo_banner->ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVO_SYNC_MODE),
- G_CALLBACK(gvo_event_received),
- (gpointer) ctk_gvo_banner);
-
- g_signal_connect(G_OBJECT(ctk_gvo_banner->ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVO_SYNC_SOURCE),
- G_CALLBACK(gvo_event_received),
- (gpointer) ctk_gvo_banner);
-
- g_signal_connect(G_OBJECT(ctk_gvo_banner->ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT),
- G_CALLBACK(gvo_event_received),
- (gpointer) ctk_gvo_banner);
-
- g_signal_connect(G_OBJECT(ctk_gvo_banner->ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVO_DATA_FORMAT),
- G_CALLBACK(gvo_event_received),
- (gpointer) ctk_gvo_banner);
-
- /* show the GVO banner widget */
-
- gtk_widget_show_all(GTK_WIDGET(ctk_gvo_banner));
-
- return GTK_WIDGET(ctk_gvo_banner);
-
-} /* ctk_gvo_banner_new() */
-
-
-
-/*
- * draw_led() - Updates the LED to the given color in the banner's
- * backing pixbuf.
- */
-
-static void draw_led(CtkBanner *ctk_banner, int led, int color) {
-
- /* Which LED to draw */
- int dst_x = ctk_banner->artwork_x +__led_pos_x[led];
- int dst_y = ctk_banner->artwork_y +__led_pos_y;
-
- /* Offset LED color into LED position */
- int offset_x = ctk_banner->artwork_x +__led_pos_x[led] -__led_pos_x[color];
- int offset_y = ctk_banner->artwork_y;
-
- gdk_pixbuf_composite(ctk_banner->artwork.pixbuf, // src
- ctk_banner->back.pixbuf, // dest
- dst_x, // dest_x
- dst_y, // dest_y
- 10, // dest_width
- 10, // dest_height
- offset_x, // offset_x
- offset_y, // offset_y
- 1.0, // scale_x
- 1.0, // scale_y
- GDK_INTERP_BILINEAR, // interp_type
- 255); // overall_alpha
-
-} /* draw_led() */
-
-
-
-/*
- * composite_callback() - Draws all the LEDs to the banner.
- */
-
-static void composite_callback(CtkBanner *ctk_banner, void *data)
-{
- CtkGvoBanner *ctk_gvo_banner = (CtkGvoBanner *) data;
- int i;
- int last_led;
-
- /* Grab the latest banner widget */
- ctk_gvo_banner->ctk_banner = GTK_WIDGET(ctk_banner);
-
- /* Draw the current state */
- last_led = ctk_gvo_banner->shared_sync_bnc ? 3 : 4;
-
- for (i = 0; i < last_led; i++) {
- draw_led(ctk_banner, i, ctk_gvo_banner->img[i]);
- }
-
-} /* composite_callback() */
-
-
-
-/*
- * update_led_image() - Updates the state of an LED and causes and
- * expose event.
- */
-
-static void update_led_image(CtkGvoBanner *banner, int led, int color)
-{
- GtkWidget *ctk_banner = banner->ctk_banner;
- GdkRectangle rec = {0, __led_pos_y, 10, 10};
-
- /* Update the state of the LED */
- banner->img[led] = color;
-
- /* Draw the LED and tell gdk to draw it to the window */
- if (ctk_banner && ctk_widget_get_window(ctk_banner)) {
-
- draw_led(CTK_BANNER(ctk_banner), led, color);
-
- rec.x = CTK_BANNER(ctk_banner)->artwork_x + __led_pos_x[led];
- rec.y = CTK_BANNER(ctk_banner)->artwork_y + __led_pos_y;
- gdk_window_invalidate_rect(ctk_widget_get_window(ctk_banner), &rec, TRUE);
- }
-
-} /* update_led_image() */
-
-
-
-/*
- * update_gvo_banner_led_images() - called by a timer to update the LED images
- * based on current state
- */
-
-static gboolean update_gvo_banner_led_images(gpointer data)
-{
- guint8 old, new;
- CtkGvoBanner *banner = (CtkGvoBanner *) data;
-
- /*
- * we store the flashing state here:
- *
- * 0 == no LED is currently flashing
- * 1 == some LED is flashing; currently "on" (lit)
- * 2 == some LED is flashing; currently "off" (grey)
- *
- * this is used to track the current state, so that we can make
- * all LEDs flash at the same time.
- */
-
- gint flashing = 0;
-
-
- /* Vid 1 out */
-
- old = banner->img[GVO_BANNER_VID1];
-
- if (banner->state[GVO_BANNER_VID1] == GVO_LED_VID_OUT_HD_MODE) {
- new = (old == LED_GREY) ? LED_GREEN: LED_GREY;
- flashing = (new == LED_GREY) ? 2 : 1;
-
- } else if (banner->state[GVO_BANNER_VID1] == GVO_LED_VID_OUT_SD_MODE) {
- new = (old == LED_GREY) ? LED_YELLOW: LED_GREY;
- flashing = (new == LED_GREY) ? 2 : 1;
-
- } else {
- new = LED_GREY;
- }
-
- if (old != new) {
- update_led_image(banner, GVO_BANNER_VID1, new);
- }
-
- /* Vid 2 out */
-
- old = banner->img[GVO_BANNER_VID2];
-
- if (banner->state[GVO_BANNER_VID2] == GVO_LED_VID_OUT_HD_MODE) {
- if (flashing) {
- new = (flashing == 1) ? LED_GREEN: LED_GREY;
- } else {
- new = (old == LED_GREY) ? LED_GREEN: LED_GREY;
- flashing = (new == LED_GREY) ? 2 : 1;
- }
- } else if (banner->state[GVO_BANNER_VID2] == GVO_LED_VID_OUT_SD_MODE) {
- if (flashing) {
- new = (flashing == 1) ? LED_YELLOW: LED_GREY;
- } else {
- new = (old == LED_GREY) ? LED_YELLOW: LED_GREY;
- flashing = (new == LED_GREY) ? 2 : 1;
- }
- } else {
- new = LED_GREY;
- }
-
- if (old != new) {
- update_led_image(banner, GVO_BANNER_VID2, new);
- }
-
- /* SDI sync */
-
- old = banner->img[GVO_BANNER_SDI];
-
- if (banner->state[GVO_BANNER_SDI] == GVO_LED_SDI_SYNC_HD) {
- if (flashing) {
- new = (flashing == 1) ? LED_GREEN : LED_GREY;
- } else {
- new = (banner->img[GVO_BANNER_SDI] == LED_GREY) ?
- LED_GREEN : LED_GREY;
- flashing = (new == LED_GREY) ? 2 : 1;
- }
- } else if (banner->state[GVO_BANNER_SDI] == GVO_LED_SDI_SYNC_SD) {
- if (flashing) {
- new = (flashing == 1) ? LED_YELLOW : LED_GREY;
- } else {
- new = (banner->img[GVO_BANNER_SDI] == LED_GREY) ?
- LED_YELLOW : LED_GREY;
- flashing = (new == LED_GREY) ? 2 : 1;
- }
- } else if (banner->state[GVO_BANNER_SDI] == GVO_LED_SDI_SYNC_ERROR) {
- new = LED_YELLOW;
- } else {
- new = LED_GREY;
- }
-
- if (old != new) {
- update_led_image(banner, GVO_BANNER_SDI, new);
- }
-
- /* COMP sync */
-
- old = banner->img[GVO_BANNER_COMP];
-
- if (banner->state[GVO_BANNER_COMP] == GVO_LED_COMP_SYNC_SYNC) {
- if (flashing) {
- new = (flashing == 1) ? LED_GREEN : LED_GREY;
- } else {
- new = (banner->img[GVO_BANNER_COMP] == LED_GREY) ?
- LED_GREEN : LED_GREY;
- }
- } else {
- new = LED_GREY;
- }
-
- if (old != new) {
- update_led_image(banner, GVO_BANNER_COMP, new);
- }
-
- return TRUE;
-
-} /* update_gvo_banner_led_images() */
-
-
-
-/*
- * update_gvo_banner_led_images_shared_sync_bnc() - called by a timer to
- * update the LED images based on current state for GVO devices that have
- * a shared input sync signal BNC connector.
- */
-
-static gboolean update_gvo_banner_led_images_shared_sync_bnc(gpointer data)
-{
- guint8 old, new;
- CtkGvoBanner *banner = (CtkGvoBanner *) data;
-
- /* Flash is used to make all the LEDs flash at the same time. */
-
- banner->flash = !banner->flash;
-
-
- /* Vid 1 out */
-
- old = banner->img[GVO_BANNER_VID1];
-
- if (banner->state[GVO_BANNER_VID1] != GVO_LED_VID_OUT_NOT_IN_USE) {
- new = banner->flash ? LED_GREEN : LED_GREY;
- } else {
- new = LED_GREY;
- }
-
- if (old != new) {
- update_led_image(banner, GVO_BANNER_VID1, new);
- }
-
- /* Vid 2 out */
-
- old = banner->img[GVO_BANNER_VID2];
-
- if (banner->state[GVO_BANNER_VID2] != GVO_LED_VID_OUT_NOT_IN_USE) {
- new = banner->flash ? LED_GREEN : LED_GREY;
- } else {
- new = LED_GREY;
- }
-
- if (old != new) {
- update_led_image(banner, GVO_BANNER_VID2, new);
- }
-
- /* Sync */
-
- /* For this GVO device both the SDI and Composite sync signals
- * share the same LED. This LED doesn't care about the lock
- * status of the input signal/output video.
- */
-
- old = banner->img[GVO_BANNER_SDI];
-
- if ((banner->sync_mode != NV_CTRL_GVO_SYNC_MODE_FREE_RUNNING) &&
- (((banner->sync_source == NV_CTRL_GVO_SYNC_SOURCE_COMPOSITE) &&
- banner->state[GVO_BANNER_COMP] != GVO_LED_COMP_SYNC_NONE) ||
- ((banner->sync_source == NV_CTRL_GVO_SYNC_SOURCE_SDI) &&
- banner->state[GVO_BANNER_SDI] != GVO_LED_SDI_SYNC_NONE))) {
-
- if (banner->input_video_format != NV_CTRL_GVIO_VIDEO_FORMAT_NONE) {
- /* LED blinks if video format is detected */
- new = banner->flash ? LED_GREEN : LED_GREY;
- } else {
- /* LED is solid green if the input video format is not detected. */
- new = LED_GREEN;
- }
-
- } else {
- new = LED_GREY;
- }
-
- if (old != new) {
- update_led_image(banner, GVO_BANNER_SDI, new);
- }
-
- return TRUE;
-
-} /* update_gvo_banner_led_images_shared_sync_bnc() */
-
-
-
-/*
- * ctk_gvo_banner_update_video_output() - update banner state of the
- * GVO video output LEDs accordingly, based on the current
- * output_video_format and output_data_format.
- */
-
-static void update_video_output_state(CtkGvoBanner *banner,
- gint output_video_format,
- gint output_data_format)
-{
- if (output_video_format == NV_CTRL_GVIO_VIDEO_FORMAT_NONE) {
- banner->state[GVO_BANNER_VID1] = GVO_LED_VID_OUT_NOT_IN_USE;
- banner->state[GVO_BANNER_VID2] = GVO_LED_VID_OUT_NOT_IN_USE;
- } else if ((output_video_format ==
- NV_CTRL_GVIO_VIDEO_FORMAT_487I_59_94_SMPTE259_NTSC) ||
- (output_video_format ==
- NV_CTRL_GVIO_VIDEO_FORMAT_576I_50_00_SMPTE259_PAL)) {
- banner->state[GVO_BANNER_VID1] = GVO_LED_VID_OUT_SD_MODE;
- banner->state[GVO_BANNER_VID2] = GVO_LED_VID_OUT_SD_MODE;
- } else {
- banner->state[GVO_BANNER_VID1] = GVO_LED_VID_OUT_HD_MODE;
- banner->state[GVO_BANNER_VID2] = GVO_LED_VID_OUT_HD_MODE;
- }
-
- if (output_data_format == NV_CTRL_GVO_DATA_FORMAT_R8G8B8_TO_YCRCB422) {
- banner->state[GVO_BANNER_VID2] = GVO_LED_VID_OUT_NOT_IN_USE;
- }
-
-} /* update_video_output_state() */
-
-
-
-/*
- * ctk_gvo_banner_update_video_input() - update banner state of the
- * video input GVO banner LEDs accordingly, based on the current sdi
- * and composite input.
- */
-
-static void update_video_input_state(CtkGvoBanner *banner,
- gint sdi, gint comp)
-{
- if (sdi == NV_CTRL_GVO_SDI_SYNC_INPUT_DETECTED_HD) {
- banner->state[GVO_BANNER_SDI] = GVO_LED_SDI_SYNC_HD;
- } else if (sdi == NV_CTRL_GVO_SDI_SYNC_INPUT_DETECTED_SD) {
- banner->state[GVO_BANNER_SDI] = GVO_LED_SDI_SYNC_SD;
- } else {
- banner->state[GVO_BANNER_SDI] = GVO_LED_SDI_SYNC_NONE;
- }
-
- banner->state[GVO_BANNER_COMP] = comp ?
- GVO_LED_COMP_SYNC_SYNC : GVO_LED_COMP_SYNC_NONE;
-
-} /* update_video_input_state() */
-
-
-
-/*
- * update_gvo_banner_led_state() - Modifies the LED state based on the
- * current GVO state.
- */
-
-static void update_gvo_banner_led_state(CtkGvoBanner *ctk_gvo_banner)
-{
- /* Update input state */
-
- update_video_input_state(ctk_gvo_banner,
- ctk_gvo_banner->sdi_sync_input_detected,
- ctk_gvo_banner->composite_sync_input_detected);
-
- /* Update output state */
-
- if (ctk_gvo_banner->gvo_lock_owner !=
- NV_CTRL_GVO_LOCK_OWNER_NONE) {
- update_video_output_state(ctk_gvo_banner,
- ctk_gvo_banner->output_video_format,
- ctk_gvo_banner->output_data_format);
- } else {
- update_video_output_state(ctk_gvo_banner,
- NV_CTRL_GVIO_VIDEO_FORMAT_NONE,
- ctk_gvo_banner->output_data_format);
- }
-
-} /* update_gvo_banner_led_state() */
-
-
-
-/*
- * ctk_gvo_banner_probe() - query the incoming signal and state of
- * the GVO board.
- */
-
-gint ctk_gvo_banner_probe(gpointer data)
-{
- ReturnStatus ret;
- gint val;
- CtkGvoBanner *ctk_gvo_banner = CTK_GVO_BANNER(data);
- CtrlTarget *ctrl_target = ctk_gvo_banner->ctrl_target;
-
-
- // XXX We could get notified of these (sync source/mode) and
- // not have to probe - i.e., it could be the job of the
- // caller/user of the ctk_gvo_banner widget to notify the
- // banner when these change. We don't however since doing
- // that could be prone to bitrot.
-
- /* query NV_CTRL_GVO_SYNC_MODE */
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_SYNC_MODE, &val);
-
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_SYNC_MODE_FREE_RUNNING;
- }
-
- ctk_gvo_banner->sync_mode = val;
-
-
- /* query NV_CTRL_GVO_SYNC_SOURCE */
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_SYNC_SOURCE, &val);
-
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_SYNC_SOURCE_COMPOSITE;
- }
-
- ctk_gvo_banner->sync_source = val;
-
-
- /* query NV_CTRL_GVIO_DETECTED_VIDEO_FORMAT */
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVIO_DETECTED_VIDEO_FORMAT, &val);
-
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVIO_VIDEO_FORMAT_NONE;
- }
-
- ctk_gvo_banner->input_video_format = val;
-
-
- /* query COMPOSITE_SYNC_INPUT_DETECTED */
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECTED, &val);
-
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECTED_FALSE;
- }
-
- ctk_gvo_banner->composite_sync_input_detected = val;
-
-
- /* query SDI_SYNC_INPUT_DETECTED */
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVO_SDI_SYNC_INPUT_DETECTED, &val);
-
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_SDI_SYNC_INPUT_DETECTED_NONE;
- }
-
- ctk_gvo_banner->sdi_sync_input_detected = val;
-
-
- /* query SYNC_LOCK_STATUS */
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVO_SYNC_LOCK_STATUS, &val);
-
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_SYNC_LOCK_STATUS_UNLOCKED;
- }
-
- ctk_gvo_banner->sync_lock_status = val;
-
-
- /* Update the banner state */
-
- update_gvo_banner_led_state(ctk_gvo_banner);
-
-
- /* Update the banner's parent */
-
- if (ctk_gvo_banner->probe_callback) {
- ctk_gvo_banner->probe_callback(ctk_gvo_banner->probe_callback_data);
- }
-
- return TRUE;
-
-} /* ctk_gvo_banner_probe() */
-
-
-
-/*
- * gvo_event_received() - Handles updating the state of the GVO banner
- * for event-driven NV-CONTROL attributes.
- */
-
-static void gvo_event_received(GObject *object,
- CtrlEvent *event,
- gpointer user_data)
-{
- CtkGvoBanner *ctk_gvo_banner = CTK_GVO_BANNER(user_data);
- gint value;
-
- if (event->type != CTRL_EVENT_TYPE_INTEGER_ATTRIBUTE) {
- return;
- }
-
- value = event->int_attr.value;
-
- switch (event->int_attr.attribute) {
- case NV_CTRL_GVO_SYNC_MODE:
- ctk_gvo_banner->sync_mode = value;
- break;
-
- case NV_CTRL_GVO_SYNC_SOURCE:
- ctk_gvo_banner->sync_source = value;
- break;
-
- case NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT:
- ctk_gvo_banner->output_video_format = value;
- break;
-
- case NV_CTRL_GVO_DATA_FORMAT:
- ctk_gvo_banner->output_data_format = value;
- break;
-
- case NV_CTRL_GVO_LOCK_OWNER:
- ctk_gvo_banner->gvo_lock_owner = value;
- break;
-
- default:
- return;
- }
-
- update_gvo_banner_led_state(ctk_gvo_banner);
-
-} /* gvo_event_recieved() */
-
-
-
-/* ctk_gvo_banner_set_parent() - Sets which parent page owns
- * (is currently displaying) the gvo banner widget.
- */
-
-void ctk_gvo_banner_set_parent(CtkGvoBanner *ctk_gvo_banner,
- GtkWidget *new_parent_box,
- ctk_gvo_banner_probe_callback probe_callback,
- gpointer probe_callback_data)
-{
- /* Repack the banner into the new parent */
-
- if (ctk_gvo_banner->parent_box != new_parent_box) {
-
- if (ctk_gvo_banner->parent_box) {
- gtk_container_remove(GTK_CONTAINER(ctk_gvo_banner->parent_box),
- GTK_WIDGET(ctk_gvo_banner));
- }
-
- if (new_parent_box) {
- gtk_container_add(GTK_CONTAINER(new_parent_box),
- GTK_WIDGET(ctk_gvo_banner));
- }
- }
-
- /* Start/stop the GVO probe */
-
- if (!ctk_gvo_banner->parent_box && new_parent_box) {
-
- ctk_config_start_timer(ctk_gvo_banner->ctk_config,
- (GSourceFunc) ctk_gvo_banner_probe,
- (gpointer) ctk_gvo_banner);
-
- } else if (ctk_gvo_banner->parent_box && !new_parent_box) {
-
- ctk_config_stop_timer(ctk_gvo_banner->ctk_config,
- (GSourceFunc) ctk_gvo_banner_probe,
- (gpointer) ctk_gvo_banner);
- }
-
- /* Keep track of the current banner owner */
-
- ctk_gvo_banner->parent_box = new_parent_box;
-
- ctk_gvo_banner->probe_callback = probe_callback;
- ctk_gvo_banner->probe_callback_data = probe_callback_data;
-
- /* If we are programming a callback, do an initial probe */
-
- if (probe_callback) {
- ctk_gvo_banner_probe((gpointer)(ctk_gvo_banner));
- }
-
-} /* ctk_gvo_banner_set_parent() */
diff --git a/src/gtk+-2.x/ctkgvo-banner.h b/src/gtk+-2.x/ctkgvo-banner.h
deleted file mode 100644
index 86a7b47..0000000
--- a/src/gtk+-2.x/ctkgvo-banner.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
- * and Linux systems.
- *
- * Copyright (C) 2004 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,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses>.
- */
-
-#ifndef __CTK_GVO_BANNER_H__
-#define __CTK_GVO_BANNER_H__
-
-#include "ctkconfig.h"
-#include "ctkevent.h"
-
-G_BEGIN_DECLS
-
-
-#define CTK_TYPE_GVO_BANNER (ctk_gvo_banner_get_type())
-
-#define CTK_GVO_BANNER(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), CTK_TYPE_GVO_BANNER, CtkGvoBanner))
-
-#define CTK_GVO_BANNER_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), CTK_TYPE_GVO_BANNER, CtkGvoBannerClass))
-
-#define CTK_IS_GVO_BANNER(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CTK_TYPE_GVO_BANNER))
-
-#define CTK_IS_GVO_BANNER_CLASS(class) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), CTK_TYPE_GVO_BANNER))
-
-#define CTK_GVO_BANNER_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), CTK_TYPE_GVO_BANNER, CtkGvoBannerClass))
-
-
-
-typedef gint (* ctk_gvo_banner_probe_callback) (gpointer data);
-
-typedef struct _CtkGvoBanner CtkGvoBanner;
-typedef struct _CtkGvoBannerClass CtkGvoBannerClass;
-
-#define GVO_BANNER_VID1 0
-#define GVO_BANNER_VID2 1
-#define GVO_BANNER_SDI 2
-#define GVO_BANNER_COMP 3
-
-struct _CtkGvoBanner
-{
- GtkVBox parent;
-
- CtrlTarget *ctrl_target;
- GtkWidget *parent_box;
- CtkConfig *ctk_config;
- CtkEvent *ctk_event;
-
- gint sync_mode;
- gint sync_source;
- gboolean shared_sync_bnc; // GVO device has single sync BNC
-
- GtkWidget *image; // Image
- GtkWidget *ctk_banner; // CtkBanner widget using the image
-
- gboolean flash; // Used to flash the LEDs at the same time
- guint8 img[4]; // Current color of LEDs
- guint state[4]; // Current state of LEDs
-
- ctk_gvo_banner_probe_callback probe_callback; // Function to call
- gpointer probe_callback_data;
-
- // Other GVO state probed
- gint gvo_lock_owner;
- gint output_video_format;
- gint output_data_format;
- gint input_video_format;
- gint composite_sync_input_detected;
- gint sdi_sync_input_detected;
- gint sync_lock_status;
-};
-
-struct _CtkGvoBannerClass
-{
- GtkVBoxClass parent_class;
-};
-
-
-GType ctk_gvo_banner_get_type (void) G_GNUC_CONST;
-GtkWidget* ctk_gvo_banner_new (CtrlTarget *, CtkConfig *,
- CtkEvent *);
-
-gint ctk_gvo_banner_probe(gpointer data);
-
-void ctk_gvo_banner_set_parent(CtkGvoBanner *ctk_gvo_banner,
- GtkWidget *new_parent_box,
- ctk_gvo_banner_probe_callback probe_callback,
- gpointer probe_callback_data);
-
-G_END_DECLS
-
-#endif /* __CTK_GVO_BANNER_H__*/
diff --git a/src/gtk+-2.x/ctkgvo-csc.c b/src/gtk+-2.x/ctkgvo-csc.c
deleted file mode 100644
index 73b3e27..0000000
--- a/src/gtk+-2.x/ctkgvo-csc.c
+++ /dev/null
@@ -1,1306 +0,0 @@
-/*
- * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
- * and Linux systems.
- *
- * Copyright (C) 2004 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,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses>.
- */
-
-#include <gtk/gtk.h>
-#include <NvCtrlAttributes.h>
-
-#include <string.h>
-
-#include "ctkbanner.h"
-#include "ctkconfig.h"
-#include "ctkhelp.h"
-#include "ctkdropdownmenu.h"
-#include "ctkutils.h"
-
-#include "ctkgvo-csc.h"
-
-#include "msg.h"
-
-/*
- * The CtkGvoCsc widget is used to provide a way for configuring
- * custom Color Space Conversion Matrices, Offsets, and Scale Factors
- * on NVIDIA SDI products. At the top, we have a checkbox that
- * enables overriding the default CSC matrix. If that checkbox is not
- * checked, then everything else on the page is insensitive.
- *
- * When the "override" checkbox is checked, then the user can modify
- * each of the 15 floating point values that comprise the 3x3 matrix,
- * 1x3 offset vector, and 1x3 scale vector.
- *
- * The user can also select from an "Initialization" dropdown menu, to
- * initialize the CSC with any of "ITU-601", "ITU-709", "ITU-177", or
- * "Identity".
- *
- * Finally, the user can select how they want changes to be applied:
- * by default, they have to click the "Apply" button to flush their
- * changes from nvidia-settings out over NV-CONTROL to the NVIDIA
- * driver. Alternatively, the user can check the "Apply Changes
- * Immediately" checkbox, which will cause changes to be sent to the
- * NVIDIA driver whenever the user makes any changes to the CSC. This
- * is handy to tweak values in "realtime" while SDI output is enabled.
- *
- * Note that on older NVIDIA SDI products, changes to CSC require
- * stopping and restarting SDI output. Furthermore, on older NVIDIA
- * SDI products, CSC only applies to OpenGL SDI output. On newer
- * NVIDIA SDI products, the CSC can be applied in real time while CSC
- * is enabled, and can apply both to OpenGL and normal X desktop over
- * SDI.
- */
-
-/*
- * TODO: ability to save/restore CSC to/from file.
- */
-
-
-/* local prototypes */
-
-static void override_button_toggled (GtkToggleButton *overrideButton,
- gpointer user_data);
-
-static void override_state_toggled (CtkGvoCsc *data,
- gboolean enabled);
-
-static void make_entry (CtkGvoCsc *ctk_gvo_csc,
- GtkWidget *table,
- GtkWidget **widget,
- float value,
- int row,
- int column);
-
-static void make_label (CtkGvoCsc *ctk_gvo_csc,
- GtkWidget *table,
- const char *str,
- int row,
- int column);
-
-static void spin_button_value_changed (GtkWidget *button,
- gpointer user_data);
-
-static void apply_immediate_button_toggled (GtkToggleButton
- *applyImmediateButton,
- gpointer user_data);
-
-static void apply_button_clicked (GtkButton *button,
- gpointer user_data);
-
-static void initialize_csc_dropdown_changed (CtkDropDownMenu *combo,
- gpointer user_data);
-
-static void set_apply_button_sensitive (CtkGvoCsc *ctk_gvo_csc);
-
-static void apply_csc_values (CtkGvoCsc *ctk_gvo_csc);
-
-static void gvo_csc_event_received (GObject *object,
- CtrlEvent *event,
- gpointer user_data);
-
-static GtkWidget *build_opengl_only_msg (void);
-
-/*
- * Color Space Conversion Standards
- */
-
-#define CSC_STANDARD_ITU_601 0
-#define CSC_STANDARD_ITU_709 1
-#define CSC_STANDARD_ITU_177 2
-#define CSC_STANDARD_IDENTITY 3
-
-#define CSC_STANDARD_ITU_601_STRING "ITU-601"
-#define CSC_STANDARD_ITU_709_STRING "ITU-709"
-#define CSC_STANDARD_ITU_177_STRING "ITU-177"
-#define CSC_STANDARD_IDENTITY_STRING "Identity"
-
-
-#define FRAME_BORDER 5
-
-
-/* General information help */
-
-static const char * __override_help =
-"The Override default Color Space Conversion checkbox will toggle use of "
-"custom CSC.";
-
-static const char * __initialize_help =
-"The Initialize Color Space Conversion drop down menu, when selected, "
-"populates the Color Space Conversion Matrix, Offset, and Scale with the "
-"values from the selected standard.";
-
-static const char * __csc_help =
-"The color space conversion matrix defines the parameters used for "
-"converting the color data.";
-
-static const char * __apply_immediately_help =
-"The Apply Changes Immediately checkbox toggles whether or not changes made "
-"to the CSC matrix immediately take effect.";
-
-static const char * __apply_help =
-"The Apply button sends the new values of the color space conversion matrix "
-"to the server.";
-
-
-
-GType ctk_gvo_csc_get_type(void)
-{
- static GType ctk_gvo_csc_type = 0;
-
- if (!ctk_gvo_csc_type) {
- static const GTypeInfo ctk_gvo_csc_info = {
- sizeof (CtkGvoCscClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- NULL, /* class_init, */
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (CtkGvoCsc),
- 0, /* n_preallocs */
- NULL, /* instance_init */
- NULL /* value_table */
- };
-
- ctk_gvo_csc_type =
- g_type_register_static (GTK_TYPE_VBOX,
- "CtkGvoCsc", &ctk_gvo_csc_info, 0);
- }
-
- return ctk_gvo_csc_type;
-}
-
-
-/*
- * ctk_gvo_csc_new() - create a CtkGvoCsc widget
- */
-
-GtkWidget* ctk_gvo_csc_new(CtrlTarget *ctrl_target,
- CtkConfig *ctk_config,
- CtkEvent *ctk_event,
- CtkGvo *gvo_parent)
-{
- GObject *object;
- CtkGvoCsc *ctk_gvo_csc;
- GtkWidget *frame;
- GtkWidget *hbox, *hbox2;
- GtkWidget *vbox, *vbox2;
- GtkWidget *label;
- GtkWidget *alignment;
-
- ReturnStatus ret;
-
- int row, column, override, caps;
-
- float initialCSCMatrix[3][3];
- float initialCSCOffset[3];
- float initialCSCScale[3];
-
- /* retrieve all the NV-CONTROL attributes that we will need */
-
- ret = NvCtrlGetGvoColorConversion(ctrl_target,
- initialCSCMatrix,
- initialCSCOffset,
- initialCSCScale);
-
- if (ret != NvCtrlSuccess) return NULL;
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_OVERRIDE_HW_CSC,
- &override);
-
- if (ret != NvCtrlSuccess) return NULL;
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_CAPABILITIES, &caps);
-
- if (ret != NvCtrlSuccess) return NULL;
-
-
- /*
- * XXX setup to receive events when another NV-CONTROL client
- * changes any of the above attributes
- */
-
-
- /* create the object */
-
- object = g_object_new(CTK_TYPE_GVO_CSC, NULL);
-
- ctk_gvo_csc = CTK_GVO_CSC(object);
- ctk_gvo_csc->ctrl_target = ctrl_target;
- ctk_gvo_csc->ctk_config = ctk_config;
- ctk_gvo_csc->ctk_event = ctk_event;
- ctk_gvo_csc->gvo_parent = gvo_parent;
- ctk_gvo_csc->caps = caps;
-
- gtk_box_set_spacing(GTK_BOX(object), 10);
-
- /* banner */
-
- hbox = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(object), hbox, FALSE, FALSE, 0);
-
- ctk_gvo_csc->banner_box = hbox;
-
- /* checkbox to enable override of HW CSC */
-
- ctk_gvo_csc->overrideButton = gtk_check_button_new_with_label
- ("Override default Color Space Conversion");
-
- ctk_config_set_tooltip(ctk_config, ctk_gvo_csc->overrideButton,
- __override_help);
-
- g_signal_connect(G_OBJECT(ctk_gvo_csc->overrideButton), "toggled",
- G_CALLBACK(override_button_toggled), ctk_gvo_csc);
-
- frame = gtk_frame_new(NULL);
- gtk_container_set_border_width(GTK_CONTAINER(frame), FRAME_BORDER);
-
- vbox2 = gtk_vbox_new(FALSE, 0);
- gtk_container_set_border_width(GTK_CONTAINER(vbox2), 5);
-
- gtk_box_pack_start(GTK_BOX(vbox2),
- ctk_gvo_csc->overrideButton,
- FALSE, // expand
- FALSE, // fill
- 0); // padding
-
- gtk_container_add(GTK_CONTAINER(frame), vbox2);
-
- gtk_box_pack_start(GTK_BOX(ctk_gvo_csc),
- frame,
- FALSE, // expand
- FALSE, // fill
- 0); // padding
-
- /* create an hbox to store everything else */
-
- hbox = gtk_vbox_new(FALSE, 0);
-
- gtk_box_pack_start(GTK_BOX(ctk_gvo_csc),
- hbox,
- FALSE, // expand
- FALSE, // fill
- 0); // padding
-
- vbox = gtk_vbox_new(FALSE, 0);
-
- gtk_box_pack_start(GTK_BOX(hbox),
- vbox,
- FALSE, // expand
- FALSE, // fill
- 0); // padding
-
- ctk_gvo_csc->cscOptions = hbox;
-
- /* create a drop-down menu for the possible initializing values */
-
- frame = gtk_frame_new(NULL);
- gtk_container_set_border_width(GTK_CONTAINER(frame), FRAME_BORDER);
-
- vbox2 = gtk_vbox_new(FALSE, 0);
- gtk_container_set_border_width(GTK_CONTAINER(vbox2), 5);
-
- gtk_container_add(GTK_CONTAINER(frame), vbox2);
-
- hbox = gtk_hbox_new(FALSE, // homogeneous
- 10); // spacing
-
- gtk_box_pack_start(GTK_BOX(vbox2),
- hbox,
- FALSE, // expand
- FALSE, // fill
- 0); // padding
-
- label = gtk_label_new("Initialize Color Space Conversion with:");
-
- gtk_box_pack_start(GTK_BOX(hbox),
- label,
- FALSE, // expand
- FALSE, // fill
- 5); // padding
-
-
- ctk_gvo_csc->initializeDropDown =
- ctk_drop_down_menu_new(CTK_DROP_DOWN_MENU_FLAG_READONLY);
-
- ctk_drop_down_menu_set_tooltip
- (ctk_config,
- CTK_DROP_DOWN_MENU(ctk_gvo_csc->initializeDropDown),
- __initialize_help);
-
- ctk_drop_down_menu_append_item
- (CTK_DROP_DOWN_MENU(ctk_gvo_csc->initializeDropDown),
- CSC_STANDARD_ITU_601_STRING,
- CSC_STANDARD_ITU_601);
-
- ctk_drop_down_menu_append_item
- (CTK_DROP_DOWN_MENU(ctk_gvo_csc->initializeDropDown),
- CSC_STANDARD_ITU_709_STRING,
- CSC_STANDARD_ITU_709);
-
- ctk_drop_down_menu_append_item
- (CTK_DROP_DOWN_MENU(ctk_gvo_csc->initializeDropDown),
- CSC_STANDARD_ITU_177_STRING,
- CSC_STANDARD_ITU_177);
-
- ctk_drop_down_menu_append_item
- (CTK_DROP_DOWN_MENU(ctk_gvo_csc->initializeDropDown),
- CSC_STANDARD_IDENTITY_STRING,
- CSC_STANDARD_IDENTITY);
-
- gtk_widget_show_all(ctk_gvo_csc->initializeDropDown);
-
- gtk_box_pack_start(GTK_BOX(hbox),
- ctk_gvo_csc->initializeDropDown,
- FALSE, // expand
- FALSE, // fill
- 5); // padding
-
- ctk_drop_down_menu_set_current_value
- (CTK_DROP_DOWN_MENU(ctk_gvo_csc->initializeDropDown),
- CSC_STANDARD_ITU_601);
-
-
- g_signal_connect(G_OBJECT(ctk_gvo_csc->initializeDropDown), "changed",
- G_CALLBACK(initialize_csc_dropdown_changed),
- (gpointer) ctk_gvo_csc);
-
-
- gtk_box_pack_start(GTK_BOX(vbox),
- frame,
- FALSE, // expand
- FALSE, // fill
- 0); // padding
-
-
- /* create an hbox to store the CSC matrix, offset, and scale */
-
- hbox = gtk_hbox_new(FALSE, // homogeneous
- 10); // spacing
-
- gtk_box_pack_start(GTK_BOX(vbox),
- hbox,
- FALSE, // expand
- FALSE, // fill
- 0); // padding
-
-
- /* create the CSC matrix */
-
- frame = gtk_frame_new(NULL);
-
- gtk_container_set_border_width(GTK_CONTAINER(frame), FRAME_BORDER);
-
- gtk_box_pack_start(GTK_BOX(hbox),
- frame,
- FALSE, // expand
- FALSE, // fill
- 0); // padding
-
- ctk_gvo_csc->matrixTable =
- gtk_table_new(4, // rows
- 4, // columns
- FALSE); // homogeneous
-
- gtk_container_add(GTK_CONTAINER(frame), ctk_gvo_csc->matrixTable);
-
- /* add labels to the matrix table */
-
- make_label(ctk_gvo_csc, ctk_gvo_csc->matrixTable, "Y" , 1, 0);
- make_label(ctk_gvo_csc, ctk_gvo_csc->matrixTable, "Cr", 2, 0);
- make_label(ctk_gvo_csc, ctk_gvo_csc->matrixTable, "Cb", 3, 0);
-
- make_label(ctk_gvo_csc, ctk_gvo_csc->matrixTable, "Red" , 0, 1);
- make_label(ctk_gvo_csc, ctk_gvo_csc->matrixTable, "Green", 0, 2);
- make_label(ctk_gvo_csc, ctk_gvo_csc->matrixTable, "Blue" , 0, 3);
-
- /* create the 3x3 matrix */
-
- for (row = 0; row < 3; row++) {
- for (column = 0; column < 3; column++) {
-
- ctk_gvo_csc->matrix[row][column] = initialCSCMatrix[row][column];
-
- make_entry(ctk_gvo_csc,
- ctk_gvo_csc->matrixTable,
- &ctk_gvo_csc->matrixWidget[row][column],
- ctk_gvo_csc->matrix[row][column],
- row + 1,
- column+1);
-
- ctk_config_set_tooltip(ctk_config,
- ctk_gvo_csc->matrixWidget[row][column],
- __csc_help);
- }
- }
-
-
- /* create the CSC offset */
-
- frame = gtk_frame_new(NULL);
-
- gtk_container_set_border_width(GTK_CONTAINER(frame), FRAME_BORDER);
-
- gtk_box_pack_start(GTK_BOX(hbox),
- frame,
- FALSE, // expand
- FALSE, // fill
- 0); // padding
-
- ctk_gvo_csc->offsetTable =
- gtk_table_new(4, // rows
- 1, // columns
- FALSE); // homogeneous
-
- make_label(ctk_gvo_csc, ctk_gvo_csc->offsetTable, "Offset", 0, 0);
-
- gtk_container_add(GTK_CONTAINER(frame), ctk_gvo_csc->offsetTable);
-
- for (row = 0; row < 3; row++) {
-
- ctk_gvo_csc->offset[row] = initialCSCOffset[row];
-
- make_entry(ctk_gvo_csc,
- ctk_gvo_csc->offsetTable,
- &ctk_gvo_csc->offsetWidget[row],
- ctk_gvo_csc->offset[row],
- row+1,
- 0);
-
- ctk_config_set_tooltip(ctk_config,
- ctk_gvo_csc->offsetWidget[row], __csc_help);
- }
-
-
- /* create the CSC scale */
-
- frame = gtk_frame_new(NULL);
-
- gtk_container_set_border_width(GTK_CONTAINER(frame), FRAME_BORDER);
-
- gtk_box_pack_start(GTK_BOX(hbox),
- frame,
- FALSE, // expand
- FALSE, // fill
- 0); // padding
-
- ctk_gvo_csc->scaleTable =
- gtk_table_new(4, // rows
- 1, // columns
- FALSE); // homogeneous
-
- make_label(ctk_gvo_csc, ctk_gvo_csc->scaleTable, "Scale" , 0, 0);
-
- gtk_container_add(GTK_CONTAINER(frame), ctk_gvo_csc->scaleTable);
-
- for (row = 0; row < 3; row++) {
-
- ctk_gvo_csc->scale[row] = initialCSCScale[row];
-
- make_entry(ctk_gvo_csc,
- ctk_gvo_csc->scaleTable,
- &ctk_gvo_csc->scaleWidget[row],
- ctk_gvo_csc->scale[row],
- row+1,
- 0);
-
- ctk_config_set_tooltip(ctk_config,
- ctk_gvo_csc->scaleWidget[row], __csc_help);
- }
-
-
- /*
- * create checkbox for immediate apply; only expose if the X
- * server can support apply CSC values immediately
- */
-
- if (caps & NV_CTRL_GVO_CAPABILITIES_APPLY_CSC_IMMEDIATELY) {
-
- ctk_gvo_csc->applyImmediateButton =
- gtk_check_button_new_with_label("Apply Changes Immediately");
-
- ctk_config_set_tooltip(ctk_config,
- ctk_gvo_csc->applyImmediateButton,
- __apply_immediately_help);
-
- gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON(ctk_gvo_csc->applyImmediateButton), FALSE);
-
- g_signal_connect(G_OBJECT(ctk_gvo_csc->applyImmediateButton),
- "toggled",
- G_CALLBACK(apply_immediate_button_toggled),
- ctk_gvo_csc);
- } else {
- ctk_gvo_csc->applyImmediateButton = NULL;
- }
-
- ctk_gvo_csc->applyImmediately = FALSE;
-
-
- /*
- * create an apply button; pack the button in an alignment inside
- * an hbox, so that we can properly position the apply button on
- * the far right
- */
-
- ctk_gvo_csc->applyButton = gtk_button_new_from_stock(GTK_STOCK_APPLY);
-
- ctk_config_set_tooltip(ctk_config, ctk_gvo_csc->applyButton, __apply_help);
-
- g_signal_connect(G_OBJECT(ctk_gvo_csc->applyButton),
- "clicked",
- G_CALLBACK(apply_button_clicked),
- ctk_gvo_csc);
-
- alignment = gtk_alignment_new(1.0, // xalign
- 0.5, // yalign
- 0.0, // xscale
- 0.0); // yscale
-
- gtk_container_add(GTK_CONTAINER(alignment), ctk_gvo_csc->applyButton);
-
- hbox2 = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(hbox2),
- alignment,
- TRUE, // expand
- TRUE, // fill
- 0); // padding
-
-
- /* create a frame to pack the apply stuff in */
-
- frame = gtk_frame_new(NULL);
- gtk_container_set_border_width(GTK_CONTAINER(frame), FRAME_BORDER);
-
- vbox2 = gtk_vbox_new(FALSE, 0);
- gtk_container_set_border_width(GTK_CONTAINER(vbox2), 5);
-
- hbox = gtk_hbox_new(FALSE, 10);
-
- /* pack applyImmediateButton, but only if we created it */
-
- if (ctk_gvo_csc->applyImmediateButton) {
-
- gtk_box_pack_start(GTK_BOX(hbox),
- ctk_gvo_csc->applyImmediateButton,
- FALSE, // expand
- FALSE, // fill
- 0); // padding
- }
-
- /* pack the Apply button */
-
- gtk_box_pack_start(GTK_BOX(hbox),
- hbox2,
- TRUE, // expand
- TRUE, // fill
- 0); // padding
-
- /* pack the hbox inside a vbox so that we have proper y padding */
-
- gtk_box_pack_start(GTK_BOX(vbox2),
- hbox,
- FALSE, // expand
- FALSE, // fill
- 0); // padding
-
- /* pack the vbox inside the frame */
-
- gtk_container_add(GTK_CONTAINER(frame), vbox2);
-
- gtk_box_pack_start(GTK_BOX(vbox),
- frame,
- FALSE, // expand
- FALSE, // fill
- 0); // padding
-
- /*
- * if custom CSC will not be applied to the X screen, make that
- * clear to the user
- */
-
- if ((caps & NV_CTRL_GVO_CAPABILITIES_APPLY_CSC_TO_X_SCREEN) == 0) {
-
- label = build_opengl_only_msg();
-
- gtk_box_pack_start(GTK_BOX(vbox),
- label,
- FALSE, // expand
- FALSE, // fill
- 0); // padding
- }
-
- /*
- * initialize the override button to what we read in
- * NV_CTRL_GVO_OVERRIDE_HW_CSC
- */
-
- gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON(ctk_gvo_csc->overrideButton),
- override);
-
- override_state_toggled(ctk_gvo_csc, override);
-
- /* Listen to server events */
-
- g_signal_connect(G_OBJECT(ctk_gvo_csc->ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVO_CSC_CHANGED_EVENT),
- G_CALLBACK(gvo_csc_event_received),
- (gpointer) ctk_gvo_csc);
-
- g_signal_connect(G_OBJECT(ctk_gvo_csc->ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVO_OVERRIDE_HW_CSC),
- G_CALLBACK(gvo_csc_event_received),
- (gpointer) ctk_gvo_csc);
-
- /* show the page */
-
- gtk_widget_show_all(GTK_WIDGET(object));
-
- return GTK_WIDGET(object);
-
-} /* ctk_gvo_csc_new() */
-
-
-
-
-/*
- * override_button_toggled() - the override checkbox has been toggled;
- * change the sensitivity of the widget; note that we do not send any
- * NV-CONTROL protocol here if override has been enabled -- that is
- * deferred until the user hits apply.
- */
-
-static void override_button_toggled(GtkToggleButton *overrideButton,
- gpointer user_data)
-{
- CtkGvoCsc *ctk_gvo_csc = (CtkGvoCsc *) user_data;
- CtrlTarget *ctrl_target = ctk_gvo_csc->ctrl_target;
- gboolean enabled = gtk_toggle_button_get_active(overrideButton);
- override_state_toggled(ctk_gvo_csc, enabled);
-
- /*
- * if override was enabled, don't send NV-CONTROL protocol, yet,
- * unless applyImmediately was enabled; otherwise, wait until the
- * user applies it. However, if override was disabled, apply that
- * immediately.
- */
-
- if (enabled) {
-
- if (ctk_gvo_csc->applyImmediately) {
- NvCtrlSetAttribute(ctrl_target,
- NV_CTRL_GVO_OVERRIDE_HW_CSC,
- NV_CTRL_GVO_OVERRIDE_HW_CSC_TRUE);
- } else {
-
- // make the "Apply" button hot
-
- gtk_widget_set_sensitive(ctk_gvo_csc->applyButton, TRUE);
- }
-
- } else {
- NvCtrlSetAttribute(ctrl_target,
- NV_CTRL_GVO_OVERRIDE_HW_CSC,
- NV_CTRL_GVO_OVERRIDE_HW_CSC_FALSE);
- }
-
-} /* override_button_toggled() */
-
-
-
-/*
- * override_state_toggled() - change the state of
- */
-
-static void override_state_toggled(CtkGvoCsc *ctk_gvo_csc, gboolean enabled)
-{
- gtk_widget_set_sensitive(ctk_gvo_csc->cscOptions, enabled);
-
-} /* override_state_toggled() */
-
-
-
-/*
- * make_entry() - helper function to create an adjustment, create a
- * numeric text entry with spin buttons, and pack the entry into the
- * provided table.
- */
-
-static void make_entry(CtkGvoCsc *ctk_gvo_csc,
- GtkWidget *table,
- GtkWidget **widget,
- float value,
- int row,
- int column)
-{
- GtkAdjustment *adj;
-
- adj = (GtkAdjustment *) gtk_adjustment_new(value, // value
- -1.0, // lower
- 1.0, // upper
- 0.001, // step incr
- 0.1, // page incr
- 0); // page size
-
- *widget = gtk_spin_button_new(adj, // adjustment
- 0.001, // climb rate
- 6); // number of digits
-
- gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(*widget), TRUE);
-
- g_signal_connect(G_OBJECT(*widget),
- "value-changed",
- G_CALLBACK(spin_button_value_changed),
- ctk_gvo_csc);
-
- gtk_table_attach(GTK_TABLE(table),
- *widget,
- column, // left attach
- column + 1, // right_attach
- row, // top_attach
- row + 1, // bottom_attach
- 0, // xoptions
- 0, // yoptions
- 10, // xpadding
- 10); // ypadding
-
-} /* make_entry() */
-
-
-
-/*
- * make_label() - helper function to create a lable and pack it in the
- * given table.
- */
-
-static void make_label(CtkGvoCsc *ctk_gvo_csc,
- GtkWidget *table,
- const char *str,
- int row,
- int column)
-{
- GtkWidget *label;
-
- label = gtk_label_new(str);
-
- gtk_table_attach(GTK_TABLE(table),
- label,
- column,
- column + 1, // right_attach
- row, // top_attach
- row + 1, // bottom_attach
- 0, // xoptions
- 0, // yoptions
- 4, // xpadding
- 4); // ypadding
-
-} /* make_label() */
-
-
-
-/*
- * spin_button_value_changed() - one of the spin buttons changed;
- */
-
-static void spin_button_value_changed(GtkWidget *button,
- gpointer user_data)
-{
- CtkGvoCsc *ctk_gvo_csc = (CtkGvoCsc *) user_data;
- gdouble value;
-
- int row, column;
-
- value = gtk_spin_button_get_value(GTK_SPIN_BUTTON(button));
-
- /* which spinbutton was it? */
-
- for (row = 0; row < 3; row++) {
- for (column = 0; column < 3; column++) {
-
- if (ctk_gvo_csc->matrixWidget[row][column] == button) {
- ctk_gvo_csc->matrix[row][column] = value;
- goto done;
- }
- }
-
- if (ctk_gvo_csc->offsetWidget[row] == button) {
- ctk_gvo_csc->offset[row] = value;
- goto done;
- }
-
- if (ctk_gvo_csc->scaleWidget[row] == button) {
- ctk_gvo_csc->scale[row] = value;
- goto done;
- }
- }
-
- done:
-
- /*
- * the data has changed, make sure the apply button is sensitive
- */
-
- set_apply_button_sensitive(ctk_gvo_csc);
-
- /* if we are supposed to apply immediately, send the data now */
-
- if (ctk_gvo_csc->applyImmediately) {
- apply_csc_values(ctk_gvo_csc);
- }
-
-} /* spin_button_value_changed() */
-
-
-
-/*
- * apply_immediate_button_toggled() - the "apply immediately" button
- * has been toggled; change the sensitivity of the "Apply" button, and
- * possibly send the current settings to the X server.
- */
-
-static
-void apply_immediate_button_toggled(GtkToggleButton *applyImmediateButton,
- gpointer user_data)
-{
- CtkGvoCsc *ctk_gvo_csc = (CtkGvoCsc *) user_data;
- gboolean enabled = gtk_toggle_button_get_active(applyImmediateButton);
-
- /* cache the current state */
-
- ctk_gvo_csc->applyImmediately = enabled;
-
- /*
- * the Apply button's sensitivity is the opposite of the Immediate
- * apply checkbox -- if changes are applied immediately, then the
- * Apply button is not needed
- */
-
- gtk_widget_set_sensitive(ctk_gvo_csc->applyButton, !enabled);
-
- /*
- * if the apply immediately button is enabled, then flush our
- * current values to the X server
- */
-
- if (enabled) {
- apply_csc_values(ctk_gvo_csc);
- }
-
-} /* apply_immediate_button_toggled() */
-
-
-
-/*
- * apply_button_clicked() - the apply button has been toggled, send
- * the current settings to the X server, and make this button
- * insensitive.
- */
-
-static void apply_button_clicked(GtkButton *button, gpointer user_data)
-{
- CtkGvoCsc *ctk_gvo_csc = (CtkGvoCsc *) user_data;
-
- apply_csc_values(ctk_gvo_csc);
-
- gtk_widget_set_sensitive(ctk_gvo_csc->applyButton, FALSE);
-
-} /* apply_button_clicked() */
-
-
-
-/*
- * initialize_csc_dropdown_changed() - the "initialize" dropdown menu
- * changed; update the values in the matrix, offset, and scale
- */
-
-static void initialize_csc_dropdown_changed(CtkDropDownMenu *menu,
- gpointer user_data)
-{
- CtkGvoCsc *ctk_gvo_csc = (CtkGvoCsc *) user_data;
- const float *std = NULL;
- gint column, row, value;
-
- value = ctk_drop_down_menu_get_current_value(menu);
-
- switch (value) {
- case CSC_STANDARD_ITU_601: std = nv_get_sdi_csc_matrix("itu_601"); break;
- case CSC_STANDARD_ITU_709: std = nv_get_sdi_csc_matrix("itu_709"); break;
- case CSC_STANDARD_ITU_177: std = nv_get_sdi_csc_matrix("itu_177"); break;
- case CSC_STANDARD_IDENTITY: std = nv_get_sdi_csc_matrix("identity"); break;
- default: return;
- }
- if (!std) {
- return;
- }
-
- for (row = 0; row < 3; row++) {
- for (column = 0; column < 3; column++) {
- ctk_gvo_csc->matrix[row][column] = std[row*5 + column];
- gtk_spin_button_set_value
- (GTK_SPIN_BUTTON(ctk_gvo_csc->matrixWidget[row][column]),
- ctk_gvo_csc->matrix[row][column]);
- }
-
- ctk_gvo_csc->offset[row] = std[row*5 + 3];
- gtk_spin_button_set_value
- (GTK_SPIN_BUTTON(ctk_gvo_csc->offsetWidget[row]),
- ctk_gvo_csc->offset[row]);
-
- ctk_gvo_csc->scale[row] = std[row*5 + 4];
- gtk_spin_button_set_value
- (GTK_SPIN_BUTTON(ctk_gvo_csc->scaleWidget[row]),
- ctk_gvo_csc->scale[row]);
- }
-
- /*
- * the data has changed, make sure the apply button is sensitive
- */
-
- set_apply_button_sensitive(ctk_gvo_csc);
-
- /* if we are supposed to apply immediately, send the data now */
-
- if (ctk_gvo_csc->applyImmediately) {
- apply_csc_values(ctk_gvo_csc);
- }
-
-} /* initialize_csc_dropdown_changed() */
-
-
-
-/*
- * set_apply_button_sensitive() - make the "Apply" button sensitive
- */
-
-static void set_apply_button_sensitive(CtkGvoCsc *ctk_gvo_csc)
-{
- /* if data is applied immediately, then we don't */
-
- if (ctk_gvo_csc->applyImmediately) return;
-
- gtk_widget_set_sensitive(ctk_gvo_csc->applyButton, TRUE);
-
-} /* set_apply_button_sensitive() */
-
-
-
-/*
- * apply_csc_values() - apply the current CSC values to the X server
- * and make sure CSC override is enabled
- */
-
-static void apply_csc_values(CtkGvoCsc *ctk_gvo_csc)
-{
- CtrlTarget *ctrl_target = ctk_gvo_csc->ctrl_target;
-
- NvCtrlSetGvoColorConversion(ctrl_target,
- ctk_gvo_csc->matrix,
- ctk_gvo_csc->offset,
- ctk_gvo_csc->scale);
-
- NvCtrlSetAttribute(ctrl_target,
- NV_CTRL_GVO_OVERRIDE_HW_CSC,
- NV_CTRL_GVO_OVERRIDE_HW_CSC_TRUE);
-
-} /* apply_csc_values() */
-
-
-
-/*
- * GVO CSC event handler.
- */
-
-static void gvo_csc_event_received(GObject *object,
- CtrlEvent *event,
- gpointer user_data)
-{
- CtkGvoCsc *ctk_gvo_csc = CTK_GVO_CSC(user_data);
- CtrlTarget *ctrl_target = ctk_gvo_csc->ctrl_target;
- GtkWidget *widget;
- gint attribute;
- gint value;
- ReturnStatus ret;
-
- float newCSCMatrix[3][3];
- float newCSCOffset[3];
- float newCSCScale[3];
- int row, column;
-
- if (event->type != CTRL_EVENT_TYPE_INTEGER_ATTRIBUTE) {
- return;
- }
-
- attribute = event->int_attr.attribute;
- value = event->int_attr.value;
-
- switch (attribute) {
-
- case NV_CTRL_GVO_CSC_CHANGED_EVENT:
-
- /* Re-query the GVO CSC matrix */
-
- ret = NvCtrlGetGvoColorConversion(ctrl_target,
- newCSCMatrix,
- newCSCOffset,
- newCSCScale);
- if (ret == NvCtrlSuccess) {
-
- for (row = 0; row < 3; row++) {
- for (column = 0; column < 3; column++) {
- g_signal_handlers_block_by_func
- (G_OBJECT(ctk_gvo_csc->matrixWidget[row][column]),
- G_CALLBACK(spin_button_value_changed),
- (gpointer) ctk_gvo_csc);
- ctk_gvo_csc->matrix[row][column] = newCSCMatrix[row][column];
- gtk_spin_button_set_value
- (GTK_SPIN_BUTTON(ctk_gvo_csc->matrixWidget[row][column]),
- ctk_gvo_csc->matrix[row][column]);
- g_signal_handlers_unblock_by_func
- (G_OBJECT(ctk_gvo_csc->matrixWidget[row][column]),
- G_CALLBACK(spin_button_value_changed),
- (gpointer) ctk_gvo_csc);
- }
-
- g_signal_handlers_block_by_func
- (G_OBJECT(ctk_gvo_csc->offsetWidget[row]),
- G_CALLBACK(spin_button_value_changed),
- (gpointer) ctk_gvo_csc);
- ctk_gvo_csc->offset[row] = newCSCOffset[row];
- gtk_spin_button_set_value
- (GTK_SPIN_BUTTON(ctk_gvo_csc->offsetWidget[row]),
- ctk_gvo_csc->offset[row]);
- g_signal_handlers_unblock_by_func
- (G_OBJECT(ctk_gvo_csc->offsetWidget[row]),
- G_CALLBACK(spin_button_value_changed),
- (gpointer) ctk_gvo_csc);
-
- g_signal_handlers_block_by_func
- (G_OBJECT(ctk_gvo_csc->scaleWidget[row]),
- G_CALLBACK(spin_button_value_changed),
- (gpointer) ctk_gvo_csc);
- ctk_gvo_csc->scale[row] = newCSCScale[row];
- gtk_spin_button_set_value
- (GTK_SPIN_BUTTON(ctk_gvo_csc->scaleWidget[row]),
- ctk_gvo_csc->scale[row]);
- g_signal_handlers_unblock_by_func
- (G_OBJECT(ctk_gvo_csc->scaleWidget[row]),
- G_CALLBACK(spin_button_value_changed),
- (gpointer) ctk_gvo_csc);
- }
- }
-
- gtk_widget_set_sensitive(ctk_gvo_csc->applyButton, FALSE);
- break;
-
- case NV_CTRL_GVO_OVERRIDE_HW_CSC:
- widget = ctk_gvo_csc->overrideButton;
-
- g_signal_handlers_block_by_func(G_OBJECT(widget),
- G_CALLBACK(override_button_toggled),
- (gpointer) ctk_gvo_csc);
-
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), value);
- override_state_toggled(ctk_gvo_csc, value);
-
- gtk_widget_set_sensitive(ctk_gvo_csc->applyButton, FALSE);
-
- g_signal_handlers_unblock_by_func(G_OBJECT(widget),
- G_CALLBACK(override_button_toggled),
- (gpointer) ctk_gvo_csc);
- break;
-
- default:
- nv_error_msg("Unhandled GVO CSC event received: %d\n",
- attribute);
- break;
- }
-
-}
-
-
-
-/*
- * build_opengl_only_msg() - build a message to inform the user that
- * custom CSC will only be applied to OpenGL GVO output; this returns
- * a frame containing the message.
- */
-
-static GtkWidget *build_opengl_only_msg(void)
-{
- GdkPixbuf *pixbuf;
- GtkWidget *label;
- GtkWidget *hbox;
- GtkWidget *vbox;
- GtkWidget *frame;
- GtkWidget *image = NULL;
-
- /* create the label */
-
- label = gtk_label_new("Note that the overridden Color Space Conversion "
- "will only apply to OpenGL applications "
- "using the GLX_NV_video_out extension.");
-
- gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-
- /* create the information icon */
-
- pixbuf = ctk_widget_render_icon(label,
- CTK_STOCK_DIALOG_INFO,
- GTK_ICON_SIZE_DIALOG,
- "CSC information message");
-
- /* create a pixmap from the icon */
-
- if (pixbuf) {
- image = gtk_image_new_from_pixbuf(pixbuf);
- } else {
- image = NULL;
- }
-
- /* create an hbox and pack the icon and label in it */
-
- hbox = gtk_hbox_new(FALSE, 5);
-
- if (image) {
- gtk_box_pack_start(GTK_BOX(hbox),
- image,
- FALSE, // expand
- FALSE, // fill
- 5); // padding
- }
-
- gtk_box_pack_start(GTK_BOX(hbox),
- label,
- FALSE, // expand
- FALSE, // fill
- 5); // padding
-
- /* pack the hbox in a vbox to get vertical padding */
-
- vbox = gtk_vbox_new(FALSE, 5);
-
- gtk_box_pack_start(GTK_BOX(vbox),
- hbox,
- FALSE, // expand
- FALSE, // fill
- 5); // padding
-
- /* pack the whole thing in a frame */
-
- frame = gtk_frame_new(NULL);
- gtk_container_set_border_width(GTK_CONTAINER(frame), FRAME_BORDER);
-
- gtk_container_add(GTK_CONTAINER(frame), vbox);
-
- return frame;
-
-} /* build_opengl_only_msg() */
-
-
-
-void ctk_gvo_csc_select(GtkWidget *widget)
-{
- CtkGvoCsc *ctk_gvo_csc = CTK_GVO_CSC(widget);
- CtkGvo *ctk_gvo = ctk_gvo_csc->gvo_parent;
-
- /* Grab the GVO banner */
-
- ctk_gvo_banner_set_parent(CTK_GVO_BANNER(ctk_gvo->banner),
- ctk_gvo_csc->banner_box,
- NULL, NULL);
-}
-
-
-
-void ctk_gvo_csc_unselect(GtkWidget *widget)
-{
- CtkGvoCsc *ctk_gvo_csc = CTK_GVO_CSC(widget);
- CtkGvo *ctk_gvo = ctk_gvo_csc->gvo_parent;
-
- /* Release the GVO banner */
-
- ctk_gvo_banner_set_parent(CTK_GVO_BANNER(ctk_gvo->banner),
- NULL, NULL, NULL);
-}
-
-
-
-/*
- * ctk_gvo_csc_create_help() - Create color space conversion help page
- */
-
-GtkTextBuffer *ctk_gvo_csc_create_help(GtkTextTagTable *table,
- CtkGvoCsc *ctk_gvo_csc)
-{
- GtkTextIter i;
- GtkTextBuffer *b;
-
- b = gtk_text_buffer_new(table);
-
- gtk_text_buffer_get_iter_at_offset(b, &i, 0);
-
- ctk_help_title(b, &i, "Color Space Conversion Help");
- ctk_help_para(b, &i, "This page gives access to configuration of "
- "the SDI (GVO) color space conversion.");
-
- ctk_help_heading(b, &i, "Override default Color Space Conversion");
- ctk_help_para(b, &i, "%s", __override_help);
-
- ctk_help_heading(b, &i, "Initialize Color Space Conversion");
- ctk_help_para(b, &i, "%s", __initialize_help);
-
- ctk_help_heading(b, &i, "Color Space Conversion Matrix, Offset and Scale");
- ctk_help_para(b, &i, "%s RGB color is converted to YCrCb in the "
- "following manner:",
- __csc_help);
- ctk_help_para(b, &i,
- "Y = Ky + Sy * ( Ry*R + Gy*G + By*B )\n"
- "Cb = Kcb + Scb * ( Rcb*R + Gcb*G + Bcb*B )\n"
- "Cr = Kcr + Scr * ( Rcr*R + Gcr*G + Bcr*B )");
- ctk_help_para(b, &i, "Where:");
- ctk_help_para(b, &i,
- "Ky = Y (luma) Offset\n"
- "Kcb = Cr (red chroma) Offset\n"
- "Kcr = Cb (blue chroma) Offset");
- ctk_help_para(b, &i,
- "Sy = Y scaling factor\n"
- "Scb = Cb Scaling factor\n"
- "Scr = Cr Scaling factor");
- ctk_help_para(b, &i,
- "Ry = Red coefficient for Y\n"
- "Rcb = Red coefficient for Cb\n"
- "Rcr = Red coefficient for Cr");
- ctk_help_para(b, &i,
- "Gy = Green coefficient for Y\n"
- "Gcb = Green coefficient for Cb\n"
- "Gcr = Green coefficient for Cr");
- ctk_help_para(b, &i,
- "By = Blue coefficient for Y\n"
- "Bcb = Blue coefficient for Cb\n"
- "Bcr = Blue coefficient for Cr");
-
- if (ctk_gvo_csc->caps & NV_CTRL_GVO_CAPABILITIES_APPLY_CSC_IMMEDIATELY) {
- ctk_help_heading(b, &i, "Apply Changes Immediately");
- ctk_help_para(b, &i, "%s", __apply_immediately_help);
- }
-
- ctk_help_heading(b, &i, "Apply");
- ctk_help_para(b, &i, "%s", __apply_help);
-
- ctk_help_finish(b);
-
- return b;
-
-} /* ctk_gvo_csc_create_help() */
diff --git a/src/gtk+-2.x/ctkgvo-csc.h b/src/gtk+-2.x/ctkgvo-csc.h
deleted file mode 100644
index d2cbe77..0000000
--- a/src/gtk+-2.x/ctkgvo-csc.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
- * and Linux systems.
- *
- * Copyright (C) 2004 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,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses>.
- */
-
-#ifndef __CTK_GVO_CSC_H__
-#define __CTK_GVO_CSC_H__
-
-#include "ctkevent.h"
-#include "ctkconfig.h"
-#include "ctkgvo.h"
-
-
-G_BEGIN_DECLS
-
-#define CTK_TYPE_GVO_CSC (ctk_gvo_csc_get_type())
-
-#define CTK_GVO_CSC(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), CTK_TYPE_GVO_CSC, \
- CtkGvoCsc))
-
-#define CTK_GVO_CSC_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), CTK_TYPE_GVO_CSC, \
- CtkGvoCscClass))
-
-#define CTK_IS_GVO_CSC(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CTK_TYPE_GVO_CSC))
-
-#define CTK_IS_GVO_CSC_CLASS(class) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), CTK_TYPE_GVO_CSC))
-
-#define CTK_GVO_CSC_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), CTK_TYPE_GVO_CSC, \
- CtkGvoCscClass))
-
-
-typedef struct _CtkGvoCsc CtkGvoCsc;
-typedef struct _CtkGvoCscClass CtkGvoCscClass;
-
-struct _CtkGvoCsc
-{
- GtkVBox parent;
-
- CtrlTarget *ctrl_target;
- CtkConfig *ctk_config;
- CtkEvent *ctk_event;
-
- CtkGvo *gvo_parent;
- GtkWidget *banner_box;
-
- int caps;
-
- float matrix[3][3]; // [row][column]
- float offset[3];
- float scale[3];
-
- gboolean applyImmediately;
-
- GtkWidget *matrixWidget[3][3];
- GtkWidget *offsetWidget[3];
- GtkWidget *scaleWidget[3];
-
- GtkWidget *matrixTable;
- GtkWidget *offsetTable;
- GtkWidget *scaleTable;
-
- GtkWidget *overrideButton;
- GtkWidget *initializeDropDown;
- GtkWidget *applyImmediateButton;
- GtkWidget *applyButton;
-
- GtkWidget *cscOptions;
-};
-
-struct _CtkGvoCscClass
-{
- GtkVBoxClass parent_class;
-};
-
-GType ctk_gvo_csc_get_type (void) G_GNUC_CONST;
-GtkWidget* ctk_gvo_csc_new (CtrlTarget *, CtkConfig *, CtkEvent *,
- CtkGvo *);
-
-GtkTextBuffer *ctk_gvo_csc_create_help(GtkTextTagTable *, CtkGvoCsc *);
-
-void ctk_gvo_csc_select(GtkWidget *);
-void ctk_gvo_csc_unselect(GtkWidget *);
-
-G_END_DECLS
-
-#endif /* __CTK_GVO_CSC_H__ */
diff --git a/src/gtk+-2.x/ctkgvo-sync.c b/src/gtk+-2.x/ctkgvo-sync.c
deleted file mode 100644
index 72e5bfe..0000000
--- a/src/gtk+-2.x/ctkgvo-sync.c
+++ /dev/null
@@ -1,1553 +0,0 @@
-/*
- * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
- * and Linux systems.
- *
- * Copyright (C) 2004 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,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses>.
- */
-
-#include <gtk/gtk.h>
-#include <NvCtrlAttributes.h>
-
-#include <string.h>
-
-#include "ctkbanner.h"
-
-#include "ctkgvo.h"
-#include "ctkgvo-sync.h"
-
-#include "ctkconfig.h"
-#include "ctkhelp.h"
-#include "ctkutils.h"
-
-#include "ctkdropdownmenu.h"
-
-
-/*
- * The CtkGvoSync widget is used to provide a way for configuring
- * how the SDI device synchronises with an input signal source.
- */
-
-#define FRAME_BORDER 5
-#define TABLE_PADDING 5
-
-
-#define DEFAULT_DETECT_INPUT_TIME_INTERVAL 2000
-
-
-#define SYNC_FORMAT_SDI 0
-#define SYNC_FORMAT_COMP_AUTO 1
-#define SYNC_FORMAT_COMP_BI_LEVEL 2
-#define SYNC_FORMAT_COMP_TRI_LEVEL 3
-
-static const GvioFormatName syncFormatNames[] = {
- { SYNC_FORMAT_SDI, "SDI Sync" },
- { SYNC_FORMAT_COMP_AUTO, "COMP Sync" },
- { SYNC_FORMAT_COMP_BI_LEVEL, "COMP Sync (Bi-level)" },
- { SYNC_FORMAT_COMP_TRI_LEVEL, "COMP Sync (Tri-level)" },
- { -1, NULL },
-};
-
-extern const GvioFormatName videoFormatNames[];
-
-
-
-/* local prototypes */
-
-static GtkWidget *start_menu(const gchar *name, GtkWidget *table,
- const gint row);
-static void finish_menu(GtkWidget *menu, GtkWidget *table, const gint row);
-
-
-static gboolean query_init_gvo_sync_state(CtkGvoSync *ctk_gvo_sync);
-static void init_composite_termination(CtkGvoSync *ctk_gvo_sync);
-static void init_sync_format_menu(CtkGvoSync *ctk_gvo_sync);
-static void register_for_gvo_sync_events(CtkGvoSync *ctk_gvo_sync);
-
-
-static void update_gvo_sync_sensitivity(CtkGvoSync *ctk_gvo_sync);
-static void update_input_video_format_text_entry(CtkGvoSync *ctk_gvo_sync);
-static void post_composite_termination_toggled(CtkGvoSync *ctk_gvo_sync,
- gboolean enabled);
-
-
-static void detect_input_toggled(GtkToggleButton *togglebutton,
- CtkGvoSync *ctk_gvo_sync);
-static gint detect_input_done(gpointer data);
-static void composite_termination_toggled(GtkWidget *button,
- CtkGvoSync *ctk_gvo_sync);
-static void sync_mode_changed(CtkDropDownMenu *menu, gpointer user_data);
-static void sync_format_changed(CtkDropDownMenu *menu, gpointer user_data);
-static void hsync_delay_changed(GtkSpinButton *spinbutton, gpointer user_data);
-static void vsync_delay_changed(GtkSpinButton *spinbutton, gpointer user_data);
-
-
-static void gvo_sync_event_received(GObject *object, CtrlEvent *event,
- gpointer user_data);
-static gint gvo_sync_probe_callback(gpointer data);
-
-
-
-/* Help tooltips */
-
-static const char * __input_video_format_help =
-"The Input Video Format text entry indicates the input video format detected "
-"on the input BNC.";
-
-static const char * __input_video_format_detect_help =
-"The Input Video Format Detect button will (re)detect the video format on "
-"the input BNC.";
-
-static const char * __composite_termination_help =
-"The Enable Composite Termination checkbox enables the 75 ohm termination "
-"of the composite input signal";
-
-static const char * __sync_mode_help =
-"The Sync Mode dropdown allows you to select how the SDI device syncs its "
-"output to the input signal.";
-
-static const char * __sync_format_help =
-"The Sync Format dropdown allows you to select the format of the input sync "
-"signal.";
-
-static const char * __sync_status_help =
-"The Sync Status reports on how the SDI device is currently syncing to the "
-"input sync signal.";
-
-static const char * __hsync_delay_help =
-"The HSync Delay entry allows you to specify the horizontal delay between the "
-"input signal and the output signal generated by the SDI device.";
-
-static const char * __hsync_advance_help =
-"The HSync Advance entry allows you to specify the horizontal advance between "
-"the input signal and the output signal generated by the SDI device.";
-
-static const char * __vsync_delay_help =
-"The VSync Delay entry allows you to specify the vertical delay between the "
-"input signal and the output signal generated by the SDI device.";
-
-static const char * __vsync_advance_help =
-"The VSync Advance entry allows you to specify the vertical advance between "
-"the input signal and the output signal generated by the SDI device.";
-
-
-
-
-/**** Utility Functions ******************************************************/
-
-/*
- * ctk_gvo_sync_get_type() - Returns the CtkGvoSync "class" type
- */
-
-GType ctk_gvo_sync_get_type(void)
-{
- static GType ctk_gvo_sync_type = 0;
-
- if (!ctk_gvo_sync_type) {
- static const GTypeInfo ctk_gvo_sync_info = {
- sizeof (CtkGvoSyncClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- NULL, /* class_init, */
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (CtkGvoSync),
- 0, /* n_preallocs */
- NULL, /* instance_init */
- NULL /* value_table */
- };
-
- ctk_gvo_sync_type =
- g_type_register_static (GTK_TYPE_VBOX,
- "CtkGvoSync", &ctk_gvo_sync_info, 0);
- }
-
- return ctk_gvo_sync_type;
-
-} /* ctk_gvo_sync_get_type() */
-
-
-
-/*
- * max_input_video_format_text_entry_length()
- */
-
-static int max_input_video_format_text_entry_length(void)
-{
- gint i, tmp, max = 0;
-
- for (i = 0; videoFormatNames[i].name; i++) {
- tmp = strlen(videoFormatNames[i].name);
- if (max < tmp) max = tmp;
- }
-
- return max;
-
-} /* max_input_video_format_text_entry_length() */
-
-
-
-/*
- * get_current_sync_format() - given the current state of the
- * sync source and composite detection mode, return the value
- * to use for the sync format dropdown.
- */
-
-static gint get_current_sync_format(CtkGvoSync *ctk_gvo_sync)
-{
- /* Setup the sync format menu */
-
- if (ctk_gvo_sync->sync_source == NV_CTRL_GVO_SYNC_SOURCE_SDI) {
- return SYNC_FORMAT_SDI;
- } else if (ctk_gvo_sync->comp_mode ==
- NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE_AUTO) {
- return SYNC_FORMAT_COMP_AUTO;
- } else if (ctk_gvo_sync->comp_mode ==
- NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE_BI_LEVEL) {
- return SYNC_FORMAT_COMP_BI_LEVEL;
- } else if (ctk_gvo_sync->comp_mode ==
- NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE_TRI_LEVEL){
- return SYNC_FORMAT_COMP_TRI_LEVEL;
- }
-
- // should not get here
- return SYNC_FORMAT_SDI;
-
-} /* get_current_sync_format() */
-
-
-
-/*
- * sync_signal_detected() - Returns whether or not a sync signal
- * is currently detected.
- */
-
-static gboolean sync_signal_detected(CtkGvoSync *ctk_gvo_sync)
-{
- /* Is a sync signal detected? */
-
- if ((ctk_gvo_sync->comp_sync_input_detected !=
- NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECTED_FALSE) ||
- (ctk_gvo_sync->sdi_sync_input_detected !=
- NV_CTRL_GVO_SDI_SYNC_INPUT_DETECTED_NONE)) {
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-
-
-/*
- * set_sync_format_menu() - Selects the sync format drop down menu
- * entry based on the current sync source and composite detection mode.
- */
-
-static void set_sync_format_menu(CtkGvoSync *ctk_gvo_sync)
-{
- gint val = get_current_sync_format(ctk_gvo_sync);
-
- ctk_drop_down_menu_set_current_value
- (CTK_DROP_DOWN_MENU(ctk_gvo_sync->sync_format_menu), val);
-}
-
-
-
-/*
- * update_sync_lock_status_text() - Sets the correct text based on the
- * current state of input sync lock.
- */
-
-static void update_sync_lock_status_text(CtkGvoSync *ctk_gvo_sync)
-{
- gchar *str = "Free Running";
-
- switch (ctk_gvo_sync->sync_mode) {
-
- case NV_CTRL_GVO_SYNC_MODE_FREE_RUNNING:
- gtk_widget_set_sensitive(ctk_gvo_sync->sync_lock_status_text, FALSE);
- break;
-
- case NV_CTRL_GVO_SYNC_MODE_GENLOCK:
- gtk_widget_set_sensitive(ctk_gvo_sync->sync_lock_status_text, TRUE);
- if (ctk_gvo_sync->sync_lock_status ==
- NV_CTRL_GVO_SYNC_LOCK_STATUS_LOCKED) {
- str = "GenLocked";
- }
- break;
-
- case NV_CTRL_GVO_SYNC_MODE_FRAMELOCK:
- gtk_widget_set_sensitive(ctk_gvo_sync->sync_lock_status_text, TRUE);
- if (ctk_gvo_sync->sync_lock_status ==
- NV_CTRL_GVO_SYNC_LOCK_STATUS_LOCKED) {
- str = "FrameLocked";
- } break;
-
- default:
- gtk_widget_set_sensitive(ctk_gvo_sync->sync_lock_status_text, FALSE);
- str = "Unknown";
- break;
- }
-
- gtk_label_set_text(GTK_LABEL(ctk_gvo_sync->sync_lock_status_text), str);
-
-} /* update_sync_lock_status_text() */
-
-
-
-
-/**** Creation Functions *****************************************************/
-
-/*
- * ctk_gvo_sync_new() - create a CtkGvoSync widget
- */
-
-GtkWidget* ctk_gvo_sync_new(CtrlTarget *ctrl_target,
- GtkWidget *parent_window,
- CtkConfig *ctk_config,
- CtkEvent *ctk_event,
- CtkGvo *gvo_parent)
-{
- GObject *object;
- CtkGvoSync *ctk_gvo_sync;
- GtkWidget *frame;
- GtkWidget *hbox;
- GtkWidget *label;
- GtkWidget *alignment;
- GtkWidget *button;
-
- GtkWidget *table, *menu;
-
- gint val, i;
- CtrlAttributeValidValues valid;
- ReturnStatus ret;
- gint row;
-
- const char *help_text;
-
- /* make sure we have a valid target */
-
- g_return_val_if_fail((ctrl_target != NULL) &&
- (ctrl_target->h != NULL), NULL);
-
- /* create and initialize the object */
-
- object = g_object_new(CTK_TYPE_GVO_SYNC, NULL);
-
- ctk_gvo_sync = CTK_GVO_SYNC(object);
- ctk_gvo_sync->ctrl_target = ctrl_target;
- ctk_gvo_sync->parent_window = parent_window;
- ctk_gvo_sync->ctk_config = ctk_config;
- ctk_gvo_sync->ctk_event = ctk_event;
- ctk_gvo_sync->gvo_parent = gvo_parent;
-
- /* Query the current GVO state */
-
- if ( !query_init_gvo_sync_state(ctk_gvo_sync) ) {
- // Free the object
- g_object_ref(object);
- ctk_g_object_ref_sink(G_OBJECT(object));
- g_object_unref(object);
- return NULL;
- }
-
- /* set container properties for the widget */
-
- gtk_box_set_spacing(GTK_BOX(object), 10);
-
- /* banner */
-
- hbox = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(object), hbox, FALSE, FALSE, 0);
-
- ctk_gvo_sync->banner_box = hbox;
-
- /*
- * Sync options
- */
-
- frame = gtk_frame_new("Sync Options");
- ctk_gvo_sync->frame = frame;
-
- gtk_box_pack_start(GTK_BOX(object), frame, FALSE, FALSE, 0);
-
- table = gtk_table_new(6, 2, FALSE);
- gtk_table_set_row_spacings(GTK_TABLE(table), 0);
- gtk_table_set_col_spacings(GTK_TABLE(table), 0);
-
- gtk_container_add(GTK_CONTAINER(frame), table);
-
- /* input video format */
-
- label = gtk_label_new("Input Video Format: ");
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach(GTK_TABLE(table), label,
- 0, 1, 0, 1, GTK_FILL, GTK_FILL,
- TABLE_PADDING, TABLE_PADDING);
-
- hbox = gtk_hbox_new(FALSE, 5);
-
- ctk_gvo_sync->input_video_format_text_entry = gtk_entry_new();
-
- ctk_config_set_tooltip(ctk_config,
- ctk_gvo_sync->input_video_format_text_entry,
- __input_video_format_help);
-
- gtk_entry_set_width_chars
- (GTK_ENTRY(ctk_gvo_sync->input_video_format_text_entry),
- max_input_video_format_text_entry_length());
-
- gtk_widget_set_sensitive(ctk_gvo_sync->input_video_format_text_entry,
- FALSE);
-
- update_input_video_format_text_entry(ctk_gvo_sync);
-
- gtk_box_pack_start(GTK_BOX(hbox),
- ctk_gvo_sync->input_video_format_text_entry,
- TRUE, TRUE, 0);
-
- /* Input video format detect button */
-
- button = gtk_toggle_button_new_with_label("Detect");
- alignment = gtk_alignment_new(1, 1, 0, 0);
- gtk_container_add(GTK_CONTAINER(alignment), button);
-
- ctk_gvo_sync->input_video_format_detect_button = button;
-
- ctk_config_set_tooltip(ctk_config, button,
- __input_video_format_detect_help);
-
- g_signal_connect(G_OBJECT(button), "toggled",
- G_CALLBACK(detect_input_toggled), ctk_gvo_sync);
-
- gtk_box_pack_start(GTK_BOX(hbox), alignment, FALSE, FALSE, 0);
-
- gtk_table_attach(GTK_TABLE(table), hbox,
- 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL,
- TABLE_PADDING, TABLE_PADDING);
-
- /* Composite Termination */
-
- if (ctk_gvo_sync->caps & NV_CTRL_GVO_CAPABILITIES_COMPOSITE_TERMINATION) {
-
- button =
- gtk_check_button_new_with_label("Enable Composite Termination");
-
- ctk_config_set_tooltip(ctk_config, button,
- __composite_termination_help);
-
- alignment = gtk_alignment_new(1, 1, 0, 0);
-
- gtk_container_add(GTK_CONTAINER(alignment), button);
- gtk_table_attach(GTK_TABLE(table), alignment,
- 0, 2, 2, 3, GTK_FILL | GTK_EXPAND, GTK_FILL,
- TABLE_PADDING, TABLE_PADDING);
-
- ctk_gvo_sync->composite_termination_button = button;
-
- init_composite_termination(ctk_gvo_sync);
-
- g_signal_connect(G_OBJECT(button), "toggled",
- G_CALLBACK(composite_termination_toggled),
- ctk_gvo_sync);
-
- row = 3;
- } else {
- ctk_gvo_sync->composite_termination_button = NULL;
- row = 2;
- }
-
- /* Sync Mode */
-
- menu = start_menu("Sync Mode: ", table, row);
-
- ctk_drop_down_menu_append_item(CTK_DROP_DOWN_MENU(menu), "Free Running",
- NV_CTRL_GVO_SYNC_MODE_FREE_RUNNING);
-
- ctk_drop_down_menu_append_item(CTK_DROP_DOWN_MENU(menu), "GenLock",
- NV_CTRL_GVO_SYNC_MODE_GENLOCK);
-
- ctk_drop_down_menu_append_item(CTK_DROP_DOWN_MENU(menu), "FrameLock",
- NV_CTRL_GVO_SYNC_MODE_FRAMELOCK);
-
- finish_menu(menu, table, row);
- row++;
-
- ctk_gvo_sync->sync_mode_menu = menu;
-
- ctk_drop_down_menu_set_tooltip(ctk_config, CTK_DROP_DOWN_MENU(menu),
- __sync_mode_help);
-
- ctk_drop_down_menu_set_current_value
- (CTK_DROP_DOWN_MENU(ctk_gvo_sync->sync_mode_menu),
- ctk_gvo_sync->sync_mode);
-
- g_signal_connect(G_OBJECT(ctk_gvo_sync->sync_mode_menu), "changed",
- G_CALLBACK(sync_mode_changed), (gpointer) ctk_gvo_sync);
-
- /* Sync Format */
-
- menu = start_menu("Sync Format: ", table, row);
-
- for (i = 0; syncFormatNames[i].name; i++) {
- ctk_drop_down_menu_append_item(CTK_DROP_DOWN_MENU(menu),
- syncFormatNames[i].name,
- syncFormatNames[i].format);
- }
-
- finish_menu(menu, table, row);
- row++;
-
- ctk_gvo_sync->sync_format_menu = menu;
-
- ctk_drop_down_menu_set_tooltip(ctk_config, CTK_DROP_DOWN_MENU(menu),
- __sync_format_help);
-
- init_sync_format_menu(ctk_gvo_sync);
-
- g_signal_connect(G_OBJECT(ctk_gvo_sync->sync_format_menu),
- "changed", G_CALLBACK(sync_format_changed),
- (gpointer) ctk_gvo_sync);
-
- /* Sync Status */
-
- label = gtk_label_new("Sync Status:");
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, row, row+1,
- GTK_FILL, GTK_FILL, TABLE_PADDING, TABLE_PADDING);
-
- ctk_gvo_sync->sync_lock_status_text = gtk_label_new("");
-
- update_sync_lock_status_text(ctk_gvo_sync);
-
- hbox = gtk_hbox_new(FALSE, 5);
- gtk_box_pack_start(GTK_BOX(hbox), ctk_gvo_sync->sync_lock_status_text,
- FALSE, FALSE, 0);
-
- gtk_table_attach(GTK_TABLE(table), hbox,
- 1, 2, row, row+1,
- GTK_FILL /*| GTK_EXPAND*/, GTK_FILL,
- TABLE_PADDING, TABLE_PADDING);
- row++;
-
-
- /*
- * Synchronization Skew (Delay/Advance)
- */
-
- /* NV_CTRL_GVO_SYNC_DELAY_PIXELS */
-
- ret = NvCtrlGetValidAttributeValues(ctrl_target,
- NV_CTRL_GVO_SYNC_DELAY_PIXELS,
- &valid);
-
- if ((ret == NvCtrlSuccess) &&
- (valid.valid_type == CTRL_ATTRIBUTE_VALID_TYPE_RANGE)) {
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_SYNC_DELAY_PIXELS,
- &val);
- if (ret != NvCtrlSuccess) val = 0;
-
- if (ctk_gvo_sync->caps & NV_CTRL_GVO_CAPABILITIES_ADVANCE_SYNC_SKEW) {
- label = gtk_label_new("HSync Advance:");
- help_text = __hsync_advance_help;
- } else {
- label = gtk_label_new("HSync Delay:");
- help_text = __hsync_delay_help;
- }
-
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, row, row+1,
- GTK_FILL, GTK_FILL, TABLE_PADDING, TABLE_PADDING);
-
- ctk_gvo_sync->hsync_delay_spin_button =
- gtk_spin_button_new_with_range(valid.range.min,
- valid.range.max, 1);
-
- ctk_config_set_tooltip(ctk_config,
- ctk_gvo_sync->hsync_delay_spin_button,
- help_text);
-
- gtk_spin_button_set_value
- (GTK_SPIN_BUTTON(ctk_gvo_sync->hsync_delay_spin_button), val);
-
- g_signal_connect(G_OBJECT(ctk_gvo_sync->hsync_delay_spin_button),
- "value-changed",
- G_CALLBACK(hsync_delay_changed), ctk_gvo_sync);
-
- hbox = gtk_hbox_new(FALSE, 5);
- gtk_box_pack_start(GTK_BOX(hbox),
- ctk_gvo_sync->hsync_delay_spin_button,
- FALSE, FALSE, 0);
-
- label = gtk_label_new("(pixels)");
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_box_pack_start(GTK_BOX(hbox), label,
- FALSE, FALSE, 0);
-
- gtk_table_attach(GTK_TABLE(table), hbox,
- 1, 2, row, row+1,
- GTK_FILL /*| GTK_EXPAND*/, GTK_FILL,
- TABLE_PADDING, TABLE_PADDING);
- row++;
- }
-
- /* NV_CTRL_GVO_SYNC_DELAY_LINES */
-
- ret = NvCtrlGetValidAttributeValues(ctrl_target,
- NV_CTRL_GVO_SYNC_DELAY_LINES,
- &valid);
-
- if ((ret == NvCtrlSuccess) &&
- (valid.valid_type == CTRL_ATTRIBUTE_VALID_TYPE_RANGE)) {
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_SYNC_DELAY_LINES,
- &val);
- if (ret != NvCtrlSuccess) val = 0;
-
- if (ctk_gvo_sync->caps & NV_CTRL_GVO_CAPABILITIES_ADVANCE_SYNC_SKEW) {
- label = gtk_label_new("VSync Advance:");
- help_text = __vsync_advance_help;
- } else {
- label = gtk_label_new("VSync Delay:");
- help_text = __vsync_delay_help;
- }
-
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, row, row+1,
- GTK_FILL, GTK_FILL, TABLE_PADDING, TABLE_PADDING);
-
- ctk_gvo_sync->vsync_delay_spin_button =
- gtk_spin_button_new_with_range(valid.range.min,
- valid.range.max, 1);
-
- ctk_config_set_tooltip(ctk_config,
- ctk_gvo_sync->vsync_delay_spin_button,
- help_text);
-
- gtk_spin_button_set_value
- (GTK_SPIN_BUTTON(ctk_gvo_sync->vsync_delay_spin_button), val);
-
- g_signal_connect(G_OBJECT(ctk_gvo_sync->vsync_delay_spin_button),
- "value-changed",
- G_CALLBACK(vsync_delay_changed), ctk_gvo_sync);
-
- hbox = gtk_hbox_new(FALSE, 5);
- gtk_box_pack_start(GTK_BOX(hbox),
- ctk_gvo_sync->vsync_delay_spin_button,
- FALSE, FALSE, 0);
-
- label = gtk_label_new("(lines)");
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_box_pack_start(GTK_BOX(hbox), label,
- FALSE, FALSE, 0);
-
- gtk_table_attach(GTK_TABLE(table), hbox,
- 1, 2, row, row+1,
- GTK_FILL /*| GTK_EXPAND*/, GTK_FILL,
- TABLE_PADDING, TABLE_PADDING);
- row++;
- }
-
- /* create the watch cursor (for use when the "Detect" button is toggled" */
-
- ctk_gvo_sync->wait_cursor = gdk_cursor_new(GDK_WATCH);
-
- /* Set UI sensitivity */
-
- update_gvo_sync_sensitivity(ctk_gvo_sync);
-
- /* Start listening for events */
-
- register_for_gvo_sync_events(ctk_gvo_sync);
-
- /* show the page */
-
- gtk_widget_show_all(GTK_WIDGET(object));
-
- return GTK_WIDGET(object);
-
-} /* ctk_gvo_sync_new() */
-
-
-
-/*
- * start_menu() - Start the creation of a labeled dropdown menu. (Packs
- * the dropdown label into the table row.
- */
-
-static GtkWidget *start_menu(const gchar *name, GtkWidget *table,
- const gint row)
-{
- GtkWidget *menu, *label, *alignment;
-
- label = gtk_label_new(name);
- alignment = gtk_alignment_new(0, 0, 0, 0);
- gtk_container_add(GTK_CONTAINER(alignment), label);
-
- gtk_table_attach(GTK_TABLE(table),
- alignment, 0, 1, row, row+1, GTK_FILL, GTK_FILL,
- TABLE_PADDING, TABLE_PADDING);
-
- menu = ctk_drop_down_menu_new(CTK_DROP_DOWN_MENU_FLAG_READONLY);
-
- return menu;
-}
-
-
-
-/*
- * finish_menu() - Finish/Finalize a dropdown menu. (Packs the menu in
- * the table row.)
- */
-
-static void finish_menu(GtkWidget *menu, GtkWidget *table, const gint row)
-{
- gtk_widget_show_all(menu);
-
- gtk_table_attach(GTK_TABLE(table), menu, 1, 2, row, row+1,
- GTK_FILL | GTK_EXPAND, GTK_FILL,
- TABLE_PADDING, TABLE_PADDING);
-}
-
-
-
-
-/**** Initialization Functions ***********************************************/
-
-/*
- * query_init_gvo_sync_state() - Query the initial GVO state so we can setup
- * the UI correctly.
- */
-
-static gboolean query_init_gvo_sync_state(CtkGvoSync *ctk_gvo_sync)
-{
- CtrlTarget *ctrl_target = ctk_gvo_sync->ctrl_target;
- gint val;
- ReturnStatus ret;
-
-
- /* Check if this screen supports GVO */
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_SUPPORTED,
- &val);
- if ((ret != NvCtrlSuccess) || (val != NV_CTRL_GVO_SUPPORTED_TRUE)) {
- /* GVO not available */
- return FALSE;
- }
-
- /* Get this GVO device's capabilities */
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_CAPABILITIES,
- &val);
- if (ret != NvCtrlSuccess) return FALSE;
- ctk_gvo_sync->caps = val;
-
- /* Query the current input video formats */
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVIO_DETECTED_VIDEO_FORMAT, &val);
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVIO_VIDEO_FORMAT_NONE;
- }
- ctk_gvo_sync->input_video_format = val;
-
- /* Query the sync mode */
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_SYNC_MODE,
- &val);
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_SYNC_MODE_FREE_RUNNING;
- }
- ctk_gvo_sync->sync_mode = val;
-
- /* query COMPOSITE_SYNC_INPUT_DETECTED */
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECTED, &val);
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECTED_FALSE;
- }
- ctk_gvo_sync->comp_sync_input_detected = val;
-
- /* query COMPOSITE_SYNC_INPUT_DETECT_MODE */
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE,
- &val);
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE_AUTO;
- }
- ctk_gvo_sync->comp_mode = val;
-
- /* query SDI_SYNC_INPUT_DETECTED */
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVO_SDI_SYNC_INPUT_DETECTED, &val);
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_SDI_SYNC_INPUT_DETECTED_NONE;
- }
- ctk_gvo_sync->sdi_sync_input_detected = val;
-
- /* query sync source */
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVO_SYNC_SOURCE,
- &val);
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_SYNC_SOURCE_SDI;
- }
- ctk_gvo_sync->sync_source = val;
-
- /* Query framelock/genlock status */
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVO_SYNC_LOCK_STATUS,
- &val);
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_SYNC_LOCK_STATUS_UNLOCKED;
- }
- ctk_gvo_sync->sync_lock_status = val;
-
- return TRUE;
-
-} /* query_init_gvo_sync_state() */
-
-
-
-/*
- * init_composite_termination() - Initialize the state of the composite
- * termination button.
- */
-
-static void init_composite_termination(CtkGvoSync *ctk_gvo_sync)
-{
- CtrlTarget *ctrl_target = ctk_gvo_sync->ctrl_target;
- ReturnStatus ret;
- gint val;
-
- if (!ctk_gvo_sync->composite_termination_button) return;
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVO_COMPOSITE_TERMINATION, &val);
- if (ret != NvCtrlSuccess) {
- val = NV_CTRL_GVO_COMPOSITE_TERMINATION_DISABLE;
- }
-
- gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON(ctk_gvo_sync->composite_termination_button),
- val == NV_CTRL_GVO_COMPOSITE_TERMINATION_ENABLE);
-
-} /* init_composite_termination() */
-
-
-
-/*
- * init_sync_format_menu() - initialize the sync format menu
- */
-
-static void init_sync_format_menu(CtkGvoSync *ctk_gvo_sync)
-{
- set_sync_format_menu(ctk_gvo_sync);
-
-} /* init_sync_format_menu() */
-
-
-
-/*
- * register_for_gvo_sync_events() - Configure ctk_gvo_sync object to listen
- * for GVO synchronization related evens.
- */
-
-static void register_for_gvo_sync_events(CtkGvoSync *ctk_gvo_sync)
-{
- g_signal_connect(G_OBJECT(ctk_gvo_sync->ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVO_SYNC_MODE),
- G_CALLBACK(gvo_sync_event_received),
- (gpointer) ctk_gvo_sync);
-
- g_signal_connect(G_OBJECT(ctk_gvo_sync->ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVO_SYNC_SOURCE),
- G_CALLBACK(gvo_sync_event_received),
- (gpointer) ctk_gvo_sync);
-
- g_signal_connect(G_OBJECT(ctk_gvo_sync->ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE),
- G_CALLBACK(gvo_sync_event_received),
- (gpointer) ctk_gvo_sync);
-
- g_signal_connect(G_OBJECT(ctk_gvo_sync->ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVO_SYNC_DELAY_PIXELS),
- G_CALLBACK(gvo_sync_event_received),
- (gpointer) ctk_gvo_sync);
-
- g_signal_connect(G_OBJECT(ctk_gvo_sync->ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVO_SYNC_DELAY_LINES),
- G_CALLBACK(gvo_sync_event_received),
- (gpointer) ctk_gvo_sync);
-
- g_signal_connect(G_OBJECT(ctk_gvo_sync->ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVO_COMPOSITE_TERMINATION),
- G_CALLBACK(gvo_sync_event_received),
- (gpointer) ctk_gvo_sync);
-
-} /* register_for_gvo_sync_events() */
-
-
-
-
-/**** Common Update Functions ************************************************/
-
-/*
- * update_gvo_sync_sensitivity() - Updates the sensitivity of various UI
- * widgets based on whether or not an input sync signal is detected.
- *
- */
-
-static void update_gvo_sync_sensitivity(CtkGvoSync *ctk_gvo_sync)
-{
- gboolean sensitive;
-
- /* Allow selection of the sync format if we're not free-running */
-
- sensitive = (ctk_gvo_sync->sync_mode != NV_CTRL_GVO_SYNC_MODE_FREE_RUNNING);
-
- gtk_widget_set_sensitive(ctk_gvo_sync->sync_format_menu, sensitive);
-
- /* Update options that require a valid sync signal */
-
- sensitive = (sensitive && sync_signal_detected(ctk_gvo_sync));
-
- if (ctk_gvo_sync->hsync_delay_spin_button) {
- gtk_widget_set_sensitive(ctk_gvo_sync->hsync_delay_spin_button,
- sensitive);
- }
- if (ctk_gvo_sync->vsync_delay_spin_button) {
- gtk_widget_set_sensitive(ctk_gvo_sync->vsync_delay_spin_button,
- sensitive);
- }
-
-} /* update_gvo_sync_sensitivity() */
-
-
-
-/*
- * update_input_video_format_text_entry() - Displays the currently detected
- * input video format.
- */
-
-static void update_input_video_format_text_entry(CtkGvoSync *ctk_gvo_sync)
-{
- gint i;
- const gchar *str;
-
- if (ctk_gvo_sync->sync_mode == NV_CTRL_GVO_SYNC_MODE_FREE_RUNNING) {
- str = "Free Running";
- } else {
- str = "No incoming signal detected";
- for (i = 0; videoFormatNames[i].name; i++) {
- if (videoFormatNames[i].format == ctk_gvo_sync->input_video_format) {
- str = videoFormatNames[i].name;
- }
- }
- }
- gtk_entry_set_text(GTK_ENTRY(ctk_gvo_sync->input_video_format_text_entry), str);
-
-} /* update_input_video_format_text_entry() */
-
-
-
-/*
- * post_composite_termination_toggled() - Call this function after
- * the composite termination attribute has changed.
- */
-
-static void post_composite_termination_toggled(CtkGvoSync *ctk_gvo_sync,
- gboolean enabled)
-{
- /* update the statusbar */
-
- ctk_config_statusbar_message(ctk_gvo_sync->ctk_config,
- "Composite Termination %s.",
- enabled ? "Enabled" : "Disabled");
-
-} /* post_composite_termination_toggled() */
-
-
-
-/*
- * post_sync_mode_menu_changed() - Call this function after the sync mode
- * menu has changed.
- *
- */
-
-static void post_sync_mode_menu_changed(CtkGvoSync *ctk_gvo_sync, gint value)
-{
- char *name;
-
- /* Update the UI */
-
- update_input_video_format_text_entry(ctk_gvo_sync);
- update_gvo_sync_sensitivity(ctk_gvo_sync);
-
- switch (value) {
- case NV_CTRL_GVO_SYNC_MODE_FREE_RUNNING: name = "Free Running"; break;
- case NV_CTRL_GVO_SYNC_MODE_GENLOCK: name = "GenLock"; break;
- case NV_CTRL_GVO_SYNC_MODE_FRAMELOCK: name = "FrameLock"; break;
- default: return;
- }
-
- ctk_config_statusbar_message(ctk_gvo_sync->ctk_config,
- "Sync Mode set to %s.", name);
-
-} /* post_sync_mode_menu_changed() */
-
-
-
-/*
- * post_sync_format_menu_changed() - Call this function after the sync
- * format has changed.
- */
-
-static void post_sync_format_menu_changed(CtkGvoSync *ctk_gvo_sync)
-{
- const char *name = "Unknown";
- gint value;
- gint i;
-
-
- /* Update the status bar */
-
- value = get_current_sync_format(ctk_gvo_sync);
-
- for (i = 0; syncFormatNames[i].name; i++) {
- if (syncFormatNames[i].format == value) {
- name = syncFormatNames[i].name;
- break;
- }
- }
-
- ctk_config_statusbar_message(ctk_gvo_sync->ctk_config,
- "Sync Format set to \"%s\".", name);
-
-} /* post_sync_format_menu_changed() */
-
-
-
-
-/**** UI Event Handlers ************************************************/
-
-/*
- * detect_input_toggled() - if the Detect button is enabled, then enable
- * INPUT_VIDEO_FORMAT_REACQUIRE, make everything else insensitive,
- * switch to the wait cursor, and queue detect_input_done() to be
- * called.
- */
-
-static void detect_input_toggled(GtkToggleButton *togglebutton,
- CtkGvoSync *ctk_gvo_sync)
-{
- CtrlTarget *ctrl_target = ctk_gvo_sync->ctrl_target;
- gboolean enabled;
-
- enabled = gtk_toggle_button_get_active(togglebutton);
-
- if (!enabled) return;
-
- /* grab the server */
-
- gtk_grab_add(ctk_gvo_sync->input_video_format_detect_button);
-
- /* change the cursor */
-
- gdk_window_set_cursor
- (ctk_widget_get_window(GTK_WIDGET(ctk_gvo_sync->parent_window)),
- ctk_gvo_sync->wait_cursor);
-
- /* make all other widgets insensitive */
-
- gtk_widget_set_sensitive(ctk_gvo_sync->frame, FALSE);
-
- /* enable REACQUIRE */
-
- NvCtrlSetAttribute(ctrl_target,
- NV_CTRL_GVO_INPUT_VIDEO_FORMAT_REACQUIRE,
- NV_CTRL_GVO_INPUT_VIDEO_FORMAT_REACQUIRE_TRUE);
-
- /* update the statusbar */
-
- ctk_config_statusbar_message(ctk_gvo_sync->ctk_config,
- "Detecting incoming signal...");
-
- /* register the "done" function */
-
- g_timeout_add(DEFAULT_DETECT_INPUT_TIME_INTERVAL,
- detect_input_done, (gpointer) ctk_gvo_sync);
-
-} /* detect_input_toggled() */
-
-
-
-/*
- * detect_input_done() - done detecting; disable REACQUIRE, make all
- * widgets sensitive again, and probe the new state
- */
-
-static gint detect_input_done(gpointer data)
-{
- CtkGvoSync *ctk_gvo_sync = CTK_GVO_SYNC(data);
- CtrlTarget *ctrl_target = ctk_gvo_sync->ctrl_target;
-
- /* disable REACQUIRE */
-
- NvCtrlSetAttribute(ctrl_target,
- NV_CTRL_GVO_INPUT_VIDEO_FORMAT_REACQUIRE,
- NV_CTRL_GVO_INPUT_VIDEO_FORMAT_REACQUIRE_FALSE);
-
- /* reprobe */
-
- ctk_gvo_banner_probe((gpointer)(ctk_gvo_sync->gvo_parent->banner));
-
- /* un-press the detect button */
-
- g_signal_handlers_block_by_func
- (G_OBJECT(ctk_gvo_sync->input_video_format_detect_button),
- G_CALLBACK(detect_input_toggled),
- (gpointer) ctk_gvo_sync);
-
- gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON(ctk_gvo_sync->input_video_format_detect_button), FALSE);
-
- g_signal_handlers_unblock_by_func
- (G_OBJECT(ctk_gvo_sync->input_video_format_detect_button),
- G_CALLBACK(detect_input_toggled),
- (gpointer) ctk_gvo_sync);
-
- /* update the status bar */
-
- ctk_config_statusbar_message(ctk_gvo_sync->ctk_config,
- "Done detecting incoming signal.");
-
- /* restore sensitivity */
-
- gtk_widget_set_sensitive(ctk_gvo_sync->frame, TRUE);
-
- /* restore the cursor */
-
- gdk_window_set_cursor(ctk_widget_get_window(GTK_WIDGET(ctk_gvo_sync->parent_window)),
- NULL);
-
- /* ungrab the server */
-
- gtk_grab_remove(ctk_gvo_sync->input_video_format_detect_button);
-
- return FALSE;
-
-} /* detect_input_done() */
-
-
-
-/*
- * composite_termination_toggled() - Called when the user clicks
- * on the "Enable Composite Termination" check button.
- */
-
-static void composite_termination_toggled(GtkWidget *button,
- CtkGvoSync *ctk_gvo_sync)
-{
- CtrlTarget *ctrl_target = ctk_gvo_sync->ctrl_target;
- gboolean enabled;
-
- enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button));
-
- NvCtrlSetAttribute(ctrl_target,
- NV_CTRL_GVO_COMPOSITE_TERMINATION,
- (enabled ? NV_CTRL_GVO_COMPOSITE_TERMINATION_ENABLE :
- NV_CTRL_GVO_COMPOSITE_TERMINATION_DISABLE));
-
- post_composite_termination_toggled(ctk_gvo_sync, enabled);
-
-} /* composite_termination_toggled() */
-
-
-
-/*
- * sync_mode_changed() - callback when the user makes a selection from the
- * sync mode menu.
- */
-
-static void sync_mode_changed(CtkDropDownMenu *menu, gpointer user_data)
-{
- CtkGvoSync *ctk_gvo_sync = CTK_GVO_SYNC(user_data);
- CtrlTarget *ctrl_target = ctk_gvo_sync->ctrl_target;
- gint value;
-
- value = ctk_drop_down_menu_get_current_value(menu);
-
- NvCtrlSetAttribute(ctrl_target, NV_CTRL_GVO_SYNC_MODE, value);
-
- if (value != NV_CTRL_GVO_SYNC_MODE_FREE_RUNNING) {
- NvCtrlSetAttribute(ctrl_target, NV_CTRL_GVO_SYNC_SOURCE,
- ctk_gvo_sync->sync_source);
- }
-
- ctk_gvo_sync->sync_mode = value;
-
- post_sync_mode_menu_changed(ctk_gvo_sync, value);
-
-} /* sync_mode_changed() */
-
-
-
-/*
- * sync_format_changed() - callback when the user makes a selection from the
- * sync format menu (from the UI.)
- */
-
-static void sync_format_changed(CtkDropDownMenu *menu, gpointer user_data)
-{
- CtkGvoSync *ctk_gvo_sync = CTK_GVO_SYNC(user_data);
- CtrlTarget *ctrl_target = ctk_gvo_sync->ctrl_target;
- gint value, sync_source, comp_mode;
-
- value = ctk_drop_down_menu_get_current_value(menu);
-
- switch (value) {
- case SYNC_FORMAT_SDI:
- sync_source = NV_CTRL_GVO_SYNC_SOURCE_SDI;
- comp_mode = NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE_AUTO;
- break;
- case SYNC_FORMAT_COMP_AUTO:
- sync_source = NV_CTRL_GVO_SYNC_SOURCE_COMPOSITE;
- comp_mode = NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE_AUTO;
- break;
- case SYNC_FORMAT_COMP_BI_LEVEL:
- sync_source = NV_CTRL_GVO_SYNC_SOURCE_COMPOSITE;
- comp_mode = NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE_BI_LEVEL;
- break;
- case SYNC_FORMAT_COMP_TRI_LEVEL:
- sync_source = NV_CTRL_GVO_SYNC_SOURCE_COMPOSITE;
- comp_mode = NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE_TRI_LEVEL;
- break;
- default:
- return;
- }
-
- ctk_gvo_sync->sync_source = sync_source;
- ctk_gvo_sync->comp_mode = comp_mode;
-
- NvCtrlSetAttribute(ctrl_target,
- NV_CTRL_GVO_SYNC_SOURCE, sync_source);
-
- NvCtrlSetAttribute(ctrl_target,
- NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE,
- comp_mode);
-
- post_sync_format_menu_changed(ctk_gvo_sync);
-
-} /* sync_format_changed() */
-
-
-
-/*
- * hsync_delay_changed() - UI Callback function for when the user changes
- * the hsync delay.
- */
-
-static void hsync_delay_changed(GtkSpinButton *spinbutton, gpointer user_data)
-{
- CtkGvoSync *ctk_gvo_sync = CTK_GVO_SYNC(user_data);
- CtrlTarget *ctrl_target = ctk_gvo_sync->ctrl_target;
- gint val;
-
- val = gtk_spin_button_get_value(spinbutton);
-
- NvCtrlSetAttribute(ctrl_target, NV_CTRL_GVO_SYNC_DELAY_PIXELS, val);
-
-} /* hsync_delay_changed() */
-
-
-
-/*
- * vsync_delay_changed() - UI Callback function for when the user changes
- * the vsync delay.
- */
-
-static void vsync_delay_changed(GtkSpinButton *spinbutton, gpointer user_data)
-{
- CtkGvoSync *ctk_gvo_sync = CTK_GVO_SYNC(user_data);
- CtrlTarget *ctrl_target = ctk_gvo_sync->ctrl_target;
- gint val;
-
- val = gtk_spin_button_get_value(spinbutton);
-
- NvCtrlSetAttribute(ctrl_target, NV_CTRL_GVO_SYNC_DELAY_LINES, val);
-
-} /* vsync_delay_changed() */
-
-
-
-
-/**** NV-CONTROL/Misc Event Handlers *****************************************/
-
-/*
- * gvo_sync_event_received() - Callback function for handling
- * NV-CONTROL events.
- */
-
-static void gvo_sync_event_received(GObject *object,
- CtrlEvent *event,
- gpointer user_data)
-{
- CtkGvoSync *ctk_gvo_sync = CTK_GVO_SYNC(user_data);
- GtkWidget *widget;
- gint value;
- gboolean update_sync_format = FALSE;
-
- if (event->type != CTRL_EVENT_TYPE_INTEGER_ATTRIBUTE) {
- return;
- }
-
- value = event->int_attr.value;
-
- switch (event->int_attr.attribute) {
- case NV_CTRL_GVO_SYNC_MODE:
- ctk_gvo_sync->sync_mode = value;
- widget = ctk_gvo_sync->sync_mode_menu;
-
- g_signal_handlers_block_by_func(G_OBJECT(widget),
- G_CALLBACK(sync_mode_changed),
- (gpointer) ctk_gvo_sync);
-
- ctk_drop_down_menu_set_current_value
- (CTK_DROP_DOWN_MENU(widget), value);
-
- g_signal_handlers_unblock_by_func(G_OBJECT(widget),
- G_CALLBACK(sync_mode_changed),
- (gpointer) ctk_gvo_sync);
-
- post_sync_mode_menu_changed(ctk_gvo_sync, value);
- break;
-
- case NV_CTRL_GVO_SYNC_SOURCE:
- ctk_gvo_sync->sync_source = value;
- update_sync_format = TRUE;
- break;
-
- case NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE:
- ctk_gvo_sync->comp_mode = value;
- update_sync_format = TRUE;
- break;
-
- case NV_CTRL_GVO_SYNC_DELAY_PIXELS:
- widget = ctk_gvo_sync->hsync_delay_spin_button;
-
- if (widget) {
- g_signal_handlers_block_by_func(G_OBJECT(widget),
- G_CALLBACK(hsync_delay_changed),
- (gpointer) ctk_gvo_sync);
-
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), value);
-
- g_signal_handlers_unblock_by_func(G_OBJECT(widget),
- G_CALLBACK(hsync_delay_changed),
- (gpointer) ctk_gvo_sync);
- }
- break;
-
- case NV_CTRL_GVO_SYNC_DELAY_LINES:
- widget = ctk_gvo_sync->vsync_delay_spin_button;
-
- if (widget) {
- g_signal_handlers_block_by_func(G_OBJECT(widget),
- G_CALLBACK(vsync_delay_changed),
- (gpointer) ctk_gvo_sync);
-
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), value);
-
- g_signal_handlers_unblock_by_func(G_OBJECT(widget),
- G_CALLBACK(vsync_delay_changed),
- (gpointer) ctk_gvo_sync);
- }
- break;
-
- case NV_CTRL_GVO_COMPOSITE_TERMINATION:
- widget = ctk_gvo_sync->composite_termination_button;
-
- if (widget) {
- g_signal_handlers_block_by_func
- (G_OBJECT(widget),
- G_CALLBACK(composite_termination_toggled),
- ctk_gvo_sync);
-
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), value);
-
- g_signal_handlers_unblock_by_func
- (G_OBJECT(widget),
- G_CALLBACK(composite_termination_toggled),
- ctk_gvo_sync);
-
- post_composite_termination_toggled(ctk_gvo_sync, value);
- }
- break;
- }
-
-
- /* Update the sync format menu */
- if (update_sync_format) {
- widget = ctk_gvo_sync->sync_format_menu;
-
- g_signal_handlers_block_by_func(G_OBJECT(widget),
- G_CALLBACK(sync_format_changed),
- (gpointer) ctk_gvo_sync);
-
- set_sync_format_menu(ctk_gvo_sync);
-
- g_signal_handlers_unblock_by_func(G_OBJECT(widget),
- G_CALLBACK(sync_format_changed),
- (gpointer) ctk_gvo_sync);
-
- post_sync_format_menu_changed(ctk_gvo_sync);
- }
-
-} /* gvo_sync_event_received() */
-
-
-
-/*
- * gvo_sync_probe_callback() - Callback function for when the
- * sync signals are probed.
- */
-
-static gint gvo_sync_probe_callback(gpointer data)
-{
- CtkGvoSync *ctk_gvo_sync = CTK_GVO_SYNC(data);
- CtkGvo *ctk_gvo = ctk_gvo_sync->gvo_parent;
-
- /* update our copies of some SDI state variables */
-
- ctk_gvo_sync->input_video_format =
- CTK_GVO_BANNER(ctk_gvo->banner)->input_video_format;
-
- ctk_gvo_sync->comp_sync_input_detected =
- CTK_GVO_BANNER(ctk_gvo->banner)->composite_sync_input_detected;
-
- ctk_gvo_sync->sdi_sync_input_detected =
- CTK_GVO_BANNER(ctk_gvo->banner)->sdi_sync_input_detected;
-
- ctk_gvo_sync->sync_lock_status =
- CTK_GVO_BANNER(ctk_gvo->banner)->sync_lock_status;
-
- /* update the UI */
-
- update_input_video_format_text_entry(ctk_gvo_sync);
-
- update_sync_lock_status_text(ctk_gvo_sync);
-
- update_gvo_sync_sensitivity(ctk_gvo_sync);
-
- return TRUE;
-
-} /* gvo_sync_probe_callback() */
-
-
-
-/*
- * ctk_gvo_sync_select() - Callback function for when the GVO
- * sync config page is selected.
- */
-void ctk_gvo_sync_select(GtkWidget *widget)
-{
- CtkGvoSync *ctk_gvo_sync = CTK_GVO_SYNC(widget);
- CtkGvo *ctk_gvo = ctk_gvo_sync->gvo_parent;
-
- /* Grab the GVO banner */
-
- ctk_gvo_banner_set_parent(CTK_GVO_BANNER(ctk_gvo->banner),
- ctk_gvo_sync->banner_box,
- gvo_sync_probe_callback, ctk_gvo_sync);
-}
-
-
-
-/*
- * ctk_gvo_sync_unselect() - Callback function for when the GVO
- * sync config page is unselected.
- */
-
-void ctk_gvo_sync_unselect(GtkWidget *widget)
-{
- CtkGvoSync *ctk_gvo_sync = CTK_GVO_SYNC(widget);
- CtkGvo *ctk_gvo = ctk_gvo_sync->gvo_parent;
-
- /* Release the GVO banner */
-
- ctk_gvo_banner_set_parent(CTK_GVO_BANNER(ctk_gvo->banner),
- NULL, NULL, NULL);
-}
-
-
-
-/*
- * ctk_gvo_sync_create_help() - GVO sync configuration help page
- * creation.
- */
-
-GtkTextBuffer* ctk_gvo_sync_create_help(GtkTextTagTable *table,
- CtkGvoSync *ctk_gvo_sync)
-{
- GtkTextIter i;
- GtkTextBuffer *b;
-
- b = gtk_text_buffer_new(table);
-
- gtk_text_buffer_get_iter_at_offset(b, &i, 0);
-
- ctk_help_title(b, &i, "GVO (Graphics to Video Out) Synchronization "
- "options");
- ctk_help_para(b, &i, "This page gives access to configuration of the "
- "SDI synchronization options.");
-
- ctk_help_heading(b, &i, "Input Video Format");
- ctk_help_para(b, &i, "%s", __input_video_format_help);
- ctk_help_heading(b, &i, "Input Video Format Detect");
- ctk_help_para(b, &i, "%s", __input_video_format_detect_help);
- ctk_help_heading(b, &i, "Composite Termination");
- ctk_help_para(b, &i, "%s. This allows the composite signal to be daisy "
- "chained from a server load.",
- __composite_termination_help);
- ctk_help_heading(b, &i, "Sync Mode");
- ctk_help_para(b, &i, "%s", __sync_mode_help);
- ctk_help_heading(b, &i, "Sync Format");
- ctk_help_para(b, &i, "%s", __sync_format_help);
- ctk_help_heading(b, &i, "Sync Status");
- ctk_help_para(b, &i, "%s", __sync_status_help);
-
- if ( ctk_gvo_sync->caps & NV_CTRL_GVO_CAPABILITIES_ADVANCE_SYNC_SKEW ) {
- ctk_help_heading(b, &i, "HSync Advance");
- ctk_help_para(b, &i, "%s", __hsync_advance_help);
- ctk_help_heading(b, &i, "VSync Advance");
- ctk_help_para(b, &i, "%s", __vsync_advance_help);
- } else {
- ctk_help_heading(b, &i, "HSync Delay");
- ctk_help_para(b, &i, "%s", __hsync_delay_help);
- ctk_help_heading(b, &i, "VSync Delay");
- ctk_help_para(b, &i, "%s", __vsync_delay_help);
- }
-
- ctk_help_finish(b);
-
- return b;
-}
diff --git a/src/gtk+-2.x/ctkgvo-sync.h b/src/gtk+-2.x/ctkgvo-sync.h
deleted file mode 100644
index 4eefb13..0000000
--- a/src/gtk+-2.x/ctkgvo-sync.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
- * and Linux systems.
- *
- * Copyright (C) 2004 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,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses>.
- */
-
-#ifndef __CTK_GVO_SYNC_H__
-#define __CTK_GVO_SYNC_H__
-
-#include "ctkevent.h"
-#include "ctkconfig.h"
-#include "ctkgvo.h"
-
-
-G_BEGIN_DECLS
-
-#define CTK_TYPE_GVO_SYNC (ctk_gvo_sync_get_type())
-
-#define CTK_GVO_SYNC(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), CTK_TYPE_GVO_SYNC, \
- CtkGvoSync))
-
-#define CTK_GVO_SYNC_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), CTK_TYPE_GVO_SYNC, \
- CtkGvoSyncClass))
-
-#define CTK_IS_GVO_SYNC(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CTK_TYPE_GVO_SYNC))
-
-#define CTK_IS_GVO_SYNC_CLASS(class) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), CTK_TYPE_GVO_SYNC))
-
-#define CTK_GVO_SYNC_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), CTK_TYPE_GVO_SYNC, \
- CtkGvoSyncClass))
-
-
-typedef struct _CtkGvoSync CtkGvoSync;
-typedef struct _CtkGvoSyncClass CtkGvoSyncClass;
-
-
-struct _CtkGvoSync
-{
- GtkVBox parent;
-
- CtrlTarget *ctrl_target;
- GtkWidget *parent_window;
- CtkConfig *ctk_config;
- CtkEvent *ctk_event;
-
- /* State */
-
- gint caps; // SDI device capabilities
- gint sync_mode; // NV_CTRL_GVO_SYNC_MODE
-
- gint input_video_format; // NV_CTRL_GVIO_DETECTED_VIDEO_FORMAT
- gint sync_source; // NV_CTRL_ SDI and COMP sync formats...
-
- gint sdi_sync_input_detected;
- gint comp_sync_input_detected;
- gint comp_mode;
- gint sync_lock_status; // Genlocked/Framelock status
-
- /* Widgets */
-
- GtkWidget *frame;
-
- CtkGvo *gvo_parent;
- GtkWidget *banner_box;
-
- GtkWidget *input_video_format_text_entry;
- GtkWidget *input_video_format_detect_button;
- GtkWidget *composite_termination_button;
-
- GtkWidget *sync_mode_menu;
- GtkWidget *sync_format_menu; // SDI/Composite sync format
- GtkWidget *sync_lock_status_text;
-
- GtkWidget *hsync_delay_spin_button;
- GtkWidget *vsync_delay_spin_button;
-
- GdkCursor *wait_cursor;
-};
-
-struct _CtkGvoSyncClass
-{
- GtkVBoxClass parent_class;
-};
-
-
-GType ctk_gvo_sync_get_type (void) G_GNUC_CONST;
-GtkWidget* ctk_gvo_sync_new (CtrlTarget *, GtkWidget *, CtkConfig *,
- CtkEvent *, CtkGvo *);
-
-GtkTextBuffer* ctk_gvo_sync_create_help(GtkTextTagTable *, CtkGvoSync *);
-
-void ctk_gvo_sync_select(GtkWidget *);
-void ctk_gvo_sync_unselect(GtkWidget *);
-
-//GtkTextBuffer* ctk_gvo_sync_create_help (GtkTextTagTable *table);
-
-
-G_END_DECLS
-
-#endif /* __CTK_GVO_SYNC_H__ */
diff --git a/src/gtk+-2.x/ctkgvo.c b/src/gtk+-2.x/ctkgvo.c
deleted file mode 100644
index 14d960b..0000000
--- a/src/gtk+-2.x/ctkgvo.c
+++ /dev/null
@@ -1,807 +0,0 @@
-/*
- * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
- * and Linux systems.
- *
- * Copyright (C) 2004 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,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses>.
- */
-
-#include <gtk/gtk.h>
-#include <string.h>
-
-#include <X11/Xlib.h>
-
-#include "NvCtrlAttributes.h"
-
-#include "ctkhelp.h"
-#include "ctkgvo.h"
-#include "ctkdropdownmenu.h"
-#include "ctkutils.h"
-#include "ctkbanner.h"
-
-#include "ctkgvo-banner.h"
-
-#include "msg.h"
-
-
-
-#define TABLE_PADDING 5
-
-
-/* General information help */
-
-static const char *__general_firmware_version_help =
-"The Firmware Version reports the version of the firmware running on the "
-"SDI device.";
-
-static const char *__general_current_sdi_resolution_help =
-"The Current SDI Resolution reports the current active resolution that the "
-"SDI device is driving or 'Inactive' if SDI is currently disabled.";
-
-static const char *__general_current_sdi_state_help =
-"The Current SDI state reports the current usage of the SDI device.";
-
-static const char *__requested_sdi_video_format_help =
-"The Requested SDI Video Format indicates what video format is currently "
-"requested through NV-CONTROL.";
-
-static const char *__requested_sdi_data_format_help =
-"The Requested SDI Data Format indicates what data format is currently "
-"requested through NV-CONTROL.";
-
-
-/* local prototypes */
-
-static void query_video_format_details(CtkGvo *ctk_gvo);
-
-static void register_for_gvo_events(CtkGvo *ctk_gvo, CtkEvent *ctk_event);
-
-static void update_gvo_current_info(CtkGvo *ctk_gvo);
-
-static void gvo_event_received(GObject *object,
- CtrlEvent *event,
- gpointer user_data);
-
-/*
- * video format table -- should this be moved into NV-CONTROL?
- */
-
-const GvioFormatName videoFormatNames[] = {
- { NV_CTRL_GVIO_VIDEO_FORMAT_487I_59_94_SMPTE259_NTSC, "720 x 487i 59.94 Hz (SMPTE259) NTSC"},
- { NV_CTRL_GVIO_VIDEO_FORMAT_576I_50_00_SMPTE259_PAL, "720 x 576i 50.00 Hz (SMPTE259) PAL"},
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_23_98_SMPTE296, "1280 x 720p 23.98 Hz (SMPTE296)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_24_00_SMPTE296, "1280 x 720p 24.00 Hz (SMPTE296)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_25_00_SMPTE296, "1280 x 720p 25.00 Hz (SMPTE296)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_29_97_SMPTE296, "1280 x 720p 29.97 Hz (SMPTE296)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_30_00_SMPTE296, "1280 x 720p 30.00 Hz (SMPTE296)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_50_00_SMPTE296, "1280 x 720p 50.00 Hz (SMPTE296)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_59_94_SMPTE296, "1280 x 720p 59.94 Hz (SMPTE296)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_60_00_SMPTE296, "1280 x 720p 60.00 Hz (SMPTE296)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1035I_59_94_SMPTE260, "1920 x 1035i 59.94 Hz (SMPTE260)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1035I_60_00_SMPTE260, "1920 x 1035i 60.00 Hz (SMPTE260)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_47_96_SMPTE274, "1920 x 1080i 47.96 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_48_00_SMPTE274, "1920 x 1080i 48.00 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_50_00_SMPTE295, "1920 x 1080i 50.00 Hz (SMPTE295)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_50_00_SMPTE274, "1920 x 1080i 50.00 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_59_94_SMPTE274, "1920 x 1080i 59.94 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_60_00_SMPTE274, "1920 x 1080i 60.00 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_23_976_SMPTE274, "1920 x 1080p 23.976 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_24_00_SMPTE274, "1920 x 1080p 24.00 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_25_00_SMPTE274, "1920 x 1080p 25.00 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_29_97_SMPTE274, "1920 x 1080p 29.97 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_30_00_SMPTE274, "1920 x 1080p 30.00 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080PSF_23_98_SMPTE274, "1920 x 1080PsF 23.98 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080PSF_24_00_SMPTE274, "1920 x 1080PsF 24.00 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080PSF_25_00_SMPTE274, "1920 x 1080PsF 25.00 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080PSF_29_97_SMPTE274, "1920 x 1080PsF 29.97 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080PSF_30_00_SMPTE274, "1920 x 1080PsF 30.00 Hz (SMPTE274)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_47_96_SMPTE372, "2048 x 1080i 47.96 Hz (SMPTE372)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_48_00_SMPTE372, "2048 x 1080i 48.00 Hz (SMPTE372)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_50_00_SMPTE372, "2048 x 1080i 50.00 Hz (SMPTE372)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_59_94_SMPTE372, "2048 x 1080i 59.94 Hz (SMPTE372)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_60_00_SMPTE372, "2048 x 1080i 60.00 Hz (SMPTE372)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_23_98_SMPTE372, "2048 x 1080p 23.98 Hz (SMPTE372)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_24_00_SMPTE372, "2048 x 1080p 24.00 Hz (SMPTE372)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_25_00_SMPTE372, "2048 x 1080p 25.00 Hz (SMPTE372)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_29_97_SMPTE372, "2048 x 1080p 29.97 Hz (SMPTE372)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_30_00_SMPTE372, "2048 x 1080p 30.00 Hz (SMPTE372)" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_50_00_3G_LEVEL_A_SMPTE274, "1920 x 1080p 50.00 Hz (SMPTE274) 3G Level A" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_59_94_3G_LEVEL_A_SMPTE274, "1920 x 1080p 59.94 Hz (SMPTE274) 3G Level A" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_60_00_3G_LEVEL_A_SMPTE274, "1920 x 1080p 60.00 Hz (SMPTE274) 3G Level A" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_60_00_3G_LEVEL_B_SMPTE274, "1920 x 1080p 60.00 Hz (SMPTE274) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_60_00_3G_LEVEL_B_SMPTE274, "1920 x 1080i 60.00 Hz (SMPTE274) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_60_00_3G_LEVEL_B_SMPTE372, "2048 x 1080i 60.00 Hz (SMPTE372) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_50_00_3G_LEVEL_B_SMPTE274, "1920 x 1080p 50.00 Hz (SMPTE274) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_50_00_3G_LEVEL_B_SMPTE274, "1920 x 1080i 50.00 Hz (SMPTE274) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_50_00_3G_LEVEL_B_SMPTE372, "2048 x 1080i 50.00 Hz (SMPTE372) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_30_00_3G_LEVEL_B_SMPTE274, "1920 x 1080p 30.00 Hz (SMPTE274) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_30_00_3G_LEVEL_B_SMPTE372, "2048 x 1080p 30.00 Hz (SMPTE372) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_25_00_3G_LEVEL_B_SMPTE274, "1920 x 1080p 25.00 Hz (SMPTE274) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_25_00_3G_LEVEL_B_SMPTE372, "2048 x 1080p 25.00 Hz (SMPTE372) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_24_00_3G_LEVEL_B_SMPTE274, "1920 x 1080p 24.00 Hz (SMPTE274) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_24_00_3G_LEVEL_B_SMPTE372, "2048 x 1080p 24.00 Hz (SMPTE372) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_48_00_3G_LEVEL_B_SMPTE274, "1920 x 1080i 48.00 Hz (SMPTE274) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_48_00_3G_LEVEL_B_SMPTE372, "2048 x 1080i 48.00 Hz (SMPTE372) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_59_94_3G_LEVEL_B_SMPTE274, "1920 x 1080p 59.94 Hz (SMPTE274) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_59_94_3G_LEVEL_B_SMPTE274, "1920 x 1080i 59.94 Hz (SMPTE274) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_59_94_3G_LEVEL_B_SMPTE372, "2048 x 1080i 59.94 Hz (SMPTE372) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_29_97_3G_LEVEL_B_SMPTE274, "1920 x 1080p 29.97 Hz (SMPTE274) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_29_97_3G_LEVEL_B_SMPTE372, "2048 x 1080p 29.97 Hz (SMPTE372) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_23_98_3G_LEVEL_B_SMPTE274, "1920 x 1080p 23.98 Hz (SMPTE274) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_23_98_3G_LEVEL_B_SMPTE372, "2048 x 1080p 23.98 Hz (SMPTE372) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_47_96_3G_LEVEL_B_SMPTE274, "1920 x 1080i 47.96 Hz (SMPTE274) 3G Level B" },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_47_96_3G_LEVEL_B_SMPTE372, "2048 x 1080i 47.96 Hz (SMPTE372) 3G Level B" },
- { -1, NULL },
-};
-
-
-static GvioFormatDetails videoFormatDetails[] = {
- { NV_CTRL_GVIO_VIDEO_FORMAT_487I_59_94_SMPTE259_NTSC, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_576I_50_00_SMPTE259_PAL, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_23_98_SMPTE296, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_24_00_SMPTE296, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_25_00_SMPTE296, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_29_97_SMPTE296, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_30_00_SMPTE296, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_50_00_SMPTE296, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_59_94_SMPTE296, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_720P_60_00_SMPTE296, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1035I_59_94_SMPTE260, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1035I_60_00_SMPTE260, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_47_96_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_48_00_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_50_00_SMPTE295, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_50_00_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_59_94_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_60_00_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_23_976_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_24_00_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_25_00_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_29_97_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_30_00_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080PSF_23_98_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080PSF_24_00_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080PSF_25_00_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080PSF_29_97_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080PSF_30_00_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_47_96_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_48_00_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_50_00_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_59_94_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_60_00_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_23_98_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_24_00_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_25_00_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_29_97_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_30_00_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_50_00_3G_LEVEL_A_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_59_94_3G_LEVEL_A_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_60_00_3G_LEVEL_A_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_60_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_60_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_60_00_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_50_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_50_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_50_00_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_30_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_30_00_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_25_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_25_00_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_24_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_24_00_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_48_00_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_48_00_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_59_94_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_59_94_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_59_94_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_29_97_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_29_97_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080P_23_98_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048P_23_98_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_1080I_47_96_3G_LEVEL_B_SMPTE274, 0, 0, 0 },
- { NV_CTRL_GVIO_VIDEO_FORMAT_2048I_47_96_3G_LEVEL_B_SMPTE372, 0, 0, 0 },
- { -1, -1, -1, -1 },
-};
-
-
-static const GvioFormatName dataFormatNames[] = {
-
- { NV_CTRL_GVO_DATA_FORMAT_R8G8B8_TO_YCRCB444, "RGB -> YCrCb (4:4:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_R8G8B8_TO_YCRCB422, "RGB -> YCrCb (4:2:2)" },
- { NV_CTRL_GVO_DATA_FORMAT_X8X8X8_444_PASSTHRU, "RGB (4:4:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_R8G8B8A8_TO_YCRCBA4444, "RGBA -> YCrCbA (4:4:4:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_R8G8B8Z10_TO_YCRCBZ4444, "RGBZ -> YCrCbZ (4:4:4:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_R8G8B8A8_TO_YCRCBA4224, "RGBA -> YCrCbA (4:2:2:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_R8G8B8Z10_TO_YCRCBZ4224, "RGBZ -> YCrCbZ (4:2:2:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_X8X8X8A8_4444_PASSTHRU, "RGBA (4:4:4:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_X8X8X8Z8_4444_PASSTHRU, "RGBZ (4:4:4:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_X10X10X10_444_PASSTHRU, "RGBA (4:4:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_X10X8X8_444_PASSTHRU, "RGB (4:4:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_X10X8X8A10_4444_PASSTHRU, "RGBA (4:4:4:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_X10X8X8Z10_4444_PASSTHRU, "RGBZ (4:4:4:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_DUAL_R8G8B8_TO_DUAL_YCRCB422, "Dual RGB -> Dual YCrCb (4:2:2)" },
- { NV_CTRL_GVO_DATA_FORMAT_DUAL_X8X8X8_TO_DUAL_422_PASSTHRU, "Dual RGB (4:2:2)" },
- { NV_CTRL_GVO_DATA_FORMAT_R10G10B10_TO_YCRCB422, "RGB -> YCrCb (4:2:2)" },
- { NV_CTRL_GVO_DATA_FORMAT_R10G10B10_TO_YCRCB444, "RGB -> YCrCb (4:4:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_X12X12X12_444_PASSTHRU, "RGB (4:4:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_R12G12B12_TO_YCRCB444, "RGB -> YCrCb (4:4:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_X8X8X8_422_PASSTHRU, "RGB (4:2:2)" },
- { NV_CTRL_GVO_DATA_FORMAT_X8X8X8A8_4224_PASSTHRU, "RGB (4:2:2:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_X8X8X8Z8_4224_PASSTHRU, "RGB (4:2:2:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_X10X10X10_422_PASSTHRU, "RGB (4:2:2)" },
- { NV_CTRL_GVO_DATA_FORMAT_X10X8X8_422_PASSTHRU, "RGB (4:2:2)" },
- { NV_CTRL_GVO_DATA_FORMAT_X10X8X8A10_4224_PASSTHRU, "RGBA (4:2:2:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_X10X8X8Z10_4224_PASSTHRU, "RGBZ (4:2:2:4)" },
- { NV_CTRL_GVO_DATA_FORMAT_X12X12X12_422_PASSTHRU, "RGB (4:2:2)" },
- { NV_CTRL_GVO_DATA_FORMAT_R12G12B12_TO_YCRCB422, "RGB -> YCrCb (4:2:2)" },
-
- { -1, NULL },
-};
-
-
-
-/**** Utility Functions ******************************************************/
-
-
-/*
- * ctk_gvio_get_video_format_name() - return the name of the given video format
- */
-
-const char *ctk_gvio_get_video_format_name(const gint format)
-{
- gint i;
-
- for (i = 0; videoFormatNames[i].name; i++) {
- if (videoFormatNames[i].format == format) {
- return videoFormatNames[i].name;
- }
- }
-
- return "Unknown";
-
-} /* ctk_gvio_get_video_format_name() */
-
-
-
-/*
- * ctk_gvo_get_video_format_resolution() - return the width and height of the
- * given video format
- */
-
-void ctk_gvo_get_video_format_resolution(const gint format, gint *w, gint *h)
-{
- gint i;
-
- *w = *h = 0;
-
- for (i = 0; videoFormatDetails[i].format != -1; i++) {
- if (videoFormatDetails[i].format == format) {
- *w = videoFormatDetails[i].width;
- *h = videoFormatDetails[i].height;
- return;
- }
- }
-} /* ctk_gvo_get_video_format_resolution() */
-
-
-
-/*
- * ctk_gvo_get_data_format_name() - return the name of the given data format
- */
-
-const char *ctk_gvo_get_data_format_name(const gint format)
-{
- gint i;
-
- for (i = 0; dataFormatNames[i].name; i++) {
- if (dataFormatNames[i].format == format) {
- return dataFormatNames[i].name;
- }
- }
-
- return "Unknown";
-
-} /* ctk_gvo_get_data_format_name() */
-
-
-
-/*
- * ctk_gvo_get_type() - Returns the CtkGvo "class" type
- */
-
-GType ctk_gvo_get_type(void)
-{
- static GType ctk_gvo_type = 0;
-
- if (!ctk_gvo_type) {
- static const GTypeInfo ctk_gvo_info = {
- sizeof (CtkGvoClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- NULL, /* constructor */
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (CtkGvo),
- 0, /* n_preallocs */
- NULL, /* instance_init */
- NULL /* value_table */
- };
-
- ctk_gvo_type =
- g_type_register_static(GTK_TYPE_VBOX, "CtkGvo",
- &ctk_gvo_info, 0);
- }
-
- return ctk_gvo_type;
-
-} /* ctk_gvo_get_type() */
-
-
-
-/**** Creation Functions *****************************************************/
-
-/*
- * ctk_gvo_new() - constructor for the CtkGvo widget
- */
-
-GtkWidget* ctk_gvo_new(CtrlTarget *ctrl_target,
- CtkConfig *ctk_config,
- CtkEvent *ctk_event)
-{
- GObject *object;
- CtkGvo *ctk_gvo;
- GtkWidget *hbox;
- ReturnStatus ret;
- gchar scratch[64], *firmware, *string;
- gint val;
-
- GtkWidget *frame, *table;
-
- /* make sure we have a valid target */
-
- g_return_val_if_fail((ctrl_target != NULL) &&
- (ctrl_target->h != NULL), NULL);
-
- /* Check if this screen supports GVO */
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_SUPPORTED, &val);
- if ((ret != NvCtrlSuccess) || (val != NV_CTRL_GVO_SUPPORTED_TRUE)) {
- /* GVO not available */
- return NULL;
- }
-
- /* create and initialize the object */
-
- object = g_object_new(CTK_TYPE_GVO, NULL);
-
- ctk_gvo = CTK_GVO(object);
- ctk_gvo->ctrl_target = ctrl_target;
-
- /*
- * Query the validness, width, height and refresh rate for each
- * video format
- */
-
- query_video_format_details(ctk_gvo);
-
- /* set container properties for the widget */
-
- gtk_box_set_spacing(GTK_BOX(ctk_gvo), 10);
-
- /* banner */
-
- hbox = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(object), hbox, FALSE, FALSE, 0);
-
- ctk_gvo->banner_box = hbox;
-
- ctk_gvo->banner = ctk_gvo_banner_new(ctrl_target, ctk_config, ctk_event);
- g_object_ref(ctk_gvo->banner);
-
- /*
- * General information
- */
-
- frame = gtk_frame_new("General Information");
-
- gtk_box_pack_start(GTK_BOX(object), frame, FALSE, FALSE, 0);
-
- table = gtk_table_new(3, 2, FALSE);
-
- gtk_table_set_row_spacings(GTK_TABLE(table), 3);
- gtk_table_set_col_spacings(GTK_TABLE(table), 15);
- gtk_container_set_border_width(GTK_CONTAINER(table), 5);
-
- gtk_container_add(GTK_CONTAINER(frame), table);
-
- /* GVO_FIRMWARE_VERSION */
-
- string = NULL;
-
- ret = NvCtrlGetStringAttribute(ctrl_target,
- NV_CTRL_STRING_GVIO_FIRMWARE_VERSION,
- &string);
-
- if ((ret == NvCtrlSuccess) && (string)) {
- firmware = strdup(string);
- } else {
-
- /*
- * NV_CTRL_STRING_GVO_FIRMWARE_VERSION was added later, so
- * older X servers may not know about it; fallback to
- * NV_CTRL_GVO_FIRMWARE_VERSION
- */
-
- ret = NvCtrlGetAttribute(ctrl_target, NV_CTRL_GVO_FIRMWARE_VERSION, &val);
-
- if (ret == NvCtrlSuccess) {
- snprintf(scratch, 64, "1.%02d", val);
- firmware = strdup(scratch);
- } else {
- firmware = strdup("???");
- }
- }
-
- add_table_row(table, 0,
- 0, 0.5, "Firmware Version:",
- 0, 0.5, firmware);
- ctk_gvo->current_resolution_label =
- add_table_row(table, 1,
- 0, 0.5, "Current SDI Resolution:",
- 0, 0.5, "Inactive");
- ctk_gvo->current_state_label =
- add_table_row(table, 2,
- 0, 0.5, "Current SDI State:",
- 0, 0.5, "Inactive");
-
- /*
- * Requested SDI Configuration
- */
-
- frame = gtk_frame_new("Requested SDI Configuration");
-
- gtk_box_pack_start(GTK_BOX(object), frame, FALSE, FALSE, 0);
-
- table = gtk_table_new(2, 2, FALSE);
-
- gtk_table_set_row_spacings(GTK_TABLE(table), 3);
- gtk_table_set_col_spacings(GTK_TABLE(table), 15);
- gtk_container_set_border_width(GTK_CONTAINER(table), 5);
-
- gtk_container_add(GTK_CONTAINER(frame), table);
-
- ctk_gvo->current_output_video_format_label =
- add_table_row(table, 3,
- 0, 0.5, "Requested SDI Video Format:",
- 0, 0.5, "Inactive");
- ctk_gvo->current_output_data_format_label =
- add_table_row(table, 4,
- 0, 0.5, "Requested SDI Data Format:",
- 0, 0.5, "Inactive");
-
- /*
- * Set the initial UI state
- */
-
- update_gvo_current_info(ctk_gvo);
-
- /*
- * Start listening for events
- */
-
- register_for_gvo_events(ctk_gvo, ctk_event);
-
- /* show the GVO widget */
-
- gtk_widget_show_all(GTK_WIDGET(ctk_gvo));
-
- return GTK_WIDGET(ctk_gvo);
-
-} /* ctk_gvo_new() */
-
-
-
-/**** Initialization Functions ***********************************************/
-
-/*
- * query_video_format_details() - initialize the videoFormatDetails[]
- * table by querying each of refresh rate, width, and height from
- * NV-CONTROL.
- */
-
-static void query_video_format_details(CtkGvo *ctk_gvo)
-{
- CtrlTarget *ctrl_target = ctk_gvo->ctrl_target;
- ReturnStatus ret;
- CtrlAttributeValidValues valid;
- gint i, val;
-
- /* Valid output video formats */
-
- ret = NvCtrlGetValidAttributeValues(ctrl_target,
- NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT,
- &valid);
- if ((ret != NvCtrlSuccess) ||
- (valid.valid_type != CTRL_ATTRIBUTE_VALID_TYPE_INT_BITS)) {
- ctk_gvo->valid_output_video_format_mask[0] = 0;
- } else {
- ctk_gvo->valid_output_video_format_mask[0] = valid.allowed_ints;
- }
-
- ret = NvCtrlGetValidAttributeValues(ctrl_target,
- NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT2,
- &valid);
-
- if ((ret != NvCtrlSuccess) ||
- (valid.valid_type != CTRL_ATTRIBUTE_VALID_TYPE_INT_BITS)) {
- ctk_gvo->valid_output_video_format_mask[1] = 0;
- } else {
- ctk_gvo->valid_output_video_format_mask[1] = valid.allowed_ints;
- }
-
- ret = NvCtrlGetValidAttributeValues(ctrl_target,
- NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT3,
- &valid);
-
- if ((ret != NvCtrlSuccess) ||
- (valid.valid_type != CTRL_ATTRIBUTE_VALID_TYPE_INT_BITS)) {
- ctk_gvo->valid_output_video_format_mask[2] = 0;
- } else {
- ctk_gvo->valid_output_video_format_mask[2] = valid.allowed_ints;
- }
-
- for (i = 0; videoFormatDetails[i].format != -1; i++) {
-
- ret = NvCtrlGetDisplayAttribute(ctrl_target,
- videoFormatDetails[i].format,
- NV_CTRL_GVIO_VIDEO_FORMAT_REFRESH_RATE,
- &val);
-
- if (ret != NvCtrlSuccess) val = 0;
-
- videoFormatDetails[i].rate = val;
-
- ret = NvCtrlGetDisplayAttribute(ctrl_target,
- videoFormatDetails[i].format,
- NV_CTRL_GVIO_VIDEO_FORMAT_WIDTH,
- &val);
-
- if (ret != NvCtrlSuccess) val = 0;
-
- videoFormatDetails[i].width = val;
-
- ret = NvCtrlGetDisplayAttribute(ctrl_target,
- videoFormatDetails[i].format,
- NV_CTRL_GVIO_VIDEO_FORMAT_HEIGHT,
- &val);
-
- if (ret != NvCtrlSuccess) val = 0;
-
- videoFormatDetails[i].height = val;
- }
-
-} /* query_video_format_details() */
-
-
-
-/*
- * register_for_gvo_events() - Configure ctk_gvo object to listen for
- * GVO related evens.
- */
-
-static void register_for_gvo_events(CtkGvo *ctk_gvo, CtkEvent *ctk_event)
-{
- g_signal_connect(G_OBJECT(ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT),
- G_CALLBACK(gvo_event_received),
- (gpointer) ctk_gvo);
-
- g_signal_connect(G_OBJECT(ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVO_DATA_FORMAT),
- G_CALLBACK(gvo_event_received),
- (gpointer) ctk_gvo);
-
- g_signal_connect(G_OBJECT(ctk_event),
- CTK_EVENT_NAME(NV_CTRL_GVO_LOCK_OWNER),
- G_CALLBACK(gvo_event_received),
- (gpointer) ctk_gvo);
-
-} /* register_for_gvo_events() */
-
-
-
-/**** Common Update Functions ************************************************/
-
-/*
- * update_gvo_current_info() - Updates the page's information to reflect
- * the GVO device's current state.
- */
-
-static void update_gvo_current_info(CtkGvo *ctk_gvo)
-{
- CtrlTarget *ctrl_target = ctk_gvo->ctrl_target;
- int width;
- int height;
- ReturnStatus ret;
- gchar res_string[64], state_string[64];
- int output_video_format;
- int output_data_format;
- int lock_owner;
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT,
- &output_video_format);
- if (ret != NvCtrlSuccess) {
- output_video_format = NV_CTRL_GVIO_VIDEO_FORMAT_NONE;
- }
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVO_DATA_FORMAT,
- &output_data_format);
- if (ret != NvCtrlSuccess) {
- output_data_format = -1;
- }
-
- ret = NvCtrlGetAttribute(ctrl_target,
- NV_CTRL_GVO_LOCK_OWNER,
- &lock_owner);
- if (ret != NvCtrlSuccess) {
- lock_owner = NV_CTRL_GVO_LOCK_OWNER_NONE;
- }
-
-
- /* Get the current video format sizes */
- ctk_gvo_get_video_format_resolution(output_video_format, &width, &height);
-
- switch (lock_owner) {
-
- case NV_CTRL_GVO_LOCK_OWNER_NONE:
- snprintf(res_string, 64, "Inactive");
- snprintf(state_string, 64, "Inactive");
- break;
-
- case NV_CTRL_GVO_LOCK_OWNER_CLONE:
- /* fall through for compatibility */
- case NV_CTRL_GVO_LOCK_OWNER_X_SCREEN:
- snprintf(res_string, 64, "%d x %d", width, height);
- snprintf(state_string, 64, "In use by X");
- break;
-
- case NV_CTRL_GVO_LOCK_OWNER_GLX:
- snprintf(res_string, 64, "%d x %d", width, height);
- snprintf(state_string, 64, "In use by GLX");
- break;
-
- default:
- return;
- }
-
- if (ctk_gvo->current_resolution_label) {
- gtk_label_set_text(GTK_LABEL(ctk_gvo->current_resolution_label),
- res_string);
- }
-
- if (ctk_gvo->current_state_label) {
- gtk_label_set_text(GTK_LABEL(ctk_gvo->current_state_label),
- state_string);
- }
-
- if (ctk_gvo->current_output_video_format_label) {
- gtk_label_set_text
- (GTK_LABEL(ctk_gvo->current_output_video_format_label),
- ctk_gvio_get_video_format_name(output_video_format));
- }
-
- if (ctk_gvo->current_output_data_format_label) {
- gtk_label_set_text
- (GTK_LABEL(ctk_gvo->current_output_data_format_label),
- ctk_gvo_get_data_format_name(output_data_format));
- }
-
-} /* update_gvo_current_info() */
-
-
-
-/**** Event Handlers *********************************************************/
-
-/*
- * gvo_event_received() - Handles GVO NV-CONTROL events.
- */
-
-static void gvo_event_received(GObject *object,
- CtrlEvent *event,
- gpointer user_data)
-{
- update_gvo_current_info(CTK_GVO(user_data));
-
-} /* gvo_event_received(() */
-
-
-
-/**** Callback Handlers ******************************************************/
-
-
-/*
- * ctk_gvo_select() - Called when the ctk_gvo page is selected
- */
-
-void ctk_gvo_select(GtkWidget *widget)
-{
- CtkGvo *ctk_gvo = CTK_GVO(widget);
-
- /* Grab the GVO banner */
-
- ctk_gvo_banner_set_parent(CTK_GVO_BANNER(ctk_gvo->banner),
- ctk_gvo->banner_box, NULL, NULL);
-
-} /* ctk_gvo_select() */
-
-
-
-/*
- * ctk_gvo_unselect() - Called when a page other than the ctk_gvo
- * page is selected and the ctk_gvo page was the last page to be
- * selected.
- */
-
-void ctk_gvo_unselect(GtkWidget *widget)
-{
- CtkGvo *ctk_gvo = CTK_GVO(widget);
-
- /* Release the GVO banner */
-
- ctk_gvo_banner_set_parent(CTK_GVO_BANNER(ctk_gvo->banner),
- NULL, NULL, NULL);
-
-} /* ctk_gvo_unselect() */
-
-
-
-/*
- * ctk_gvo_create_help() - Creates the GVO help page.
- */
-
-GtkTextBuffer* ctk_gvo_create_help(GtkTextTagTable *table)
-{
- GtkTextIter i;
- GtkTextBuffer *b;
-
- b = gtk_text_buffer_new(table);
-
- gtk_text_buffer_get_iter_at_offset(b, &i, 0);
-
- ctk_help_title(b, &i, "GVO (Graphics to Video Out) Help");
- ctk_help_para(b, &i, "This page reports general information about the SDI "
- "device.");
-
- ctk_help_heading(b, &i, "General Information");
- ctk_help_para(b, &i, "This section shows information about the SDI device "
- "that is associated with the X screen.");
- ctk_help_heading(b, &i, "Firmware Version");
- ctk_help_para(b, &i, "%s", __general_firmware_version_help);
- ctk_help_heading(b, &i, "Current SDI Resolution");
- ctk_help_para(b, &i, "%s", __general_current_sdi_resolution_help);
- ctk_help_heading(b, &i, "Current SDI State");
- ctk_help_para(b, &i, "%s", __general_current_sdi_state_help);
-
- ctk_help_heading(b, &i, "Requested SDI Video Format");
- ctk_help_para(b, &i, "%s", __requested_sdi_video_format_help);
- ctk_help_heading(b, &i, "Requested SDI Data Format");
- ctk_help_para(b, &i, "%s", __requested_sdi_data_format_help);
-
- ctk_help_finish(b);
-
- return b;
-
-} /* ctk_gvo_create_help() */
diff --git a/src/gtk+-2.x/ctkgvo.h b/src/gtk+-2.x/ctkgvo.h
deleted file mode 100644
index 807777e..0000000
--- a/src/gtk+-2.x/ctkgvo.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
- * and Linux systems.
- *
- * Copyright (C) 2004 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,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses>.
- */
-
-#ifndef __CTK_GVO_H__
-#define __CTK_GVO_H__
-
-#include "ctkconfig.h"
-#include "ctkevent.h"
-#include "ctkgvo-banner.h"
-
-G_BEGIN_DECLS
-
-
-#define CTK_TYPE_GVO (ctk_gvo_get_type())
-
-#define CTK_GVO(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), CTK_TYPE_GVO, CtkGvo))
-
-#define CTK_GVO_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), CTK_TYPE_GVO, CtkGvoClass))
-
-#define CTK_IS_GVO(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CTK_TYPE_GVO))
-
-#define CTK_IS_GVO_CLASS(class) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), CTK_TYPE_GVO))
-
-#define CTK_GVO_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), CTK_TYPE_GVO, CtkGvoClass))
-
-
-
-typedef struct _CtkGvo CtkGvo;
-typedef struct _CtkGvoClass CtkGvoClass;
-
-
-struct _CtkGvo
-{
- GtkVBox parent;
- CtrlTarget *ctrl_target;
-
- /* State */
-
- guint valid_output_video_format_mask[3];
-
- /* Widgets */
-
- GtkWidget *banner_box;
- GtkWidget *banner;
-
- GtkWidget *current_resolution_label;
- GtkWidget *current_state_label;
- GtkWidget *current_output_video_format_label;
- GtkWidget *current_output_data_format_label;
-};
-
-
-struct _CtkGvoClass
-{
- GtkVBoxClass parent_class;
-};
-
-
-typedef struct {
- int format;
- const char *name;
-} GvioFormatName;
-
-typedef struct {
- int format;
- int rate;
- int width;
- int height;
-} GvioFormatDetails;
-
-
-
-GType ctk_gvo_get_type (void) G_GNUC_CONST;
-GtkWidget* ctk_gvo_new (CtrlTarget *, CtkConfig *, CtkEvent *);
-void ctk_gvo_select (GtkWidget *);
-void ctk_gvo_unselect (GtkWidget *);
-GtkTextBuffer* ctk_gvo_create_help (GtkTextTagTable *);
-
-
-
-const char *ctk_gvio_get_video_format_name(const gint format);
-const char *ctk_gvo_get_data_format_name(const gint format);
-void ctk_gvo_get_video_format_resolution(const gint format, gint *w, gint *h);
-
-
-G_END_DECLS
-
-#endif /* __CTK_GVO_H__*/
diff --git a/src/gtk+-2.x/ctkslimm.c b/src/gtk+-2.x/ctkslimm.c
index 1f8a767..67488e8 100644
--- a/src/gtk+-2.x/ctkslimm.c
+++ b/src/gtk+-2.x/ctkslimm.c
@@ -1335,9 +1335,8 @@ GtkWidget* ctk_slimm_new(CtrlTarget *ctrl_target,
trust_slimm_available = TRUE;
}
- /* return on old X drivers if target is other than VCS. */
- if (!ctk_config->pCtrlSystem->targets[VCS_TARGET] &&
- !trust_slimm_available) {
+ /* return on old X drivers. */
+ if (!trust_slimm_available) {
return NULL;
}
diff --git a/src/gtk+-2.x/ctkvcs.c b/src/gtk+-2.x/ctkvcs.c
deleted file mode 100644
index b0b0ca9..0000000
--- a/src/gtk+-2.x/ctkvcs.c
+++ /dev/null
@@ -1,859 +0,0 @@
-/*
- * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
- * and Linux systems.
- *
- * Copyright (C) 2006 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,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses>.
- */
-
-#include <stdlib.h> /* malloc */
-#include <stdio.h> /* snprintf */
-#include <string.h>
-
-#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
-#include <X11/Xlib.h>
-
-#include "ctkbanner.h"
-#include "msg.h"
-#include "ctkvcs.h"
-#include "ctkevent.h"
-#include "ctkhelp.h"
-#include "ctkutils.h"
-
-#define DEFAULT_UPDATE_VCS_INFO_TIME_INTERVAL 5000
-
-#define VCS_PSU_STATE_NORMAL 0
-#define VCS_PSU_STATE_ABNORMAL 1
-
-static gboolean update_vcs_info(gpointer);
-static gboolean update_fan_status(CtkVcs *ctk_object);
-
-static void apply_fan_entry_token(char *token, char *value, void *data)
-{
- FanEntryPtr pFanEntry = (FanEntryPtr) data;
-
- if (!strcasecmp("fan", token)) {
- pFanEntry->fan_number = atoi(value);
- } else if (!strcasecmp("speed", token)) {
- pFanEntry->fan_speed = atoi(value);
- } else if (!strcasecmp("fail", token)) {
- pFanEntry->fan_failed = atoi(value);
- }
-}
-
-static void apply_thermal_entry_token(char *token, char *value, void *data)
-{
- ThermalEntryPtr pThermalEntry = (ThermalEntryPtr) data;
-
- if (!strcasecmp("intake", token)) {
- pThermalEntry->intake_temp = atoi(value);
- } else if (!strcasecmp("exhaust", token)) {
- pThermalEntry->exhaust_temp = atoi(value);
- } else if (!strcasecmp("board", token)) {
- pThermalEntry->board_temp = atoi(value);
- }
-}
-
-static void apply_psu_entry_token(char *token, char *value, void *data)
-{
- PSUEntryPtr pPSUEntry = (PSUEntryPtr) data;
-
- if (!strcasecmp("current", token)) {
- pPSUEntry->psu_current = atoi(value);
- } else if (!strcasecmp("power", token)) {
- if (!strcasecmp("unknown", value)) {
- pPSUEntry->psu_power = -1;
- } else {
- pPSUEntry->psu_power = atoi(value);
- }
- } else if (!strcasecmp("voltage", token)) {
- if (!strcasecmp("unknown", value)) {
- pPSUEntry->psu_voltage = -1;
- } else {
- pPSUEntry->psu_voltage = atoi(value);
- }
- } else if (!strcasecmp("state", token)) {
- if (!strcasecmp("normal", value)) {
- pPSUEntry->psu_state = VCS_PSU_STATE_NORMAL;
- } else {
- pPSUEntry->psu_state = VCS_PSU_STATE_ABNORMAL;
- }
- }
-}
-
-GType ctk_vcs_get_type(void)
-{
- static GType ctk_vcs_type = 0;
-
- if (!ctk_vcs_type) {
- static const GTypeInfo ctk_vcs_info = {
- sizeof (CtkVcsClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- NULL, /* class_init */
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof(CtkVcs),
- 0, /* n_preallocs */
- NULL, /* instance_init */
- NULL /* value_table */
- };
-
- ctk_vcs_type = g_type_register_static
- (GTK_TYPE_VBOX, "CtkVcs", &ctk_vcs_info, 0);
- }
-
- return ctk_vcs_type;
-}
-
-
-static gboolean update_vcs_info(gpointer user_data)
-{
- char output_str[16];
- char *temp_str = NULL;
- char *psu_str = NULL;
- CtkVcs *ctk_object = CTK_VCS(user_data);
- CtrlTarget *ctrl_target = ctk_object->ctrl_target;
- ThermalEntry thermEntry;
- PSUEntry psuEntry;
- gboolean high_perf_mode;
-
- /* These queries should always succeed for Canoas 2.0 and above */
- if ((NvCtrlGetAttribute(ctrl_target, NV_CTRL_VCSC_HIGH_PERF_MODE,
- &high_perf_mode) != NvCtrlSuccess) ||
- (NvCtrlGetStringAttribute(ctrl_target,
- NV_CTRL_STRING_VCSC_TEMPERATURES,
- &temp_str) != NvCtrlSuccess) ||
- (NvCtrlGetStringAttribute(ctrl_target,
- NV_CTRL_STRING_VCSC_PSU_INFO,
- &psu_str) != NvCtrlSuccess)) {
- return FALSE;
- }
-
- /* Extract out thermal and PSU entry tokens */
-
- /* First Invalidate thermal and psu entries */
- thermEntry.intake_temp = -1;
- thermEntry.exhaust_temp = -1;
- thermEntry.board_temp = -1;
-
- psuEntry.psu_current = -1;
- psuEntry.psu_power = -1;
- psuEntry.psu_voltage = -1;
- psuEntry.psu_state = -1;
-
- if (temp_str) {
- parse_token_value_pairs(temp_str, apply_thermal_entry_token, &thermEntry);
- }
- if (psu_str) {
- parse_token_value_pairs(psu_str, apply_psu_entry_token, &psuEntry);
- }
-
- if ((thermEntry.intake_temp != -1) &&
- (thermEntry.exhaust_temp != -1) &&
- (thermEntry.board_temp != -1)) {
- if (ctk_object->intake_temp) {
- g_snprintf(output_str, 16, "%d C", thermEntry.intake_temp);
- gtk_label_set_text(GTK_LABEL(ctk_object->intake_temp), output_str);
- }
- if (ctk_object->exhaust_temp) {
- g_snprintf(output_str, 16, "%d C", thermEntry.exhaust_temp);
- gtk_label_set_text(GTK_LABEL(ctk_object->exhaust_temp), output_str);
- }
- if (ctk_object->board_temp) {
- g_snprintf(output_str, 16, "%d C", thermEntry.board_temp);
- gtk_label_set_text(GTK_LABEL(ctk_object->board_temp), output_str);
- }
- }
-
- if ((psuEntry.psu_current != -1) &&
- (psuEntry.psu_state != -1)) {
- if (ctk_object->psu_current) {
- g_snprintf(output_str, 16, "%d A", psuEntry.psu_current);
- gtk_label_set_text(GTK_LABEL(ctk_object->psu_current), output_str);
- }
- if (ctk_object->psu_state) {
- switch (psuEntry.psu_state) {
- case VCS_PSU_STATE_NORMAL:
- g_snprintf(output_str, 16, "Normal");
- break;
- case VCS_PSU_STATE_ABNORMAL:
- g_snprintf(output_str, 16, "Abnormal");
- break;
- default:
- g_snprintf(output_str, 16, "Unknown");
- break;
- }
- gtk_label_set_text(GTK_LABEL(ctk_object->psu_state), output_str);
- }
- }
- if (ctk_object->psu_power && psuEntry.psu_power != -1) {
- g_snprintf(output_str, 16, "%d W", psuEntry.psu_power);
- gtk_label_set_text(GTK_LABEL(ctk_object->psu_power), output_str);
- }
-
- if (ctk_object->psu_voltage && psuEntry.psu_voltage != -1) {
- g_snprintf(output_str, 16, "%d V", psuEntry.psu_voltage);
- gtk_label_set_text(GTK_LABEL(ctk_object->psu_voltage), output_str);
- }
-
- if (!update_fan_status(ctk_object)) {
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-
-/** create_error_dialog() *********************************
- *
- * Creates a generic error message dialog widget
- *
- **/
-
-static GtkWidget * create_error_dialog(CtkVcs *ctk_object)
-{
- GtkWidget *dialog;
- GtkWidget *image;
- GtkWidget *hbox;
- GtkWidget *vbox;
- GtkWidget *label;
-
- /* Display validation override confirmation dialog */
- dialog = gtk_dialog_new_with_buttons
- ("Cannot Apply",
- GTK_WINDOW(gtk_widget_get_parent(GTK_WIDGET(ctk_object))),
- GTK_DIALOG_MODAL |
- GTK_DIALOG_DESTROY_WITH_PARENT,
- NULL);
-
- /* Main horizontal box */
- hbox = gtk_hbox_new(FALSE, 5);
- gtk_box_pack_start(GTK_BOX(ctk_dialog_get_content_area(GTK_DIALOG(dialog))),
- hbox, TRUE, TRUE, 5);
-
- /* Pack the information icon */
- image = ctk_image_new_from_str(CTK_STOCK_DIALOG_INFO,
- GTK_ICON_SIZE_DIALOG);
- gtk_misc_set_alignment(GTK_MISC(image), 0.0f, 0.0f);
- gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 5);
-
- /* Main vertical box */
- vbox = gtk_vbox_new(FALSE, 5);
- gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
-
-
- label = gtk_label_new(NULL);
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.0f);
- gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
- ctk_object->error_dialog_label = label;
-
- /* Action Buttons */
- gtk_dialog_add_button(GTK_DIALOG(dialog), "OK",
- GTK_RESPONSE_ACCEPT);
-
- gtk_widget_show_all(ctk_dialog_get_content_area(GTK_DIALOG(dialog)));
-
- return dialog;
-
-} /* create_error_dialog() */
-
-
-static void vcs_perf_checkbox_toggled(GtkWidget *widget, gpointer user_data)
-{
- CtkVcs *ctk_object = CTK_VCS(user_data);
- CtrlTarget *ctrl_target = ctk_object->ctrl_target;
- gint enabled;
- gint ret;
-
- enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
-
- ret = NvCtrlSetAttribute(ctrl_target, NV_CTRL_VCSC_HIGH_PERF_MODE, enabled);
-
- if (ret != NvCtrlSuccess) {
- if (ctk_object->error_dialog_label) {
- gchar *str;
- str = g_strdup_printf("Failed to %s High Performance mode!",
- (enabled ? "enable" : "disable"));
- gtk_label_set_text(GTK_LABEL(ctk_object->error_dialog_label), str);
- gtk_window_set_resizable(GTK_WINDOW(ctk_object->error_dialog), FALSE);
- gtk_window_set_transient_for
- (GTK_WINDOW(ctk_object->error_dialog),
- GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(ctk_object))));
- gtk_widget_show(ctk_object->error_dialog);
- gtk_dialog_run(GTK_DIALOG(ctk_object->error_dialog));
- gtk_widget_hide(ctk_object->error_dialog);
- }
- goto fail;
- }
- return;
- fail:
- g_signal_handlers_block_by_func(G_OBJECT(widget),
- G_CALLBACK(vcs_perf_checkbox_toggled),
- (gpointer) ctk_object);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), !enabled);
- gtk_widget_set_sensitive(widget, FALSE);
- g_signal_handlers_unblock_by_func(G_OBJECT(widget),
- G_CALLBACK(vcs_perf_checkbox_toggled),
- (gpointer) ctk_object);
-}
-
-
-
-static gboolean update_fan_status(CtkVcs *ctk_object)
-{
- CtrlTarget *ctrl_target = ctk_object->ctrl_target;
- gint ret;
- char *fan_entry_str = NULL;
- char *tokens;
- GtkWidget *table;
- GtkWidget *label;
- FanEntry current_fan;
- gchar output_str[16];
- gint current_row;
-
- if (!ctk_object->fan_status_container) {
- return FALSE;
- }
- ret = NvCtrlGetStringAttribute(ctrl_target,
- NV_CTRL_STRING_VCSC_FAN_STATUS,
- &fan_entry_str);
- if (ret != NvCtrlSuccess) {
- return FALSE;
- }
-
- ctk_empty_container(ctk_object->fan_status_container);
-
- /* Generate the new table */
-
- table = gtk_table_new(1, 3, FALSE);
- gtk_table_set_row_spacings(GTK_TABLE(table), 3);
- gtk_table_set_col_spacings(GTK_TABLE(table), 15);
- gtk_container_set_border_width(GTK_CONTAINER(table), 5);
- gtk_box_pack_start(GTK_BOX(ctk_object->fan_status_container),
- table, FALSE, FALSE, 0);
-
-
- label = gtk_label_new("Fan Number");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_widget_set_size_request(label, ctk_object->req.width, -1);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
-
- label = gtk_label_new("Fan Speed");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 1, 2, 0, 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
-
- label = gtk_label_new("Fan Status");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 2, 3, 0, 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
-
-
- /* Parse string of fan entries and populate table */
- current_row = 1;
- for (tokens = strtok(fan_entry_str, ";");
- tokens;
- tokens = strtok(NULL, ";")) {
-
- /* Invalidate fan entry */
- current_fan.fan_number = -1;
- current_fan.fan_speed = -1;
- current_fan.fan_failed = -1;
-
- parse_token_value_pairs(tokens, apply_fan_entry_token, &current_fan);
-
- if ((current_fan.fan_number != -1) &&
- (current_fan.fan_speed != -1) &&
- (current_fan.fan_failed != -1)) {
-
- gtk_table_resize(GTK_TABLE(table), current_row + 1, 3);
- g_snprintf(output_str, 16, "%d", current_fan.fan_number);
- label = gtk_label_new(output_str);
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_widget_set_size_request(label, ctk_object->req.width, -1);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, current_row,
- current_row + 1, GTK_FILL,
- GTK_FILL | GTK_EXPAND, 5, 0);
-
- g_snprintf(output_str, 16, "%d rpm", current_fan.fan_speed);
- label = gtk_label_new(output_str);
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 1, 2, current_row,
- current_row + 1, GTK_FILL,
- GTK_FILL | GTK_EXPAND, 5, 0);
-
-
- if (!current_fan.fan_failed) {
- g_snprintf(output_str, 16, "Ok");
- } else {
- g_snprintf(output_str, 16, "Failed");
- }
- label = gtk_label_new(output_str);
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 2, 3, current_row,
- current_row + 1, GTK_FILL,
- GTK_FILL | GTK_EXPAND, 5, 0);
-
- current_row++;
-
- } else {
- nv_warning_msg("Incomplete Fan Entry (fan=%d, speed=%d, failFlag=%d)",
- current_fan.fan_number,
- current_fan.fan_speed,
- current_fan.fan_failed);
- }
- }
- gtk_widget_show_all(table);
- free(fan_entry_str);
- return TRUE;
-}
-
-
-/*
- * CTK VCS (Visual Computing System) widget creation
- *
- */
-GtkWidget* ctk_vcs_new(CtrlTarget *ctrl_target,
- CtkConfig *ctk_config)
-{
- GObject *object;
- CtkVcs *ctk_object;
- GtkWidget *label;
- GtkWidget *vbox;
- GtkWidget *hbox;
- GtkWidget *event;
- GtkWidget *banner;
- GtkWidget *hseparator;
- GtkWidget *table;
- GtkWidget *scrollWin;
- GtkWidget *checkbutton;
-
- gchar *product_name;
- gchar *serial_number;
- gchar *build_date;
- gchar *product_id;
- gchar *firmware_version;
- gchar *hardware_version;
-
- gint current_row;
- gboolean high_perf_mode;
-
- ReturnStatus ret;
- gchar *s;
- char *psu_str = NULL;
- PSUEntry psuEntry;
-
- GtkWidget *vbox_scroll, *hbox_scroll;
-
- /*
- * get the static string data that we will display below
- */
-
- /* Product Name */
- ret = NvCtrlGetStringAttribute(ctrl_target,
- NV_CTRL_STRING_VCSC_PRODUCT_NAME,
- &product_name);
- if (ret != NvCtrlSuccess) {
- product_name = g_strdup("Unable to determine");
- }
-
- /* Serial Number */
- ret = NvCtrlGetStringAttribute(ctrl_target,
- NV_CTRL_STRING_VCSC_SERIAL_NUMBER,
- &serial_number);
- if (ret != NvCtrlSuccess) {
- serial_number = g_strdup("Unable to determine");
- }
-
- /* Build Date */
- ret = NvCtrlGetStringAttribute(ctrl_target,
- NV_CTRL_STRING_VCSC_BUILD_DATE,
- &build_date);
- if (ret != NvCtrlSuccess) {
- build_date = g_strdup("Unable to determine");
- }
-
- /* Product ID */
- ret = NvCtrlGetStringAttribute(ctrl_target,
- NV_CTRL_STRING_VCSC_PRODUCT_ID,
- &product_id);
- if (ret != NvCtrlSuccess) {
- product_id = g_strdup("Unable to determine");
- }
-
- /* Firmware Version */
- ret = NvCtrlGetStringAttribute(ctrl_target,
- NV_CTRL_STRING_VCSC_FIRMWARE_VERSION,
- &firmware_version);
- if (ret != NvCtrlSuccess) {
- firmware_version = g_strdup("Unable to determine");
- }
-
- /* Hardware Version */
- ret = NvCtrlGetStringAttribute(ctrl_target,
- NV_CTRL_STRING_VCSC_HARDWARE_VERSION,
- &hardware_version);
- if (ret != NvCtrlSuccess) {
- hardware_version = g_strdup("Unable to determine");
- }
-
-
- /* now, create the object */
-
- object = g_object_new(CTK_TYPE_VCS, NULL);
- ctk_object = CTK_VCS(object);
-
- /* cache the target */
-
- ctk_object->ctrl_target = ctrl_target;
- ctk_object->ctk_config = ctk_config;
-
- /* set container properties of the object */
-
- gtk_box_set_spacing(GTK_BOX(ctk_object), 10);
-
- /* banner */
-
- banner = ctk_banner_image_new(BANNER_ARTWORK_VCS);
- gtk_box_pack_start(GTK_BOX(ctk_object), banner, FALSE, FALSE, 0);
-
- /*
- * This displays basic System information, including
- * display name, Operating system type and the NVIDIA driver version.
- */
-
- vbox = gtk_vbox_new(FALSE, 5);
- gtk_box_pack_start(GTK_BOX(ctk_object), vbox, TRUE, TRUE, 0);
-
- /* General purpose error dialog */
- ctk_object->error_dialog = create_error_dialog(ctk_object);
-
- if (NvCtrlGetAttribute(ctrl_target, NV_CTRL_VCSC_HIGH_PERF_MODE,
- &high_perf_mode) == NvCtrlSuccess) {
-
- hbox = gtk_hbox_new(FALSE, 0);
- checkbutton = gtk_check_button_new_with_label("Enable High Performance Mode");
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton), high_perf_mode);
- g_signal_connect(G_OBJECT(checkbutton), "toggled",
- G_CALLBACK(vcs_perf_checkbox_toggled),
- (gpointer) ctk_object);
- gtk_box_pack_start(GTK_BOX(hbox), checkbutton, TRUE, TRUE, 0);
- gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
- }
-
- /* Create the Scrolling Window */
- scrollWin = gtk_scrolled_window_new(NULL, NULL);
- hbox_scroll = gtk_hbox_new(FALSE, 0);
- vbox_scroll = gtk_vbox_new(FALSE, 5);
- event = gtk_event_box_new();
- ctk_force_text_colors_on_widget(event);
- gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollWin),
- GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
- gtk_container_add(GTK_CONTAINER(event), hbox_scroll);
- gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollWin),
- event);
- gtk_box_pack_start(GTK_BOX(hbox_scroll), vbox_scroll, TRUE, TRUE, 5);
- gtk_widget_set_size_request(scrollWin, -1, 50);
- gtk_box_pack_start(GTK_BOX(vbox), scrollWin, TRUE, TRUE, 0);
-
- hbox = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(vbox_scroll), hbox, FALSE, FALSE, 0);
-
- label = gtk_label_new("VCS Information");
- gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
-
- hseparator = gtk_hseparator_new();
- gtk_box_pack_start(GTK_BOX(hbox), hseparator, TRUE, TRUE, 5);
-
- table = gtk_table_new(5, 2, FALSE);
- gtk_box_pack_start(GTK_BOX(vbox_scroll), table, FALSE, FALSE, 0);
-
- gtk_table_set_row_spacings(GTK_TABLE(table), 3);
- gtk_table_set_col_spacings(GTK_TABLE(table), 15);
-
- gtk_container_set_border_width(GTK_CONTAINER(table), 5);
-
- add_table_row(table, 0,
- 0, 0.5, "Product Name:", 0, 0.5, product_name);
- add_table_row(table, 1,
- 0, 0.5, "Serial Number:", 0, 0.5, serial_number);
- add_table_row(table, 2,
- 0, 0.5, "Build Date:", 0, 0.5, build_date);
- add_table_row(table, 3,
- 0, 0.5, "Product ID:", 0, 0.5, product_id);
- add_table_row(table, 4,
- 0, 0.5, "Firmware version:", 0, 0.5, firmware_version);
- add_table_row(table, 5,
- 0, 0.5, "Hardware version:", 0, 0.5, hardware_version);
-
- g_free(product_name);
- g_free(serial_number);
- g_free(build_date);
- g_free(product_id);
- g_free(firmware_version);
- g_free(hardware_version);
-
-
- /* Query Canoas 2.0 specific details */
- if ((NvCtrlGetAttribute(ctrl_target, NV_CTRL_VCSC_HIGH_PERF_MODE,
- &high_perf_mode) == NvCtrlSuccess) &&
- (NvCtrlGetStringAttribute(ctrl_target,
- NV_CTRL_STRING_VCSC_PSU_INFO,
- &psu_str) == NvCtrlSuccess)) {
- GtkWidget *vbox_padding;
-
- /* Show the additional queried information */
-
-
- /* Populate scrolling window with data */
- vbox_padding = gtk_vbox_new(FALSE, 0);
- hbox = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(vbox_scroll), vbox_padding, FALSE, FALSE, 1);
- gtk_box_pack_start(GTK_BOX(vbox_scroll), hbox, FALSE, FALSE, 0);
- label = gtk_label_new("VCS Thermal Information");
- gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
- hseparator = gtk_hseparator_new();
- gtk_box_pack_start(GTK_BOX(hbox), hseparator, TRUE, TRUE, 5);
-
- table = gtk_table_new(3, 2, FALSE);
- gtk_box_pack_start(GTK_BOX(vbox_scroll), table, FALSE, FALSE, 0);
-
- gtk_table_set_row_spacings(GTK_TABLE(table), 3);
- gtk_table_set_col_spacings(GTK_TABLE(table), 15);
-
- gtk_container_set_border_width(GTK_CONTAINER(table), 5);
-
- label = gtk_label_new("Intake Temperature:");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
-
- label = gtk_label_new(NULL);
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 1, 2, 0, 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
- ctk_object->intake_temp = label;
-
- label = gtk_label_new("Exhaust Temperature:");
- /* This is the current largest label. Get its size */
- ctk_widget_get_preferred_size(label, &ctk_object->req);
-
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
-
- label = gtk_label_new(NULL);
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 1, 2, 1, 2,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
- ctk_object->exhaust_temp = label;
-
- label = gtk_label_new("Board Temperature:");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
-
- label = gtk_label_new(NULL);
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 1, 2, 2, 3,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
- ctk_object->board_temp = label;
-
- /* Populate table for PSU information */
-
- psuEntry.psu_current = -1;
- psuEntry.psu_power = -1;
- psuEntry.psu_voltage = -1;
- psuEntry.psu_state = -1;
-
- if (psu_str) {
- parse_token_value_pairs(psu_str, apply_psu_entry_token, &psuEntry);
- }
-
- vbox_padding = gtk_vbox_new(FALSE, 0);
- hbox = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(vbox_scroll), vbox_padding, FALSE, FALSE, 1);
- gtk_box_pack_start(GTK_BOX(vbox_scroll), hbox, FALSE, FALSE, 0);
- label = gtk_label_new("VCS Power Supply Unit Information");
- gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
- hseparator = gtk_hseparator_new();
- gtk_box_pack_start(GTK_BOX(hbox), hseparator, TRUE, TRUE, 5);
-
- table = gtk_table_new(4, 2, FALSE);
- gtk_box_pack_start(GTK_BOX(vbox_scroll), table, FALSE, FALSE, 0);
- gtk_table_set_row_spacings(GTK_TABLE(table), 3);
- gtk_table_set_col_spacings(GTK_TABLE(table), 15);
- gtk_container_set_border_width(GTK_CONTAINER(table), 5);
-
- label = gtk_label_new("PSU State:");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_widget_set_size_request(label, ctk_object->req.width, -1);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
-
-
- label = gtk_label_new(NULL);
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 1, 2, 0, 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
- ctk_object->psu_state = label;
-
- label = gtk_label_new("PSU Current:");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_widget_set_size_request(label, ctk_object->req.width, -1);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
-
-
- label = gtk_label_new(NULL);
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 1, 2, 1, 2,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
- ctk_object->psu_current = label;
-
- current_row = 2;
-
- if (psuEntry.psu_power != -1) {
- label = gtk_label_new("PSU Power:");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_widget_set_size_request(label, ctk_object->req.width, -1);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1,
- current_row, current_row + 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
-
- label = gtk_label_new(NULL);
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 1, 2,
- current_row, current_row + 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
- ctk_object->psu_power = label;
- current_row++;
- }
-
- if (psuEntry.psu_voltage != -1) {
- label = gtk_label_new("PSU Voltage:");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_widget_set_size_request(label, ctk_object->req.width, -1);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1,
- current_row, current_row + 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
-
- label = gtk_label_new(NULL);
- gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), label, 1, 2,
- current_row, current_row + 1,
- GTK_FILL, GTK_FILL | GTK_EXPAND, 5, 0);
- ctk_object->psu_voltage = label;
- }
-
- /* Create container for fan status table */
-
- vbox_padding = gtk_vbox_new(FALSE, 0);
- hbox = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(vbox_scroll), vbox_padding, FALSE, FALSE, 1);
- gtk_box_pack_start(GTK_BOX(vbox_scroll), hbox, FALSE, FALSE, 0);
- label = gtk_label_new("VCS Fan Status");
- gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
- hseparator = gtk_hseparator_new();
- gtk_box_pack_start(GTK_BOX(hbox), hseparator, TRUE, TRUE, 5);
-
- hbox = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(vbox_scroll), hbox, FALSE, FALSE, 0);
- ctk_object->fan_status_container = hbox;
-
- /* Register a timer callback to update the dynamic information */
- s = g_strdup_printf("VCS Monitor (VCS %d)",
- NvCtrlGetTargetId(ctrl_target));
-
- ctk_config_add_timer(ctk_object->ctk_config,
- DEFAULT_UPDATE_VCS_INFO_TIME_INTERVAL,
- s,
- (GSourceFunc) update_vcs_info,
- (gpointer) ctk_object);
- g_free(s);
-
- update_vcs_info(ctk_object);
- }
-
- gtk_widget_show_all(GTK_WIDGET(object));
-
- return GTK_WIDGET(object);
-}
-
-
-
-/*
- * VCS help screen
- */
-GtkTextBuffer *ctk_vcs_create_help(GtkTextTagTable *table,
- CtkVcs *ctk_object)
-{
- GtkTextIter i;
- GtkTextBuffer *b;
-
- b = gtk_text_buffer_new(table);
-
- gtk_text_buffer_get_iter_at_offset(b, &i, 0);
-
- ctk_help_title(b, &i, "VCS (Visual Computing System) Help");
-
- ctk_help_heading(b, &i, "Product Name");
- ctk_help_para(b, &i, "This is the product name of the VCS.");
-
- ctk_help_heading(b, &i, "Serial Number");
- ctk_help_para(b, &i, "This is the unique serial number of the VCS.");
-
- ctk_help_heading(b, &i, "Build Date");
- ctk_help_para(b, &i, "This is the date the VCS was build, "
- "shown in a 'week.year' format");
-
- ctk_help_heading(b, &i, "Product ID");
- ctk_help_para(b, &i, "This identifies the VCS configuration.");
-
- ctk_help_heading(b, &i, "Firmware Version");
- ctk_help_para(b, &i, "This is the firmware version currently running on "
- "the VCS.");
-
- ctk_help_heading(b, &i, "Hardware Version");
- ctk_help_para(b, &i, "This is the hardware version of the VCS.");
-
- ctk_help_finish(b);
-
- return b;
-}
-
-void ctk_vcs_start_timer(GtkWidget *widget)
-{
- CtkVcs *ctk_vcs = CTK_VCS(widget);
-
- /* Start the VCS timer */
- ctk_config_start_timer(ctk_vcs->ctk_config,
- (GSourceFunc) update_vcs_info,
- (gpointer) ctk_vcs);
-}
-
-void ctk_vcs_stop_timer(GtkWidget *widget)
-{
- CtkVcs *ctk_vcs = CTK_VCS(widget);
-
- /* Stop the VCS timer */
- ctk_config_stop_timer(ctk_vcs->ctk_config,
- (GSourceFunc) update_vcs_info,
- (gpointer) ctk_vcs);
-}
-
diff --git a/src/gtk+-2.x/ctkvcs.h b/src/gtk+-2.x/ctkvcs.h
deleted file mode 100644
index 8ffcead..0000000
--- a/src/gtk+-2.x/ctkvcs.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
- * and Linux systems.
- *
- * Copyright (C) 2006 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,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses>.
- */
-
-#ifndef __CTK_VCS_H__
-#define __CTK_VCS_H__
-
-#include "ctkevent.h"
-#include "ctkconfig.h"
-
-G_BEGIN_DECLS
-
-#define CTK_TYPE_VCS (ctk_vcs_get_type())
-
-#define CTK_VCS(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), CTK_TYPE_VCS, \
- CtkVcs))
-
-#define CTK_VCS_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), CTK_TYPE_VCS, \
- CtkVcsClass))
-
-#define CTK_IS_VCS(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CTK_TYPE_VCS))
-
-#define CTK_IS_VCS_CLASS(class) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), CTK_TYPE_VCS))
-
-#define CTK_VCS_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), CTK_TYPE_VCS, \
- CtkVcsClass))
-
-
-typedef struct FanEntry
-{
- gint fan_number;
- gint fan_speed;
- gint fan_failed;
-} FanEntry, *FanEntryPtr;
-
-typedef struct ThermalEntry
-{
- gint intake_temp;
- gint exhaust_temp;
- gint board_temp;
-} ThermalEntry, *ThermalEntryPtr;
-
-typedef struct PSUEntry
-{
- gint psu_current;
- gint psu_voltage;
- gint psu_power;
- gint psu_state;
-} PSUEntry, *PSUEntryPtr;
-
-typedef struct _CtkVcs
-{
- GtkVBox parent;
-
- CtkConfig *ctk_config;
- CtrlTarget *ctrl_target;
-
- GtkWidget *intake_temp;
- GtkWidget *exhaust_temp;
- GtkWidget *board_temp;
- GtkWidget *psu_state;
- GtkWidget *psu_current;
- GtkWidget *psu_voltage;
- GtkWidget *psu_power;
- GtkWidget *error_dialog_label;
- GtkWidget *error_dialog;
- GtkWidget *fan_status_container;
- GtkRequisition req;
-
-} CtkVcs;
-
-typedef struct _CtkVcsClass
-{
- GtkVBoxClass parent_class;
-} CtkVcsClass;
-
-
-GType ctk_vcs_get_type (void) G_GNUC_CONST;
-GtkWidget* ctk_vcs_new (CtrlTarget *, CtkConfig *);
-
-GtkTextBuffer *ctk_vcs_create_help(GtkTextTagTable *,
- CtkVcs *);
-
-void ctk_vcs_start_timer(GtkWidget *widget);
-void ctk_vcs_stop_timer(GtkWidget *widget);
-
-G_END_DECLS
-
-#endif /* __CTK_VCS_H__ */
diff --git a/src/gtk+-2.x/ctkvdpau.c b/src/gtk+-2.x/ctkvdpau.c
index 6149c28..0bf40d7 100644
--- a/src/gtk+-2.x/ctkvdpau.c
+++ b/src/gtk+-2.x/ctkvdpau.c
@@ -213,6 +213,10 @@ static int queryBaseInfo(CtkVDPAU *ctk_vdpau, VdpDevice device,
{"HEVC", VDP_DECODER_PROFILE_HEVC_MAIN_STILL, 0x80},
{"HEVC", VDP_DECODER_PROFILE_HEVC_MAIN_12, 0x80},
{"HEVC", VDP_DECODER_PROFILE_HEVC_MAIN_444, 0x80},
+#ifdef VDP_DECODER_PROFILE_HEVC_MAIN_444_10
+ {"HEVC", VDP_DECODER_PROFILE_HEVC_MAIN_444_10, 0x80},
+ {"HEVC", VDP_DECODER_PROFILE_HEVC_MAIN_444_12, 0x80},
+#endif
#ifdef VDP_DECODER_PROFILE_VP9_PROFILE_0
{"VP9", VDP_DECODER_PROFILE_VP9_PROFILE_0, 0x100},
{"VP9", VDP_DECODER_PROFILE_VP9_PROFILE_1, 0x100},
@@ -319,6 +323,17 @@ static const Desc ycbcr_types[] = {
#else
#warning "Update libvdpau to version 1.2"
#endif
+#ifdef VDP_YCBCR_FORMAT_P010
+ {"P010", VDP_YCBCR_FORMAT_P010, 0},
+ {"P016", VDP_YCBCR_FORMAT_P016, 0},
+ {"Y_U_V_444_16", VDP_YCBCR_FORMAT_Y_U_V_444_16, 0},
+#else
+ /*
+ * TO DO: Update the libvdpau version in place of x.x once new libvdpau
+ * wrapper lib release is made.
+ */
+#warning "Update libvdpau to version x.x"
+#endif
};
static const size_t ycbcr_type_count = sizeof(ycbcr_types)/sizeof(Desc);
@@ -343,6 +358,11 @@ static int queryVideoSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
{"420", VDP_CHROMA_TYPE_420, 0},
{"422", VDP_CHROMA_TYPE_422, 0},
{"444", VDP_CHROMA_TYPE_444, 0},
+#ifdef VDP_CHROMA_TYPE_420_16
+ {"420_16", VDP_CHROMA_TYPE_420_16, 0},
+ {"422_16", VDP_CHROMA_TYPE_422_16, 0},
+ {"444_16", VDP_CHROMA_TYPE_444_16, 0},
+#endif
};
const size_t chroma_type_count = sizeof(chroma_types)/sizeof(Desc);
@@ -549,6 +569,10 @@ static int queryDecoderCaps(CtkVDPAU *ctk_vdpau, VdpDevice device,
{"HEVC Main Still Picture", VDP_DECODER_PROFILE_HEVC_MAIN_STILL, 0},
{"HEVC Main 12", VDP_DECODER_PROFILE_HEVC_MAIN_12, 0},
{"HEVC Main 4:4:4", VDP_DECODER_PROFILE_HEVC_MAIN_444, 0},
+#ifdef VDP_DECODER_PROFILE_HEVC_MAIN_444_10
+ {"HEVC Main 4:4:4 10", VDP_DECODER_PROFILE_HEVC_MAIN_444_10, 0},
+ {"HEVC Main 4:4:4 12", VDP_DECODER_PROFILE_HEVC_MAIN_444_12, 0},
+#endif
#ifdef VDP_DECODER_PROFILE_VP9_PROFILE_0
{"VP9 PROFILE 0", VDP_DECODER_PROFILE_VP9_PROFILE_0, 0},
{"VP9 PROFILE 1", VDP_DECODER_PROFILE_VP9_PROFILE_1, 0},
diff --git a/src/gtk+-2.x/ctkwindow.c b/src/gtk+-2.x/ctkwindow.c
index 5bde243..dd9a8a4 100644
--- a/src/gtk+-2.x/ctkwindow.c
+++ b/src/gtk+-2.x/ctkwindow.c
@@ -34,10 +34,6 @@
#include "ctkwindow.h"
#include "ctkframelock.h"
-#include "ctkgvi.h"
-#include "ctkgvo.h"
-#include "ctkgvo-sync.h"
-#include "ctkgvo-csc.h"
#include "ctkconfig.h"
#include "ctkutils.h"
@@ -52,7 +48,6 @@
#include "ctkmultisample.h"
#include "ctkthermal.h"
#include "ctkpowermizer.h"
-#include "ctkvcs.h"
#include "ctk3dvisionpro.h"
#include "ctkdisplaydevice.h"
@@ -819,42 +814,6 @@ GtkWidget *ctk_window_new(ParsedAttribute *p, ConfigProperties *conf,
add_page(child, help, ctk_window, &iter, NULL, "VDPAU Information",
NULL, NULL, NULL);
}
-
- /* gvo (Graphics To Video Out) */
-
- child = ctk_gvo_new(screen_target, ctk_config, ctk_event);
- if (child) {
- GtkWidget *gvo_parent = child;
- GtkTreeIter child_iter;
- help = ctk_gvo_create_help(tag_table);
- add_page(child, help, ctk_window, &iter, &child_iter,
- "Graphics to Video Out", NULL,
- ctk_gvo_select, ctk_gvo_unselect);
-
- /* GVO Sync options */
-
- child = ctk_gvo_sync_new(screen_target, GTK_WIDGET(ctk_window),
- ctk_config, ctk_event,
- CTK_GVO(gvo_parent));
- if (child) {
- help = ctk_gvo_sync_create_help(tag_table,
- CTK_GVO_SYNC(child));
- add_page(child, help, ctk_window, &child_iter, NULL,
- "Synchronization Options", NULL,
- ctk_gvo_sync_select, ctk_gvo_sync_unselect);
- }
-
- /* GVO color space conversion */
-
- child = ctk_gvo_csc_new(screen_target, ctk_config, ctk_event,
- CTK_GVO(gvo_parent));
- if (child) {
- help = ctk_gvo_csc_create_help(tag_table, CTK_GVO_CSC(child));
- add_page(child, help, ctk_window, &child_iter, NULL,
- "Color Space Conversion", NULL,
- ctk_gvo_csc_select, ctk_gvo_csc_unselect);
- }
- }
}
/* add the per-gpu entries into the tree model */
@@ -951,114 +910,6 @@ GtkWidget *ctk_window_new(ParsedAttribute *p, ConfigProperties *conf,
data, ctk_window->attribute_list);
}
- /* add the per-vcs (e.g. Quadro Plex) entries into the tree model */
-
- for (node = system->targets[VCS_TARGET]; node; node = node->next) {
-
- gchar *vcs_product_name;
- gchar *vcs_name;
- GtkWidget *child;
- ReturnStatus ret;
- CtrlTarget *vcs_target = node->t;
-
- if (vcs_target == NULL || vcs_target->h == NULL) {
- continue;
- }
-
- /* create the vcs entry name */
-
- ret = NvCtrlGetStringAttribute(vcs_target,
- NV_CTRL_STRING_VCSC_PRODUCT_NAME,
- &vcs_product_name);
- if (ret == NvCtrlSuccess && vcs_product_name) {
- vcs_name = g_strdup_printf("VCS %d - (%s)",
- NvCtrlGetTargetId(vcs_target),
- vcs_product_name);
- free(vcs_product_name);
- } else {
- vcs_name = g_strdup_printf("VCS %d - (Unknown)",
- NvCtrlGetTargetId(vcs_target));
- }
- if (!vcs_name) continue;
-
- /* create the object for receiving NV-CONTROL events */
-
- ctk_event = CTK_EVENT(ctk_event_new(vcs_target));
-
- /* create the vcs entry */
-
- gtk_tree_store_append(ctk_window->tree_store, &iter, NULL);
- gtk_tree_store_set(ctk_window->tree_store, &iter,
- CTK_WINDOW_LABEL_COLUMN, vcs_name, -1);
- child = ctk_vcs_new(vcs_target, ctk_config);
- g_object_ref(G_OBJECT(child));
- gtk_tree_store_set(ctk_window->tree_store, &iter,
- CTK_WINDOW_WIDGET_COLUMN, child, -1);
- gtk_tree_store_set(ctk_window->tree_store, &iter,
- CTK_WINDOW_HELP_COLUMN,
- ctk_vcs_create_help(tag_table, CTK_VCS(child)), -1);
- 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_vcs_start_timer, -1);
- gtk_tree_store_set(ctk_window->tree_store, &iter,
- CTK_WINDOW_UNSELECT_WIDGET_FUNC_COLUMN,
- ctk_vcs_stop_timer, -1);
-
- }
-
- /* add the per gvi entries into the tree model */
-
- for (node = system->targets[GVI_TARGET]; node; node = node->next) {
-
- gchar *gvi_name;
- GtkWidget *child;
- CtrlTarget *gvi_target = node->t;
-
- if (gvi_target == NULL || gvi_target->h == NULL) {
- continue;
- }
-
- /* create the gvi entry name */
-
- if (node->next) {
- gvi_name = g_strdup_printf("Graphics to Video In %d",
- NvCtrlGetTargetId(gvi_target));
- } else {
- gvi_name = g_strdup_printf("Graphics to Video In");
- }
-
- if (!gvi_name) continue;
-
- /* create the object for receiving NV-CONTROL events */
-
- ctk_event = CTK_EVENT(ctk_event_new(gvi_target));
-
- /* create the gvi entry */
-
- gtk_tree_store_append(ctk_window->tree_store, &iter, NULL);
- gtk_tree_store_set(ctk_window->tree_store, &iter,
- CTK_WINDOW_LABEL_COLUMN, gvi_name, -1);
- child = ctk_gvi_new(gvi_target, ctk_config, ctk_event);
- g_object_ref(G_OBJECT(child));
- gtk_tree_store_set(ctk_window->tree_store, &iter,
- CTK_WINDOW_WIDGET_COLUMN, child, -1);
- gtk_tree_store_set(ctk_window->tree_store, &iter,
- CTK_WINDOW_HELP_COLUMN,
- ctk_gvi_create_help(tag_table, CTK_GVI(child)), -1);
- 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_gvi_start_timer, -1);
- gtk_tree_store_set(ctk_window->tree_store, &iter,
- CTK_WINDOW_UNSELECT_WIDGET_FUNC_COLUMN,
- ctk_gvi_stop_timer, -1);
-
- }
/*
* add the frame lock page, if any of the X screens support
* frame lock
diff --git a/src/image_data/gvi.png b/src/image_data/gvi.png
deleted file mode 100644
index d025cd5..0000000
--- a/src/image_data/gvi.png
+++ /dev/null
Binary files differ
diff --git a/src/image_data/sdi.png b/src/image_data/sdi.png
deleted file mode 100644
index 9c265d6..0000000
--- a/src/image_data/sdi.png
+++ /dev/null
Binary files differ
diff --git a/src/image_data/sdi_shared_sync_bnc.png b/src/image_data/sdi_shared_sync_bnc.png
deleted file mode 100644
index 894359d..0000000
--- a/src/image_data/sdi_shared_sync_bnc.png
+++ /dev/null
Binary files differ
diff --git a/src/image_data/vcs.png b/src/image_data/vcs.png
deleted file mode 100644
index 5e96b0c..0000000
--- a/src/image_data/vcs.png
+++ /dev/null
Binary files differ
diff --git a/src/jansson/jansson_private_config.h b/src/jansson/jansson_private_config.h
index 6b51bc0..0131fec 100644
--- a/src/jansson/jansson_private_config.h
+++ b/src/jansson/jansson_private_config.h
@@ -3,7 +3,7 @@
#endif
/* Prevent value.c from overriding Solaris's builtin isnan() */
-#if defined(NV_SUNOS)
+#if defined(NV_SUNOS) && !defined(isnan)
# define isnan isnan
#endif
diff --git a/src/libXNVCtrl/NVCtrl.h b/src/libXNVCtrl/NVCtrl.h
index 939b446..7d22d6a 100644
--- a/src/libXNVCtrl/NVCtrl.h
+++ b/src/libXNVCtrl/NVCtrl.h
@@ -2671,6 +2671,7 @@
#define NV_CTRL_GPU_PCIE_GENERATION1 0x00000001
#define NV_CTRL_GPU_PCIE_GENERATION2 0x00000002
#define NV_CTRL_GPU_PCIE_GENERATION3 0x00000003
+#define NV_CTRL_GPU_PCIE_GENERATION4 0x00000004
/*
* NV_CTRL_GVI_BOUND_GPU - Returns the NV_CTRL_TARGET_TYPE_GPU target_id of
diff --git a/src/libXNVCtrl/version.mk b/src/libXNVCtrl/version.mk
index 7a63ce9..38f9fbf 100644
--- a/src/libXNVCtrl/version.mk
+++ b/src/libXNVCtrl/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 440.100
+NVIDIA_VERSION = 450.51
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributes.c b/src/libXNVCtrlAttributes/NvCtrlAttributes.c
index a60b85b..a1198a1 100644
--- a/src/libXNVCtrlAttributes/NvCtrlAttributes.c
+++ b/src/libXNVCtrlAttributes/NvCtrlAttributes.c
@@ -69,22 +69,6 @@ const CtrlTargetTypeInfo targetTypeInfoTable[] = {
NV_FALSE, /* uses_display_devices */
1, 10 }, /* required major,minor protocol rev */
- [VCS_TARGET] =
- { "VCS", /* name */
- "vcs", /* parsed_name */
- NV_CTRL_TARGET_TYPE_VCSC, /* nvctrl */
- CTRL_TARGET_PERM_BIT(VCS_TARGET), /* permission_bit */
- NV_FALSE, /* uses_display_devices */
- 1, 12 }, /* required major,minor protocol rev */
-
- [GVI_TARGET] =
- { "SDI Input Device", /* name */
- "gvi", /* parsed_name */
- NV_CTRL_TARGET_TYPE_GVI, /* nvctrl */
- CTRL_TARGET_PERM_BIT(GVI_TARGET), /* permission_bit */
- NV_FALSE, /* uses_display_devices */
- 1, 18 }, /* required major,minor protocol rev */
-
[COOLER_TARGET] =
{ "Fan", /* name */
"fan", /* parsed_name */
@@ -133,8 +117,6 @@ Bool NvCtrlIsTargetTypeValid(CtrlTargetType target_type)
case X_SCREEN_TARGET:
case GPU_TARGET:
case FRAMELOCK_TARGET:
- case VCS_TARGET:
- case GVI_TARGET:
case COOLER_TARGET:
case THERMAL_SENSOR_TARGET:
case NVIDIA_3D_VISION_PRO_TRANSCEIVER_TARGET:
@@ -628,8 +610,6 @@ ReturnStatus NvCtrlQueryTargetCount(const CtrlTarget *ctrl_target,
case DISPLAY_TARGET:
case X_SCREEN_TARGET:
case FRAMELOCK_TARGET:
- case VCS_TARGET:
- case GVI_TARGET:
case NVIDIA_3D_VISION_PRO_TRANSCEIVER_TARGET:
return NvCtrlNvControlQueryTargetCount(h, target_type, val);
default:
@@ -701,7 +681,6 @@ ReturnStatus NvCtrlGetAttributePerms(const CtrlTarget *ctrl_target,
return NvCtrlNvControlGetAttributePerms(h, attr_type, attr, perms);
case CTRL_ATTRIBUTE_TYPE_COLOR:
- case CTRL_ATTRIBUTE_TYPE_SDI_CSC:
/*
* Allow non NV-CONTROL attributes to be read/written on X screen
* targets
@@ -790,8 +769,6 @@ ReturnStatus NvCtrlGetDisplayAttribute64(const CtrlTarget *ctrl_target,
case DISPLAY_TARGET:
case X_SCREEN_TARGET:
case FRAMELOCK_TARGET:
- case VCS_TARGET:
- case GVI_TARGET:
case NVIDIA_3D_VISION_PRO_TRANSCEIVER_TARGET:
if (!h->nv) return NvCtrlMissingExtension;
return NvCtrlNvControlGetAttribute(h, display_mask, attr, val);
@@ -853,8 +830,6 @@ ReturnStatus NvCtrlSetDisplayAttribute(CtrlTarget *ctrl_target,
case DISPLAY_TARGET:
case X_SCREEN_TARGET:
case FRAMELOCK_TARGET:
- case VCS_TARGET:
- case GVI_TARGET:
case NVIDIA_3D_VISION_PRO_TRANSCEIVER_TARGET:
if (!h->nv) {
return NvCtrlMissingExtension;
@@ -929,8 +904,6 @@ NvCtrlGetValidDisplayAttributeValues(const CtrlTarget *ctrl_target,
case DISPLAY_TARGET:
case X_SCREEN_TARGET:
case FRAMELOCK_TARGET:
- case VCS_TARGET:
- case GVI_TARGET:
case NVIDIA_3D_VISION_PRO_TRANSCEIVER_TARGET:
if (!h->nv) {
return NvCtrlMissingExtension;
@@ -1004,8 +977,6 @@ NvCtrlGetValidStringDisplayAttributeValues(const CtrlTarget *ctrl_target,
case DISPLAY_TARGET:
case X_SCREEN_TARGET:
case FRAMELOCK_TARGET:
- case VCS_TARGET:
- case GVI_TARGET:
case NVIDIA_3D_VISION_PRO_TRANSCEIVER_TARGET:
if (!h->nv) {
return NvCtrlMissingExtension;
@@ -1089,8 +1060,6 @@ ReturnStatus NvCtrlGetStringDisplayAttribute(const CtrlTarget *ctrl_target,
case DISPLAY_TARGET:
case X_SCREEN_TARGET:
case FRAMELOCK_TARGET:
- case VCS_TARGET:
- case GVI_TARGET:
case NVIDIA_3D_VISION_PRO_TRANSCEIVER_TARGET:
if ((attr >= 0) && (attr <= NV_CTRL_STRING_LAST_ATTRIBUTE)) {
if (!h->nv) return NvCtrlMissingExtension;
@@ -1171,8 +1140,6 @@ ReturnStatus NvCtrlSetStringDisplayAttribute(CtrlTarget *ctrl_target,
case DISPLAY_TARGET:
case X_SCREEN_TARGET:
case FRAMELOCK_TARGET:
- case VCS_TARGET:
- case GVI_TARGET:
case NVIDIA_3D_VISION_PRO_TRANSCEIVER_TARGET:
if (!h->nv) return NvCtrlMissingExtension;
return NvCtrlNvControlSetStringAttribute(h, display_mask, attr,
@@ -1215,8 +1182,6 @@ ReturnStatus NvCtrlGetBinaryAttribute(const CtrlTarget *ctrl_target,
case DISPLAY_TARGET:
case X_SCREEN_TARGET:
case FRAMELOCK_TARGET:
- case VCS_TARGET:
- case GVI_TARGET:
case NVIDIA_3D_VISION_PRO_TRANSCEIVER_TARGET:
return NvCtrlNvControlGetBinaryAttribute(h, display_mask, attr, data, len);
default:
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributes.h b/src/libXNVCtrlAttributes/NvCtrlAttributes.h
index ad222a3..4d5e46d 100644
--- a/src/libXNVCtrlAttributes/NvCtrlAttributes.h
+++ b/src/libXNVCtrlAttributes/NvCtrlAttributes.h
@@ -40,8 +40,6 @@ typedef enum {
X_SCREEN_TARGET = 0,
GPU_TARGET,
FRAMELOCK_TARGET,
- VCS_TARGET,
- GVI_TARGET,
COOLER_TARGET,
THERMAL_SENSOR_TARGET,
NVIDIA_3D_VISION_PRO_TRANSCEIVER_TARGET,
@@ -208,7 +206,6 @@ typedef enum {
CTRL_ATTRIBUTE_TYPE_STRING_OPERATION,
CTRL_ATTRIBUTE_TYPE_BINARY_DATA,
CTRL_ATTRIBUTE_TYPE_COLOR,
- CTRL_ATTRIBUTE_TYPE_SDI_CSC,
} CtrlAttributeType;
@@ -806,23 +803,6 @@ ReturnStatus NvCtrlStringOperation(CtrlTarget *ctrl_target,
unsigned int display_mask, int attr,
const char *ptrIn, char **ptrOut);
-/*
- * NvCtrl[SG]etGvoColorConversion() - get and set the color conversion
- * matrix and offset used in the Graphics to Video Out (GVO)
- * extension. These should only be used if the NV_CTRL_GVO_SUPPORTED
- * attribute is TRUE.
- */
-
-ReturnStatus NvCtrlSetGvoColorConversion(CtrlTarget *ctrl_target,
- float colorMatrix[3][3],
- float colorOffset[3],
- float colorScale[3]);
-
-ReturnStatus NvCtrlGetGvoColorConversion(const CtrlTarget *ctrl_target,
- float colorMatrix[3][3],
- float colorOffset[3],
- float colorScale[3]);
-
const char *NvCtrlGetStereoModeNameIfExists(int stereo_mode);
const char *NvCtrlGetStereoModeName(int stereo_mode);
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c b/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c
index e17fbdd..bd6e829 100644
--- a/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c
+++ b/src/libXNVCtrlAttributes/NvCtrlAttributesNvControl.c
@@ -277,12 +277,6 @@ static void convertFromNvCtrlPermissions(CtrlAttributePerms *dst,
if (permissions & ATTRIBUTE_TYPE_FRAMELOCK) {
dst->valid_targets |= CTRL_TARGET_PERM_BIT(FRAMELOCK_TARGET);
}
- if (permissions & ATTRIBUTE_TYPE_VCSC) {
- dst->valid_targets |= CTRL_TARGET_PERM_BIT(VCS_TARGET);
- }
- if (permissions & ATTRIBUTE_TYPE_GVI) {
- dst->valid_targets |= CTRL_TARGET_PERM_BIT(GVI_TARGET);
- }
if (permissions & ATTRIBUTE_TYPE_COOLER) {
dst->valid_targets |= CTRL_TARGET_PERM_BIT(COOLER_TARGET);
}
@@ -481,7 +475,7 @@ NvCtrlNvControlGetStringAttribute(const NvCtrlAttributePrivateHandle *h,
}
if (attr == NV_CTRL_STRING_NV_CONTROL_VERSION) {
- char str[16];
+ char str[24];
if (h->target_type != X_SCREEN_TARGET) {
return NvCtrlBadHandle;
}
@@ -651,67 +645,3 @@ NvCtrlNvControlStringOperation(NvCtrlAttributePrivateHandle *h,
return NvCtrlNoAttribute;
} /* NvCtrlNvControlStringOperation() */
-
-
-ReturnStatus NvCtrlSetGvoColorConversion(CtrlTarget *ctrl_target,
- float colorMatrix[3][3],
- float colorOffset[3],
- float colorScale[3])
-{
- NvCtrlAttributePrivateHandle *h;
-
- if (ctrl_target == NULL || ctrl_target->h == NULL) {
- return NvCtrlBadHandle;
- }
-
- h = (NvCtrlAttributePrivateHandle *)(ctrl_target->h);
-
- if (!h->nv) return NvCtrlMissingExtension;
-
- if (h->target_type != X_SCREEN_TARGET) {
- return NvCtrlBadHandle;
- }
-
- XNVCTRLSetGvoColorConversion(h->dpy,
- h->target_id,
- colorMatrix,
- colorOffset,
- colorScale);
-
- return NvCtrlSuccess;
-
-} /* NvCtrlNvControlSetGvoColorConversion() */
-
-
-ReturnStatus NvCtrlGetGvoColorConversion(const CtrlTarget *ctrl_target,
- float colorMatrix[3][3],
- float colorOffset[3],
- float colorScale[3])
-{
- const NvCtrlAttributePrivateHandle *h;
- Bool bRet;
-
- if (ctrl_target == NULL || ctrl_target->h == NULL) {
- return NvCtrlBadHandle;
- }
-
- h = (const NvCtrlAttributePrivateHandle *)(ctrl_target->h);
-
- if (!h->nv) return NvCtrlMissingExtension;
-
- if (h->target_type != X_SCREEN_TARGET) {
- return NvCtrlBadHandle;
- }
-
- bRet = XNVCTRLQueryGvoColorConversion(h->dpy,
- h->target_id,
- colorMatrix,
- colorOffset,
- colorScale);
- if (!bRet) {
- return NvCtrlError;
- } else {
- return NvCtrlSuccess;
- }
-
-} /* NvCtrlNvControlGetGvoColorConversion() */
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributesNvml.c b/src/libXNVCtrlAttributes/NvCtrlAttributesNvml.c
index 35c0f1e..7399400 100644
--- a/src/libXNVCtrlAttributes/NvCtrlAttributesNvml.c
+++ b/src/libXNVCtrlAttributes/NvCtrlAttributesNvml.c
@@ -537,7 +537,6 @@ static ReturnStatus NvCtrlNvmlGetGPUStringAttribute(const CtrlTarget *ctrl_targe
case NV_CTRL_STRING_GPU_CURRENT_CLOCK_FREQS:
case NV_CTRL_STRING_GPU_UTILIZATION:
case NV_CTRL_STRING_MULTIGPU_MODE:
- case NV_CTRL_STRING_GVIO_FIRMWARE_VERSION:
/*
* XXX We'll eventually need to add support for this attributes
* through NVML
@@ -846,7 +845,6 @@ static ReturnStatus NvCtrlNvmlGetGPUAttribute(const CtrlTarget *ctrl_target,
case NV_CTRL_VIDEO_ENCODER_UTILIZATION:
case NV_CTRL_VIDEO_DECODER_UTILIZATION:
case NV_CTRL_FRAMELOCK:
- case NV_CTRL_IS_GVO_DISPLAY:
case NV_CTRL_DITHERING:
case NV_CTRL_CURRENT_DITHERING:
case NV_CTRL_DITHERING_MODE:
@@ -1330,7 +1328,6 @@ NvCtrlNvmlGetGPUBinaryAttribute(const CtrlTarget *ctrl_target,
if (ret == NVML_SUCCESS) {
switch (attr) {
case NV_CTRL_BINARY_DATA_FRAMELOCKS_USED_BY_GPU:
- case NV_CTRL_BINARY_DATA_VCSCS_USED_BY_GPU:
case NV_CTRL_BINARY_DATA_COOLERS_USED_BY_GPU:
case NV_CTRL_BINARY_DATA_THERMAL_SENSORS_USED_BY_GPU:
case NV_CTRL_BINARY_DATA_DISPLAYS_CONNECTED_TO_GPU:
@@ -1429,7 +1426,6 @@ NvCtrlNvmlGetGPUValidStringAttributeValues(int attr,
case NV_CTRL_STRING_PERFORMANCE_MODES:
case NV_CTRL_STRING_MULTIGPU_MODE:
case NV_CTRL_STRING_GPU_CURRENT_CLOCK_FREQS:
- case NV_CTRL_STRING_GVIO_FIRMWARE_VERSION:
case NV_CTRL_STRING_GPU_UUID:
case NV_CTRL_STRING_GPU_UTILIZATION:
/*
@@ -1589,7 +1585,6 @@ NvCtrlNvmlGetGPUValidAttributeValues(const CtrlTarget *ctrl_target, int attr,
case NV_CTRL_VIDEO_ENCODER_UTILIZATION:
case NV_CTRL_VIDEO_DECODER_UTILIZATION:
case NV_CTRL_FRAMELOCK:
- case NV_CTRL_IS_GVO_DISPLAY:
case NV_CTRL_DITHERING:
case NV_CTRL_CURRENT_DITHERING:
case NV_CTRL_DITHERING_MODE:
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h b/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h
index 37edb29..51d538c 100644
--- a/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h
+++ b/src/libXNVCtrlAttributes/NvCtrlAttributesPrivate.h
@@ -103,7 +103,6 @@
#define SOP_ATTRIBUTE_NAME(_ATTR_) ATTRIBUTE_NAME(_ATTR_, CTRL_ATTRIBUTE_TYPE_STRING_OPERATION)
#define BIN_ATTRIBUTE_NAME(_ATTR_) ATTRIBUTE_NAME(_ATTR_, CTRL_ATTRIBUTE_TYPE_BINARY_DATA)
#define COL_ATTRIBUTE_NAME(_ATTR_) ATTRIBUTE_NAME(_ATTR_, CTRL_ATTRIBUTE_TYPE_COLOR)
-#define CSC_ATTRIBUTE_NAME(_ATTR_) ATTRIBUTE_NAME(_ATTR_, CTRL_ATTRIBUTE_TYPE_SDI_CSC)
typedef struct __NvCtrlAttributes NvCtrlAttributes;
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributesUtils.c b/src/libXNVCtrlAttributes/NvCtrlAttributesUtils.c
index 4207c10..4d7001f 100644
--- a/src/libXNVCtrlAttributes/NvCtrlAttributesUtils.c
+++ b/src/libXNVCtrlAttributes/NvCtrlAttributesUtils.c
@@ -564,9 +564,6 @@ static void load_gpu_target_relationships(CtrlTarget *target)
add_target_relationships(target, FRAMELOCK_TARGET,
NV_CTRL_BINARY_DATA_FRAMELOCKS_USED_BY_GPU,
NV_FALSE);
- add_target_relationships(target, VCS_TARGET,
- NV_CTRL_BINARY_DATA_VCSCS_USED_BY_GPU,
- NV_FALSE);
add_target_relationships(target, COOLER_TARGET,
NV_CTRL_BINARY_DATA_COOLERS_USED_BY_GPU,
NV_TRUE);
@@ -600,22 +597,6 @@ static void load_framelock_target_relationships(CtrlTarget *target)
/*!
- * Adds all associations to/from a VCS target.
- *
- * \param[in\out] target The VCS target to which association(s) are being
- * made.
- */
-
-static void load_vcs_target_relationships(CtrlTarget *target)
-{
- add_target_relationships(target, GPU_TARGET,
- NV_CTRL_BINARY_DATA_GPUS_USING_VCSC,
- NV_FALSE);
-}
-
-
-
-/*!
* Adds all associations to/from a target.
*
* \param[in\out] target The target to which association(s) are being made.
@@ -636,10 +617,6 @@ static void load_target_relationships(CtrlTarget *target)
load_framelock_target_relationships(target);
break;
- case VCS_TARGET:
- load_vcs_target_relationships(target);
- break;
-
default:
break;
}
@@ -986,8 +963,6 @@ static Bool load_system_info(CtrlSystem *system, const char *display)
case X_SCREEN_TARGET:
case GPU_TARGET:
case FRAMELOCK_TARGET:
- case VCS_TARGET:
- case GVI_TARGET:
case COOLER_TARGET:
case THERMAL_SENSOR_TARGET:
case NVIDIA_3D_VISION_PRO_TRANSCEIVER_TARGET:
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c b/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c
index c2225c2..224f300 100644
--- a/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c
+++ b/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c
@@ -242,7 +242,7 @@ NvCtrlVidModeGetStringAttribute(const NvCtrlAttributePrivateHandle *h,
/* Get Video Mode major & minor versions */
if (attr == NV_CTRL_STRING_XF86VIDMODE_VERSION) {
- char str[16];
+ char str[24];
sprintf(str, "%d.%d", h->vm->major_version, h->vm->minor_version);
*ptr = strdup(str);
return NvCtrlSuccess;
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributesXrandr.c b/src/libXNVCtrlAttributes/NvCtrlAttributesXrandr.c
index f28d759..b5797dc 100644
--- a/src/libXNVCtrlAttributes/NvCtrlAttributesXrandr.c
+++ b/src/libXNVCtrlAttributes/NvCtrlAttributesXrandr.c
@@ -404,7 +404,7 @@ NvCtrlXrandrGetStringAttribute(const NvCtrlAttributePrivateHandle *h,
/* Get Xrandr major & minor versions */
if (attr == NV_CTRL_STRING_XRANDR_VERSION) {
- char str[16];
+ char str[24];
sprintf(str, "%d.%d", h->xrandr->major_version, h->xrandr->minor_version);
*ptr = strdup(str);
return NvCtrlSuccess;
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributesXv.c b/src/libXNVCtrlAttributes/NvCtrlAttributesXv.c
index 09ae46c..ce13eee 100644
--- a/src/libXNVCtrlAttributes/NvCtrlAttributesXv.c
+++ b/src/libXNVCtrlAttributes/NvCtrlAttributesXv.c
@@ -235,7 +235,7 @@ ReturnStatus NvCtrlXvGetStringAttribute(const NvCtrlAttributePrivateHandle *h,
/* Get Xv major & minor versions */
if (attr == NV_CTRL_STRING_XV_VERSION) {
- char str[16];
+ char str[24];
sprintf(str, "%d.%d", h->xv->major_version, h->xv->minor_version);
*ptr = strdup(str);
return NvCtrlSuccess;
diff --git a/src/nvml.h b/src/nvml.h
index 4c7db7a..99e48e5 100644
--- a/src/nvml.h
+++ b/src/nvml.h
@@ -1,5 +1,5 @@
/*
- * Copyright 1993-2019 NVIDIA Corporation. All rights reserved.
+ * Copyright 1993-2020 NVIDIA Corporation. All rights reserved.
*
* NOTICE TO USER:
*
@@ -95,16 +95,25 @@ extern "C" {
/**
* NVML API versioning support
*/
-#define NVML_API_VERSION 10
-#define NVML_API_VERSION_STR "10"
-#define nvmlInit nvmlInit_v2
-#define nvmlDeviceGetPciInfo nvmlDeviceGetPciInfo_v3
-#define nvmlDeviceGetCount nvmlDeviceGetCount_v2
-#define nvmlDeviceGetHandleByIndex nvmlDeviceGetHandleByIndex_v2
-#define nvmlDeviceGetHandleByPciBusId nvmlDeviceGetHandleByPciBusId_v2
-#define nvmlDeviceGetNvLinkRemotePciInfo nvmlDeviceGetNvLinkRemotePciInfo_v2
-#define nvmlDeviceRemoveGpu nvmlDeviceRemoveGpu_v2
-#define nvmlDeviceGetGridLicensableFeatures nvmlDeviceGetGridLicensableFeatures_v3
+#define NVML_API_VERSION 11
+#define NVML_API_VERSION_STR "11"
+/**
+ * Defining NVML_NO_UNVERSIONED_FUNC_DEFS will disable "auto upgrading" of APIs.
+ * e.g. the user will have to call nvmlInit_v2 instead of nvmlInit. Enable this
+ * guard if you need to support older versions of the API
+ */
+#ifndef NVML_NO_UNVERSIONED_FUNC_DEFS
+ #define nvmlInit nvmlInit_v2
+ #define nvmlDeviceGetPciInfo nvmlDeviceGetPciInfo_v3
+ #define nvmlDeviceGetCount nvmlDeviceGetCount_v2
+ #define nvmlDeviceGetHandleByIndex nvmlDeviceGetHandleByIndex_v2
+ #define nvmlDeviceGetHandleByPciBusId nvmlDeviceGetHandleByPciBusId_v2
+ #define nvmlDeviceGetNvLinkRemotePciInfo nvmlDeviceGetNvLinkRemotePciInfo_v2
+ #define nvmlDeviceRemoveGpu nvmlDeviceRemoveGpu_v2
+ #define nvmlDeviceGetGridLicensableFeatures nvmlDeviceGetGridLicensableFeatures_v3
+ #define nvmlEventSetWait nvmlEventSetWait_v2
+ #define nvmlDeviceGetAttributes nvmlDeviceGetAttributes_v2
+#endif // #ifndef NVML_NO_UNVERSIONED_FUNC_DEFS
/***************************************************************************************************/
/** @defgroup nvmlDeviceStructs Device Structs
@@ -221,6 +230,34 @@ typedef struct nvmlProcessInfo_st
//! because Windows KMD manages all the memory and not the NVIDIA driver
} nvmlProcessInfo_t;
+typedef struct nvmlDeviceAttributes_st
+{
+ unsigned int multiprocessorCount; //!< Streaming Multiprocessor count
+ unsigned int sharedCopyEngineCount; //!< Shared Copy Engine count
+ unsigned int sharedDecoderCount; //!< Shared Decoder Engine count
+ unsigned int sharedEncoderCount; //!< Shared Encoder Engine count
+ unsigned int sharedJpegCount; //!< Shared JPEG Engine count
+ unsigned int sharedOfaCount; //!< Shared OFA Engine count
+ unsigned int gpuInstanceSliceCount; //!< GPU instance slice count
+ unsigned int computeInstanceSliceCount; //!< Compute instance slice count
+ unsigned long long memorySizeMB; //!< Device memory size (in MiB)
+} nvmlDeviceAttributes_t;
+
+/**
+ * Possible values that classify the remap availability for each bank. The max
+ * field will contain the number of banks that have maximum remap availability
+ * (all reserved rows are available). None means that there are no reserved
+ * rows available.
+ */
+typedef struct nvmlRowRemapperHistogramValues_st
+{
+ unsigned int max;
+ unsigned int high;
+ unsigned int partial;
+ unsigned int low;
+ unsigned int none;
+} nvmlRowRemapperHistogramValues_t;
+
/**
* Enum to represent type of bridge chip
*/
@@ -233,7 +270,7 @@ typedef enum nvmlBridgeChipType_enum
/**
* Maximum number of NvLink links supported
*/
-#define NVML_NVLINK_MAX_LINKS 6
+#define NVML_NVLINK_MAX_LINKS 12
/**
* Enum to represent the NvLink utilization counter packet units
@@ -716,30 +753,31 @@ 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
- NVML_ERROR_NOT_SUPPORTED = 3, //!< The requested operation is not available on target device
- NVML_ERROR_NO_PERMISSION = 4, //!< The current user does not have permission for operation
- NVML_ERROR_ALREADY_INITIALIZED = 5, //!< Deprecated: Multiple initializations are now allowed through ref counting
- NVML_ERROR_NOT_FOUND = 6, //!< A query to find an object was unsuccessful
- NVML_ERROR_INSUFFICIENT_SIZE = 7, //!< An input argument is not large enough
- NVML_ERROR_INSUFFICIENT_POWER = 8, //!< A device's external power cables are not properly attached
- NVML_ERROR_DRIVER_NOT_LOADED = 9, //!< NVIDIA driver is not loaded
- NVML_ERROR_TIMEOUT = 10, //!< User provided timeout passed
- NVML_ERROR_IRQ_ISSUE = 11, //!< NVIDIA Kernel detected an interrupt issue with a GPU
- NVML_ERROR_LIBRARY_NOT_FOUND = 12, //!< NVML Shared Library couldn't be found or loaded
- NVML_ERROR_FUNCTION_NOT_FOUND = 13, //!< Local version of NVML doesn't implement this function
- NVML_ERROR_CORRUPTED_INFOROM = 14, //!< infoROM is corrupted
- NVML_ERROR_GPU_IS_LOST = 15, //!< The GPU has fallen off the bus or has otherwise become inaccessible
- NVML_ERROR_RESET_REQUIRED = 16, //!< The GPU requires a reset before it can be used again
- NVML_ERROR_OPERATING_SYSTEM = 17, //!< The GPU control device has been blocked by the operating system/cgroups
- NVML_ERROR_LIB_RM_VERSION_MISMATCH = 18, //!< RM detects a driver/library version mismatch
- NVML_ERROR_IN_USE = 19, //!< An operation cannot be performed because the GPU is currently in use
- NVML_ERROR_MEMORY = 20, //!< Insufficient memory
- NVML_ERROR_NO_DATA = 21, //!<No data
- NVML_ERROR_VGPU_ECC_NOT_SUPPORTED = 22, //!< The requested vgpu operation is not available on target device, becasue ECC is enabled
- NVML_ERROR_UNKNOWN = 999 //!< An internal driver error occurred
+ 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
+ NVML_ERROR_NOT_SUPPORTED = 3, //!< The requested operation is not available on target device
+ NVML_ERROR_NO_PERMISSION = 4, //!< The current user does not have permission for operation
+ NVML_ERROR_ALREADY_INITIALIZED = 5, //!< Deprecated: Multiple initializations are now allowed through ref counting
+ NVML_ERROR_NOT_FOUND = 6, //!< A query to find an object was unsuccessful
+ NVML_ERROR_INSUFFICIENT_SIZE = 7, //!< An input argument is not large enough
+ NVML_ERROR_INSUFFICIENT_POWER = 8, //!< A device's external power cables are not properly attached
+ NVML_ERROR_DRIVER_NOT_LOADED = 9, //!< NVIDIA driver is not loaded
+ NVML_ERROR_TIMEOUT = 10, //!< User provided timeout passed
+ NVML_ERROR_IRQ_ISSUE = 11, //!< NVIDIA Kernel detected an interrupt issue with a GPU
+ NVML_ERROR_LIBRARY_NOT_FOUND = 12, //!< NVML Shared Library couldn't be found or loaded
+ NVML_ERROR_FUNCTION_NOT_FOUND = 13, //!< Local version of NVML doesn't implement this function
+ NVML_ERROR_CORRUPTED_INFOROM = 14, //!< infoROM is corrupted
+ NVML_ERROR_GPU_IS_LOST = 15, //!< The GPU has fallen off the bus or has otherwise become inaccessible
+ NVML_ERROR_RESET_REQUIRED = 16, //!< The GPU requires a reset before it can be used again
+ NVML_ERROR_OPERATING_SYSTEM = 17, //!< The GPU control device has been blocked by the operating system/cgroups
+ NVML_ERROR_LIB_RM_VERSION_MISMATCH = 18, //!< RM detects a driver/library version mismatch
+ NVML_ERROR_IN_USE = 19, //!< An operation cannot be performed because the GPU is currently in use
+ NVML_ERROR_MEMORY = 20, //!< Insufficient memory
+ NVML_ERROR_NO_DATA = 21, //!< No data
+ NVML_ERROR_VGPU_ECC_NOT_SUPPORTED = 22, //!< The requested vgpu operation is not available on target device, becasue ECC is enabled
+ NVML_ERROR_INSUFFICIENT_RESOURCES = 23, //!< Ran out of critical resources, other than memory
+ NVML_ERROR_UNKNOWN = 999 //!< An internal driver error occurred
} nvmlReturn_t;
/**
@@ -845,6 +883,7 @@ typedef enum {
/** @} */
/***************************************************************************************************/
+
/** @defgroup nvmlVgpuConstants GRID Virtualization Constants
* @{
*/
@@ -948,6 +987,21 @@ typedef struct nvmlGridLicensableFeatures_st
nvmlGridLicensableFeature_t gridLicensableFeatures[NVML_GRID_LICENSE_FEATURE_MAX_COUNT]; //!< Array of GRID licensable features.
} nvmlGridLicensableFeatures_t;
+/**
+ * Simplified chip architecture
+ */
+#define NVML_DEVICE_ARCH_KEPLER 2 // Devices based on the NVIDIA Kepler architecture
+#define NVML_DEVICE_ARCH_MAXWELL 3 // Devices based on the NVIDIA Maxwell architecture
+#define NVML_DEVICE_ARCH_PASCAL 4 // Devices based on the NVIDIA Pascal architecture
+#define NVML_DEVICE_ARCH_VOLTA 5 // Devices based on the NVIDIA Volta architecture
+#define NVML_DEVICE_ARCH_TURING 6 // Devices based on the NVIDIA Turing architecture
+
+#define NVML_DEVICE_ARCH_AMPERE 7 // Devices based on the NVIDIA Ampere architecture
+
+#define NVML_DEVICE_ARCH_UNKNOWN 0xffffffff // Anything else, presumably something newer
+
+typedef unsigned int nvmlDeviceArchitecture_t;
+
/** @} */
/** @} */
@@ -1035,6 +1089,14 @@ typedef struct nvmlGridLicensableFeatures_st
#define NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_TOTAL 59 //!< NVLink Recovery Error Counter total for all Lanes
/* NvLink Bandwidth Counters */
+/*
+ * NVML_FI_DEV_NVLINK_BANDWIDTH_* field values are now deprecated.
+ * Please use the following field values instead:
+ * NVML_FI_DEV_NVLINK_THROUGHPUT_DATA_TX
+ * NVML_FI_DEV_NVLINK_THROUGHPUT_DATA_RX
+ * NVML_FI_DEV_NVLINK_THROUGHPUT_RAW_TX
+ * NVML_FI_DEV_NVLINK_THROUGHPUT_RAW_RX
+ */
#define NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L0 60 //!< NVLink Bandwidth Counter for Counter Set 0, Lane 0
#define NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L1 61 //!< NVLink Bandwidth Counter for Counter Set 0, Lane 1
#define NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L2 62 //!< NVLink Bandwidth Counter for Counter Set 0, Lane 2
@@ -1085,7 +1147,89 @@ typedef struct nvmlGridLicensableFeatures_st
#define NVML_FI_DEV_PCIE_REPLAY_COUNTER 94 //!< PCIe replay counter
#define NVML_FI_DEV_PCIE_REPLAY_ROLLOVER_COUNTER 95 //!< PCIe replay rollover counter
-#define NVML_FI_MAX 96 //!< One greater than the largest field ID defined above
+/* NvLink Flit Error Counters */
+#define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L6 96 //!< NVLink flow control CRC Error Counter for Lane 6
+#define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L7 97 //!< NVLink flow control CRC Error Counter for Lane 7
+#define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L8 98 //!< NVLink flow control CRC Error Counter for Lane 8
+#define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L9 99 //!< NVLink flow control CRC Error Counter for Lane 9
+#define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L10 100 //!< NVLink flow control CRC Error Counter for Lane 10
+#define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L11 101 //!< NVLink flow control CRC Error Counter for Lane 11
+
+/* NvLink CRC Data Error Counters */
+#define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L6 102 //!< NVLink data CRC Error Counter for Lane 6
+#define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L7 103 //!< NVLink data CRC Error Counter for Lane 7
+#define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L8 104 //!< NVLink data CRC Error Counter for Lane 8
+#define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L9 105 //!< NVLink data CRC Error Counter for Lane 9
+#define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L10 106 //!< NVLink data CRC Error Counter for Lane 10
+#define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L11 107 //!< NVLink data CRC Error Counter for Lane 11
+
+/* NvLink Replay Error Counters */
+#define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L6 108 //!< NVLink Replay Error Counter for Lane 6
+#define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L7 109 //!< NVLink Replay Error Counter for Lane 7
+#define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L8 110 //!< NVLink Replay Error Counter for Lane 8
+#define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L9 111 //!< NVLink Replay Error Counter for Lane 9
+#define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L10 112 //!< NVLink Replay Error Counter for Lane 10
+#define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L11 113 //!< NVLink Replay Error Counter for Lane 11
+
+/* NvLink Recovery Error Counters */
+#define NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L6 114 //!< NVLink Recovery Error Counter for Lane 6
+#define NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L7 115 //!< NVLink Recovery Error Counter for Lane 7
+#define NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L8 116 //!< NVLink Recovery Error Counter for Lane 8
+#define NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L9 117 //!< NVLink Recovery Error Counter for Lane 9
+#define NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L10 118 //!< NVLink Recovery Error Counter for Lane 10
+#define NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L11 119 //!< NVLink Recovery Error Counter for Lane 11
+
+/* NvLink Bandwidth Counters */
+/*
+ * NVML_FI_DEV_NVLINK_BANDWIDTH_* field values are now deprecated.
+ * Please use the following field values instead:
+ * NVML_FI_DEV_NVLINK_THROUGHPUT_DATA_TX
+ * NVML_FI_DEV_NVLINK_THROUGHPUT_DATA_RX
+ * NVML_FI_DEV_NVLINK_THROUGHPUT_RAW_TX
+ * NVML_FI_DEV_NVLINK_THROUGHPUT_RAW_RX
+ */
+#define NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L6 120 //!< NVLink Bandwidth Counter for Counter Set 0, Lane 6
+#define NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L7 121 //!< NVLink Bandwidth Counter for Counter Set 0, Lane 7
+#define NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L8 122 //!< NVLink Bandwidth Counter for Counter Set 0, Lane 8
+#define NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L9 123 //!< NVLink Bandwidth Counter for Counter Set 0, Lane 9
+#define NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L10 124 //!< NVLink Bandwidth Counter for Counter Set 0, Lane 10
+#define NVML_FI_DEV_NVLINK_BANDWIDTH_C0_L11 125 //!< NVLink Bandwidth Counter for Counter Set 0, Lane 11
+
+/* NvLink Bandwidth Counters */
+#define NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L6 126 //!< NVLink Bandwidth Counter for Counter Set 1, Lane 6
+#define NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L7 127 //!< NVLink Bandwidth Counter for Counter Set 1, Lane 7
+#define NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L8 128 //!< NVLink Bandwidth Counter for Counter Set 1, Lane 8
+#define NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L9 129 //!< NVLink Bandwidth Counter for Counter Set 1, Lane 9
+#define NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L10 130 //!< NVLink Bandwidth Counter for Counter Set 1, Lane 10
+#define NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L11 131 //!< NVLink Bandwidth Counter for Counter Set 1, Lane 11
+
+/* NVLink Speed */
+#define NVML_FI_DEV_NVLINK_SPEED_MBPS_L6 132 //!< NVLink Speed in MBps for Link 6
+#define NVML_FI_DEV_NVLINK_SPEED_MBPS_L7 133 //!< NVLink Speed in MBps for Link 7
+#define NVML_FI_DEV_NVLINK_SPEED_MBPS_L8 134 //!< NVLink Speed in MBps for Link 8
+#define NVML_FI_DEV_NVLINK_SPEED_MBPS_L9 135 //!< NVLink Speed in MBps for Link 9
+#define NVML_FI_DEV_NVLINK_SPEED_MBPS_L10 136 //!< NVLink Speed in MBps for Link 10
+#define NVML_FI_DEV_NVLINK_SPEED_MBPS_L11 137 //!< NVLink Speed in MBps for Link 11
+
+/**
+ * NVLink throughput counters field values
+ *
+ * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t.
+ * A scopeId of UINT_MAX returns aggregate value summed up across all links
+ * for the specified counter type in fieldId.
+ */
+#define NVML_FI_DEV_NVLINK_THROUGHPUT_DATA_TX 138 //!< NVLink TX Data throughput in KiB
+#define NVML_FI_DEV_NVLINK_THROUGHPUT_DATA_RX 139 //!< NVLink RX Data throughput in KiB
+#define NVML_FI_DEV_NVLINK_THROUGHPUT_RAW_TX 140 //!< NVLink TX Data + protocol overhead in KiB
+#define NVML_FI_DEV_NVLINK_THROUGHPUT_RAW_RX 141 //!< NVLink RX Data + protocol overhead in KiB
+
+/* Row Remapper */
+#define NVML_FI_DEV_REMAPPED_COR 142 //!< Number of remapped rows due to correctable errors
+#define NVML_FI_DEV_REMAPPED_UNC 143 //!< Number of remapped rows due to uncorrectable errors
+#define NVML_FI_DEV_REMAPPED_PENDING 144 //!< If any rows are pending remapping. 1=yes 0=no
+#define NVML_FI_DEV_REMAPPED_FAILURE 145 //!< If any rows failed to be remapped 1=yes 0=no
+
+#define NVML_FI_MAX 146 //!< One greater than the largest field ID defined above
/**
* Information for a Field Value Sample
@@ -1093,7 +1237,7 @@ typedef struct nvmlGridLicensableFeatures_st
typedef struct nvmlFieldValue_st
{
unsigned int fieldId; //!< ID of the NVML field to retrieve. This must be set before any call that uses this struct. See the constants starting with NVML_FI_ above.
- unsigned int unused; //!< Currently unused. This should be initialized to 0 by the caller before any API call
+ unsigned int scopeId; //!< Scope ID can represent data used by NVML depending on fieldId's context. For example, for NVLink throughput counter data, scopeId can represent linkId.
long long timestamp; //!< CPU Timestamp of this value in microseconds since 1970
long long latencyUsec; //!< How long this field value took to update (in usec) within NVML. This may be averaged across several fields that are serviced by the same driver call.
nvmlValueType_t valueType; //!< Type of the value stored in value
@@ -1253,8 +1397,15 @@ typedef struct nvmlEventSet_st* nvmlEventSet_t;
*/
#define nvmlEventTypeClock 0x0000000000000010LL
+//! Event about AC/Battery power source changes
+#define nvmlEventTypePowerSourceChange 0x0000000000000080LL
+
+//! Event about MIG configuration changes
+#define nvmlEventMigConfigChange 0x0000000000000100LL
+
//! Mask with no events
#define nvmlEventTypeNone 0x0000000000000000LL
+
//! Mask of all events
#define nvmlEventTypeAll (nvmlEventTypeNone \
| nvmlEventTypeSingleBitEccError \
@@ -1262,6 +1413,8 @@ typedef struct nvmlEventSet_st* nvmlEventSet_t;
| nvmlEventTypePState \
| nvmlEventTypeClock \
| nvmlEventTypeXidCriticalError \
+ | nvmlEventTypePowerSourceChange \
+ | nvmlEventMigConfigChange \
)
/** @} */
@@ -1270,10 +1423,16 @@ typedef struct nvmlEventSet_st* nvmlEventSet_t;
*/
typedef struct nvmlEventData_st
{
- nvmlDevice_t device; //!< Specific device where the event occurred
- unsigned long long eventType; //!< Information about what specific event occurred
- unsigned long long eventData; //!< Stores last XID error for the device in the event of nvmlEventTypeXidCriticalError,
- // eventData is 0 for any other event. eventData is set as 999 for unknown xid error.
+ nvmlDevice_t device; //!< Specific device where the event occurred
+ unsigned long long eventType; //!< Information about what specific event occurred
+ unsigned long long eventData; //!< Stores XID error for the device in the event of nvmlEventTypeXidCriticalError,
+ // eventData is 0 for any other event. eventData is set as 999 for unknown xid error.
+ unsigned int gpuInstanceId; //!< If MIG is enabled and nvmlEventTypeXidCriticalError event is attributable to a GPU
+ // instance, stores a valid GPU instance ID. gpuInstanceId is set to 0xFFFFFFFF
+ // otherwise.
+ unsigned int computeInstanceId; //!< If MIG is enabled and nvmlEventTypeXidCriticalError event is attributable to a
+ // compute instance, stores a valid compute instance ID. computeInstanceId is set to
+ // 0xFFFFFFFF otherwise.
} nvmlEventData_t;
/** @} */
@@ -1438,8 +1597,6 @@ typedef struct nvmlAccountingStats_st {
/** @} */
/***************************************************************************************************/
-
-/***************************************************************************************************/
/** @defgroup nvmlEncoderStructs Encoder Structs
* @{
*/
@@ -1555,7 +1712,7 @@ typedef enum nvmlPcieLinkState_enum
/***************************************************************************************************/
/** @defgroup nvmlInitializationAndCleanup Initialization and Cleanup
* This chapter describes the methods that handle NVML initialization and cleanup.
- * It is the user's responsibility to call \ref nvmlInit() before calling any other methods, and
+ * It is the user's responsibility to call \ref nvmlInit_v2() before calling any other methods, and
* nvmlShutdown() once NVML is no longer being used.
* @{
*/
@@ -1591,12 +1748,12 @@ typedef enum nvmlPcieLinkState_enum
* - \ref NVML_ERROR_NO_PERMISSION if NVML does not have permission to talk to the driver
* - \ref NVML_ERROR_UNKNOWN on any unexpected error
*/
-nvmlReturn_t DECLDIR nvmlInit(void);
+nvmlReturn_t DECLDIR nvmlInit_v2(void);
/**
* nvmlInitWithFlags is a variant of nvmlInit(), that allows passing a set of boolean values
* modifying the behaviour of nvmlInit().
- * Other than the "flags" parameter it is completely similar to \ref nvmlInit.
+ * Other than the "flags" parameter it is completely similar to \ref nvmlInit_v2.
*
* For all products.
*
@@ -1611,11 +1768,11 @@ nvmlReturn_t DECLDIR nvmlInit(void);
nvmlReturn_t DECLDIR nvmlInitWithFlags(unsigned int flags);
/**
- * Shut down NVML by releasing all GPU resources previously allocated with \ref nvmlInit().
+ * Shut down NVML by releasing all GPU resources previously allocated with \ref nvmlInit_v2().
*
* For all products.
*
- * This method should be called after NVML work is done, once for each call to \ref nvmlInit()
+ * This method should be called after NVML work is done, once for each call to \ref nvmlInit_v2()
* A reference count of the number of initializations is maintained. Shutdown only occurs
* when the reference count reaches zero. For backwards compatibility, no error is reported if
* nvmlShutdown() is called more times than nvmlInit().
@@ -1662,11 +1819,16 @@ const DECLDIR char* nvmlErrorString(nvmlReturn_t result);
#define NVML_DEVICE_INFOROM_VERSION_BUFFER_SIZE 16
/**
- * Buffer size guaranteed to be large enough for \ref nvmlDeviceGetUUID
+ * Buffer size guaranteed to be large enough for storing GPU identifiers.
*/
#define NVML_DEVICE_UUID_BUFFER_SIZE 80
/**
+ * Buffer size guaranteed to be large enough for \ref nvmlDeviceGetUUID
+ */
+#define NVML_DEVICE_UUID_V2_BUFFER_SIZE 96
+
+/**
* Buffer size guaranteed to be large enough for \ref nvmlDeviceGetBoardPartNumber
*/
#define NVML_DEVICE_PART_NUMBER_BUFFER_SIZE 80
@@ -1682,11 +1844,16 @@ const DECLDIR char* nvmlErrorString(nvmlReturn_t result);
#define NVML_SYSTEM_NVML_VERSION_BUFFER_SIZE 80
/**
- * Buffer size guaranteed to be large enough for \ref nvmlDeviceGetName
+ * Buffer size guaranteed to be large enough for storing GPU device names.
*/
#define NVML_DEVICE_NAME_BUFFER_SIZE 64
/**
+ * Buffer size guaranteed to be large enough for \ref nvmlDeviceGetName
+ */
+#define NVML_DEVICE_NAME_V2_BUFFER_SIZE 96
+
+/**
* Buffer size guaranteed to be large enough for \ref nvmlDeviceGetSerial
*/
#define NVML_DEVICE_SERIAL_BUFFER_SIZE 30
@@ -1993,8 +2160,8 @@ nvmlReturn_t DECLDIR nvmlSystemGetHicVersion(unsigned int *hwbcCount, nvmlHwbcEn
/** @defgroup nvmlDeviceQueries Device Queries
* This chapter describes that queries that NVML can perform against each device.
* In each case the device is identified with an nvmlDevice_t handle. This handle is obtained by
- * calling one of \ref nvmlDeviceGetHandleByIndex(), \ref nvmlDeviceGetHandleBySerial(),
- * \ref nvmlDeviceGetHandleByPciBusId(). or \ref nvmlDeviceGetHandleByUUID().
+ * calling one of \ref nvmlDeviceGetHandleByIndex_v2(), \ref nvmlDeviceGetHandleBySerial(),
+ * \ref nvmlDeviceGetHandleByPciBusId_v2(). or \ref nvmlDeviceGetHandleByUUID().
* @{
*/
/***************************************************************************************************/
@@ -2019,7 +2186,27 @@ nvmlReturn_t DECLDIR nvmlSystemGetHicVersion(unsigned int *hwbcCount, nvmlHwbcEn
* - \ref NVML_ERROR_INVALID_ARGUMENT if \a deviceCount is NULL
* - \ref NVML_ERROR_UNKNOWN on any unexpected error
*/
-nvmlReturn_t DECLDIR nvmlDeviceGetCount(unsigned int *deviceCount);
+nvmlReturn_t DECLDIR nvmlDeviceGetCount_v2(unsigned int *deviceCount);
+
+/**
+ * Get attributes (engine counts etc.) for the given NVML device handle.
+ *
+ * @note This API currently only supports MIG device handles.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ *
+ * @param device NVML device handle
+ * @param attributes Device attributes
+ *
+ * @return
+ * - \ref NVML_SUCCESS if \a device attributes were successfully retrieved
+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device handle is invalid
+ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
+ * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device
+ * - \ref NVML_ERROR_UNKNOWN on any unexpected error
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetAttributes_v2(nvmlDevice_t device, nvmlDeviceAttributes_t *attributes);
/**
* Acquire the handle for a particular device, based on its index.
@@ -2027,12 +2214,12 @@ nvmlReturn_t DECLDIR nvmlDeviceGetCount(unsigned int *deviceCount);
* For all products.
*
* Valid indices are derived from the \a accessibleDevices count returned by
- * \ref nvmlDeviceGetCount(). For example, if \a accessibleDevices is 2 the valid indices
+ * \ref nvmlDeviceGetCount_v2(). For example, if \a accessibleDevices is 2 the valid indices
* are 0 and 1, corresponding to GPU 0 and GPU 1.
*
* The order in which NVML enumerates devices has no guarantees of consistency between reboots. For that reason it
* is recommended that devices be looked up by their PCI ids or UUID. See
- * \ref nvmlDeviceGetHandleByUUID() and \ref nvmlDeviceGetHandleByPciBusId().
+ * \ref nvmlDeviceGetHandleByUUID() and \ref nvmlDeviceGetHandleByPciBusId_v2().
*
* Note: The NVML index may not correlate with other APIs, such as the CUDA device index.
*
@@ -2067,7 +2254,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetCount(unsigned int *deviceCount);
* @see nvmlDeviceGetIndex
* @see nvmlDeviceGetCount
*/
-nvmlReturn_t DECLDIR nvmlDeviceGetHandleByIndex(unsigned int index, nvmlDevice_t *device);
+nvmlReturn_t DECLDIR nvmlDeviceGetHandleByIndex_v2(unsigned int index, nvmlDevice_t *device);
/**
* Acquire the handle for a particular device, based on its board serial number.
@@ -2114,6 +2301,8 @@ nvmlReturn_t DECLDIR nvmlDeviceGetHandleBySerial(const char *serial, nvmlDevice_
* Starting from NVML 5, this API causes NVML to initialize the target GPU
* NVML may initialize additional GPUs as it searches for the target GPU
*
+ * This API does not currently support acquiring MIG device handles using MIG device UUIDs.
+ *
* @return
* - \ref NVML_SUCCESS if \a device has been set
* - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
@@ -2133,7 +2322,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetHandleByUUID(const char *uuid, nvmlDevice_t *d
*
* For all products.
*
- * This value corresponds to the nvmlPciInfo_t::busId returned by \ref nvmlDeviceGetPciInfo().
+ * This value corresponds to the nvmlPciInfo_t::busId returned by \ref nvmlDeviceGetPciInfo_v3().
*
* Starting from NVML 5, this API causes NVML to initialize the target GPU
* NVML may initialize additional GPUs if:
@@ -2156,7 +2345,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetHandleByUUID(const char *uuid, nvmlDevice_t *d
* - \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 nvmlDeviceGetHandleByPciBusId(const char *pciBusId, nvmlDevice_t *device);
+nvmlReturn_t DECLDIR nvmlDeviceGetHandleByPciBusId_v2(const char *pciBusId, nvmlDevice_t *device);
/**
* Retrieves the name of this device.
@@ -2164,8 +2353,11 @@ nvmlReturn_t DECLDIR nvmlDeviceGetHandleByPciBusId(const char *pciBusId, nvmlDev
* For all products.
*
* The name is an alphanumeric string that denotes a particular product, e.g. Tesla &tm; C2070. It will not
- * exceed 64 characters in length (including the NULL terminator). See \ref
- * nvmlConstants::NVML_DEVICE_NAME_BUFFER_SIZE.
+ * exceed 96 characters in length (including the NULL terminator). See \ref
+ * nvmlConstants::NVML_DEVICE_NAME_V2_BUFFER_SIZE.
+ *
+ * When used with MIG device handles the API returns MIG device names which can be used to identify devices
+ * based on their attributes.
*
* @param device The identifier of the target device
* @param name Reference in which to return the product name
@@ -2206,12 +2398,16 @@ nvmlReturn_t DECLDIR nvmlDeviceGetBrand(nvmlDevice_t device, nvmlBrandType_t *ty
* For all products.
*
* Valid indices are derived from the \a accessibleDevices count returned by
- * \ref nvmlDeviceGetCount(). For example, if \a accessibleDevices is 2 the valid indices
+ * \ref nvmlDeviceGetCount_v2(). For example, if \a accessibleDevices is 2 the valid indices
* are 0 and 1, corresponding to GPU 0 and GPU 1.
*
* The order in which NVML enumerates devices has no guarantees of consistency between reboots. For that reason it
* is recommended that devices be looked up by their PCI ids or GPU UUID. See
- * \ref nvmlDeviceGetHandleByPciBusId() and \ref nvmlDeviceGetHandleByUUID().
+ * \ref nvmlDeviceGetHandleByPciBusId_v2() and \ref nvmlDeviceGetHandleByUUID().
+ *
+ * When used with MIG device handles this API returns indices that can be
+ * passed to \ref nvmlDeviceGetMigDeviceHandleByIndex to retrieve an identical handle.
+ * MIG device indices are unique within a device.
*
* Note: The NVML index may not correlate with other APIs, such as the CUDA device index.
*
@@ -2254,10 +2450,88 @@ nvmlReturn_t DECLDIR nvmlDeviceGetIndex(nvmlDevice_t device, unsigned int *index
*/
nvmlReturn_t DECLDIR nvmlDeviceGetSerial(nvmlDevice_t device, char *serial, unsigned int length);
+
+/***************************************************************************************************/
+
+/** @defgroup nvmlAffinity CPU and Memory Affinity
+ * This chapter describes NVML operations that are associated with CPU and memory
+ * affinity.
+ * @{
+ */
+/***************************************************************************************************/
+
+//! Scope of NUMA node for affinity queries
+#define NVML_AFFINITY_SCOPE_NODE 0
+//! Scope of processor socket for affinity queries
+#define NVML_AFFINITY_SCOPE_SOCKET 1
+
+typedef unsigned int nvmlAffinityScope_t;
+
+/**
+ * Retrieves an array of unsigned ints (sized to nodeSetSize) of bitmasks with
+ * the ideal memory affinity within node or socket for the device.
+ * For example, if NUMA node 0, 1 are ideal within the socket for the device and nodeSetSize == 1,
+ * result[0] = 0x3
+ *
+ * \note If requested scope is not applicable to the target topology, the API
+ * will fall back to reporting the memory affinity for the immediate non-I/O
+ * ancestor of the device.
+ *
+ * For Kepler &tm; or newer fully supported devices.
+ * Supported on Linux only.
+ *
+ * @param device The identifier of the target device
+ * @param nodeSetSize The size of the nodeSet array that is safe to access
+ * @param nodeSet Array reference in which to return a bitmask of NODEs, 64 NODEs per
+ * unsigned long on 64-bit machines, 32 on 32-bit machines
+ * @param scope Scope that change the default behavior
+ *
+ * @return
+ * - \ref NVML_SUCCESS if \a NUMA node Affinity has been filled
+ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, nodeSetSize == 0, nodeSet is NULL or scope is invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature
+ * - \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 nvmlDeviceGetMemoryAffinity(nvmlDevice_t device, unsigned int nodeSetSize, unsigned long *nodeSet, nvmlAffinityScope_t scope);
+
+/**
+ * Retrieves an array of unsigned ints (sized to cpuSetSize) of bitmasks with the
+ * ideal CPU affinity within node or socket for the device.
+ * For example, if processors 0, 1, 32, and 33 are ideal for the device and cpuSetSize == 2,
+ * result[0] = 0x3, result[1] = 0x3
+ *
+ * \note If requested scope is not applicable to the target topology, the API
+ * will fall back to reporting the CPU affinity for the immediate non-I/O
+ * ancestor of the device.
+ *
+ * For Kepler &tm; or newer fully supported devices.
+ * Supported on Linux only.
+ *
+ * @param device The identifier of the target device
+ * @param cpuSetSize The size of the cpuSet array that is safe to access
+ * @param cpuSet Array reference in which to return a bitmask of CPUs, 64 CPUs per
+ * unsigned long on 64-bit machines, 32 on 32-bit machines
+ * @param scope Scope that change the default behavior
+ *
+ * @return
+ * - \ref NVML_SUCCESS if \a cpuAffinity has been filled
+ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, cpuSetSize == 0, cpuSet is NULL or sope is invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature
+ * - \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 nvmlDeviceGetCpuAffinityWithinScope(nvmlDevice_t device, unsigned int cpuSetSize, unsigned long *cpuSet, nvmlAffinityScope_t scope);
+
/**
* Retrieves an array of unsigned ints (sized to cpuSetSize) of bitmasks with the ideal CPU affinity for the device
* For example, if processors 0, 1, 32, and 33 are ideal for the device and cpuSetSize == 2,
* result[0] = 0x3, result[1] = 0x3
+ * This is equivalent to calling \ref nvmlDeviceGetCpuAffinityWithinScope with \ref NVML_AFFINITY_SCOPE_NODE.
*
* For Kepler &tm; or newer fully supported devices.
* Supported on Linux only.
@@ -2281,7 +2555,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetCpuAffinity(nvmlDevice_t device, unsigned int
* Sets the ideal affinity for the calling thread and device using the guidelines
* given in nvmlDeviceGetCpuAffinity(). Note, this is a change as of version 8.0.
* Older versions set the affinity for a calling process and all children.
- * Currently supports up to 64 processors.
+ * Currently supports up to 1024 processors.
*
* For Kepler &tm; or newer fully supported devices.
* Supported on Linux only.
@@ -2330,6 +2604,8 @@ nvmlReturn_t DECLDIR nvmlDeviceClearCpuAffinity(nvmlDevice_t device);
* - \ref NVML_ERROR_NOT_SUPPORTED if the device or OS does not support this feature
* - \ref NVML_ERROR_UNKNOWN an error has occurred in underlying topology discovery
*/
+
+/** @} */
nvmlReturn_t DECLDIR nvmlDeviceGetTopologyCommonAncestor(nvmlDevice_t device1, nvmlDevice_t device2, nvmlGpuTopologyLevel_t *pathInfo);
/**
@@ -2393,8 +2669,11 @@ nvmlReturn_t DECLDIR nvmlDeviceGetP2PStatus(nvmlDevice_t device1, nvmlDevice_t d
* For all products.
*
* The UUID is a globally unique identifier. It is the only available identifier for pre-Fermi-architecture products.
- * It does NOT correspond to any identifier printed on the board. It will not exceed 80 characters in length
- * (including the NULL terminator). See \ref nvmlConstants::NVML_DEVICE_UUID_BUFFER_SIZE.
+ * It does NOT correspond to any identifier printed on the board. It will not exceed 96 characters in length
+ * (including the NULL terminator). See \ref nvmlConstants::NVML_DEVICE_UUID_V2_BUFFER_SIZE.
+ *
+ * When used with MIG device handles the API returns globally unique UUIDs which can be used to identify MIG
+ * devices across both GPU and MIG devices. UUIDs are immutable for the lifetime of a MIG device.
*
* @param device The identifier of the target device
* @param uuid Reference in which to return the GPU UUID
@@ -2412,6 +2691,31 @@ nvmlReturn_t DECLDIR nvmlDeviceGetP2PStatus(nvmlDevice_t device1, nvmlDevice_t d
nvmlReturn_t DECLDIR nvmlDeviceGetUUID(nvmlDevice_t device, char *uuid, unsigned int length);
/**
+ * Retrieve the MDEV UUID of a vGPU instance.
+ *
+ * The MDEV UUID is a globally unique identifier of the mdev device assigned to the VM, and is returned as a 5-part hexadecimal string,
+ * not exceeding 80 characters in length (including the NULL terminator).
+ * MDEV UUID is displayed only on KVM platform.
+ * See \ref nvmlConstants::NVML_DEVICE_UUID_BUFFER_SIZE.
+ *
+ * For Maxwell &tm; or newer fully supported devices.
+ *
+ * @param vgpuInstance Identifier of the target vGPU instance
+ * @param mdevUuid Pointer to caller-supplied buffer to hold MDEV UUID
+ * @param size Size of buffer in bytes
+ *
+ * @return
+ * - \ref NVML_SUCCESS successful completion
+ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
+ * - \ref NVML_ERROR_NOT_SUPPORTED on any hypervisor other than KVM
+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a vgpuInstance is 0, or \a mdevUuid is NULL
+ * - \ref NVML_ERROR_NOT_FOUND if \a vgpuInstance does not match a valid active vGPU instance on the system
+ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a size is too small
+ * - \ref NVML_ERROR_UNKNOWN on any unexpected error
+ */
+nvmlReturn_t DECLDIR nvmlVgpuInstanceGetMdevUUID(nvmlVgpuInstance_t vgpuInstance, char *mdevUuid, unsigned int size);
+
+/**
* Retrieves minor number for the device. The minor number for the device is such that the Nvidia device node file for
* each GPU will have the form /dev/nvidia[minor number].
*
@@ -2637,7 +2941,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetPersistenceMode(nvmlDevice_t device, nvmlEnabl
* - \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 nvmlDeviceGetPciInfo(nvmlDevice_t device, nvmlPciInfo_t *pci);
+nvmlReturn_t DECLDIR nvmlDeviceGetPciInfo_v3(nvmlDevice_t device, nvmlPciInfo_t *pci);
/**
* Retrieves the maximum PCIe link generation possible with this device and system
@@ -3061,7 +3365,8 @@ nvmlReturn_t DECLDIR nvmlDeviceSetDefaultAutoBoostedClocksEnabled(nvmlDevice_t d
*
* For all discrete products with dedicated fans.
*
- * The fan speed is expressed as a percent of the maximum, i.e. full speed is 100%.
+ * The fan speed is expressed as a percentage of the product's maximum noise tolerance fan speed.
+ * This value may exceed 100% in certain cases.
*
* @param device The identifier of the target device
* @param speed Reference in which to return the fan speed percentage
@@ -3085,7 +3390,8 @@ nvmlReturn_t DECLDIR nvmlDeviceGetFanSpeed(nvmlDevice_t device, unsigned int *sp
*
* For all discrete products with dedicated fans.
*
- * The fan speed is expressed as a percentage of the maximum, i.e. full speed is 100%
+ * The fan speed is expressed as a percentage of the product's maximum noise tolerance fan speed.
+ * This value may exceed 100% in certain cases.
*
* @param device The identifier of the target device
* @param fan The index of the target fan, zero indexed.
@@ -3352,7 +3658,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetPowerUsage(nvmlDevice_t device, unsigned int *
/**
* Retrieves total energy consumption for this GPU in millijoules (mJ) since the driver was last reloaded
*
- * For newer than Pascal &tm; fully supported devices.
+ * For Volta &tm; or newer fully supported devices.
*
* @param device The identifier of the target device
* @param energy Reference in which to return the energy consumption information
@@ -3425,12 +3731,17 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGpuOperationMode(nvmlDevice_t device, nvmlGpuO
*
* See \ref nvmlMemory_t for details on available memory info.
*
+ * @note In MIG mode, if device handle is provided, the API returns aggregate
+ * information, only if the caller has appropriate privileges. Per-instance
+ * information can be queried by using specific MIG device handles.
+ *
* @param device The identifier of the target device
* @param memory Reference in which to return the memory information
*
* @return
* - \ref NVML_SUCCESS if \a memory has been populated
* - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
+ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation
* - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a memory is NULL
* - \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
@@ -3636,6 +3947,11 @@ nvmlReturn_t DECLDIR nvmlDeviceGetDetailedEccErrors(nvmlDevice_t device, nvmlMem
*
* Requires ECC Mode to be enabled.
*
+ * @note On MIG-enabled GPUs, per instance information can be queried using specific
+ * MIG device handles. Per instance information is currently only supported for
+ * non-DRAM uncorrectable volatile errors. Querying volatile errors using device
+ * handles is currently not supported.
+ *
* See \ref nvmlMemoryErrorType_t for a description of available memory error types.\n
* See \ref nvmlEccCounterType_t for a description of available counter types.\n
* See \ref nvmlMemoryLocation_t for a description of available counter locations.\n
@@ -3669,6 +3985,8 @@ nvmlReturn_t DECLDIR nvmlDeviceGetMemoryErrorCounter(nvmlDevice_t device, nvmlMe
* \note During driver initialization when ECC is enabled one can see high GPU and Memory Utilization readings.
* This is caused by ECC Memory Scrubbing mechanism that is performed during driver initialization.
*
+ * @note On MIG-enabled GPUs, querying device utilization rates is not currently supported.
+ *
* @param device The identifier of the target device
* @param utilization Reference in which to return the utilization information
*
@@ -3687,6 +4005,8 @@ nvmlReturn_t DECLDIR nvmlDeviceGetUtilizationRates(nvmlDevice_t device, nvmlUtil
*
* For Kepler &tm; or newer fully supported devices.
*
+ * @note On MIG-enabled GPUs, querying encoder utilization is not currently supported.
+ *
* @param device The identifier of the target device
* @param utilization Reference to an unsigned int for encoder utilization info
* @param samplingPeriodUs Reference to an unsigned int for the sampling period in US
@@ -3775,6 +4095,8 @@ nvmlReturn_t DECLDIR nvmlDeviceGetEncoderSessions(nvmlDevice_t device, unsigned
*
* For Kepler &tm; or newer fully supported devices.
*
+ * @note On MIG-enabled GPUs, querying decoder utilization is not currently supported.
+ *
* @param device The identifier of the target device
* @param utilization Reference to an unsigned int for decoder utilization info
* @param samplingPeriodUs Reference to an unsigned int for the sampling period in US
@@ -3923,19 +4245,26 @@ nvmlReturn_t DECLDIR nvmlDeviceGetBridgeChipInfo(nvmlDevice_t device, nvmlBridge
* Keep in mind that information returned by this call is dynamic and the number of elements might change in
* time. Allocate more space for \a infos table in case new compute processes are spawned.
*
- * @param device The identifier of the target device
+ * @note In MIG mode, if device handle is provided, the API returns aggregate information, only if
+ * the caller has appropriate privileges. Per-instance information can be queried by using
+ * specific MIG device handles.
+ * Querying per-instance information using MIG device handles is not supported if the device is in vGPU Host virtualization mode.
+ *
+ * @param device The device handle or MIG device handle
* @param infoCount Reference in which to provide the \a infos array size, and
* to return the number of returned elements
* @param infos Reference in which to return the process information
- *
- * @return
+ *
+ * @return
* - \ref NVML_SUCCESS if \a infoCount and \a infos have been populated
* - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
* - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a infoCount indicates that the \a infos array is too small
* \a infoCount will contain minimal amount of space necessary for
* the call to complete
+ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation
* - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, either of \a infoCount or \a infos is NULL
* - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible
+ * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by \a device
* - \ref NVML_ERROR_UNKNOWN on any unexpected error
*
* @see \ref nvmlSystemGetProcessName
@@ -3947,7 +4276,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetComputeRunningProcesses(nvmlDevice_t device, u
*
* For Kepler &tm; or newer fully supported devices.
*
- * This function returns information only about graphics based processes
+ * This function returns information only about graphics based processes
* (eg. applications using OpenGL, DirectX)
*
* To query the current number of running graphics processes, call this function with *infoCount = 0. The
@@ -3959,19 +4288,26 @@ nvmlReturn_t DECLDIR nvmlDeviceGetComputeRunningProcesses(nvmlDevice_t device, u
* Keep in mind that information returned by this call is dynamic and the number of elements might change in
* time. Allocate more space for \a infos table in case new graphics processes are spawned.
*
+ * @note In MIG mode, if device handle is provided, the API returns aggregate information, only if
+ * the caller has appropriate privileges. Per-instance information can be queried by using
+ * specific MIG device handles.
+ * Querying per-instance information using MIG device handles is not supported if the device is in vGPU Host virtualization mode.
+ *
* @param device The identifier of the target device
* @param infoCount Reference in which to provide the \a infos array size, and
* to return the number of returned elements
* @param infos Reference in which to return the process information
- *
- * @return
+ *
+ * @return
* - \ref NVML_SUCCESS if \a infoCount and \a infos have been populated
* - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
* - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a infoCount indicates that the \a infos array is too small
* \a infoCount will contain minimal amount of space necessary for
* the call to complete
+ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation
* - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, either of \a infoCount or \a infos is NULL
* - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible
+ * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by \a device
* - \ref NVML_ERROR_UNKNOWN on any unexpected error
*
* @see \ref nvmlSystemGetProcessName
@@ -4045,7 +4381,10 @@ nvmlReturn_t DECLDIR nvmlDeviceGetAPIRestriction(nvmlDevice_t device, nvmlRestri
* This method fetches the number of entries which can be accommodated in the provided samples array, and the
* reference samplesCount is updated to indicate how many samples were actually retrieved. The advantage of using this
* method for samples in contrast to polling via existing methods is to get get higher frequency data at lower polling cost.
- *
+ *
+ * @note On MIG-enabled GPUs, querying the following sample types, NVML_GPU_UTILIZATION_SAMPLES, NVML_MEMORY_UTILIZATION_SAMPLES
+ * NVML_ENC_UTILIZATION_SAMPLES and NVML_DEC_UTILIZATION_SAMPLES, is not currently supported.
+ *
* @param device The identifier for the target device
* @param type Type of sampling event
* @param lastSeenTimeStamp Return only samples with timestamp greater than lastSeenTimeStamp.
@@ -4323,6 +4662,61 @@ nvmlReturn_t DECLDIR nvmlDeviceGetRetiredPages_v2(nvmlDevice_t device, nvmlPageR
*/
nvmlReturn_t DECLDIR nvmlDeviceGetRetiredPagesPendingStatus(nvmlDevice_t device, nvmlEnableState_t *isPending);
+/**
+ * Get number of remapped rows. The number of rows reported will be based on
+ * the cause of the remapping. isPending indicates whether or not there are
+ * pending remappings. A reset will be required to actually remap the row.
+ * failureOccurred will be set if a row remapping ever failed in the past. A
+ * pending remapping won't affect future work on the GPU since
+ * error-containment and dynamic page blacklisting will take care of that.
+ *
+ * @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.
+ *
+ * @param device The identifier of the target device
+ * @param corrRows Reference for number of rows remapped due to correctable errors
+ * @param uncRows Reference for number of rows remapped due to uncorrectable errors
+ * @param isPending Reference for whether or not remappings are pending
+ * @param failureOccurred Reference that is set when a remapping has failed in the past
+ *
+ * @return
+ * - \ref NVML_SUCCESS Upon success
+ * - \ref NVML_ERROR_INVALID_ARGUMENT If \a corrRows, \a uncRows, \a isPending or \a failureOccurred is invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED If MIG is enabled or if the device doesn't support this feature
+ * - \ref NVML_ERROR_UNKNOWN Unexpected error
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetRemappedRows(nvmlDevice_t device, unsigned int *corrRows, unsigned int *uncRows,
+ unsigned int *isPending, unsigned int *failureOccurred);
+
+/**
+ * Get the row remapper histogram. Returns the remap availability for each bank
+ * on the GPU.
+ *
+ * @param device Device handle
+ * @param values Histogram values
+ *
+ * @return
+ * - \ref NVML_SUCCESS On success
+ * - \ref NVML_ERROR_UNKNOWN On any unexpected error
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetRowRemapperHistogram(nvmlDevice_t device, nvmlRowRemapperHistogramValues_t *values);
+
+/**
+ * Get architecture for device
+ *
+ * @param device The identifier of the target device
+ * @param arch Reference where architecture is returned, if call successful.
+ * Set to NVML_DEVICE_ARCH_* upon success
+ *
+ * @return
+ * - \ref NVML_SUCCESS Upon success
+ * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device or \a arch (output refererence) are invalid
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetArchitecture(nvmlDevice_t device, nvmlDeviceArchitecture_t *arch);
+
/** @} */
/***************************************************************************************************/
@@ -4425,6 +4819,8 @@ nvmlReturn_t DECLDIR nvmlDeviceSetPersistenceMode(nvmlDevice_t device, nvmlEnabl
*
* Under windows compute mode may only be set to DEFAULT when running in WDDM
*
+ * @note On MIG-enabled GPUs, compute mode would be set to DEFAULT and changing it is not supported.
+ *
* See \ref nvmlComputeMode_t for details on available compute modes.
*
* @param device The identifier of the target device
@@ -4548,6 +4944,12 @@ nvmlReturn_t DECLDIR nvmlDeviceClearEccErrorCounts(nvmlDevice_t device, nvmlEccC
*/
nvmlReturn_t DECLDIR nvmlDeviceSetDriverModel(nvmlDevice_t device, nvmlDriverModel_t driverModel, unsigned int flags);
+typedef enum nvmlClockLimitId_enum {
+ NVML_CLOCK_LIMIT_ID_RANGE_START = 0xffffff00,
+ NVML_CLOCK_LIMIT_ID_TDP,
+ NVML_CLOCK_LIMIT_ID_UNLIMITED
+} nvmlClockLimitId_t;
+
/**
* Set clocks that device will lock to.
*
@@ -4557,12 +4959,25 @@ nvmlReturn_t DECLDIR nvmlDeviceSetDriverModel(nvmlDevice_t device, nvmlDriverMod
*
* Can be used as a setting to request constant performance.
*
+ * This can be called with a pair of integer clock frequencies in MHz, or a pair of /ref nvmlClockLimitId_t values.
+ * See the table below for valid combinations of these values.
+ *
+ * minGpuClock | maxGpuClock | Effect
+ * ------------+-------------+--------------------------------------------------
+ * tdp | tdp | Lock clock to TDP
+ * unlimited | tdp | Upper bound is TDP but clock may drift below this
+ * tdp | unlimited | Lower bound is TDP but clock may boost above this
+ * unlimited | unlimited | Unlocked (== nvmlDeviceResetGpuLockedClocks)
+ *
+ * If one arg takes one of these values, the other must be one of these values as
+ * well. Mixed numeric and symbolic calls return NVML_ERROR_INVALID_ARGUMENT.
+ *
* Requires root/admin permissions.
*
* After system reboot or driver reload applications clocks go back to their default value.
* See \ref nvmlDeviceResetGpuLockedClocks.
*
- * For newer than Pascal &tm; fully supported devices.
+ * For Volta &tm; or newer fully supported devices.
*
* @param device The identifier of the target device
* @param minGpuClockMHz Requested minimum gpu clock in MHz
@@ -4588,7 +5003,7 @@ nvmlReturn_t DECLDIR nvmlDeviceSetGpuLockedClocks(nvmlDevice_t device, unsigned
*
* @see nvmlDeviceSetGpuLockedClocks
*
- * For newer than Pascal &tm; fully supported devices.
+ * For Volta &tm; or newer fully supported devices.
*
* @param device The identifier of the target device
*
@@ -4750,6 +5165,8 @@ nvmlReturn_t DECLDIR nvmlDeviceSetAPIRestriction(nvmlDevice_t device, nvmlRestri
*
* @note Disabling accounting clears all accounting pids information.
*
+ * @note On MIG-enabled GPUs, accounting mode would be set to DISABLED and changing it is not supported.
+ *
* See \ref nvmlDeviceGetAccountingMode
* See \ref nvmlDeviceGetAccountingStats
* See \ref nvmlDeviceClearAccountingPids
@@ -4875,7 +5292,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkCapability(nvmlDevice_t device, unsigned
* - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature
* - \ref NVML_ERROR_UNKNOWN on any unexpected error
*/
-nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkRemotePciInfo(nvmlDevice_t device, unsigned int link, nvmlPciInfo_t *pci);
+nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkRemotePciInfo_v2(nvmlDevice_t device, unsigned int link, nvmlPciInfo_t *pci);
/**
* Retrieves the specified error counter value
@@ -4917,6 +5334,8 @@ nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkErrorCounter(nvmlDevice_t device, unsign
nvmlReturn_t DECLDIR nvmlDeviceResetNvLinkErrorCounters(nvmlDevice_t device, unsigned int link);
/**
+ * Deprecated: Setting utilization counter control is no longer supported.
+ *
* Set the NVLINK utilization counter control information for the specified counter, 0 or 1.
* Please refer to \a nvmlNvLinkUtilizationControl_t for the structure definition. Performs a reset
* of the counters if the reset parameter is non-zero.
@@ -4940,6 +5359,8 @@ nvmlReturn_t DECLDIR nvmlDeviceSetNvLinkUtilizationControl(nvmlDevice_t device,
nvmlNvLinkUtilizationControl_t *control, unsigned int reset);
/**
+ * Deprecated: Getting utilization counter control is no longer supported.
+ *
* Get the NVLINK utilization counter control information for the specified counter, 0 or 1.
* Please refer to \a nvmlNvLinkUtilizationControl_t for the structure definition
*
@@ -4962,6 +5383,8 @@ nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkUtilizationControl(nvmlDevice_t device,
/**
+ * Deprecated: Use \ref nvmlDeviceGetFieldValues with NVML_FI_DEV_NVLINK_THROUGHPUT_* as field values instead.
+ *
* Retrieve the NVLINK utilization counter based on the current control for a specified counter.
* In general it is good practice to use \a nvmlDeviceSetNvLinkUtilizationControl
* before reading the utilization counters as they have no default state
@@ -4985,6 +5408,8 @@ nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkUtilizationCounter(nvmlDevice_t device,
unsigned long long *rxcounter, unsigned long long *txcounter);
/**
+ * Deprecated: Freezing NVLINK utilization counters is no longer supported.
+ *
* Freeze the NVLINK utilization counters
* Both the receive and transmit counters are operated on by this function
*
@@ -5007,6 +5432,8 @@ nvmlReturn_t DECLDIR nvmlDeviceFreezeNvLinkUtilizationCounter (nvmlDevice_t devi
unsigned int counter, nvmlEnableState_t freeze);
/**
+ * Deprecated: Resetting NVLINK utilization counters is no longer supported.
+ *
* Reset the NVLINK utilization counters
* Both the receive and transmit counters are operated on by this function
*
@@ -5065,7 +5492,7 @@ nvmlReturn_t DECLDIR nvmlEventSetCreate(nvmlEventSet_t *set);
*
* This call starts recording of events on specific device.
* All events that occurred before this call are not recorded.
- * Checking if some event occurred can be done with \ref nvmlEventSetWait
+ * Checking if some event occurred can be done with \ref nvmlEventSetWait_v2
*
* If function reports NVML_ERROR_UNKNOWN, event set is in undefined state and should be freed.
* If function reports NVML_ERROR_NOT_SUPPORTED, event set can still be used. None of the requested eventTypes
@@ -5121,11 +5548,19 @@ nvmlReturn_t DECLDIR nvmlDeviceGetSupportedEventTypes(nvmlDevice_t device, unsig
* If there are no events ready to be delivered, function sleeps till event arrives
* but not longer than specified timeout. This function in certain conditions can return before
* specified timeout passes (e.g. when interrupt arrives)
- *
- * In case of xid error, the function returns the most recent xid error type seen by the system. If there are multiple
- * xid errors generated before nvmlEventSetWait is invoked then the last seen xid error type is returned for all
- * xid error events.
- *
+ *
+ * On Windows, in case of xid error, the function returns the most recent xid error type seen by the system.
+ * If there are multiple xid errors generated before nvmlEventSetWait is invoked then the last seen xid error
+ * type is returned for all xid error events.
+ *
+ * On Linux, every xid error event would return the associated event data and other information if applicable.
+ *
+ * In MIG mode, if device handle is provided, the API reports all the events for the available instances,
+ * only if the caller has appropriate privileges. In absence of required privileges, only the events which
+ * affect all the instances (i.e. whole device) are reported.
+ *
+ * This API does not currently support per-instance event reporting using MIG device handles.
+ *
* @param set Reference to set of events to wait on
* @param data Reference in which to return event data
* @param timeoutms Maximum amount of wait time in milliseconds for registered event
@@ -5141,7 +5576,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetSupportedEventTypes(nvmlDevice_t device, unsig
* @see nvmlEventType
* @see nvmlDeviceRegisterEvents
*/
-nvmlReturn_t DECLDIR nvmlEventSetWait(nvmlEventSet_t set, nvmlEventData_t * data, unsigned int timeoutms);
+nvmlReturn_t DECLDIR nvmlEventSetWait_v2(nvmlEventSet_t set, nvmlEventData_t * data, unsigned int timeoutms);
/**
* Releases events in the set
@@ -5244,7 +5679,7 @@ nvmlReturn_t DECLDIR nvmlDeviceQueryDrainState (nvmlPciInfo_t *pciInfo, nvmlEnab
* - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature
* - \ref NVML_ERROR_IN_USE if the device is still in use and cannot be removed
*/
-nvmlReturn_t DECLDIR nvmlDeviceRemoveGpu (nvmlPciInfo_t *pciInfo, nvmlDetachGpuState_t gpuState, nvmlPcieLinkState_t linkState);
+nvmlReturn_t DECLDIR nvmlDeviceRemoveGpu_v2(nvmlPciInfo_t *pciInfo, nvmlDetachGpuState_t gpuState, nvmlPcieLinkState_t linkState);
/**
* Request the OS and the NVIDIA kernel driver to rediscover a portion of the PCI subsystem looking for GPUs that
@@ -5386,7 +5821,7 @@ nvmlReturn_t DECLDIR nvmlDeviceSetVirtualizationMode(nvmlDevice_t device, nvmlGp
* - \ref NVML_ERROR_INVALID_ARGUMENT if \a pGridLicensableFeatures is NULL
* - \ref NVML_ERROR_UNKNOWN on any unexpected error
*/
-nvmlReturn_t DECLDIR nvmlDeviceGetGridLicensableFeatures(nvmlDevice_t device, nvmlGridLicensableFeatures_t *pGridLicensableFeatures);
+nvmlReturn_t DECLDIR nvmlDeviceGetGridLicensableFeatures_v3(nvmlDevice_t device, nvmlGridLicensableFeatures_t *pGridLicensableFeatures);
/**
* Retrieves the current utilization and process ID
@@ -5412,6 +5847,8 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGridLicensableFeatures(nvmlDevice_t device, nv
* to read utilization based on all the samples maintained by the driver's internal sample buffer. Set lastSeenTimeStamp
* to a timeStamp retrieved from a previous query to read utilization since the previous query.
*
+ * @note On MIG-enabled GPUs, querying process utilization is not currently supported.
+ *
* @param device The identifier of the target device
* @param utilization Pointer to caller-supplied buffer in which guest process utilization samples are returned
* @param processSamplesCount Pointer to caller-supplied array size, and returns number of processes running
@@ -5434,7 +5871,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetProcessUtilization(nvmlDevice_t device, nvmlPr
/** @defgroup nvmlVgpu GRID vGPU Management
* @{
*
- * This chapter describes APIs supporting NVIDIA GRID vGPU
+ * This chapter describes APIs supporting NVIDIA GRID vGPU.
*/
/***************************************************************************************************/
@@ -5751,31 +6188,6 @@ nvmlReturn_t DECLDIR nvmlVgpuInstanceGetVmID(nvmlVgpuInstance_t vgpuInstance, ch
nvmlReturn_t DECLDIR nvmlVgpuInstanceGetUUID(nvmlVgpuInstance_t vgpuInstance, char *uuid, unsigned int size);
/**
- * Retrieve the MDEV UUID of a vGPU instance.
- *
- * The MDEV UUID is a globally unique identifier of the mdev device assigned to the VM, and is returned as a 5-part hexadecimal string,
- * not exceeding 80 characters in length (including the NULL terminator).
- * MDEV UUID is displayed only on KVM platform.
- * See \ref nvmlConstants::NVML_DEVICE_UUID_BUFFER_SIZE.
- *
- * For Maxwell &tm; or newer fully supported devices.
- *
- * @param vgpuInstance Identifier of the target vGPU instance
- * @param mdevUuid Pointer to caller-supplied buffer to hold MDEV UUID
- * @param size Size of buffer in bytes
- *
- * @return
- * - \ref NVML_SUCCESS successful completion
- * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
- * - \ref NVML_ERROR_NOT_SUPPORTED on any hypervisor other than KVM
- * - \ref NVML_ERROR_INVALID_ARGUMENT if \a vgpuInstance is 0, or \a mdevUuid is NULL
- * - \ref NVML_ERROR_NOT_FOUND if \a vgpuInstance does not match a valid active vGPU instance on the system
- * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a size is too small
- * - \ref NVML_ERROR_UNKNOWN on any unexpected error
- */
-nvmlReturn_t DECLDIR nvmlVgpuInstanceGetMdevUUID(nvmlVgpuInstance_t vgpuInstance, char *mdevUuid, unsigned int size);
-
-/**
* Retrieve the NVIDIA driver version installed in the VM associated with a vGPU.
*
* The version is returned as an alphanumeric string in the caller-supplied buffer \a version. The length of the version
@@ -5783,7 +6195,7 @@ nvmlReturn_t DECLDIR nvmlVgpuInstanceGetMdevUUID(nvmlVgpuInstance_t vgpuInstance
* See \ref nvmlConstants::NVML_SYSTEM_DRIVER_VERSION_BUFFER_SIZE.
*
* nvmlVgpuInstanceGetVmDriverVersion() may be called at any time for a vGPU instance. The guest VM driver version is
- * returned as "Unknown" if no NVIDIA driver is installed in the VM, or the VM has not yet booted to the point where the
+ * returned as "Not Available" if no NVIDIA driver is installed in the VM, or the VM has not yet booted to the point where the
* NVIDIA driver is loaded and initialized.
*
* For Kepler &tm; or newer fully supported devices.
@@ -6370,17 +6782,16 @@ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuUtilization(nvmlDevice_t device, unsigned
nvmlReturn_t DECLDIR nvmlDeviceGetVgpuProcessUtilization(nvmlDevice_t device, unsigned long long lastSeenTimeStamp,
unsigned int *vgpuProcessSamplesCount,
nvmlVgpuProcessUtilizationSample_t *utilizationSamples);
-
/**
* Queries the state of per process accounting mode on vGPU.
*
* For Maxwell &tm; or newer fully supported devices.
*
- * @param vgpuInstance The identifier of the target vGPU VM
+ * @param vgpuInstance The identifier of the target vGPU instance
* @param mode Reference in which to return the current accounting mode
*
- * @return
- * - \ref NVML_SUCCESS if the mode has been successfully retrieved
+ * @return
+ * - \ref NVML_SUCCESS if the mode has been successfully retrieved
* - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
* - \ref NVML_ERROR_INVALID_ARGUMENT if \a vgpuInstance is 0, or \a mode is NULL
* - \ref NVML_ERROR_NOT_FOUND if \a vgpuInstance does not match a valid active vGPU instance on the system
@@ -6391,24 +6802,24 @@ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuProcessUtilization(nvmlDevice_t device, un
nvmlReturn_t DECLDIR nvmlVgpuInstanceGetAccountingMode(nvmlVgpuInstance_t vgpuInstance, nvmlEnableState_t *mode);
/**
- * Queries list of processes running on vGPU that can be queried for accounting stats. The list of processes
+ * Queries list of processes running on vGPU that can be queried for accounting stats. The list of processes
* returned can be in running or terminated state.
*
* For Maxwell &tm; or newer fully supported devices.
- *
+ *
* To just query the maximum number of processes that can be queried, call this function with *count = 0 and
* pids=NULL. The return code will be NVML_ERROR_INSUFFICIENT_SIZE, or NVML_SUCCESS if list is empty.
- *
+ *
* For more details see \ref nvmlVgpuInstanceGetAccountingStats.
*
* @note In case of PID collision some processes might not be accessible before the circular buffer is full.
*
- * @param vgpuInstance The identifier of the target vGPU VM
+ * @param vgpuInstance The identifier of the target vGPU instance
* @param count Reference in which to provide the \a pids array size, and
* to return the number of elements ready to be queried
* @param pids Reference in which to return list of process ids
- *
- * @return
+ *
+ * @return
* - \ref NVML_SUCCESS if pids were successfully retrieved
* - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
* - \ref NVML_ERROR_INVALID_ARGUMENT if \a vgpuInstance is 0, or \a count is NULL
@@ -6425,10 +6836,10 @@ nvmlReturn_t DECLDIR nvmlVgpuInstanceGetAccountingPids(nvmlVgpuInstance_t vgpuIn
* Queries process's accounting stats.
*
* For Maxwell &tm; or newer fully supported devices.
- *
+ *
* Accounting stats capture GPU utilization and other statistics across the lifetime of a process, and
* can be queried during life time of the process or after its termination.
- * The time field in \ref nvmlAccountingStats_t is reported as 0 during the lifetime of the process and
+ * The time field in \ref nvmlAccountingStats_t is reported as 0 during the lifetime of the process and
* updated to actual running time after its termination.
* Accounting stats are kept in a circular buffer, newly created processes overwrite information about old
* processes.
@@ -6441,11 +6852,11 @@ nvmlReturn_t DECLDIR nvmlVgpuInstanceGetAccountingPids(nvmlVgpuInstance_t vgpuIn
* queried since they don't contribute to GPU utilization.
* @note In case of pid collision stats of only the latest process (that terminated last) will be reported
*
- * @param vgpuInstance The identifier of the target vGPU VM
+ * @param vgpuInstance The identifier of the target vGPU instance
* @param pid Process Id of the target process to query stats for
* @param stats Reference in which to return the process's accounting stats
*
- * @return
+ * @return
* - \ref NVML_SUCCESS if stats have been successfully retrieved
* - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
* - \ref NVML_ERROR_INVALID_ARGUMENT if \a vgpuInstance is 0, or \a stats is NULL
@@ -6456,6 +6867,27 @@ nvmlReturn_t DECLDIR nvmlVgpuInstanceGetAccountingPids(nvmlVgpuInstance_t vgpuIn
*/
nvmlReturn_t DECLDIR nvmlVgpuInstanceGetAccountingStats(nvmlVgpuInstance_t vgpuInstance, unsigned int pid, nvmlAccountingStats_t *stats);
+/**
+ * Clears accounting information of the vGPU instance that have already terminated.
+ *
+ * For Maxwell &tm; or newer fully supported devices.
+ * Requires root/admin permissions.
+ *
+ * @note Accounting Mode needs to be on. See \ref nvmlVgpuInstanceGetAccountingMode.
+ * @note Only compute and graphics applications stats are reported and can be cleared since monitoring applications
+ * stats don't contribute to GPU utilization.
+ *
+ * @param vgpuInstance The identifier of the target vGPU instance
+ *
+ * @return
+ * - \ref NVML_SUCCESS if accounting information has been cleared
+ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a vgpuInstance is invalid
+ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation
+ * - \ref NVML_ERROR_NOT_SUPPORTED if the vGPU doesn't support this feature or accounting mode is disabled
+ * - \ref NVML_ERROR_UNKNOWN on any unexpected error
+ */
+nvmlReturn_t DECLDIR nvmlVgpuInstanceClearAccountingPids(nvmlVgpuInstance_t vgpuInstance);
/** @} */
/***************************************************************************************************/
@@ -6509,10 +6941,655 @@ nvmlReturn_t DECLDIR nvmlGetBlacklistDeviceInfoByIndex(unsigned int index, nvmlB
/** @} */
+/***************************************************************************************************/
+/** @defgroup nvmlMultiInstanceGPU Multi Instance GPU Management
+ * This chapter describes NVML operations that are associated with Multi Instance GPU management.
+ * @{
+ */
+/***************************************************************************************************/
+
+/**
+ * Disable Multi Instance GPU mode.
+ */
+#define NVML_DEVICE_MIG_DISABLE 0x0
+
+/**
+ * Enable Multi Instance GPU mode.
+ */
+#define NVML_DEVICE_MIG_ENABLE 0x1
+
+/**
+ * GPU instance profiles.
+ *
+ * These macros should be passed to \ref nvmlDeviceGetGpuInstanceProfileInfo to retrieve the
+ * detailed information about a GPU instance such as profile ID, engine counts.
+ */
+#define NVML_GPU_INSTANCE_PROFILE_1_SLICE 0x0
+#define NVML_GPU_INSTANCE_PROFILE_2_SLICE 0x1
+#define NVML_GPU_INSTANCE_PROFILE_3_SLICE 0x2
+#define NVML_GPU_INSTANCE_PROFILE_4_SLICE 0x3
+#define NVML_GPU_INSTANCE_PROFILE_7_SLICE 0x4
+#define NVML_GPU_INSTANCE_PROFILE_COUNT 0x5
+
+typedef struct nvmlGpuInstancePlacement_st
+{
+ unsigned int start;
+ unsigned int size;
+} nvmlGpuInstancePlacement_t;
+
+typedef struct nvmlGpuInstanceProfileInfo_st
+{
+ unsigned int id; //!< Unique profile ID within the device
+ unsigned int isP2pSupported; //!< Peer-to-Peer support
+ unsigned int sliceCount; //!< GPU Slice count
+ unsigned int instanceCount; //!< GPU instance count
+ unsigned int multiprocessorCount; //!< Streaming Multiprocessor count
+ unsigned int copyEngineCount; //!< Copy Engine count
+ unsigned int decoderCount; //!< Decoder Engine count
+ unsigned int encoderCount; //!< Encoder Engine count
+ unsigned int jpegCount; //!< JPEG Engine count
+ unsigned int ofaCount; //!< OFA Engine count
+ unsigned long long memorySizeMB; //!< Memory size in MBytes
+} nvmlGpuInstanceProfileInfo_t;
+
+typedef struct nvmlGpuInstanceInfo_st
+{
+ nvmlDevice_t device; //!< Parent device
+ unsigned int id; //!< Unique instance ID within the device
+ unsigned int profileId; //!< Unique profile ID within the device
+ nvmlGpuInstancePlacement_t placement; //!< Placement for this instance
+} nvmlGpuInstanceInfo_t;
+
+typedef struct nvmlGpuInstance_st* nvmlGpuInstance_t;
+
+/**
+ * Compute instance profiles.
+ *
+ * These macros should be passed to \ref nvmlGpuInstanceGetComputeInstanceProfileInfo to retrieve the
+ * detailed information about a compute instance such as profile ID, engine counts
+ */
+#define NVML_COMPUTE_INSTANCE_PROFILE_1_SLICE 0x0
+#define NVML_COMPUTE_INSTANCE_PROFILE_2_SLICE 0x1
+#define NVML_COMPUTE_INSTANCE_PROFILE_3_SLICE 0x2
+#define NVML_COMPUTE_INSTANCE_PROFILE_4_SLICE 0x3
+#define NVML_COMPUTE_INSTANCE_PROFILE_7_SLICE 0x4
+#define NVML_COMPUTE_INSTANCE_PROFILE_COUNT 0x5
+
+#define NVML_COMPUTE_INSTANCE_ENGINE_PROFILE_SHARED 0x0 //!< All the engines except multiprocessors would be shared
+#define NVML_COMPUTE_INSTANCE_ENGINE_PROFILE_COUNT 0x1
+
+typedef struct nvmlComputeInstanceProfileInfo_st
+{
+ unsigned int id; //!< Unique profile ID within the GPU instance
+ unsigned int sliceCount; //!< GPU Slice count
+ unsigned int instanceCount; //!< Compute instance count
+ unsigned int multiprocessorCount; //!< Streaming Multiprocessor count
+ unsigned int sharedCopyEngineCount; //!< Shared Copy Engine count
+ unsigned int sharedDecoderCount; //!< Shared Decoder Engine count
+ unsigned int sharedEncoderCount; //!< Shared Encoder Engine count
+ unsigned int sharedJpegCount; //!< Shared JPEG Engine count
+ unsigned int sharedOfaCount; //!< Shared OFA Engine count
+} nvmlComputeInstanceProfileInfo_t;
+
+typedef struct nvmlComputeInstanceInfo_st
+{
+ nvmlDevice_t device; //!< Parent device
+ nvmlGpuInstance_t gpuInstance; //!< Parent GPU instance
+ unsigned int id; //!< Unique instance ID within the GPU instance
+ unsigned int profileId; //!< Unique profile ID within the GPU instance
+} nvmlComputeInstanceInfo_t;
+
+typedef struct nvmlComputeInstance_st* nvmlComputeInstance_t;
+
+/**
+ * Set MIG mode for the device.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ * Requires root user.
+ *
+ * This mode determines whether a GPU instance can be created.
+ *
+ * This API may unbind or reset the device to activate the requested mode. Thus, the attributes associated with the
+ * device, such as minor number, might change. The caller of this API is expected to query such attributes again.
+ *
+ * On certain platforms like pass-through virtualization, where reset functionality may not be exposed directly, VM
+ * reboot is required. \a activationStatus would return \ref NVML_ERROR_RESET_REQUIRED for such cases.
+ *
+ * \a activationStatus would return the appropriate error code upon unsuccessful activation. For example, if device
+ * unbind fails because the device isn't idle, \ref NVML_ERROR_IN_USE would be returned. The caller of this API
+ * is expected to idle the device and retry setting the \a mode.
+ *
+ * @param device The identifier of the target device
+ * @param mode The mode to be set, \ref NVML_DEVICE_MIG_DISABLE or
+ * \ref NVML_DEVICE_MIG_ENABLE
+ * @param activationStatus The activationStatus status
+ *
+ * @return
+ * - \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 mode or \a activationStatus are invalid
+ * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
+ * - \ref NVML_ERROR_NOT_SUPPORTED If \a device doesn't support MIG mode
+ */
+nvmlReturn_t DECLDIR nvmlDeviceSetMigMode(nvmlDevice_t device, unsigned int mode, nvmlReturn_t *activationStatus);
+
+/**
+ * Get MIG mode for the device.
+ *
+ * For newer than Volta &tm; 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
+ * next activation trigger.
+ *
+ * @param device The identifier of the target device
+ * @param currentMode Returns the current mode, \ref NVML_DEVICE_MIG_DISABLE or
+ * \ref NVML_DEVICE_MIG_ENABLE
+ * @param pendingMode Returns the pending mode, \ref NVML_DEVICE_MIG_DISABLE or
+ * \ref NVML_DEVICE_MIG_ENABLE
+ *
+ * @return
+ * - \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 currentMode or \a pendingMode are invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED If \a device doesn't support MIG mode
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetMigMode(nvmlDevice_t device, unsigned int *currentMode, unsigned int *pendingMode);
+
+/**
+ * Get GPU instance profile information.
+ *
+ * Information provided by this API is immutable throughout the lifetime of a MIG mode.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ * Requires privileged user.
+ *
+ * @param device The identifier of the target device
+ * @param profile One of the NVML_GPU_INSTANCE_PROFILE_*
+ * @param info Returns detailed profile information
+ *
+ * @return
+ * - \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 or \a info are invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED If \a device doesn't have MIG mode enabled or \a profile isn't supported
+ * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceProfileInfo(nvmlDevice_t device, unsigned int profile,
+ nvmlGpuInstanceProfileInfo_t *info);
+
+/**
+ * Get GPU instance placements.
+ *
+ * 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.
+ * Supported on Linux only.
+ * Requires privileged user.
+ *
+ * @param device The identifier of the target device
+ * @param profileId The GPU instance profile ID. See \ref nvmlDeviceGetGpuInstanceProfileInfo
+ * @param placements Returns placements, the buffer must be large enough to accommodate
+ * the instances supported by the profile.
+ * See \ref nvmlDeviceGetGpuInstanceProfileInfo
+ * @param count The count of returned placements
+ *
+ * @return
+ * - \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 profileId, \a placements or \a count are invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED If \a device doesn't have MIG mode enabled or \a profileId isn't supported
+ * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstancePossiblePlacements(nvmlDevice_t device, unsigned int profileId,
+ nvmlGpuInstancePlacement_t *placements,
+ unsigned int *count);
+
+/**
+ * Get GPU instance profile capacity.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ * Requires privileged user.
+ *
+ * @param device The identifier of the target device
+ * @param profileId The GPU instance profile ID. See \ref nvmlDeviceGetGpuInstanceProfileInfo
+ * @param count Returns remaining instance count for the profile ID
+ *
+ * @return
+ * - \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 profileId or \a count are invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED If \a device doesn't have MIG mode enabled or \a profileId isn't supported
+ * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceRemainingCapacity(nvmlDevice_t device, unsigned int profileId,
+ unsigned int *count);
+
+/**
+ * Create GPU instance.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ * Requires privileged user.
+ *
+ * If the parent device is unbound, reset or the GPU instance is destroyed explicitly, the GPU instance handle would
+ * become invalid. The GPU instance must be recreated to acquire a valid handle.
+ *
+ * @param device The identifier of the target device
+ * @param profileId The GPU instance profile ID. See \ref nvmlDeviceGetGpuInstanceProfileInfo
+ * @param gpuInstance Returns the GPU instance handle
+ *
+ * @return
+ * - \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_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
+ */
+nvmlReturn_t DECLDIR nvmlDeviceCreateGpuInstance(nvmlDevice_t device, unsigned int profileId,
+ nvmlGpuInstance_t *gpuInstance);
+
+/**
+ * Destroy GPU instance.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ * Requires privileged user.
+ *
+ * @param gpuInstance The GPU instance handle
+ *
+ * @return
+ * - \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_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
+ * GPU instance.
+ */
+nvmlReturn_t DECLDIR nvmlGpuInstanceDestroy(nvmlGpuInstance_t gpuInstance);
+
+/**
+ * Get GPU instances for given profile ID.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ * Requires privileged user.
+ *
+ * @param device The identifier of the target device
+ * @param profileId The GPU instance profile ID. See \ref nvmlDeviceGetGpuInstanceProfileInfo
+ * @param gpuInstances Returns pre-exiting GPU instances, the buffer must be large enough to
+ * accommodate the instances supported by the profile.
+ * See \ref nvmlDeviceGetGpuInstanceProfileInfo
+ * @param count The count of returned GPU instances
+ *
+ * @return
+ * - \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 profileId, \a gpuInstances or \a count are invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED If \a device doesn't have MIG mode enabled
+ * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstances(nvmlDevice_t device, unsigned int profileId,
+ nvmlGpuInstance_t *gpuInstances, unsigned int *count);
+
+/**
+ * Get GPU instances for given instance ID.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ * Requires privileged user.
+ *
+ * @param device The identifier of the target device
+ * @param id The GPU instance ID
+ * @param gpuInstance Returns GPU instance
+ *
+ * @return
+ * - \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 id or \a gpuInstance are invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED If \a device doesn't have MIG mode enabled
+ * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
+ * - \ref NVML_ERROR_NOT_FOUND If the GPU instance is not found.
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceById(nvmlDevice_t device, unsigned int id, nvmlGpuInstance_t *gpuInstance);
+
+/**
+ * Get GPU instance information.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ *
+ * @param gpuInstance The GPU instance handle
+ * @param info Return GPU instance information
+ *
+ * @return
+ * - \ref NVML_SUCCESS Upon success
+ * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT If \a gpuInstance or \a info are invalid
+ * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
+ */
+nvmlReturn_t DECLDIR nvmlGpuInstanceGetInfo(nvmlGpuInstance_t gpuInstance, nvmlGpuInstanceInfo_t *info);
+
+/**
+ * Get compute instance profile information.
+ *
+ * Information provided by this API is immutable throughout the lifetime of a MIG mode.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ * Requires privileged user.
+ *
+ * @param gpuInstance The identifier of the target GPU instance
+ * @param profile One of the NVML_COMPUTE_INSTANCE_PROFILE_*
+ * @param engProfile One of the NVML_COMPUTE_INSTANCE_ENGINE_PROFILE_*
+ * @param info Returns detailed profile information
+ *
+ * @return
+ * - \ref NVML_SUCCESS Upon success
+ * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT If \a gpuInstance, \a profile, \a engProfile or \a info are invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED If \a profile isn't supported
+ * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
+ */
+nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstanceProfileInfo(nvmlGpuInstance_t gpuInstance, unsigned int profile,
+ unsigned int engProfile,
+ nvmlComputeInstanceProfileInfo_t *info);
+
+/**
+ * Get compute instance profile capacity.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ * Requires privileged user.
+ *
+ * @param gpuInstance The identifier of the target GPU instance
+ * @param profileId The compute instance profile ID.
+ * See \ref nvmlGpuInstanceGetComputeInstanceProfileInfo
+ * @param count Returns remaining instance count for the profile ID
+ *
+ * @return
+ * - \ref NVML_SUCCESS Upon success
+ * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT If \a gpuInstance, \a profileId or \a availableCount are invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED If \a profileId isn't supported
+ * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
+ */
+nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstanceRemainingCapacity(nvmlGpuInstance_t gpuInstance,
+ unsigned int profileId, unsigned int *count);
+
+/**
+ * Create compute instance.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ * Requires privileged user.
+ *
+ * If the parent device is unbound, reset or the parent GPU instance is destroyed or the compute instance is destroyed
+ * explicitly, the compute instance handle would become invalid. The compute instance must be recreated to acquire
+ * a valid handle.
+ *
+ * @param gpuInstance The identifier of the target GPU instance
+ * @param profileId The compute instance profile ID.
+ * See \ref nvmlGpuInstanceGetComputeInstanceProfileInfo
+ * @param computeInstance Returns the compute instance handle
+ *
+ * @return
+ * - \ref NVML_SUCCESS Upon success
+ * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT If \a gpuInstance, \a profile, \a profileId or \a computeInstance
+ * are invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED If \a profileId isn't supported
+ * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
+ * - \ref NVML_ERROR_INSUFFICIENT_RESOURCES If the requested compute instance could not be created
+ */
+nvmlReturn_t DECLDIR nvmlGpuInstanceCreateComputeInstance(nvmlGpuInstance_t gpuInstance, unsigned int profileId,
+ nvmlComputeInstance_t *computeInstance);
+
+/**
+ * Destroy compute instance.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ * Requires privileged user.
+ *
+ * @param computeInstance The compute instance handle
+ *
+ * @return
+ * - \ref NVML_SUCCESS Upon success
+ * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT If \a computeInstance is invalid
+ * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
+ * - \ref NVML_ERROR_IN_USE If the compute instance is in use. This error would be returned if
+ * processes (e.g. CUDA application) are active on the compute instance.
+ */
+nvmlReturn_t DECLDIR nvmlComputeInstanceDestroy(nvmlComputeInstance_t computeInstance);
+
+/**
+ * Get compute instances for given profile ID.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ * Requires privileged user.
+ *
+ * @param gpuInstance The identifier of the target GPU instance
+ * @param profileId The compute instance profile ID.
+ * See \ref nvmlGpuInstanceGetComputeInstanceProfileInfo
+ * @param computeInstances Returns pre-exiting compute instances, the buffer must be large enough to
+ * accommodate the instances supported by the profile.
+ * See \ref nvmlGpuInstanceGetComputeInstanceProfileInfo
+ * @param count The count of returned compute instances
+ *
+ * @return
+ * - \ref NVML_SUCCESS Upon success
+ * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT If \a gpuInstance, \a profileId, \a computeInstances or \a count
+ * are invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED If \a profileId isn't supported
+ * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
+ */
+nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstances(nvmlGpuInstance_t gpuInstance, unsigned int profileId,
+ nvmlComputeInstance_t *computeInstances, unsigned int *count);
+
+/**
+ * Get compute instance for given instance ID.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ * Requires privileged user.
+ *
+ * @param gpuInstance The identifier of the target GPU instance
+ * @param id The compute instance ID
+ * @param computeInstance Returns compute instance
+ *
+ * @return
+ * - \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 ID or \a computeInstance are invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED If \a device doesn't have MIG mode enabled
+ * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
+ * - \ref NVML_ERROR_NOT_FOUND If the compute instance is not found.
+ */
+nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstanceById(nvmlGpuInstance_t gpuInstance, unsigned int id,
+ nvmlComputeInstance_t *computeInstance);
+
+/**
+ * Get compute instance information.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ *
+ * @param computeInstance The compute instance handle
+ * @param info Return compute instance information
+ *
+ * @return
+ * - \ref NVML_SUCCESS Upon success
+ * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT If \a computeInstance or \a info are invalid
+ * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation
+ */
+nvmlReturn_t DECLDIR nvmlComputeInstanceGetInfo(nvmlComputeInstance_t computeInstance, nvmlComputeInstanceInfo_t *info);
+
+/**
+ * Test if the given handle refers to a MIG device.
+ *
+ * A MIG device handle is an NVML abstraction which maps to a MIG compute instance.
+ * 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.
+ * Supported on Linux only.
+ *
+ * @param device NVML handle to test
+ * @param isMigDevice True when handle refers to a MIG device
+ *
+ * @return
+ * - \ref NVML_SUCCESS if \a device status was successfully retrieved
+ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device handle or \a isMigDevice reference is invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED if this check is not supported by the device
+ * - \ref NVML_ERROR_UNKNOWN on any unexpected error
+ */
+nvmlReturn_t DECLDIR nvmlDeviceIsMigDeviceHandle(nvmlDevice_t device, unsigned int *isMigDevice);
+
+/**
+ * Get GPU instance ID for the given MIG device handle.
+ *
+ * GPU instance IDs are unique per device and remain valid until the GPU instance is destroyed.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ *
+ * @param device Target MIG device handle
+ * @param id GPU instance ID
+ *
+ * @return
+ * - \ref NVML_SUCCESS if instance ID was successfully retrieved
+ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a id reference is invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device
+ * - \ref NVML_ERROR_UNKNOWN on any unexpected error
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceId(nvmlDevice_t device, unsigned int *id);
+
+/**
+ * Get compute instance ID for the given MIG device handle.
+ *
+ * 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.
+ * Supported on Linux only.
+ *
+ * @param device Target MIG device handle
+ * @param id Compute instance ID
+ *
+ * @return
+ * - \ref NVML_SUCCESS if instance ID was successfully retrieved
+ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a id reference is invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device
+ * - \ref NVML_ERROR_UNKNOWN on any unexpected error
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetComputeInstanceId(nvmlDevice_t device, unsigned int *id);
+
+/**
+ * Get the maximum number of MIG devices that can exist under a given parent NVML device.
+ *
+ * Returns zero if MIG is not supported or enabled.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ *
+ * @param device Target device handle
+ * @param count Count of MIG devices
+ *
+ * @return
+ * - \ref NVML_SUCCESS if \a count was successfully retrieved
+ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a count reference is invalid
+ * - \ref NVML_ERROR_UNKNOWN on any unexpected error
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetMaxMigDeviceCount(nvmlDevice_t device, unsigned int *count);
+
+/**
+ * Get MIG device handle for the given index under its parent NVML device.
+ *
+ * If the compute instance is destroyed either explicitly or by destroying,
+ * resetting or unbinding the parent GPU instance or the GPU device itself
+ * the MIG device handle would remain invalid and must be requested again
+ * using this API. Handles may be reused and their properties can change in
+ * the process.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ *
+ * @param device Reference to the parent GPU device handle
+ * @param index Index of the MIG device
+ * @param migDevice Reference to the MIG device handle
+ *
+ * @return
+ * - \ref NVML_SUCCESS if \a migDevice handle was successfully created
+ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a index or \a migDevice reference is invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device
+ * - \ref NVML_ERROR_NOT_FOUND if no valid MIG device was found at \a index
+ * - \ref NVML_ERROR_UNKNOWN on any unexpected error
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetMigDeviceHandleByIndex(nvmlDevice_t device, unsigned int index,
+ nvmlDevice_t *migDevice);
+
+/**
+ * Get parent device handle from a MIG device handle.
+ *
+ * For newer than Volta &tm; fully supported devices.
+ * Supported on Linux only.
+ *
+ * @param migDevice MIG device handle
+ * @param device Device handle
+ *
+ * @return
+ * - \ref NVML_SUCCESS if \a device handle was successfully created
+ * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a migDevice or \a device is invalid
+ * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device
+ * - \ref NVML_ERROR_UNKNOWN on any unexpected error
+ */
+nvmlReturn_t DECLDIR nvmlDeviceGetDeviceHandleFromMigDeviceHandle(nvmlDevice_t migDevice, nvmlDevice_t *device);
+
+/** @} */
+
/**
* NVML API versioning support
*/
-#if defined(__NVML_API_VERSION_INTERNAL)
+
+#ifdef NVML_NO_UNVERSIONED_FUNC_DEFS
+nvmlReturn_t DECLDIR nvmlInit(void);
+nvmlReturn_t DECLDIR nvmlDeviceGetCount(unsigned int *deviceCount);
+nvmlReturn_t DECLDIR nvmlDeviceGetHandleByIndex(unsigned int index, nvmlDevice_t *device);
+nvmlReturn_t DECLDIR nvmlDeviceGetHandleByPciBusId(const char *pciBusId, nvmlDevice_t *device);
+nvmlReturn_t DECLDIR nvmlDeviceGetPciInfo(nvmlDevice_t device, nvmlPciInfo_t *pci);
+nvmlReturn_t DECLDIR nvmlDeviceGetPciInfo_v2(nvmlDevice_t device, nvmlPciInfo_t *pci);
+nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkRemotePciInfo(nvmlDevice_t device, unsigned int link, nvmlPciInfo_t *pci);
+nvmlReturn_t DECLDIR nvmlDeviceGetGridLicensableFeatures(nvmlDevice_t device, nvmlGridLicensableFeatures_t *pGridLicensableFeatures);
+nvmlReturn_t DECLDIR nvmlDeviceGetGridLicensableFeatures_v2(nvmlDevice_t device, nvmlGridLicensableFeatures_t *pGridLicensableFeatures);
+nvmlReturn_t DECLDIR nvmlDeviceRemoveGpu(nvmlPciInfo_t *pciInfo);
+nvmlReturn_t DECLDIR nvmlEventSetWait(nvmlEventSet_t set, nvmlEventData_t * data, unsigned int timeoutms);
+nvmlReturn_t DECLDIR nvmlDeviceGetAttributes(nvmlDevice_t device, nvmlDeviceAttributes_t *attributes);
+#endif // #ifdef NVML_NO_UNVERSIONED_FUNC_DEFS
+
+#if defined(NVML_NO_UNVERSIONED_FUNC_DEFS)
+// We don't define APIs to run new versions if this guard is present so there is
+// no need to undef
+#elif defined(__NVML_API_VERSION_INTERNAL)
+#undef nvmlDeviceGetAttributes
+#undef nvmlEventSetWait
#undef nvmlDeviceGetGridLicensableFeatures
#undef nvmlDeviceRemoveGpu
#undef nvmlDeviceGetNvLinkRemotePciInfo
diff --git a/src/option-table.h b/src/option-table.h
index 53a9a08..d8109de 100644
--- a/src/option-table.h
+++ b/src/option-table.h
@@ -99,7 +99,7 @@ static const NVGetoptOption __options[] = {
"an assignment to something other than an X screen. A target "
"specification is contained within brackets and consists of a target "
"type name, a colon, and the target id. The target type name can be "
- "one of ^\"screen\", \"gpu\", \"framelock\", \"vcs\", \"gvi\", \"fan\", "
+ "one of ^\"screen\", \"gpu\", \"framelock\", \"fan\", "
"\"thermalsensor\", \"svp\",^ or ^\"dpy\";^ the target id is the index "
"into the list of targets (for that target type). The target "
"specification can be used in {DISPLAY} wherever an X screen can be used, "
@@ -111,7 +111,7 @@ static const NVGetoptOption __options[] = {
"for information on which target types can be used with which "
"attributes. See the output of\n"
"\n"
- TAB " nvidia-settings -q screens -q gpus -q framelocks -q vcs -q gvis "
+ TAB " nvidia-settings -q screens -q gpus -q framelocks "
"-q fans -q thermalsensors -q svps -q dpys \n"
"\n"
"for lists of targets for each target type.\n"
@@ -135,9 +135,9 @@ static const NVGetoptOption __options[] = {
"This queries the current value of the attribute {attribute name} on the "
"X Display {DISPLAY}. The syntax is the same as that for the "
"^'--assign'^ option, without '=^{value}'^; specify ^'-q screens', "
- "'-q gpus', '-q framelocks', '-q vcs', '-q gvis', '-q fans'^, "
+ "'-q gpus', '-q framelocks', '-q fans'^, "
"'-q thermalsensors', '-q svps', or '-q dpys' to query a list of X "
- "screens, GPUs, Frame Lock devices, Visual Computing Systems, SDI Input "
+ "screens, GPUs, Frame Lock devices, Visual Computing Systems, "
"Devices, Fans, Thermal Sensors, 3D Vision Pro Transceivers, or Display "
"Devices, respectively, that are present on the X Display {DISPLAY}. "
"Specify ^'-q all'^ to query all attributes." },
diff --git a/src/parse.c b/src/parse.c
index 9d7db3e..e308463 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -51,345 +51,290 @@ static uint32 display_device_name_to_display_device_mask(const char *str);
#define INT_ATTR CTRL_ATTRIBUTE_TYPE_INTEGER
#define STR_ATTR CTRL_ATTRIBUTE_TYPE_STRING
#define COL_ATTR CTRL_ATTRIBUTE_TYPE_COLOR
-#define CSC_ATTR CTRL_ATTRIBUTE_TYPE_SDI_CSC
#define SOP_ATTR CTRL_ATTRIBUTE_TYPE_STRING_OPERATION
const AttributeTableEntry attributeTable[] = {
/* name attribute type common flags special flags description
*
- * .-------------- is_100Hz
- * no_query_all -----------. | .------------ is_1000Hz
- * no_config_write ---------. | | | .---------- is_packed
- * hijack_display_device -------. | | | | | .-------- is_display_mask
- * is_sdi_attribute -----. | | | | | | | .------ is_display_id
- * is_framelock_attribute ---. | | | | | | | | | .---- no_zero
- * is_gui_attribute -. | | | | | | | | | | | .-- is_switch_display
- * | | | | | | | | | | | | |
+ * .-------------- is_100Hz
+ * | .------------ is_1000Hz
+ * no_query_all -----------. | | .---------- is_packed
+ * no_config_write ---------. | | | | .-------- is_display_mask
+ * hijack_display_device -------. | | | | | | .------ is_display_id
+ * is_framelock_attribute ---. | | | | | | | | .---- no_zero
+ * is_gui_attribute -. | | | | | | | | | | .-- is_switch_display
+ * | | | | | | | | | | | |
*/
/* Version information */
- { "OperatingSystem", NV_CTRL_OPERATING_SYSTEM, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The operating system on which the X server is running. 0-Linux, 1-FreeBSD, 2-SunOS." },
- { "NvidiaDriverVersion", NV_CTRL_STRING_NVIDIA_DRIVER_VERSION, STR_ATTR, {0,0,0,0,1,0}, {}, "The NVIDIA X driver version." },
- { "NvControlVersion", NV_CTRL_STRING_NV_CONTROL_VERSION, STR_ATTR, {0,0,0,0,1,0}, {}, "The NV-CONTROL X driver extension version." },
- { "GLXServerVersion", NV_CTRL_STRING_GLX_SERVER_VERSION, STR_ATTR, {0,0,0,0,1,0}, {}, "The GLX X server extension version." },
- { "GLXClientVersion", NV_CTRL_STRING_GLX_CLIENT_VERSION, STR_ATTR, {0,0,0,0,1,0}, {}, "The GLX client version." },
- { "OpenGLVersion", NV_CTRL_STRING_GLX_OPENGL_VERSION, STR_ATTR, {0,0,0,0,1,0}, {}, "The OpenGL version." },
- { "XRandRVersion", NV_CTRL_STRING_XRANDR_VERSION, STR_ATTR, {0,0,0,0,1,0}, {}, "The X RandR version." },
- { "XF86VidModeVersion", NV_CTRL_STRING_XF86VIDMODE_VERSION, STR_ATTR, {0,0,0,0,1,0}, {}, "The XF86 Video Mode X extension version." },
- { "XvVersion", NV_CTRL_STRING_XV_VERSION, STR_ATTR, {0,0,0,0,1,0}, {}, "The Xv X extension version." },
+ { "OperatingSystem", NV_CTRL_OPERATING_SYSTEM, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The operating system on which the X server is running. 0-Linux, 1-FreeBSD, 2-SunOS." },
+ { "NvidiaDriverVersion", NV_CTRL_STRING_NVIDIA_DRIVER_VERSION, STR_ATTR, {0,0,0,1,0}, {}, "The NVIDIA X driver version." },
+ { "NvControlVersion", NV_CTRL_STRING_NV_CONTROL_VERSION, STR_ATTR, {0,0,0,1,0}, {}, "The NV-CONTROL X driver extension version." },
+ { "GLXServerVersion", NV_CTRL_STRING_GLX_SERVER_VERSION, STR_ATTR, {0,0,0,1,0}, {}, "The GLX X server extension version." },
+ { "GLXClientVersion", NV_CTRL_STRING_GLX_CLIENT_VERSION, STR_ATTR, {0,0,0,1,0}, {}, "The GLX client version." },
+ { "OpenGLVersion", NV_CTRL_STRING_GLX_OPENGL_VERSION, STR_ATTR, {0,0,0,1,0}, {}, "The OpenGL version." },
+ { "XRandRVersion", NV_CTRL_STRING_XRANDR_VERSION, STR_ATTR, {0,0,0,1,0}, {}, "The X RandR version." },
+ { "XF86VidModeVersion", NV_CTRL_STRING_XF86VIDMODE_VERSION, STR_ATTR, {0,0,0,1,0}, {}, "The XF86 Video Mode X extension version." },
+ { "XvVersion", NV_CTRL_STRING_XV_VERSION, STR_ATTR, {0,0,0,1,0}, {}, "The Xv X extension version." },
/* X screen */
- { "Ubb", NV_CTRL_UBB, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Is UBB enabled for the specified X screen." },
- { "Overlay", NV_CTRL_OVERLAY, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Is the RGB overlay enabled for the specified X screen." },
- { "Stereo", NV_CTRL_STEREO, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The stereo mode for the specified X screen." },
- { "TwinView", NV_CTRL_TWINVIEW, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Is TwinView enabled for the specified X screen." },
- { "ConnectedDisplays", NV_CTRL_CONNECTED_DISPLAYS, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED: use \"-q dpys\" instead." },
- { "EnabledDisplays", NV_CTRL_ENABLED_DISPLAYS, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED: use \"-q dpys\" instead." },
- { "AssociatedDisplays", NV_CTRL_ASSOCIATED_DISPLAY_DEVICES, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED: use \"-q xscreens -V all\" instead." },
- { "ProbeDisplays", NV_CTRL_PROBE_DISPLAYS, INT_ATTR, {0,0,0,0,0,1}, { .int_flags = {0,0,0,1,0,0,0} }, "When this attribute is queried, the X driver re-probes the hardware to detect which display devices are connected to the GPU or DPU driving the specified X screen." },
- { "InitialPixmapPlacement", NV_CTRL_INITIAL_PIXMAP_PLACEMENT, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls where X pixmaps are initially created." },
- { "MultiGpuDisplayOwner", NV_CTRL_MULTIGPU_DISPLAY_OWNER, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "GPU ID of the GPU that has the display device(s) used for showing the X screen." },
- { "HWOverlay", NV_CTRL_HWOVERLAY, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "When a workstation overlay is in use, this value is 1 if the hardware overlay is used, or 0 if the overlay is emulated." },
- { "GlyphCache", NV_CTRL_GLYPH_CACHE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enable or disable caching of glyphs (text) in video memory." },
- { "SwitchToDisplays", NV_CTRL_SWITCH_TO_DISPLAYS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,1,0,0,1} }, "DEPRECATED." },
- { "NotebookDisplayChangeLidEvent", NV_CTRL_NOTEBOOK_DISPLAY_CHANGE_LID_EVENT, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "DEPRECATED." },
- { "NotebookInternalLCD", NV_CTRL_NOTEBOOK_INTERNAL_LCD, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED." },
- { "Depth30Allowed", NV_CTRL_DEPTH_30_ALLOWED, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether the NVIDIA X driver supports depth 30 on the specified X screen or GPU." },
- { "NoScanout", NV_CTRL_NO_SCANOUT, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether the special \"NoScanout\" mode is enabled on the specified X screen or GPU." },
- { "XServerUniqueId", NV_CTRL_X_SERVER_UNIQUE_ID, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns a pseudo-unique identification number for the X server." },
- { "PixmapCache", NV_CTRL_PIXMAP_CACHE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls whether pixmaps are allocated in a cache." },
- { "PixmapCacheRoundSizeKB", NV_CTRL_PIXMAP_CACHE_ROUNDING_SIZE_KB, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the number of kilobytes to add to the pixmap cache when there is not enough room." },
- { "AccelerateTrapezoids", NV_CTRL_ACCELERATE_TRAPEZOIDS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enable or disable GPU acceleration of RENDER Trapezoids." },
- { "ScreenPosition", NV_CTRL_STRING_SCREEN_RECTANGLE, STR_ATTR, {0,0,0,0,1,0}, {}, "Returns the physical X Screen's initial position and size (in absolute coordinates) within the desktop as the \"token=value \" string: \"x=#, y=#, width=#, height=#\"." },
- { "AddMetaMode", NV_CTRL_STRING_OPERATION_ADD_METAMODE, SOP_ATTR, {0,0,0,0,1,1}, {}, "Adds the given MetaMode to the X screen." },
- { "ParseMetaMode", NV_CTRL_STRING_OPERATION_ADD_METAMODE, SOP_ATTR, {0,0,0,0,1,1}, {}, "Parses and validates a given MetaMode." },
- { "PrimeOutputsData", NV_CTRL_STRING_PRIME_OUTPUTS_DATA , STR_ATTR, {0,0,0,0,1,0}, {}, "Lists configured PRIME displays' configuration information." },
+ { "Ubb", NV_CTRL_UBB, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Is UBB enabled for the specified X screen." },
+ { "Overlay", NV_CTRL_OVERLAY, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Is the RGB overlay enabled for the specified X screen." },
+ { "Stereo", NV_CTRL_STEREO, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The stereo mode for the specified X screen." },
+ { "TwinView", NV_CTRL_TWINVIEW, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Is TwinView enabled for the specified X screen." },
+ { "ConnectedDisplays", NV_CTRL_CONNECTED_DISPLAYS, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED: use \"-q dpys\" instead." },
+ { "EnabledDisplays", NV_CTRL_ENABLED_DISPLAYS, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED: use \"-q dpys\" instead." },
+ { "AssociatedDisplays", NV_CTRL_ASSOCIATED_DISPLAY_DEVICES, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED: use \"-q xscreens -V all\" instead." },
+ { "ProbeDisplays", NV_CTRL_PROBE_DISPLAYS, INT_ATTR, {0,0,0,0,1}, { .int_flags = {0,0,0,1,0,0,0} }, "When this attribute is queried, the X driver re-probes the hardware to detect which display devices are connected to the GPU or DPU driving the specified X screen." },
+ { "InitialPixmapPlacement", NV_CTRL_INITIAL_PIXMAP_PLACEMENT, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls where X pixmaps are initially created." },
+ { "MultiGpuDisplayOwner", NV_CTRL_MULTIGPU_DISPLAY_OWNER, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "GPU ID of the GPU that has the display device(s) used for showing the X screen." },
+ { "HWOverlay", NV_CTRL_HWOVERLAY, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "When a workstation overlay is in use, this value is 1 if the hardware overlay is used, or 0 if the overlay is emulated." },
+ { "GlyphCache", NV_CTRL_GLYPH_CACHE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enable or disable caching of glyphs (text) in video memory." },
+ { "SwitchToDisplays", NV_CTRL_SWITCH_TO_DISPLAYS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,1,0,0,1} }, "DEPRECATED." },
+ { "NotebookDisplayChangeLidEvent", NV_CTRL_NOTEBOOK_DISPLAY_CHANGE_LID_EVENT, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "DEPRECATED." },
+ { "NotebookInternalLCD", NV_CTRL_NOTEBOOK_INTERNAL_LCD, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED." },
+ { "Depth30Allowed", NV_CTRL_DEPTH_30_ALLOWED, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether the NVIDIA X driver supports depth 30 on the specified X screen or GPU." },
+ { "NoScanout", NV_CTRL_NO_SCANOUT, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether the special \"NoScanout\" mode is enabled on the specified X screen or GPU." },
+ { "XServerUniqueId", NV_CTRL_X_SERVER_UNIQUE_ID, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns a pseudo-unique identification number for the X server." },
+ { "PixmapCache", NV_CTRL_PIXMAP_CACHE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls whether pixmaps are allocated in a cache." },
+ { "PixmapCacheRoundSizeKB", NV_CTRL_PIXMAP_CACHE_ROUNDING_SIZE_KB, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the number of kilobytes to add to the pixmap cache when there is not enough room." },
+ { "AccelerateTrapezoids", NV_CTRL_ACCELERATE_TRAPEZOIDS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enable or disable GPU acceleration of RENDER Trapezoids." },
+ { "ScreenPosition", NV_CTRL_STRING_SCREEN_RECTANGLE, STR_ATTR, {0,0,0,1,0}, {}, "Returns the physical X Screen's initial position and size (in absolute coordinates) within the desktop as the \"token=value \" string: \"x=#, y=#, width=#, height=#\"." },
+ { "AddMetaMode", NV_CTRL_STRING_OPERATION_ADD_METAMODE, SOP_ATTR, {0,0,0,1,1}, {}, "Adds the given MetaMode to the X screen." },
+ { "ParseMetaMode", NV_CTRL_STRING_OPERATION_ADD_METAMODE, SOP_ATTR, {0,0,0,1,1}, {}, "Parses and validates a given MetaMode." },
+ { "PrimeOutputsData", NV_CTRL_STRING_PRIME_OUTPUTS_DATA , STR_ATTR, {0,0,0,1,0}, {}, "Lists configured PRIME displays' configuration information." },
/* OpenGL */
- { "SyncToVBlank", NV_CTRL_SYNC_TO_VBLANK, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enables sync to vertical blanking for OpenGL clients. This setting only takes effect on OpenGL clients started after it is set." },
- { "LogAniso", NV_CTRL_LOG_ANISO, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enables anisotropic filtering for OpenGL clients; on some NVIDIA hardware, this can only be enabled or disabled; on other hardware different levels of anisotropic filtering can be specified. This setting only takes effect on OpenGL clients started after it is set." },
- { "FSAA", NV_CTRL_FSAA_MODE, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The full screen antialiasing setting for OpenGL clients. This setting only takes effect on OpenGL clients started after it is set. Enabling antialiasing will disable FXAA." },
- { "ForceGenericCpu", NV_CTRL_FORCE_GENERIC_CPU, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "NOT SUPPORTED." },
- { "GammaCorrectedAALines", NV_CTRL_OPENGL_AA_LINE_GAMMA, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "For OpenGL clients, allow gamma-corrected antialiased lines to consider variances in the color display capabilities of output devices when rendering smooth lines. Only available on recent Quadro GPUs. This setting only takes effect on OpenGL clients started after it is set." },
- { "TextureClamping", NV_CTRL_TEXTURE_CLAMPING, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Define the behavior of OpenGL texture clamping for unbordered textures. If enabled (1), the conformant behavior is used. If disabled (0), GL_CLAMP is remapped to GL_CLAMP_TO_EDGE to avoid seams in applications that rely on this behavior, which was the only option in some very old hardware." },
- { "FXAA", NV_CTRL_FXAA, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enables or disables the use of FXAA, Fast Approximate Anti-Aliasing. Enabling FXAA will disable regular antialiasing modes." },
- { "AllowFlipping", NV_CTRL_FLIPPING_ALLOWED, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Defines the swap behavior of OpenGL. When 1, OpenGL will swap by flipping when possible; When 0, OpenGL will always swap by blitting." },
- { "FSAAAppControlled", NV_CTRL_FSAA_APPLICATION_CONTROLLED, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "When Application Control for FSAA is enabled, then what the application requests is used, and the FSAA attribute is ignored. If this is disabled, then any application setting is overridden with the FSAA attribute." },
- { "LogAnisoAppControlled", NV_CTRL_LOG_ANISO_APPLICATION_CONTROLLED, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "When Application Control for LogAniso is enabled, then what the application requests is used, and the LogAniso attribute is ignored. If this is disabled, then any application setting is overridden with the LogAniso attribute." },
- { "ForceStereoFlipping", NV_CTRL_FORCE_STEREO, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "When 1, OpenGL will force stereo flipping even when no stereo drawables are visible (if the device is configured to support it, see the \"Stereo\" X config option). When 0, fall back to the default behavior of only flipping when a stereo drawable is visible." },
- { "OpenGLImageSettings", NV_CTRL_IMAGE_SETTINGS, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The image quality setting for OpenGL clients. This setting only takes effect on OpenGL clients started after it is set." },
- { "XineramaStereoFlipping", NV_CTRL_XINERAMA_STEREO, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "When 1, OpenGL will allow stereo flipping on multiple X screens configured with Xinerama. When 0, flipping is allowed only on one X screen at a time." },
- { "ShowSLIHUD", NV_CTRL_SHOW_SLI_HUD, 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 current SLI mode into a \"heads-up display\" inside OpenGL windows accelerated with SLI. This setting only takes effect on OpenGL clients started after it is set." },
- { "ShowSLIVisualIndicator", NV_CTRL_SHOW_SLI_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 current SLI mode into a \"visual indicator\" inside OpenGL windows accelerated with SLI. This setting only takes effect on OpenGL clients started after it is set." },
- { "ShowMultiGpuVisualIndicator", NV_CTRL_SHOW_MULTIGPU_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 current MultiGPU mode into a \"visual indicator\" inside OpenGL windows accelerated with SLI. This setting only takes effect on OpenGL clients started after it is set." },
- { "FSAAAppEnhanced", NV_CTRL_FSAA_APPLICATION_ENHANCED, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls how the FSAA attribute is applied when FSAAAppControlled is disabled. When FSAAAppEnhanced is disabled, OpenGL applications will be forced to use the FSAA mode specified by the FSAA attribute. When the FSAAAppEnhanced attribute is enabled, only those applications that have selected a multisample FBConfig will be made to use the FSAA mode specified." },
- { "GammaCorrectedAALinesValue", NV_CTRL_OPENGL_AA_LINE_GAMMA_VALUE, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the gamma value used by OpenGL when gamma-corrected antialiased lines are enabled." },
- { "StereoEyesExchange", NV_CTRL_STEREO_EYES_EXCHANGE, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Swaps the left and right eyes of stereo images." },
- { "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} }, "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." },
+ { "SyncToVBlank", NV_CTRL_SYNC_TO_VBLANK, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enables sync to vertical blanking for OpenGL clients. This setting only takes effect on OpenGL clients started after it is set." },
+ { "LogAniso", NV_CTRL_LOG_ANISO, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enables anisotropic filtering for OpenGL clients; on some NVIDIA hardware, this can only be enabled or disabled; on other hardware different levels of anisotropic filtering can be specified. This setting only takes effect on OpenGL clients started after it is set." },
+ { "FSAA", NV_CTRL_FSAA_MODE, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The full screen antialiasing setting for OpenGL clients. This setting only takes effect on OpenGL clients started after it is set. Enabling antialiasing will disable FXAA." },
+ { "ForceGenericCpu", NV_CTRL_FORCE_GENERIC_CPU, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "NOT SUPPORTED." },
+ { "GammaCorrectedAALines", NV_CTRL_OPENGL_AA_LINE_GAMMA, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "For OpenGL clients, allow gamma-corrected antialiased lines to consider variances in the color display capabilities of output devices when rendering smooth lines. Only available on recent Quadro GPUs. This setting only takes effect on OpenGL clients started after it is set." },
+ { "TextureClamping", NV_CTRL_TEXTURE_CLAMPING, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Define the behavior of OpenGL texture clamping for unbordered textures. If enabled (1), the conformant behavior is used. If disabled (0), GL_CLAMP is remapped to GL_CLAMP_TO_EDGE to avoid seams in applications that rely on this behavior, which was the only option in some very old hardware." },
+ { "FXAA", NV_CTRL_FXAA, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enables or disables the use of FXAA, Fast Approximate Anti-Aliasing. Enabling FXAA will disable regular antialiasing modes." },
+ { "AllowFlipping", NV_CTRL_FLIPPING_ALLOWED, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Defines the swap behavior of OpenGL. When 1, OpenGL will swap by flipping when possible; When 0, OpenGL will always swap by blitting." },
+ { "FSAAAppControlled", NV_CTRL_FSAA_APPLICATION_CONTROLLED, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "When Application Control for FSAA is enabled, then what the application requests is used, and the FSAA attribute is ignored. If this is disabled, then any application setting is overridden with the FSAA attribute." },
+ { "LogAnisoAppControlled", NV_CTRL_LOG_ANISO_APPLICATION_CONTROLLED, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "When Application Control for LogAniso is enabled, then what the application requests is used, and the LogAniso attribute is ignored. If this is disabled, then any application setting is overridden with the LogAniso attribute." },
+ { "ForceStereoFlipping", NV_CTRL_FORCE_STEREO, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "When 1, OpenGL will force stereo flipping even when no stereo drawables are visible (if the device is configured to support it, see the \"Stereo\" X config option). When 0, fall back to the default behavior of only flipping when a stereo drawable is visible." },
+ { "OpenGLImageSettings", NV_CTRL_IMAGE_SETTINGS, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The image quality setting for OpenGL clients. This setting only takes effect on OpenGL clients started after it is set." },
+ { "XineramaStereoFlipping", NV_CTRL_XINERAMA_STEREO, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "When 1, OpenGL will allow stereo flipping on multiple X screens configured with Xinerama. When 0, flipping is allowed only on one X screen at a time." },
+ { "ShowSLIHUD", NV_CTRL_SHOW_SLI_HUD, INT_ATTR, {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 current SLI mode into a \"heads-up display\" inside OpenGL windows accelerated with SLI. This setting only takes effect on OpenGL clients started after it is set." },
+ { "ShowSLIVisualIndicator", NV_CTRL_SHOW_SLI_VISUAL_INDICATOR, INT_ATTR, {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 current SLI mode into a \"visual indicator\" inside OpenGL windows accelerated with SLI. This setting only takes effect on OpenGL clients started after it is set." },
+ { "ShowMultiGpuVisualIndicator", NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR, INT_ATTR, {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 current MultiGPU mode into a \"visual indicator\" inside OpenGL windows accelerated with SLI. This setting only takes effect on OpenGL clients started after it is set." },
+ { "FSAAAppEnhanced", NV_CTRL_FSAA_APPLICATION_ENHANCED, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls how the FSAA attribute is applied when FSAAAppControlled is disabled. When FSAAAppEnhanced is disabled, OpenGL applications will be forced to use the FSAA mode specified by the FSAA attribute. When the FSAAAppEnhanced attribute is enabled, only those applications that have selected a multisample FBConfig will be made to use the FSAA mode specified." },
+ { "GammaCorrectedAALinesValue", NV_CTRL_OPENGL_AA_LINE_GAMMA_VALUE, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the gamma value used by OpenGL when gamma-corrected antialiased lines are enabled." },
+ { "StereoEyesExchange", NV_CTRL_STEREO_EYES_EXCHANGE, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Swaps the left and right eyes of stereo images." },
+ { "SliMosaicModeAvailable", NV_CTRL_SLI_MOSAIC_MODE_AVAILABLE, INT_ATTR, {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,1,0}, {}, "Returns a string describing the current SLI mode, if any." },
+ { "MultiGpuMode", NV_CTRL_STRING_MULTIGPU_MODE, STR_ATTR, {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}, { .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}, { .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}, { .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}, { .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}, { .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}, { .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." },
/* GPU */
- { "BusType", NV_CTRL_BUS_TYPE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,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, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the maximum speed that the PCIe link between the GPU and the system may be trained to. This is expressed in gigatransfers per second (GT/s). The link may be dynamically trained to a slower speed, based on the GPU's utilization and performance settings." },
- { "PCIEMaxLinkWidth", NV_CTRL_GPU_PCIE_MAX_LINK_WIDTH, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the maximum width that the PCIe link between the GPU and the system may be trained to. This is expressed in number of lanes. The trained link width may vary dynamically and possibly be narrower based on the GPU's utilization and performance settings." },
- { "PCIECurrentLinkSpeed", NV_CTRL_GPU_PCIE_CURRENT_LINK_SPEED, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current PCIe link speed, in gigatransfers per second (GT/s)." },
- { "PCIECurrentLinkWidth", NV_CTRL_GPU_PCIE_CURRENT_LINK_WIDTH, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current PCIe link width of the GPU, in number of lanes." },
- { "VideoRam", NV_CTRL_VIDEO_RAM, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,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." },
- { "TotalDedicatedGPUMemory", NV_CTRL_TOTAL_DEDICATED_GPU_MEMORY, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the amount of total dedicated memory on the specified GPU in MB." },
- { "UsedDedicatedGPUMemory", NV_CTRL_USED_DEDICATED_GPU_MEMORY, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the amount of dedicated memory used on the specified GPU in MB." },
- { "Irq", NV_CTRL_IRQ, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,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, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns number of CUDA cores supported by the graphics pipeline." },
- { "GPUMemoryInterface", NV_CTRL_GPU_MEMORY_BUS_WIDTH, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns bus bandwidth of the GPU's memory interface." },
- { "GPUCoreTemp", NV_CTRL_GPU_CORE_TEMPERATURE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports the current core temperature in Celsius of the GPU driving the X screen." },
- { "GPUAmbientTemp", NV_CTRL_AMBIENT_TEMPERATURE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports the current temperature in Celsius of the immediate neighborhood of the GPU driving the X screen." },
- { "GPUGraphicsClockOffset", NV_CTRL_GPU_NVCLOCK_OFFSET, INT_ATTR, {0,0,0,1,1,1}, { .int_flags = {0,0,0,0,0,0,0} }, "This is the offset amount, in MHz, to over- or under-clock the Graphics Clock. Specify the performance level in square brackets after the attribute name. E.g., 'GPUGraphicsClockOffset[2]'." },
- { "GPUMemoryTransferRateOffset", NV_CTRL_GPU_MEM_TRANSFER_RATE_OFFSET, INT_ATTR, {0,0,0,1,1,1}, { .int_flags = {0,0,0,0,0,0,0} }, "This is the offset amount, in MHz, to over- or under-clock the Memory Transfer Rate. Specify the performance level in square brackets after the attribute name. E.g., 'GPUMemoryTransferRateOffset[2]'." },
- { "GPUGraphicsClockOffsetAllPerformanceLevels", NV_CTRL_GPU_NVCLOCK_OFFSET_ALL_PERFORMANCE_LEVELS, INT_ATTR, {0,0,0,1,1,1}, { .int_flags = {0,0,0,0,0,0,0} }, "This is the offset amount, in MHz, to over- or under-clock the Graphics Clock. The offset is applied to all performance levels. This attribute is available starting with Pascal GPUs." },
- { "GPUMemoryTransferRateOffsetAllPerformanceLevels", NV_CTRL_GPU_MEM_TRANSFER_RATE_OFFSET_ALL_PERFORMANCE_LEVELS, INT_ATTR, {0,0,0,1,1,1}, { .int_flags = {0,0,0,0,0,0,0} }, "This is the offset amount, in MHz, to over- or under-clock the Memory Transfer Rate. The offset is applied to all performance levels. This attribute is available starting with Pascal GPUs." },
- { "GPUCurrentCoreVoltage", NV_CTRL_GPU_CURRENT_CORE_VOLTAGE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "This attribute returns the GPU's current operating voltage, in microvolts (uV)."},
- { "GPUOverVoltageOffset", NV_CTRL_GPU_OVER_VOLTAGE_OFFSET, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "This is the offset, in microvolts (uV), to apply to the GPU's operating voltage."},
- { "GPUOverclockingState", NV_CTRL_GPU_OVERCLOCKING_STATE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "NOT SUPPORTED." },
- { "GPU2DClockFreqs", NV_CTRL_GPU_2D_CLOCK_FREQS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "NOT SUPPORTED." },
- { "GPU3DClockFreqs", NV_CTRL_GPU_3D_CLOCK_FREQS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "NOT SUPPORTED." },
- { "GPUDefault2DClockFreqs", NV_CTRL_GPU_DEFAULT_2D_CLOCK_FREQS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "NOT SUPPORTED." },
- { "GPUDefault3DClockFreqs", NV_CTRL_GPU_DEFAULT_3D_CLOCK_FREQS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "NOT SUPPORTED." },
- { "GPUCurrentClockFreqs", NV_CTRL_GPU_CURRENT_CLOCK_FREQS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "Returns the current GPU and memory clocks of the graphics device driving the X screen." },
- { "GPUCurrentProcessorClockFreqs", NV_CTRL_GPU_CURRENT_PROCESSOR_CLOCK_FREQS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current processor clock of the graphics device driving the X screen." },
- { "BusRate", NV_CTRL_BUS_RATE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "If the device is on an AGP bus, then BusRate returns the configured AGP rate. If the device is on a PCI Express bus, then this attribute returns the width of the physical link." },
- { "PCIDomain", NV_CTRL_PCI_DOMAIN, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the PCI domain number for the specified device." },
- { "PCIBus", NV_CTRL_PCI_BUS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the PCI bus number for the specified device." },
- { "PCIDevice", NV_CTRL_PCI_DEVICE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the PCI device number for the specified device." },
- { "PCIFunc", NV_CTRL_PCI_FUNCTION, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the PCI function number for the specified device." },
- { "PCIID", NV_CTRL_PCI_ID, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "Returns the PCI vendor and device ID of the specified device." },
- { "PCIEGen", NV_CTRL_GPU_PCIE_GENERATION, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the PCIe generation that this GPU, in this system, is compliant with." },
- { "GPUErrors", NV_CTRL_NUM_GPU_ERRORS_RECOVERED, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of GPU errors occurred." },
- { "GPUPowerSource", NV_CTRL_GPU_POWER_SOURCE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports the type of power source of the GPU." },
- { "GPUCurrentPerfMode", NV_CTRL_GPU_CURRENT_PERFORMANCE_MODE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "NOT SUPPORTED." },
- { "GPUCurrentPerfLevel", NV_CTRL_GPU_CURRENT_PERFORMANCE_LEVEL, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports the current Performance level of the GPU driving the X screen. Each Performance level has associated NVClock and Mem Clock values." },
- { "GPUAdaptiveClockState", NV_CTRL_GPU_ADAPTIVE_CLOCK_STATE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports if Adaptive Clocking is Enabled on the GPU driving the X screen." },
- { "GPUPowerMizerMode", NV_CTRL_GPU_POWER_MIZER_MODE, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Allows setting different GPU powermizer modes." },
- { "GPUPowerMizerDefaultMode", NV_CTRL_GPU_POWER_MIZER_DEFAULT_MODE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports the default powermizer mode of the GPU, if any." },
- { "ECCSupported", NV_CTRL_GPU_ECC_SUPPORTED, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports whether the underlying GPU supports ECC. All of the other ECC attributes are only applicable if this attribute indicates that ECC is supported." },
- { "ECCStatus", NV_CTRL_GPU_ECC_STATUS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports whether ECC is enabled." },
- { "GPULogoBrightness", NV_CTRL_GPU_LOGO_BRIGHTNESS, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls brightness of the logo on the GPU, if any. The value is variable from 0% - 100%." },
- { "GPUSLIBridgeLogoBrightness", NV_CTRL_GPU_SLI_LOGO_BRIGHTNESS, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls brightness of the logo on the SLI bridge, if any. The value is variable from 0% - 100%." },
- { "ECCConfigurationSupported", NV_CTRL_GPU_ECC_CONFIGURATION_SUPPORTED, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports whether ECC whether the ECC configuration setting can be changed." },
- { "ECCConfiguration", NV_CTRL_GPU_ECC_CONFIGURATION, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current ECC configuration setting." },
- { "ECCDefaultConfiguration", NV_CTRL_GPU_ECC_DEFAULT_CONFIGURATION, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the default ECC configuration setting." },
- { "ECCSingleBitErrors", NV_CTRL_GPU_ECC_SINGLE_BIT_ERRORS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of single-bit ECC errors detected by the targeted GPU since the last system reboot." },
- { "ECCDoubleBitErrors", NV_CTRL_GPU_ECC_DOUBLE_BIT_ERRORS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of double-bit ECC errors detected by the targeted GPU since the last system reboot." },
- { "ECCAggregateSingleBitErrors", NV_CTRL_GPU_ECC_AGGREGATE_SINGLE_BIT_ERRORS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of single-bit ECC errors detected by the targeted GPU since the last counter reset." },
- { "ECCAggregateDoubleBitErrors", NV_CTRL_GPU_ECC_AGGREGATE_DOUBLE_BIT_ERRORS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of double-bit ECC errors detected by the targeted GPU since the last counter reset." },
- { "GPUFanControlState", NV_CTRL_GPU_COOLER_MANUAL_CONTROL, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The current fan control state; the value of this attribute controls the availability of additional fan control attributes. Note that this attribute is unavailable unless fan control support has been enabled by setting the \"Coolbits\" X config option." },
- { "GPUTargetFanSpeed", NV_CTRL_THERMAL_COOLER_LEVEL, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the GPU fan's target speed." },
- { "GPUCurrentFanSpeed", NV_CTRL_THERMAL_COOLER_CURRENT_LEVEL, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the GPU fan's current speed." },
- { "GPUResetFanSpeed", NV_CTRL_THERMAL_COOLER_LEVEL_SET_DEFAULT, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Resets the GPU fan's speed to its default." },
- { "GPUCurrentFanSpeedRPM", NV_CTRL_THERMAL_COOLER_SPEED, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the GPU fan's tachometer-measured speed in rotations per minute (RPM)." },
- { "GPUFanControlType", NV_CTRL_THERMAL_COOLER_CONTROL_TYPE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns how the GPU fan is controlled. '1' means the fan can only be toggled on and off; '2' means the fan has variable speed. '0' means the fan is restricted and cannot be adjusted under end user control." },
- { "GPUFanTarget", NV_CTRL_THERMAL_COOLER_TARGET, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the objects the fan cools. '1' means the GPU, '2' means video memory, '4' means the power supply, and '7' means all of the above." },
- { "ThermalSensorReading", NV_CTRL_THERMAL_SENSOR_READING, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the thermal sensor's current reading." },
- { "ThermalSensorProvider", NV_CTRL_THERMAL_SENSOR_PROVIDER, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the hardware device that provides the thermal sensor." },
- { "ThermalSensorTarget", NV_CTRL_THERMAL_SENSOR_TARGET, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns what hardware component the thermal sensor is measuring." },
- { "GPUDoublePrecisionBoostImmediate", NV_CTRL_GPU_DOUBLE_PRECISION_BOOST_IMMEDIATE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Toggles GPU double precision; the change is applied immediately. Only available when the change can be made immediately." },
- { "GPUDoublePrecisionBoostReboot", NV_CTRL_GPU_DOUBLE_PRECISION_BOOST_REBOOT, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Toggles GPU double precision; the change is applied on the next reboot. Only available when the change requires a reboot." },
- { "BaseMosaic", NV_CTRL_BASE_MOSAIC, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current Base Mosaic configuration." },
- { "MultiGpuMasterPossible", NV_CTRL_MULTIGPU_MASTER_POSSIBLE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether or not the GPU can be configured as the master GPU for a Multi GPU configuration (SLI, SLI Mosaic, Base Mosaic, ...)." },
- { "VideoEncoderUtilization", NV_CTRL_VIDEO_ENCODER_UTILIZATION, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the video encoder engine utilization as a percentage." },
- { "VideoDecoderUtilization", NV_CTRL_VIDEO_DECODER_UTILIZATION, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the video decoder engine utilization as a percentage." },
- { "GPUCurrentClockFreqsString", NV_CTRL_STRING_GPU_CURRENT_CLOCK_FREQS, STR_ATTR, {0,0,0,0,1,0}, {}, "Returns the current GPU, memory and Processor clocks of the graphics device driving the X screen." },
- { "GPUPerfModes", NV_CTRL_STRING_PERFORMANCE_MODES, STR_ATTR, {0,0,0,0,1,0}, {}, "Returns a string with all the performance modes defined for this GPU along with their associated NV Clock and Memory Clock values." },
- { "GpuUUID", NV_CTRL_STRING_GPU_UUID, STR_ATTR, {0,0,0,0,1,0}, {}, "Returns the global unique identifier of the GPU." },
- { "GPUUtilization", NV_CTRL_STRING_GPU_UTILIZATION, STR_ATTR, {0,0,0,0,1,0}, {}, "Returns the current percentage utilization of the GPU components." },
- { "GPUSlowdownTempThreshold", NV_CTRL_GPU_SLOWDOWN_THRESHOLD, INT_ATTR, {0,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,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,0,1,0}, {}, "Returns the maximum temperature that will support normal GPU behavior." },
+ { "BusType", NV_CTRL_BUS_TYPE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,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, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the maximum speed that the PCIe link between the GPU and the system may be trained to. This is expressed in gigatransfers per second (GT/s). The link may be dynamically trained to a slower speed, based on the GPU's utilization and performance settings." },
+ { "PCIEMaxLinkWidth", NV_CTRL_GPU_PCIE_MAX_LINK_WIDTH, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the maximum width that the PCIe link between the GPU and the system may be trained to. This is expressed in number of lanes. The trained link width may vary dynamically and possibly be narrower based on the GPU's utilization and performance settings." },
+ { "PCIECurrentLinkSpeed", NV_CTRL_GPU_PCIE_CURRENT_LINK_SPEED, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current PCIe link speed, in gigatransfers per second (GT/s)." },
+ { "PCIECurrentLinkWidth", NV_CTRL_GPU_PCIE_CURRENT_LINK_WIDTH, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current PCIe link width of the GPU, in number of lanes." },
+ { "VideoRam", NV_CTRL_VIDEO_RAM, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,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." },
+ { "TotalDedicatedGPUMemory", NV_CTRL_TOTAL_DEDICATED_GPU_MEMORY, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the amount of total dedicated memory on the specified GPU in MB." },
+ { "UsedDedicatedGPUMemory", NV_CTRL_USED_DEDICATED_GPU_MEMORY, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the amount of dedicated memory used on the specified GPU in MB." },
+ { "Irq", NV_CTRL_IRQ, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,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, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns number of CUDA cores supported by the graphics pipeline." },
+ { "GPUMemoryInterface", NV_CTRL_GPU_MEMORY_BUS_WIDTH, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns bus bandwidth of the GPU's memory interface." },
+ { "GPUCoreTemp", NV_CTRL_GPU_CORE_TEMPERATURE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports the current core temperature in Celsius of the GPU driving the X screen." },
+ { "GPUAmbientTemp", NV_CTRL_AMBIENT_TEMPERATURE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports the current temperature in Celsius of the immediate neighborhood of the GPU driving the X screen." },
+ { "GPUGraphicsClockOffset", NV_CTRL_GPU_NVCLOCK_OFFSET, INT_ATTR, {0,0,1,1,1}, { .int_flags = {0,0,0,0,0,0,0} }, "This is the offset amount, in MHz, to over- or under-clock the Graphics Clock. Specify the performance level in square brackets after the attribute name. E.g., 'GPUGraphicsClockOffset[2]'." },
+ { "GPUMemoryTransferRateOffset", NV_CTRL_GPU_MEM_TRANSFER_RATE_OFFSET, INT_ATTR, {0,0,1,1,1}, { .int_flags = {0,0,0,0,0,0,0} }, "This is the offset amount, in MHz, to over- or under-clock the Memory Transfer Rate. Specify the performance level in square brackets after the attribute name. E.g., 'GPUMemoryTransferRateOffset[2]'." },
+ { "GPUGraphicsClockOffsetAllPerformanceLevels", NV_CTRL_GPU_NVCLOCK_OFFSET_ALL_PERFORMANCE_LEVELS, INT_ATTR, {0,0,1,1,1}, { .int_flags = {0,0,0,0,0,0,0} }, "This is the offset amount, in MHz, to over- or under-clock the Graphics Clock. The offset is applied to all performance levels. This attribute is available starting with Pascal GPUs." },
+ { "GPUMemoryTransferRateOffsetAllPerformanceLevels", NV_CTRL_GPU_MEM_TRANSFER_RATE_OFFSET_ALL_PERFORMANCE_LEVELS, INT_ATTR, {0,0,1,1,1}, { .int_flags = {0,0,0,0,0,0,0} }, "This is the offset amount, in MHz, to over- or under-clock the Memory Transfer Rate. The offset is applied to all performance levels. This attribute is available starting with Pascal GPUs." },
+ { "GPUCurrentCoreVoltage", NV_CTRL_GPU_CURRENT_CORE_VOLTAGE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "This attribute returns the GPU's current operating voltage, in microvolts (uV)."},
+ { "GPUOverVoltageOffset", NV_CTRL_GPU_OVER_VOLTAGE_OFFSET, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "This is the offset, in microvolts (uV), to apply to the GPU's operating voltage."},
+ { "GPUOverclockingState", NV_CTRL_GPU_OVERCLOCKING_STATE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "NOT SUPPORTED." },
+ { "GPU2DClockFreqs", NV_CTRL_GPU_2D_CLOCK_FREQS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "NOT SUPPORTED." },
+ { "GPU3DClockFreqs", NV_CTRL_GPU_3D_CLOCK_FREQS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "NOT SUPPORTED." },
+ { "GPUDefault2DClockFreqs", NV_CTRL_GPU_DEFAULT_2D_CLOCK_FREQS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "NOT SUPPORTED." },
+ { "GPUDefault3DClockFreqs", NV_CTRL_GPU_DEFAULT_3D_CLOCK_FREQS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "NOT SUPPORTED." },
+ { "GPUCurrentClockFreqs", NV_CTRL_GPU_CURRENT_CLOCK_FREQS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "Returns the current GPU and memory clocks of the graphics device driving the X screen." },
+ { "GPUCurrentProcessorClockFreqs", NV_CTRL_GPU_CURRENT_PROCESSOR_CLOCK_FREQS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current processor clock of the graphics device driving the X screen." },
+ { "BusRate", NV_CTRL_BUS_RATE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "If the device is on an AGP bus, then BusRate returns the configured AGP rate. If the device is on a PCI Express bus, then this attribute returns the width of the physical link." },
+ { "PCIDomain", NV_CTRL_PCI_DOMAIN, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the PCI domain number for the specified device." },
+ { "PCIBus", NV_CTRL_PCI_BUS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the PCI bus number for the specified device." },
+ { "PCIDevice", NV_CTRL_PCI_DEVICE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the PCI device number for the specified device." },
+ { "PCIFunc", NV_CTRL_PCI_FUNCTION, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the PCI function number for the specified device." },
+ { "PCIID", NV_CTRL_PCI_ID, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "Returns the PCI vendor and device ID of the specified device." },
+ { "PCIEGen", NV_CTRL_GPU_PCIE_GENERATION, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the PCIe generation that this GPU, in this system, is compliant with." },
+ { "GPUErrors", NV_CTRL_NUM_GPU_ERRORS_RECOVERED, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of GPU errors occurred." },
+ { "GPUPowerSource", NV_CTRL_GPU_POWER_SOURCE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports the type of power source of the GPU." },
+ { "GPUCurrentPerfMode", NV_CTRL_GPU_CURRENT_PERFORMANCE_MODE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "NOT SUPPORTED." },
+ { "GPUCurrentPerfLevel", NV_CTRL_GPU_CURRENT_PERFORMANCE_LEVEL, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports the current Performance level of the GPU driving the X screen. Each Performance level has associated NVClock and Mem Clock values." },
+ { "GPUAdaptiveClockState", NV_CTRL_GPU_ADAPTIVE_CLOCK_STATE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports if Adaptive Clocking is Enabled on the GPU driving the X screen." },
+ { "GPUPowerMizerMode", NV_CTRL_GPU_POWER_MIZER_MODE, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Allows setting different GPU powermizer modes." },
+ { "GPUPowerMizerDefaultMode", NV_CTRL_GPU_POWER_MIZER_DEFAULT_MODE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports the default powermizer mode of the GPU, if any." },
+ { "ECCSupported", NV_CTRL_GPU_ECC_SUPPORTED, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports whether the underlying GPU supports ECC. All of the other ECC attributes are only applicable if this attribute indicates that ECC is supported." },
+ { "ECCStatus", NV_CTRL_GPU_ECC_STATUS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports whether ECC is enabled." },
+ { "GPULogoBrightness", NV_CTRL_GPU_LOGO_BRIGHTNESS, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls brightness of the logo on the GPU, if any. The value is variable from 0% - 100%." },
+ { "GPUSLIBridgeLogoBrightness", NV_CTRL_GPU_SLI_LOGO_BRIGHTNESS, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls brightness of the logo on the SLI bridge, if any. The value is variable from 0% - 100%." },
+ { "ECCConfigurationSupported", NV_CTRL_GPU_ECC_CONFIGURATION_SUPPORTED, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports whether ECC whether the ECC configuration setting can be changed." },
+ { "ECCConfiguration", NV_CTRL_GPU_ECC_CONFIGURATION, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current ECC configuration setting." },
+ { "ECCDefaultConfiguration", NV_CTRL_GPU_ECC_DEFAULT_CONFIGURATION, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the default ECC configuration setting." },
+ { "ECCSingleBitErrors", NV_CTRL_GPU_ECC_SINGLE_BIT_ERRORS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of single-bit ECC errors detected by the targeted GPU since the last system reboot." },
+ { "ECCDoubleBitErrors", NV_CTRL_GPU_ECC_DOUBLE_BIT_ERRORS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of double-bit ECC errors detected by the targeted GPU since the last system reboot." },
+ { "ECCAggregateSingleBitErrors", NV_CTRL_GPU_ECC_AGGREGATE_SINGLE_BIT_ERRORS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of single-bit ECC errors detected by the targeted GPU since the last counter reset." },
+ { "ECCAggregateDoubleBitErrors", NV_CTRL_GPU_ECC_AGGREGATE_DOUBLE_BIT_ERRORS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of double-bit ECC errors detected by the targeted GPU since the last counter reset." },
+ { "GPUFanControlState", NV_CTRL_GPU_COOLER_MANUAL_CONTROL, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The current fan control state; the value of this attribute controls the availability of additional fan control attributes. Note that this attribute is unavailable unless fan control support has been enabled by setting the \"Coolbits\" X config option." },
+ { "GPUTargetFanSpeed", NV_CTRL_THERMAL_COOLER_LEVEL, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the GPU fan's target speed." },
+ { "GPUCurrentFanSpeed", NV_CTRL_THERMAL_COOLER_CURRENT_LEVEL, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the GPU fan's current speed." },
+ { "GPUResetFanSpeed", NV_CTRL_THERMAL_COOLER_LEVEL_SET_DEFAULT, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Resets the GPU fan's speed to its default." },
+ { "GPUCurrentFanSpeedRPM", NV_CTRL_THERMAL_COOLER_SPEED, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the GPU fan's tachometer-measured speed in rotations per minute (RPM)." },
+ { "GPUFanControlType", NV_CTRL_THERMAL_COOLER_CONTROL_TYPE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns how the GPU fan is controlled. '1' means the fan can only be toggled on and off; '2' means the fan has variable speed. '0' means the fan is restricted and cannot be adjusted under end user control." },
+ { "GPUFanTarget", NV_CTRL_THERMAL_COOLER_TARGET, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the objects the fan cools. '1' means the GPU, '2' means video memory, '4' means the power supply, and '7' means all of the above." },
+ { "ThermalSensorReading", NV_CTRL_THERMAL_SENSOR_READING, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the thermal sensor's current reading." },
+ { "ThermalSensorProvider", NV_CTRL_THERMAL_SENSOR_PROVIDER, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the hardware device that provides the thermal sensor." },
+ { "ThermalSensorTarget", NV_CTRL_THERMAL_SENSOR_TARGET, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns what hardware component the thermal sensor is measuring." },
+ { "GPUDoublePrecisionBoostImmediate", NV_CTRL_GPU_DOUBLE_PRECISION_BOOST_IMMEDIATE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Toggles GPU double precision; the change is applied immediately. Only available when the change can be made immediately." },
+ { "GPUDoublePrecisionBoostReboot", NV_CTRL_GPU_DOUBLE_PRECISION_BOOST_REBOOT, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Toggles GPU double precision; the change is applied on the next reboot. Only available when the change requires a reboot." },
+ { "BaseMosaic", NV_CTRL_BASE_MOSAIC, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current Base Mosaic configuration." },
+ { "MultiGpuMasterPossible", NV_CTRL_MULTIGPU_MASTER_POSSIBLE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether or not the GPU can be configured as the master GPU for a Multi GPU configuration (SLI, SLI Mosaic, Base Mosaic, ...)." },
+ { "VideoEncoderUtilization", NV_CTRL_VIDEO_ENCODER_UTILIZATION, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the video encoder engine utilization as a percentage." },
+ { "VideoDecoderUtilization", NV_CTRL_VIDEO_DECODER_UTILIZATION, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the video decoder engine utilization as a percentage." },
+ { "GPUCurrentClockFreqsString", NV_CTRL_STRING_GPU_CURRENT_CLOCK_FREQS, STR_ATTR, {0,0,0,1,0}, {}, "Returns the current GPU, memory and Processor clocks of the graphics device driving the X screen." },
+ { "GPUPerfModes", NV_CTRL_STRING_PERFORMANCE_MODES, STR_ATTR, {0,0,0,1,0}, {}, "Returns a string with all the performance modes defined for this GPU along with their associated NV Clock and Memory Clock values." },
+ { "GpuUUID", NV_CTRL_STRING_GPU_UUID, STR_ATTR, {0,0,0,1,0}, {}, "Returns the global unique identifier of the GPU." },
+ { "GPUUtilization", NV_CTRL_STRING_GPU_UTILIZATION, STR_ATTR, {0,0,0,1,0}, {}, "Returns the current percentage utilization of the GPU components." },
+ { "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." },
/* Framelock */
- { "FrameLockAvailable", NV_CTRL_FRAMELOCK, INT_ATTR, {1,1,0,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)." },
- { "FrameLockMaster", NV_CTRL_FRAMELOCK_MASTER, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED: use \"FrameLockDisplayConfig\" instead." },
- { "FrameLockPolarity", NV_CTRL_FRAMELOCK_POLARITY, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Sync to the rising edge of the Frame Lock pulse, the falling edge of the Frame Lock pulse, or both." },
- { "FrameLockSyncDelay", NV_CTRL_FRAMELOCK_SYNC_DELAY, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the delay between the frame lock pulse and the GPU sync. This is an 11 bit value which is multiplied by 7.81 to determine the sync delay in microseconds." },
- { "FrameLockSyncInterval", NV_CTRL_FRAMELOCK_SYNC_INTERVAL, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "This defines the number of house sync pulses for each Frame Lock sync period. This only applies to the server, and only when recieving house sync. A value of zero means every house sync pulse is one frame period." },
- { "FrameLockPort0Status", NV_CTRL_FRAMELOCK_PORT0_STATUS, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Input/Output status of the RJ45 port0." },
- { "FrameLockPort1Status", NV_CTRL_FRAMELOCK_PORT1_STATUS, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Input/Output status of the RJ45 port1." },
- { "FrameLockHouseStatus", NV_CTRL_FRAMELOCK_HOUSE_STATUS, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether or not the house sync signal was detected on the BNC connector of the frame lock board." },
- { "FrameLockEnable", NV_CTRL_FRAMELOCK_SYNC, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enable/disable the syncing of display devices to the frame lock pulse as specified by previous calls to FrameLockMaster and FrameLockSlaves." },
- { "FrameLockSyncReady", NV_CTRL_FRAMELOCK_SYNC_READY, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports whether a slave frame lock board is receiving sync, whether or not any display devices are using the signal." },
- { "FrameLockFirmwareUnsupported", NV_CTRL_GPU_FRAMELOCK_FIRMWARE_UNSUPPORTED, INT_ATTR, {1,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns true if the Quadro Sync card connected to this GPU has a firmware version incompatible with this GPU." },
- { "FrameLockStereoSync", NV_CTRL_FRAMELOCK_STEREO_SYNC, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "This indicates that the GPU stereo signal is in sync with the frame lock stereo signal." },
- { "FrameLockTestSignal", NV_CTRL_FRAMELOCK_TEST_SIGNAL, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "To test the connections in the sync group, tell the master to enable a test signal, then query port[01] status and sync_ready on all slaves. When done, tell the master to disable the test signal. Test signal should only be manipulated while FrameLockEnable is enabled. The FrameLockTestSignal is also used to reset the Universal Frame Count (as returned by the glXQueryFrameCountNV() function in the GLX_NV_swap_group extension). Note: for best accuracy of the Universal Frame Count, it is recommended to toggle the FrameLockTestSignal on and off after enabling frame lock." },
- { "FrameLockEthDetected", NV_CTRL_FRAMELOCK_ETHERNET_DETECTED, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The frame lock boards are cabled together using regular cat5 cable, connecting to RJ45 ports on the backplane of the card. There is some concern that users may think these are Ethernet ports and connect them to a router/hub/etc. The hardware can detect this and will shut off to prevent damage (either to itself or to the router). FrameLockEthDetected may be called to find out if Ethernet is connected to one of the RJ45 ports. An appropriate error message should then be displayed." },
- { "FrameLockVideoMode", NV_CTRL_FRAMELOCK_VIDEO_MODE, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Get/set what video mode is used to interpret the house sync signal. This should only be set on the master." },
- { "FrameLockSyncRate", NV_CTRL_FRAMELOCK_SYNC_RATE, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the refresh rate that the frame lock board is sending to the GPU, in mHz (Millihertz) (i.e., to get the refresh rate in Hz, divide the returned value by 1000)." },
- { "FrameLockTiming", NV_CTRL_FRAMELOCK_TIMING, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "This is 1 when the GPU is both receiving and locked to an input timing signal. Timing information may come from the following places: another frame lock device that is set to master, the house sync signal, or the GPU's internal timing from a display device." },
- { "FramelockUseHouseSync", NV_CTRL_USE_HOUSE_SYNC, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "When 1 (input), the server (master) frame lock device will propagate the incoming house sync signal as the outgoing frame lock sync signal. If the frame lock device cannot detect a frame lock sync signal, it will default to using the internal timings from the GPU connected to the primary connector. When 2 (output), the server (master) frame lock device will generate a house sync signal from its internal timing and output this signal over the BNC connector on the frame lock device. This is only allowed on a Quadro Sync II frame lock device. If an incoming house sync signal is present on the BNC connector, setting this value to 2 (output) will have no effect." },
- { "FrameLockSlaves", NV_CTRL_FRAMELOCK_SLAVES, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED: use \"FrameLockDisplayConfig\" instead." },
- { "FrameLockMasterable", NV_CTRL_FRAMELOCK_MASTERABLE, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED: use \"FrameLockDisplayConfig\" instead." },
- { "FrameLockSlaveable", NV_CTRL_FRAMELOCK_SLAVEABLE, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED: use \"FrameLockDisplayConfig\" instead." },
- { "FrameLockFPGARevision", NV_CTRL_FRAMELOCK_FPGA_REVISION, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the FPGA revision of the Frame Lock device." },
- { "FrameLockFirmwareVersion", NV_CTRL_FRAMELOCK_FIRMWARE_VERSION, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the firmware major version of the Frame Lock device." },
- { "FrameLockFirmwareMinorVersion", NV_CTRL_FRAMELOCK_FIRMWARE_MINOR_VERSION, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the firmware minor version of the Frame Lock device." },
- { "FrameLockSyncRate4", NV_CTRL_FRAMELOCK_SYNC_RATE_4, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the refresh rate that the frame lock board is sending to the GPU in 1/10000 Hz (i.e., to get the refresh rate in Hz, divide the returned value by 10000)." },
- { "FrameLockSyncDelayResolution", NV_CTRL_FRAMELOCK_SYNC_DELAY_RESOLUTION, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of nanoseconds that one unit of FrameLockSyncDelay corresponds to." },
- { "FrameLockIncomingHouseSyncRate", NV_CTRL_FRAMELOCK_INCOMING_HOUSE_SYNC_RATE, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the rate of the incoming house sync signal to the frame lock board, in mHz (Millihertz) (i.e., to get the house sync rate in Hz, divide the returned value by 1000)." },
- { "FrameLockDisplayConfig", NV_CTRL_FRAMELOCK_DISPLAY_CONFIG, INT_ATTR, {1,1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the FrameLock mode of operation for the display device." },
-
- /* GVIO */
- { "GvoSupported", NV_CTRL_GVO_SUPPORTED, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether this X screen supports GVO; if this screen does not support GVO output, then all other GVO attributes are unavailable." },
- { "GvoSyncMode", NV_CTRL_GVO_SYNC_MODE, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Selects the GVO sync mode; possible values are: FREE_RUNNING - GVO does not sync to any external signal. GENLOCK - the GVO output is genlocked to an incoming sync signal; genlocking locks at hsync. This requires that the output video format exactly match the incoming sync video format. FRAMELOCK - the GVO output is frame locked to an incoming sync signal; frame locking locks at vsync. This requires that the output video format have the same refresh rate as the incoming sync video format." },
- { "GvoSyncSource", NV_CTRL_GVO_SYNC_SOURCE, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "If the GVO sync mode is set to either GENLOCK or FRAMELOCK, this controls which sync source is used as the incoming sync signal (either Composite or SDI). If the GVO sync mode is FREE_RUNNING, this attribute has no effect." },
- { "GvioRequestedVideoFormat", NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Specifies the requested output video format for a GVO device, or the requested capture format for a GVI device." },
- { "GvoOutputVideoFormat", NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT, INT_ATTR, {0,0,1,0,0,1}, { .int_flags = {0,0,0,0,0,0,0} }, "DEPRECATED: use \"GvioRequestedVideoFormat\" instead." },
- { "GviSyncOutputFormat", NV_CTRL_GVI_SYNC_OUTPUT_FORMAT, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the output sync signal from the GVI device." },
- { "GvioDetectedVideoFormat", NV_CTRL_GVIO_DETECTED_VIDEO_FORMAT, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the input video format detected by the GVO or GVI device. For GVI devices, the jack+channel must be passed through via the display mask param where the jack number is in the lower 16 bits and the channel number is in the upper 16 bits." },
- { "GvoInputVideoFormat", NV_CTRL_GVIO_DETECTED_VIDEO_FORMAT, INT_ATTR, {0,0,1,0,1,1}, { .int_flags = {0,0,0,0,0,0,0} }, "DEPRECATED: use \"GvioDetectedVideoFormat\" instead." },
- { "GvoDataFormat", NV_CTRL_GVO_DATA_FORMAT, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Configures how the data in the source (either the X screen or the GLX pbuffer) is interpreted and displayed by the GVO device." },
- { "GvoCompositeSyncInputDetected", NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECTED, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Indicates whether Composite Sync input is detected." },
- { "GvoCompositeSyncInputDetectMode", NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Get/set the Composite Sync input detect mode." },
- { "GvoSdiSyncInputDetected", NV_CTRL_GVO_SDI_SYNC_INPUT_DETECTED, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Indicates whether SDI Sync input is detected, and what type." },
- { "GvoVideoOutputs", NV_CTRL_GVO_VIDEO_OUTPUTS, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Indicates which GVO video output connectors are currently transmitting data." },
- { "GvoSyncDelayPixels", NV_CTRL_GVO_SYNC_DELAY_PIXELS, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the skew between the input sync and the output sync in numbers of pixels from hsync; this is a 12-bit value. If the GVO Capabilities has the Advanced Sync Skew bit set, then setting this value will set a sync advance instead of a delay." },
- { "GvoSyncDelayLines", NV_CTRL_GVO_SYNC_DELAY_LINES, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the skew between the input sync and the output sync in numbers of lines from vsync; this is a 12-bit value. If the GVO Capabilities has the Advanced Sync Skew bit set, then setting this value will set a sync advance instead of a delay." },
- { "GvoInputVideoFormatReacquire", NV_CTRL_GVO_INPUT_VIDEO_FORMAT_REACQUIRE, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Forces input detection to reacquire the input format." },
- { "GvoGlxLocked", NV_CTRL_GVO_GLX_LOCKED, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "DEPRECATED: use \"GvoLockOwner\" instead." },
- { "GvoOverrideHwCsc", NV_CTRL_GVO_OVERRIDE_HW_CSC, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Override the SDI hardware's Color Space Conversion with the values controlled through XNVCTRLSetGvoColorConversion() and XNVCTRLGetGvoColorConversion()." },
- { "GvoCapabilities", NV_CTRL_GVO_CAPABILITIES, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns a description of the GVO capabilities that differ between NVIDIA SDI products. This value is a bitmask where each bit indicates whether that capability is available." },
- { "GvoCompositeTermination", NV_CTRL_GVO_COMPOSITE_TERMINATION, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enable or disable 75 ohm termination of the SDI composite input signal." },
- { "GvoFlipQueueSize", NV_CTRL_GVO_FLIP_QUEUE_SIZE, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Sets/Returns the GVO flip queue size. This value is used by the GLX_NV_video_out extension to determine the size of the internal flip queue when pbuffers are sent to the video device (via glXSendPbufferToVideoNV()). This attribute is applied to GLX when glXGetVideoDeviceNV() is called by the application." },
- { "GvoLockOwner", NV_CTRL_GVO_LOCK_OWNER, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Indicates that the GVO device is available or in use (by GLX, Clone Mode, or TwinView)." },
- { "GvoOutputVideoLocked", NV_CTRL_GVO_OUTPUT_VIDEO_LOCKED, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether or not the GVO output video is locked to the GPU output signal." },
- { "GvoSyncLockStatus", NV_CTRL_GVO_SYNC_LOCK_STATUS, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether or not the GVO device is locked to the input reference signal." },
- { "GvoANCTimeCodeGeneration", NV_CTRL_GVO_ANC_TIME_CODE_GENERATION, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls whether the GVO device generates time codes in the ANC region of the SDI video output stream." },
- { "GvoComposite", NV_CTRL_GVO_COMPOSITE, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enables/Disables SDI compositing. This attribute is only available when an SDI input source is detected and is in genlock mode." },
- { "GvoCompositeAlphaKey", NV_CTRL_GVO_COMPOSITE_ALPHA_KEY, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "When SDI compositing is enabled, this enables/disables alpha blending." },
- { "GvoCompositeNumKeyRanges", NV_CTRL_GVO_COMPOSITE_NUM_KEY_RANGES, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of ranges available for each channel (Y/Luma, Cr, and Cb) that are used SDI compositing through color keying." },
- { "GvoSyncToDisplay", NV_CTRL_GVO_SYNC_TO_DISPLAY, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls synchronization of the non-SDI display to the SDI display when both are active." },
- { "GvoFullRangeColor", NV_CTRL_GVO_FULL_RANGE_COLOR, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Allow full range color data [4-1019]. If disabled, color data is clamped to [64-940]." },
- { "IsGvoDisplay", NV_CTRL_IS_GVO_DISPLAY, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,1,0,0,0} }, "Returns whether or not the given display device is driven by the GVO device." },
- { "GvoEnableRGBData", NV_CTRL_GVO_ENABLE_RGB_DATA, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Indicates that RGB data is being sent via a PASSTHU mode." },
- { "GvoAudioBlanking", NV_CTRL_GVO_AUDIO_BLANKING, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Indicates that the GVO device should drop audio ancillary data packets when frames are repeated." },
- { "GviNumJacks", NV_CTRL_GVI_NUM_JACKS, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of input (BNC) jacks on a GVI device that can read video streams." },
- { "GviMaxLinksPerStream", NV_CTRL_GVI_MAX_LINKS_PER_STREAM, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the maximum number of links that can make up a stream." },
- { "GviDetectedChannelBitsPerComponent", NV_CTRL_GVI_DETECTED_CHANNEL_BITS_PER_COMPONENT, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the detected bits per component on the given jack+channel of the GVI device. The jack+channel must be passed through via the display mask param where the jack number is in the lower 16 bits and the channel number is in the upper 16 bits." },
- { "GviRequestedStreamBitsPerComponent", NV_CTRL_GVI_REQUESTED_STREAM_BITS_PER_COMPONENT, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Indicates the number of bits per component for a capture stream." },
- { "GviDetectedChannelComponentSampling", NV_CTRL_GVI_DETECTED_CHANNEL_COMPONENT_SAMPLING, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the detected sampling format on the given jack+channel of the GVI device. The jack+channel must be passed through via the display mask param where the jack number is in the lower 16 bits and the channel number is in the upper 16 bits." },
- { "GviRequestedStreamComponentSampling", NV_CTRL_GVI_REQUESTED_STREAM_COMPONENT_SAMPLING, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Indicates the sampling format for a capture stream." },
- { "GviRequestedStreamChromaExpand", NV_CTRL_GVI_REQUESTED_STREAM_CHROMA_EXPAND, INT_ATTR, {0,0,1,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Indicates whether 4:2:2 -> 4:4:4 chroma expansion is enabled for the capture stream." },
- { "GviDetectedChannelColorSpace", NV_CTRL_GVI_DETECTED_CHANNEL_COLOR_SPACE, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the detected color space (RGB, YCRCB, etc) for the given jack+channel of the GVI device. The jack+channel must be passed through via the display mask param where the jack number is in the lower 16 bits and the channel number is in the upper 16 bits." },
- { "GviDetectedChannelLinkID", NV_CTRL_GVI_DETECTED_CHANNEL_LINK_ID, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the detected link identifier for the given jack+channel of the GVI device. The jack+channel must be passed through via the display mask param where the jack number is in the lower 16 bits and the channel number is in the upper 16 bits." },
- { "GviDetectedChannelSMPTE352Identifier", NV_CTRL_GVI_DETECTED_CHANNEL_SMPTE352_IDENTIFIER, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the detected 4-byte SMPTE 352 identifier from the given jack+channel of the GVI device. The jack+channel must be passed through via the display mask param where the jack number is in the lower 16 bits and the channel number is in the upper 16 bits." },
- { "GviGlobalIdentifier", NV_CTRL_GVI_GLOBAL_IDENTIFIER, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the global identifier for the given NV-CONTROL GVI device." },
- { "GviMaxChannelsPerJack", NV_CTRL_GVI_MAX_CHANNELS_PER_JACK, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the maximum supported number of channels per single jack on a GVI device." },
- { "GviMaxStreams", NV_CTRL_GVI_MAX_STREAMS, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the maximum supported number of streams that can be configured on a GVI device." },
- { "GviNumCaptureSurfaces", NV_CTRL_GVI_NUM_CAPTURE_SURFACES, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the number of capture buffers for storing incoming video from the GVI device." },
- { "GviBoundGpu", NV_CTRL_GVI_BOUND_GPU, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the target index of the GPU currently attached to the GVI device." },
- { "GviTestMode", NV_CTRL_GVI_TEST_MODE, INT_ATTR, {0,0,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enable or disable GVI test mode." },
- { "GvioFirmwareVersion", NV_CTRL_STRING_GVIO_FIRMWARE_VERSION, STR_ATTR, {0,0,1,0,1,0}, {}, "Indicates the version of the firmware on the GVO or GVI device." },
- { "GvoFirmwareVersion", NV_CTRL_STRING_GVIO_FIRMWARE_VERSION, STR_ATTR, {0,0,1,0,1,1}, {}, "DEPRECATED: use \"GvioFirmwareVersion\" instead." },
- { "GvoCSCMatrix", 0, CSC_ATTR, {0,0,1,0,1,0}, {}, "Sets the GVO Color Space Conversion (CSC) matrix. Accepted values are \"ITU_601\", \"ITU_709\", \"ITU_177\", and \"Identity\"." },
+ { "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)." },
+ { "FrameLockMaster", NV_CTRL_FRAMELOCK_MASTER, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED: use \"FrameLockDisplayConfig\" instead." },
+ { "FrameLockPolarity", NV_CTRL_FRAMELOCK_POLARITY, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Sync to the rising edge of the Frame Lock pulse, the falling edge of the Frame Lock pulse, or both." },
+ { "FrameLockSyncDelay", NV_CTRL_FRAMELOCK_SYNC_DELAY, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the delay between the frame lock pulse and the GPU sync. This is an 11 bit value which is multiplied by 7.81 to determine the sync delay in microseconds." },
+ { "FrameLockSyncInterval", NV_CTRL_FRAMELOCK_SYNC_INTERVAL, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "This defines the number of house sync pulses for each Frame Lock sync period. This only applies to the server, and only when recieving house sync. A value of zero means every house sync pulse is one frame period." },
+ { "FrameLockPort0Status", NV_CTRL_FRAMELOCK_PORT0_STATUS, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Input/Output status of the RJ45 port0." },
+ { "FrameLockPort1Status", NV_CTRL_FRAMELOCK_PORT1_STATUS, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Input/Output status of the RJ45 port1." },
+ { "FrameLockHouseStatus", NV_CTRL_FRAMELOCK_HOUSE_STATUS, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether or not the house sync signal was detected on the BNC connector of the frame lock board." },
+ { "FrameLockEnable", NV_CTRL_FRAMELOCK_SYNC, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enable/disable the syncing of display devices to the frame lock pulse as specified by previous calls to FrameLockMaster and FrameLockSlaves." },
+ { "FrameLockSyncReady", NV_CTRL_FRAMELOCK_SYNC_READY, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Reports whether a slave frame lock board is receiving sync, whether or not any display devices are using the signal." },
+ { "FrameLockFirmwareUnsupported", NV_CTRL_GPU_FRAMELOCK_FIRMWARE_UNSUPPORTED, INT_ATTR, {1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns true if the Quadro Sync card connected to this GPU has a firmware version incompatible with this GPU." },
+ { "FrameLockStereoSync", NV_CTRL_FRAMELOCK_STEREO_SYNC, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "This indicates that the GPU stereo signal is in sync with the frame lock stereo signal." },
+ { "FrameLockTestSignal", NV_CTRL_FRAMELOCK_TEST_SIGNAL, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "To test the connections in the sync group, tell the master to enable a test signal, then query port[01] status and sync_ready on all slaves. When done, tell the master to disable the test signal. Test signal should only be manipulated while FrameLockEnable is enabled. The FrameLockTestSignal is also used to reset the Universal Frame Count (as returned by the glXQueryFrameCountNV() function in the GLX_NV_swap_group extension). Note: for best accuracy of the Universal Frame Count, it is recommended to toggle the FrameLockTestSignal on and off after enabling frame lock." },
+ { "FrameLockEthDetected", NV_CTRL_FRAMELOCK_ETHERNET_DETECTED, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The frame lock boards are cabled together using regular cat5 cable, connecting to RJ45 ports on the backplane of the card. There is some concern that users may think these are Ethernet ports and connect them to a router/hub/etc. The hardware can detect this and will shut off to prevent damage (either to itself or to the router). FrameLockEthDetected may be called to find out if Ethernet is connected to one of the RJ45 ports. An appropriate error message should then be displayed." },
+ { "FrameLockVideoMode", NV_CTRL_FRAMELOCK_VIDEO_MODE, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Get/set what video mode is used to interpret the house sync signal. This should only be set on the master." },
+ { "FrameLockSyncRate", NV_CTRL_FRAMELOCK_SYNC_RATE, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the refresh rate that the frame lock board is sending to the GPU, in mHz (Millihertz) (i.e., to get the refresh rate in Hz, divide the returned value by 1000)." },
+ { "FrameLockTiming", NV_CTRL_FRAMELOCK_TIMING, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "This is 1 when the GPU is both receiving and locked to an input timing signal. Timing information may come from the following places: another frame lock device that is set to master, the house sync signal, or the GPU's internal timing from a display device." },
+ { "FramelockUseHouseSync", NV_CTRL_USE_HOUSE_SYNC, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "When 1 (input), the server (master) frame lock device will propagate the incoming house sync signal as the outgoing frame lock sync signal. If the frame lock device cannot detect a frame lock sync signal, it will default to using the internal timings from the GPU connected to the primary connector. When 2 (output), the server (master) frame lock device will generate a house sync signal from its internal timing and output this signal over the BNC connector on the frame lock device. This is only allowed on a Quadro Sync II frame lock device. If an incoming house sync signal is present on the BNC connector, setting this value to 2 (output) will have no effect." },
+ { "FrameLockSlaves", NV_CTRL_FRAMELOCK_SLAVES, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED: use \"FrameLockDisplayConfig\" instead." },
+ { "FrameLockMasterable", NV_CTRL_FRAMELOCK_MASTERABLE, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED: use \"FrameLockDisplayConfig\" instead." },
+ { "FrameLockSlaveable", NV_CTRL_FRAMELOCK_SLAVEABLE, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,1,0,0,0} }, "DEPRECATED: use \"FrameLockDisplayConfig\" instead." },
+ { "FrameLockFPGARevision", NV_CTRL_FRAMELOCK_FPGA_REVISION, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the FPGA revision of the Frame Lock device." },
+ { "FrameLockFirmwareVersion", NV_CTRL_FRAMELOCK_FIRMWARE_VERSION, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the firmware major version of the Frame Lock device." },
+ { "FrameLockFirmwareMinorVersion", NV_CTRL_FRAMELOCK_FIRMWARE_MINOR_VERSION, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the firmware minor version of the Frame Lock device." },
+ { "FrameLockSyncRate4", NV_CTRL_FRAMELOCK_SYNC_RATE_4, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the refresh rate that the frame lock board is sending to the GPU in 1/10000 Hz (i.e., to get the refresh rate in Hz, divide the returned value by 10000)." },
+ { "FrameLockSyncDelayResolution", NV_CTRL_FRAMELOCK_SYNC_DELAY_RESOLUTION, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of nanoseconds that one unit of FrameLockSyncDelay corresponds to." },
+ { "FrameLockIncomingHouseSyncRate", NV_CTRL_FRAMELOCK_INCOMING_HOUSE_SYNC_RATE, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the rate of the incoming house sync signal to the frame lock board, in mHz (Millihertz) (i.e., to get the house sync rate in Hz, divide the returned value by 1000)." },
+ { "FrameLockDisplayConfig", NV_CTRL_FRAMELOCK_DISPLAY_CONFIG, INT_ATTR, {1,1,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the FrameLock mode of operation for the display device." },
/* Display */
- { "Brightness", BRIGHTNESS_VALUE|ALL_CHANNELS, COL_ATTR, {1,0,0,0,1,0}, {}, "Controls the overall brightness of the display." },
- { "RedBrightness", BRIGHTNESS_VALUE|RED_CHANNEL, COL_ATTR, {1,0,0,0,0,0}, {}, "Controls the brightness of the color red in the display." },
- { "GreenBrightness", BRIGHTNESS_VALUE|GREEN_CHANNEL, COL_ATTR, {1,0,0,0,0,0}, {}, "Controls the brightness of the color green in the display." },
- { "BlueBrightness", BRIGHTNESS_VALUE|BLUE_CHANNEL, COL_ATTR, {1,0,0,0,0,0}, {}, "Controls the brightness of the color blue in the display." },
- { "Contrast", CONTRAST_VALUE|ALL_CHANNELS, COL_ATTR, {1,0,0,0,1,0}, {}, "Controls the overall contrast of the display." },
- { "RedContrast", CONTRAST_VALUE|RED_CHANNEL, COL_ATTR, {1,0,0,0,0,0}, {}, "Controls the contrast of the color red in the display." },
- { "GreenContrast", CONTRAST_VALUE|GREEN_CHANNEL, COL_ATTR, {1,0,0,0,0,0}, {}, "Controls the contrast of the color green in the display." },
- { "BlueContrast", CONTRAST_VALUE|BLUE_CHANNEL, COL_ATTR, {1,0,0,0,0,0}, {}, "Controls the contrast of the color blue in the display." },
- { "Gamma", GAMMA_VALUE|ALL_CHANNELS, COL_ATTR, {1,0,0,0,1,0}, {}, "Controls the overall gamma of the display." },
- { "RedGamma", GAMMA_VALUE|RED_CHANNEL, COL_ATTR, {1,0,0,0,0,0}, {}, "Controls the gamma of the color red in the display." },
- { "GreenGamma", GAMMA_VALUE|GREEN_CHANNEL, COL_ATTR, {1,0,0,0,0,0}, {}, "Controls the gamma of the color green in the display." },
- { "BlueGamma", GAMMA_VALUE|BLUE_CHANNEL, COL_ATTR, {1,0,0,0,0,0}, {},"Controls the gamma of the color blue in the display." },
- { "Dithering", NV_CTRL_DITHERING, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the dithering: auto (0), enabled (1), disabled (2)." },
- { "CurrentDithering", NV_CTRL_CURRENT_DITHERING, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current dithering state: enabled (1), disabled (0)." },
- { "DitheringMode", NV_CTRL_DITHERING_MODE, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the dithering mode when CurrentDithering=1; auto (0), temporally repeating dithering pattern (1), static dithering pattern (2), temporally stochastic dithering (3)." },
- { "CurrentDitheringMode", NV_CTRL_CURRENT_DITHERING_MODE, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current dithering mode: none (0), temporally repeating dithering pattern (1), static dithering pattern (2), temporally stochastic dithering (3)." },
- { "DitheringDepth", NV_CTRL_DITHERING_DEPTH, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the dithering depth when CurrentDithering=1; auto (0), 6 bits per channel (1), 8 bits per channel (2)." },
- { "CurrentDitheringDepth", NV_CTRL_CURRENT_DITHERING_DEPTH, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current dithering depth: none (0), 6 bits per channel (1), 8 bits per channel (2)." },
- { "DigitalVibrance", NV_CTRL_DIGITAL_VIBRANCE, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Sets the digital vibrance level of the display device." },
- { "ImageSharpening", NV_CTRL_IMAGE_SHARPENING, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjusts the sharpness of the display's image quality by amplifying high frequency content." },
- { "ImageSharpeningDefault", NV_CTRL_IMAGE_SHARPENING_DEFAULT, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns default value of image sharpening." },
- { "FrontendResolution", NV_CTRL_FRONTEND_RESOLUTION, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "Returns the dimensions of the frontend (current) resolution as determined by the NVIDIA X Driver. This attribute is a packed integer; the width is packed in the upper 16 bits and the height is packed in the lower 16-bits." },
- { "BackendResolution", NV_CTRL_BACKEND_RESOLUTION, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "Returns the dimensions of the backend resolution as determined by the NVIDIA X Driver. The backend resolution is the resolution (supported by the display device) the GPU is set to scale to. If this resolution matches the frontend resolution, GPU scaling will not be needed/used. This attribute is a packed integer; the width is packed in the upper 16-bits and the height is packed in the lower 16-bits." },
- { "FlatpanelNativeResolution", NV_CTRL_FLATPANEL_NATIVE_RESOLUTION, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "Returns the dimensions of the native resolution of the flat panel as determined by the NVIDIA X Driver. The native resolution is the resolution at which a flat panel must display any image. All other resolutions must be scaled to this resolution through GPU scaling or the DFP's native scaling capabilities in order to be displayed. This attribute is only valid for flat panel (DFP) display devices. This attribute is a packed integer; the width is packed in the upper 16-bits and the height is packed in the lower 16-bits." },
- { "FlatpanelBestFitResolution", NV_CTRL_FLATPANEL_BEST_FIT_RESOLUTION, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "Returns the dimensions of the resolution, selected by the X driver, from the DFP's EDID that most closely matches the frontend resolution of the current mode. The best fit resolution is selected on a per-mode basis. This attribute is only valid for flat panel (DFP) display devices. This attribute is a packed integer; the width is packed in the upper 16-bits and the height is packed in the lower 16-bits." },
- { "DFPScalingActive", NV_CTRL_DFP_SCALING_ACTIVE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current state of DFP scaling. DFP scaling is mode-specific (meaning it may vary depending on which mode is currently set). DFP scaling is active if the GPU is set to scale to the best fit resolution (GPUScaling is set to use FlatpanelBestFitResolution) and the best fit and native resolutions are different." },
- { "GPUScaling", NV_CTRL_GPU_SCALING, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,1,0,0,0,0} }, "Controls what the GPU scales to and how. This attribute is a packed integer; the scaling target (native/best fit) is packed in the upper 16-bits and the scaling method is packed in the lower 16-bits." },
- { "GPUScalingDefaultTarget", NV_CTRL_GPU_SCALING_DEFAULT_TARGET, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the default gpu scaling target for the Flatpanel." },
- { "GPUScalingDefaultMethod", NV_CTRL_GPU_SCALING_DEFAULT_METHOD, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the default gpu scaling method for the Flatpanel." },
- { "GPUScalingActive", NV_CTRL_GPU_SCALING_ACTIVE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current state of GPU scaling. GPU scaling is mode-specific (meaning it may vary depending on which mode is currently set). GPU scaling is active if the frontend timing (current resolution) is different than the target resolution. The target resolution is either the native resolution of the flat panel or the best fit resolution supported by the flat panel. What (and how) the GPU should scale to is controlled through the GPUScaling attribute." },
- { "RefreshRate", NV_CTRL_REFRESH_RATE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {1,0,0,0,0,0,0} }, "Returns the refresh rate of the specified display device in cHz (Centihertz) (to get the refresh rate in Hz, divide the returned value by 100)." },
- { "RefreshRate3", NV_CTRL_REFRESH_RATE_3, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,1,0,0,0,0,0} }, "Returns the refresh rate of the specified display device in mHz (Millihertz) (to get the refresh rate in Hz, divide the returned value by 1000)." },
- { "OverscanCompensation", NV_CTRL_OVERSCAN_COMPENSATION, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjust the amount of overscan compensation scaling, in pixels, to apply to the specified display device." },
- { "ColorSpace", NV_CTRL_COLOR_SPACE, INT_ATTR, {1,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Sets the preferred color space of the signal sent to the display device." },
- { "ColorRange", NV_CTRL_COLOR_RANGE, INT_ATTR, {1,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Sets the preferred color range of the signal sent to the display device." },
- { "CurrentColorSpace", NV_CTRL_CURRENT_COLOR_SPACE, INT_ATTR, {1,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current color space of the signal sent to the display device." },
- { "CurrentColorRange", NV_CTRL_CURRENT_COLOR_RANGE, INT_ATTR, {1,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current color range of the signal sent to the display device." },
- { "SynchronousPaletteUpdates", NV_CTRL_SYNCHRONOUS_PALETTE_UPDATES, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls whether colormap updates are synchronized with X rendering." },
- { "CurrentMetaModeID", NV_CTRL_CURRENT_METAMODE_ID, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The ID of the current MetaMode." },
- { "RandROutputID", NV_CTRL_DISPLAY_RANDR_OUTPUT_ID, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The RandR Output ID that corresponds to the display device." },
- { "Hdmi3D", NV_CTRL_DPY_HDMI_3D, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether the specified display device is currently using HDMI 3D Frame Packed Stereo mode. If so, the result of refresh rate queries will be doubled." },
- { "BacklightBrightness", NV_CTRL_BACKLIGHT_BRIGHTNESS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the backlight brightness of an internal panel." },
- { "CurrentMetaMode", NV_CTRL_STRING_CURRENT_METAMODE_VERSION_2, STR_ATTR, {0,0,0,0,1,0}, {}, "Controls the current MetaMode." },
- { "XineramaInfoOrder", NV_CTRL_STRING_NVIDIA_XINERAMA_INFO_ORDER, STR_ATTR, {0,0,0,0,1,0}, {}, "Controls the nvidiaXineramaInfoOrder." },
- { "BuildModepool", NV_CTRL_STRING_OPERATION_BUILD_MODEPOOL, SOP_ATTR, {0,0,0,0,1,1}, {}, "Build the modepool of the display device if it does not already have one." },
- { "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." },
- { "DisplayVRREnabled", NV_CTRL_DISPLAY_VRR_ENABLED, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "If this is enabled (1), then VRR was enabled on this display at modeset time." },
+ { "Brightness", BRIGHTNESS_VALUE|ALL_CHANNELS, COL_ATTR, {1,0,0,1,0}, {}, "Controls the overall brightness of the display." },
+ { "RedBrightness", BRIGHTNESS_VALUE|RED_CHANNEL, COL_ATTR, {1,0,0,0,0}, {}, "Controls the brightness of the color red in the display." },
+ { "GreenBrightness", BRIGHTNESS_VALUE|GREEN_CHANNEL, COL_ATTR, {1,0,0,0,0}, {}, "Controls the brightness of the color green in the display." },
+ { "BlueBrightness", BRIGHTNESS_VALUE|BLUE_CHANNEL, COL_ATTR, {1,0,0,0,0}, {}, "Controls the brightness of the color blue in the display." },
+ { "Contrast", CONTRAST_VALUE|ALL_CHANNELS, COL_ATTR, {1,0,0,1,0}, {}, "Controls the overall contrast of the display." },
+ { "RedContrast", CONTRAST_VALUE|RED_CHANNEL, COL_ATTR, {1,0,0,0,0}, {}, "Controls the contrast of the color red in the display." },
+ { "GreenContrast", CONTRAST_VALUE|GREEN_CHANNEL, COL_ATTR, {1,0,0,0,0}, {}, "Controls the contrast of the color green in the display." },
+ { "BlueContrast", CONTRAST_VALUE|BLUE_CHANNEL, COL_ATTR, {1,0,0,0,0}, {}, "Controls the contrast of the color blue in the display." },
+ { "Gamma", GAMMA_VALUE|ALL_CHANNELS, COL_ATTR, {1,0,0,1,0}, {}, "Controls the overall gamma of the display." },
+ { "RedGamma", GAMMA_VALUE|RED_CHANNEL, COL_ATTR, {1,0,0,0,0}, {}, "Controls the gamma of the color red in the display." },
+ { "GreenGamma", GAMMA_VALUE|GREEN_CHANNEL, COL_ATTR, {1,0,0,0,0}, {}, "Controls the gamma of the color green in the display." },
+ { "BlueGamma", GAMMA_VALUE|BLUE_CHANNEL, COL_ATTR, {1,0,0,0,0}, {},"Controls the gamma of the color blue in the display." },
+ { "Dithering", NV_CTRL_DITHERING, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the dithering: auto (0), enabled (1), disabled (2)." },
+ { "CurrentDithering", NV_CTRL_CURRENT_DITHERING, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current dithering state: enabled (1), disabled (0)." },
+ { "DitheringMode", NV_CTRL_DITHERING_MODE, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the dithering mode when CurrentDithering=1; auto (0), temporally repeating dithering pattern (1), static dithering pattern (2), temporally stochastic dithering (3)." },
+ { "CurrentDitheringMode", NV_CTRL_CURRENT_DITHERING_MODE, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current dithering mode: none (0), temporally repeating dithering pattern (1), static dithering pattern (2), temporally stochastic dithering (3)." },
+ { "DitheringDepth", NV_CTRL_DITHERING_DEPTH, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the dithering depth when CurrentDithering=1; auto (0), 6 bits per channel (1), 8 bits per channel (2)." },
+ { "CurrentDitheringDepth", NV_CTRL_CURRENT_DITHERING_DEPTH, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current dithering depth: none (0), 6 bits per channel (1), 8 bits per channel (2)." },
+ { "DigitalVibrance", NV_CTRL_DIGITAL_VIBRANCE, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Sets the digital vibrance level of the display device." },
+ { "ImageSharpening", NV_CTRL_IMAGE_SHARPENING, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjusts the sharpness of the display's image quality by amplifying high frequency content." },
+ { "ImageSharpeningDefault", NV_CTRL_IMAGE_SHARPENING_DEFAULT, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns default value of image sharpening." },
+ { "FrontendResolution", NV_CTRL_FRONTEND_RESOLUTION, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "Returns the dimensions of the frontend (current) resolution as determined by the NVIDIA X Driver. This attribute is a packed integer; the width is packed in the upper 16 bits and the height is packed in the lower 16-bits." },
+ { "BackendResolution", NV_CTRL_BACKEND_RESOLUTION, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "Returns the dimensions of the backend resolution as determined by the NVIDIA X Driver. The backend resolution is the resolution (supported by the display device) the GPU is set to scale to. If this resolution matches the frontend resolution, GPU scaling will not be needed/used. This attribute is a packed integer; the width is packed in the upper 16-bits and the height is packed in the lower 16-bits." },
+ { "FlatpanelNativeResolution", NV_CTRL_FLATPANEL_NATIVE_RESOLUTION, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "Returns the dimensions of the native resolution of the flat panel as determined by the NVIDIA X Driver. The native resolution is the resolution at which a flat panel must display any image. All other resolutions must be scaled to this resolution through GPU scaling or the DFP's native scaling capabilities in order to be displayed. This attribute is only valid for flat panel (DFP) display devices. This attribute is a packed integer; the width is packed in the upper 16-bits and the height is packed in the lower 16-bits." },
+ { "FlatpanelBestFitResolution", NV_CTRL_FLATPANEL_BEST_FIT_RESOLUTION, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,1,0,0,0,0} }, "Returns the dimensions of the resolution, selected by the X driver, from the DFP's EDID that most closely matches the frontend resolution of the current mode. The best fit resolution is selected on a per-mode basis. This attribute is only valid for flat panel (DFP) display devices. This attribute is a packed integer; the width is packed in the upper 16-bits and the height is packed in the lower 16-bits." },
+ { "DFPScalingActive", NV_CTRL_DFP_SCALING_ACTIVE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current state of DFP scaling. DFP scaling is mode-specific (meaning it may vary depending on which mode is currently set). DFP scaling is active if the GPU is set to scale to the best fit resolution (GPUScaling is set to use FlatpanelBestFitResolution) and the best fit and native resolutions are different." },
+ { "GPUScaling", NV_CTRL_GPU_SCALING, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,1,0,0,0,0} }, "Controls what the GPU scales to and how. This attribute is a packed integer; the scaling target (native/best fit) is packed in the upper 16-bits and the scaling method is packed in the lower 16-bits." },
+ { "GPUScalingDefaultTarget", NV_CTRL_GPU_SCALING_DEFAULT_TARGET, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the default gpu scaling target for the Flatpanel." },
+ { "GPUScalingDefaultMethod", NV_CTRL_GPU_SCALING_DEFAULT_METHOD, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the default gpu scaling method for the Flatpanel." },
+ { "GPUScalingActive", NV_CTRL_GPU_SCALING_ACTIVE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current state of GPU scaling. GPU scaling is mode-specific (meaning it may vary depending on which mode is currently set). GPU scaling is active if the frontend timing (current resolution) is different than the target resolution. The target resolution is either the native resolution of the flat panel or the best fit resolution supported by the flat panel. What (and how) the GPU should scale to is controlled through the GPUScaling attribute." },
+ { "RefreshRate", NV_CTRL_REFRESH_RATE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {1,0,0,0,0,0,0} }, "Returns the refresh rate of the specified display device in cHz (Centihertz) (to get the refresh rate in Hz, divide the returned value by 100)." },
+ { "RefreshRate3", NV_CTRL_REFRESH_RATE_3, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,1,0,0,0,0,0} }, "Returns the refresh rate of the specified display device in mHz (Millihertz) (to get the refresh rate in Hz, divide the returned value by 1000)." },
+ { "OverscanCompensation", NV_CTRL_OVERSCAN_COMPENSATION, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjust the amount of overscan compensation scaling, in pixels, to apply to the specified display device." },
+ { "ColorSpace", NV_CTRL_COLOR_SPACE, INT_ATTR, {1,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Sets the preferred color space of the signal sent to the display device." },
+ { "ColorRange", NV_CTRL_COLOR_RANGE, INT_ATTR, {1,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Sets the preferred color range of the signal sent to the display device." },
+ { "CurrentColorSpace", NV_CTRL_CURRENT_COLOR_SPACE, INT_ATTR, {1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current color space of the signal sent to the display device." },
+ { "CurrentColorRange", NV_CTRL_CURRENT_COLOR_RANGE, INT_ATTR, {1,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the current color range of the signal sent to the display device." },
+ { "SynchronousPaletteUpdates", NV_CTRL_SYNCHRONOUS_PALETTE_UPDATES, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls whether colormap updates are synchronized with X rendering." },
+ { "CurrentMetaModeID", NV_CTRL_CURRENT_METAMODE_ID, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The ID of the current MetaMode." },
+ { "RandROutputID", NV_CTRL_DISPLAY_RANDR_OUTPUT_ID, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The RandR Output ID that corresponds to the display device." },
+ { "Hdmi3D", NV_CTRL_DPY_HDMI_3D, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns whether the specified display device is currently using HDMI 3D Frame Packed Stereo mode. If so, the result of refresh rate queries will be doubled." },
+ { "BacklightBrightness", NV_CTRL_BACKLIGHT_BRIGHTNESS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the backlight brightness of an internal panel." },
+ { "CurrentMetaMode", NV_CTRL_STRING_CURRENT_METAMODE_VERSION_2, STR_ATTR, {0,0,0,1,0}, {}, "Controls the current MetaMode." },
+ { "XineramaInfoOrder", NV_CTRL_STRING_NVIDIA_XINERAMA_INFO_ORDER, STR_ATTR, {0,0,0,1,0}, {}, "Controls the nvidiaXineramaInfoOrder." },
+ { "BuildModepool", NV_CTRL_STRING_OPERATION_BUILD_MODEPOOL, SOP_ATTR, {0,0,0,1,1}, {}, "Build the modepool of the display device if it does not already have one." },
+ { "DisplayPortConnectorType", NV_CTRL_DISPLAYPORT_CONNECTOR_TYPE, INT_ATTR, {0,0,0,1,0}, {}, "Returns the DisplayPort connector type."},
+ { "DisplayPortIsMultiStream", NV_CTRL_DISPLAYPORT_IS_MULTISTREAM, INT_ATTR, {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,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,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,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "The minimum refresh rate for the specified VRR display device." },
+ { "DisplayVRREnabled", NV_CTRL_DISPLAY_VRR_ENABLED, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "If this is enabled (1), then VRR was enabled on this display at modeset time." },
/* 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." },
- { "TVFlickerFilter", NV_CTRL_TV_FLICKER_FILTER, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjusts the amount of flicker filter on the specified display device." },
- { "TVBrightness", NV_CTRL_TV_BRIGHTNESS, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjusts the amount of brightness on the specified display device." },
- { "TVHue", NV_CTRL_TV_HUE, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjusts the amount of hue on the specified display device." },
- { "TVContrast", NV_CTRL_TV_CONTRAST, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjusts the amount of contrast on the specified display device." },
- { "TVSaturation", NV_CTRL_TV_SATURATION, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjusts the amount of saturation on the specified display device." },
+ { "TVOverScan", NV_CTRL_TV_OVERSCAN, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjusts the amount of overscan on the specified display device." },
+ { "TVFlickerFilter", NV_CTRL_TV_FLICKER_FILTER, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjusts the amount of flicker filter on the specified display device." },
+ { "TVBrightness", NV_CTRL_TV_BRIGHTNESS, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjusts the amount of brightness on the specified display device." },
+ { "TVHue", NV_CTRL_TV_HUE, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjusts the amount of hue on the specified display device." },
+ { "TVContrast", NV_CTRL_TV_CONTRAST, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjusts the amount of contrast on the specified display device." },
+ { "TVSaturation", NV_CTRL_TV_SATURATION, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Adjusts the amount of saturation on the specified display device." },
/* X Video */
- { "XVideoSyncToDisplay", NV_CTRL_XV_SYNC_TO_DISPLAY, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,1,0,1,0} }, "DEPRECATED: Use \"XVideoSyncToDisplayID\" instead." },
- { "XVideoSyncToDisplayID", NV_CTRL_XV_SYNC_TO_DISPLAY_ID, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,1,0,0} }, "Controls which display device is synced to by the XVideo texture and blitter adaptors when they are set to synchronize to the vertical blanking." },
- { "CurrentXVideoSyncToDisplayID", NV_CTRL_CURRENT_XV_SYNC_TO_DISPLAY_ID, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,1,0,0} }, "Returns the display device synced to by the XVideo texture and blitter adaptors when they are set to synchronize to the vertical blanking." },
+ { "XVideoSyncToDisplay", NV_CTRL_XV_SYNC_TO_DISPLAY, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,1,0,1,0} }, "DEPRECATED: Use \"XVideoSyncToDisplayID\" instead." },
+ { "XVideoSyncToDisplayID", NV_CTRL_XV_SYNC_TO_DISPLAY_ID, INT_ATTR, {0,0,0,0,0}, { .int_flags = {0,0,0,0,1,0,0} }, "Controls which display device is synced to by the XVideo texture and blitter adaptors when they are set to synchronize to the vertical blanking." },
+ { "CurrentXVideoSyncToDisplayID", NV_CTRL_CURRENT_XV_SYNC_TO_DISPLAY_ID, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,1,0,0} }, "Returns the display device synced to by the XVideo texture and blitter adaptors when they are set to synchronize to the vertical blanking." },
/* 3D Vision Pro */
- { "3DVisionProResetTransceiverToFactorySettings", NV_CTRL_3D_VISION_PRO_RESET_TRANSCEIVER_TO_FACTORY_SETTINGS, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Resets the 3D Vision Pro transceiver to its factory settings."},
- { "3DVisionProTransceiverChannel", NV_CTRL_3D_VISION_PRO_TRANSCEIVER_CHANNEL, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the channel that is currently used by the 3D Vision Pro transceiver."},
- { "3DVisionProTransceiverMode", NV_CTRL_3D_VISION_PRO_TRANSCEIVER_MODE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the mode in which the 3D Vision Pro transceiver operates."},
- { "3DVisionProTransceiverChannelFrequency", NV_CTRL_3D_VISION_PRO_TRANSCEIVER_CHANNEL_FREQUENCY, INT_ATTR, {0,0,0,1,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the frequency of the channel(in kHz) of the 3D Vision Pro transceiver."},
- { "3DVisionProTransceiverChannelQuality", NV_CTRL_3D_VISION_PRO_TRANSCEIVER_CHANNEL_QUALITY, INT_ATTR, {0,0,0,1,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the quality of the channel(in percentage) of the 3D Vision Pro transceiver."},
- { "3DVisionProTransceiverChannelCount", NV_CTRL_3D_VISION_PRO_TRANSCEIVER_CHANNEL_COUNT, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of channels on the 3D Vision Pro transceiver."},
- { "3DVisionProPairGlasses", NV_CTRL_3D_VISION_PRO_PAIR_GLASSES, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Puts the 3D Vision Pro transceiver into pairing mode to gather additional glasses."},
- { "3DVisionProUnpairGlasses", NV_CTRL_3D_VISION_PRO_UNPAIR_GLASSES, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Tells a specific pair of glasses to unpair."},
- { "3DVisionProDiscoverGlasses", NV_CTRL_3D_VISION_PRO_DISCOVER_GLASSES, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Tells the 3D Vision Pro transceiver about the glasses that have been paired using NV_CTRL_3D_VISION_PRO_PAIR_GLASSES_BEACON."},
- { "3DVisionProIdentifyGlasses", NV_CTRL_3D_VISION_PRO_IDENTIFY_GLASSES, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Causes glasses LEDs to flash for a short period of time."},
- { "3DVisionProGlassesSyncCycle", NV_CTRL_3D_VISION_PRO_GLASSES_SYNC_CYCLE, INT_ATTR, {0,0,0,1,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the sync cycle duration(in milliseconds) of the glasses."},
- { "3DVisionProGlassesMissedSyncCycles", NV_CTRL_3D_VISION_PRO_GLASSES_MISSED_SYNC_CYCLES, INT_ATTR, {0,0,0,1,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of state sync cycles recently missed by the glasses."},
- { "3DVisionProGlassesBatteryLevel", NV_CTRL_3D_VISION_PRO_GLASSES_BATTERY_LEVEL, INT_ATTR, {0,0,0,1,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the battery level(in percentage) of the glasses."},
- { "3DVisionProTransceiverHardwareRevision", NV_CTRL_STRING_3D_VISION_PRO_TRANSCEIVER_HARDWARE_REVISION, STR_ATTR, {0,0,0,0,1,0}, {}, "Returns the hardware revision of the 3D Vision Pro transceiver."},
- { "3DVisionProTransceiverFirmwareVersionA", NV_CTRL_STRING_3D_VISION_PRO_TRANSCEIVER_FIRMWARE_VERSION_A, STR_ATTR, {0,0,0,0,1,0}, {}, "Returns the firmware version of chip A of the 3D Vision Pro transceiver."},
- { "3DVisionProTransceiverFirmwareDateA", NV_CTRL_STRING_3D_VISION_PRO_TRANSCEIVER_FIRMWARE_DATE_A, STR_ATTR, {0,0,0,0,1,0}, {}, "Returns the date of the firmware of chip A of the 3D Vision Pro transceiver."},
- { "3DVisionProTransceiverFirmwareVersionB", NV_CTRL_STRING_3D_VISION_PRO_TRANSCEIVER_FIRMWARE_VERSION_B, STR_ATTR, {0,0,0,0,1,0}, {}, "Returns the firmware version of chip B of the 3D Vision Pro transceiver."},
- { "3DVisionProTransceiverFirmwareDateB", NV_CTRL_STRING_3D_VISION_PRO_TRANSCEIVER_FIRMWARE_DATE_B, STR_ATTR, {0,0,0,0,1,0}, {}, "Returns the date of the firmware of chip B of the 3D Vision Pro transceiver."},
- { "3DVisionProTransceiverAddress", NV_CTRL_STRING_3D_VISION_PRO_TRANSCEIVER_ADDRESS, STR_ATTR, {0,0,0,0,1,0}, {}, "Returns the RF address of the 3D Vision Pro transceiver."},
- { "3DVisionProGlassesFirmwareVersionA", NV_CTRL_STRING_3D_VISION_PRO_GLASSES_FIRMWARE_VERSION_A, STR_ATTR, {0,0,0,1,1,0}, {}, "Returns the firmware version of chip A of the glasses."},
- { "3DVisionProGlassesFirmwareDateA", NV_CTRL_STRING_3D_VISION_PRO_GLASSES_FIRMWARE_DATE_A, STR_ATTR, {0,0,0,1,1,0}, {}, "Returns the date of the firmware of chip A of the glasses."},
- { "3DVisionProGlassesAddress", NV_CTRL_STRING_3D_VISION_PRO_GLASSES_ADDRESS, STR_ATTR, {0,0,0,1,1,0}, {}, "Returns the RF address of the glasses."},
- { "3DVisionProGlassesName", NV_CTRL_STRING_3D_VISION_PRO_GLASSES_NAME, STR_ATTR, {0,0,0,1,1,0}, {}, "Controls the name the glasses should use."},
+ { "3DVisionProResetTransceiverToFactorySettings", NV_CTRL_3D_VISION_PRO_RESET_TRANSCEIVER_TO_FACTORY_SETTINGS, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Resets the 3D Vision Pro transceiver to its factory settings."},
+ { "3DVisionProTransceiverChannel", NV_CTRL_3D_VISION_PRO_TRANSCEIVER_CHANNEL, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the channel that is currently used by the 3D Vision Pro transceiver."},
+ { "3DVisionProTransceiverMode", NV_CTRL_3D_VISION_PRO_TRANSCEIVER_MODE, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the mode in which the 3D Vision Pro transceiver operates."},
+ { "3DVisionProTransceiverChannelFrequency", NV_CTRL_3D_VISION_PRO_TRANSCEIVER_CHANNEL_FREQUENCY, INT_ATTR, {0,0,1,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the frequency of the channel(in kHz) of the 3D Vision Pro transceiver."},
+ { "3DVisionProTransceiverChannelQuality", NV_CTRL_3D_VISION_PRO_TRANSCEIVER_CHANNEL_QUALITY, INT_ATTR, {0,0,1,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the quality of the channel(in percentage) of the 3D Vision Pro transceiver."},
+ { "3DVisionProTransceiverChannelCount", NV_CTRL_3D_VISION_PRO_TRANSCEIVER_CHANNEL_COUNT, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of channels on the 3D Vision Pro transceiver."},
+ { "3DVisionProPairGlasses", NV_CTRL_3D_VISION_PRO_PAIR_GLASSES, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Puts the 3D Vision Pro transceiver into pairing mode to gather additional glasses."},
+ { "3DVisionProUnpairGlasses", NV_CTRL_3D_VISION_PRO_UNPAIR_GLASSES, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Tells a specific pair of glasses to unpair."},
+ { "3DVisionProDiscoverGlasses", NV_CTRL_3D_VISION_PRO_DISCOVER_GLASSES, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Tells the 3D Vision Pro transceiver about the glasses that have been paired using NV_CTRL_3D_VISION_PRO_PAIR_GLASSES_BEACON."},
+ { "3DVisionProIdentifyGlasses", NV_CTRL_3D_VISION_PRO_IDENTIFY_GLASSES, INT_ATTR, {0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Causes glasses LEDs to flash for a short period of time."},
+ { "3DVisionProGlassesSyncCycle", NV_CTRL_3D_VISION_PRO_GLASSES_SYNC_CYCLE, INT_ATTR, {0,0,1,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the sync cycle duration(in milliseconds) of the glasses."},
+ { "3DVisionProGlassesMissedSyncCycles", NV_CTRL_3D_VISION_PRO_GLASSES_MISSED_SYNC_CYCLES, INT_ATTR, {0,0,1,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the number of state sync cycles recently missed by the glasses."},
+ { "3DVisionProGlassesBatteryLevel", NV_CTRL_3D_VISION_PRO_GLASSES_BATTERY_LEVEL, INT_ATTR, {0,0,1,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the battery level(in percentage) of the glasses."},
+ { "3DVisionProTransceiverHardwareRevision", NV_CTRL_STRING_3D_VISION_PRO_TRANSCEIVER_HARDWARE_REVISION, STR_ATTR, {0,0,0,1,0}, {}, "Returns the hardware revision of the 3D Vision Pro transceiver."},
+ { "3DVisionProTransceiverFirmwareVersionA", NV_CTRL_STRING_3D_VISION_PRO_TRANSCEIVER_FIRMWARE_VERSION_A, STR_ATTR, {0,0,0,1,0}, {}, "Returns the firmware version of chip A of the 3D Vision Pro transceiver."},
+ { "3DVisionProTransceiverFirmwareDateA", NV_CTRL_STRING_3D_VISION_PRO_TRANSCEIVER_FIRMWARE_DATE_A, STR_ATTR, {0,0,0,1,0}, {}, "Returns the date of the firmware of chip A of the 3D Vision Pro transceiver."},
+ { "3DVisionProTransceiverFirmwareVersionB", NV_CTRL_STRING_3D_VISION_PRO_TRANSCEIVER_FIRMWARE_VERSION_B, STR_ATTR, {0,0,0,1,0}, {}, "Returns the firmware version of chip B of the 3D Vision Pro transceiver."},
+ { "3DVisionProTransceiverFirmwareDateB", NV_CTRL_STRING_3D_VISION_PRO_TRANSCEIVER_FIRMWARE_DATE_B, STR_ATTR, {0,0,0,1,0}, {}, "Returns the date of the firmware of chip B of the 3D Vision Pro transceiver."},
+ { "3DVisionProTransceiverAddress", NV_CTRL_STRING_3D_VISION_PRO_TRANSCEIVER_ADDRESS, STR_ATTR, {0,0,0,1,0}, {}, "Returns the RF address of the 3D Vision Pro transceiver."},
+ { "3DVisionProGlassesFirmwareVersionA", NV_CTRL_STRING_3D_VISION_PRO_GLASSES_FIRMWARE_VERSION_A, STR_ATTR, {0,0,1,1,0}, {}, "Returns the firmware version of chip A of the glasses."},
+ { "3DVisionProGlassesFirmwareDateA", NV_CTRL_STRING_3D_VISION_PRO_GLASSES_FIRMWARE_DATE_A, STR_ATTR, {0,0,1,1,0}, {}, "Returns the date of the firmware of chip A of the glasses."},
+ { "3DVisionProGlassesAddress", NV_CTRL_STRING_3D_VISION_PRO_GLASSES_ADDRESS, STR_ATTR, {0,0,1,1,0}, {}, "Returns the RF address of the glasses."},
+ { "3DVisionProGlassesName", NV_CTRL_STRING_3D_VISION_PRO_GLASSES_NAME, STR_ATTR, {0,0,1,1,0}, {}, "Controls the name the glasses should use."},
/* Misc */
- { "GTFModeline", NV_CTRL_STRING_OPERATION_GTF_MODELINE, SOP_ATTR, {0,0,0,0,1,1}, { }, "Builds a modeline using the GTF formula." },
- { "CVTModeline", NV_CTRL_STRING_OPERATION_CVT_MODELINE, SOP_ATTR, {0,0,0,0,1,1}, { }, "Builds a modeline using the CVT formula." },
+ { "GTFModeline", NV_CTRL_STRING_OPERATION_GTF_MODELINE, SOP_ATTR, {0,0,0,1,1}, { }, "Builds a modeline using the GTF formula." },
+ { "CVTModeline", NV_CTRL_STRING_OPERATION_CVT_MODELINE, SOP_ATTR, {0,0,0,1,1}, { }, "Builds a modeline using the CVT formula." },
};
@@ -456,48 +401,6 @@ static const AttributeTableEntry *nv_get_attribute_entry_by_name(const char *nam
-/*
- * nv_get_sdi_csc_matrix() - see comments in parse.h
- */
-
-static const float sdi_csc_itu601[15] = {
- 0.2991, 0.5870, 0.1150, 0.0625, 0.85547, // Y
- 0.5000, -0.4185, -0.0810, 0.5000, 0.87500, // Cr
- -0.1685, -0.3310, 0.5000, 0.5000, 0.87500, // Cb
-};
-static const float sdi_csc_itu709[15] = {
- 0.2130, 0.7156, 0.0725, 0.0625, 0.85547, // Y
- 0.5000, -0.4542, -0.0455, 0.5000, 0.87500, // Cr
- -0.1146, -0.3850, 0.5000, 0.5000, 0.87500, // Cb
-};
-static const float sdi_csc_itu177[15] = {
- 0.412391, 0.357584, 0.180481, 0.0, 0.85547, // Y
- 0.019331, 0.119195, 0.950532, 0.0, 0.87500, // Cr
- 0.212639, 0.715169, 0.072192, 0.0, 0.87500, // Cb
-};
-static const float sdi_csc_identity[15] = {
- 0.0000, 1.0000, 0.0000, 0.0000, 1.0, // Y (Green)
- 1.0000, 0.0000, 0.0000, 0.0000, 1.0, // Cr (Red)
- 0.0000, 0.0000, 1.0000, 0.0000, 1.0, // Cb (Blue)
-};
-
-const float * nv_get_sdi_csc_matrix(char *s)
-{
- if (nv_strcasecmp(s, "itu_601")) {
- return sdi_csc_itu601;
- } else if (nv_strcasecmp(s, "itu_709")) {
- return sdi_csc_itu709;
- } else if (nv_strcasecmp(s, "itu_177")) {
- return sdi_csc_itu177;
- } else if (nv_strcasecmp(s, "identity")) {
- return sdi_csc_identity;
- }
-
- return NULL;
-}
-
-
-
/*!
* Return whether the string defined by 'start' and 'end' is a simple numerical
* value; and if so, assigns the value to where 'val' points.
@@ -873,12 +776,6 @@ int nv_parse_attribute_string(const char *str, int query, ParsedAttribute *p)
/* color attributes are floating point */
p->val.f = strtod(s, &tmp);
break;
-
- case CTRL_ATTRIBUTE_TYPE_SDI_CSC:
- /* String that names a standard CSC matrix */
- p->val.pf = nv_get_sdi_csc_matrix(s);
- tmp = s + strlen(s);
- break;
}
if (tmp && (s != tmp)) {
diff --git a/src/parse.h b/src/parse.h
index b13e1b5..4069396 100644
--- a/src/parse.h
+++ b/src/parse.h
@@ -71,7 +71,6 @@ typedef unsigned int uint32;
typedef struct AttributeFlagsRec {
int is_gui_attribute : 1;
int is_framelock_attribute : 1;
- int is_sdi_attribute : 1;
int hijack_display_device : 1;
int no_config_write : 1;
int no_query_all : 1;
@@ -170,18 +169,6 @@ extern const int attributeTableLen;
-/* nv_get_sdi_csc_matrxi() - Returns an array of floats that specifies
- * all the color, offset and scale values for specifying one of the
- * Standard CSC. 's' is a string that names the matrix values to return.
- * The values are placed in the float buffer like so:
- *
- * { YR, YG, YB, YOffset, YScale,
- * CrR, CrG, CrB, CrOffset, CrScale,
- * CbR, CbG, CbB, CbOffset, CbScale }
- *
- */
-const float * nv_get_sdi_csc_matrix(char *s);
-
/*
* nv_parse_attribute_string() - this function parses an attribute
* string, the syntax for which is:
diff --git a/src/query-assign.c b/src/query-assign.c
index 03436e6..73ab43b 100644
--- a/src/query-assign.c
+++ b/src/query-assign.c
@@ -752,16 +752,6 @@ static int process_attribute_queries(const Options *op,
continue;
}
- if (nv_strcasecmp(queries[query], "vcs")) {
- query_all_targets(display_name, VCS_TARGET, systems);
- continue;
- }
-
- if (nv_strcasecmp(queries[query], "gvis")) {
- query_all_targets(display_name, GVI_TARGET, systems);
- continue;
- }
-
if (nv_strcasecmp(queries[query], "fans")) {
query_all_targets(display_name, COOLER_TARGET, systems);
continue;
@@ -1553,7 +1543,7 @@ exit_bit_loop:
/*
- * get_product_name() Returns the (GPU, X screen, display device or VCS)
+ * get_product_name() Returns the (GPU, X screen, display device)
* product name of the given target.
*/
@@ -1675,12 +1665,6 @@ static int print_target_connections(CtrlTarget *t,
is_x_name = NV_TRUE;
break;
- case VCS_TARGET:
- product_name =
- get_product_name(other, NV_CTRL_STRING_VCSC_PRODUCT_NAME);
- is_x_name = NV_TRUE;
- break;
-
case DISPLAY_TARGET:
product_name = get_display_product_name(other);
extra_str = get_display_state_str(other);
@@ -1690,7 +1674,6 @@ static int print_target_connections(CtrlTarget *t,
case THERMAL_SENSOR_TARGET:
case COOLER_TARGET:
case FRAMELOCK_TARGET:
- case GVI_TARGET:
case X_SCREEN_TARGET:
default:
break;
@@ -1800,16 +1783,12 @@ static int query_all_targets(const char *display_name, const int target_type,
switch (target_type) {
case FRAMELOCK_TARGET:
- case GVI_TARGET:
case COOLER_TARGET:
case THERMAL_SENSOR_TARGET:
case NVIDIA_3D_VISION_PRO_TRANSCEIVER_TARGET:
snprintf(product_name, PRODUCT_NAME_LEN, "%s %d",
targetTypeInfo->name, target_id);
break;
- case VCS_TARGET:
- product_name = get_product_name(t, NV_CTRL_STRING_VCSC_PRODUCT_NAME);
- break;
case DISPLAY_TARGET:
product_name = get_display_product_name(t);
extra_str = get_display_state_str(t);
@@ -1885,11 +1864,6 @@ static int query_all_targets(const char *display_name, const int target_type,
(t,
"Is connected to",
"Is not connected to",
- VCS_TARGET);
- print_target_connections
- (t,
- "Is connected to",
- "Is not connected to",
COOLER_TARGET);
print_target_connections
(t,
@@ -1919,14 +1893,6 @@ static int query_all_targets(const char *display_name, const int target_type,
GPU_TARGET);
break;
- case VCS_TARGET:
- print_target_connections
- (t,
- "Is connected to",
- "Is not connected to",
- GPU_TARGET);
- break;
-
case COOLER_TARGET:
print_target_connections
(t,
@@ -2496,35 +2462,6 @@ int nv_process_parsed_attribute(const Options *op,
}
}
- /*
- * To properly handle SDI (GVO) attributes, we just need to make
- * sure that GVO is supported by the handle.
- */
-
- if (a->flags.is_sdi_attribute &&
- target_type != GVI_TARGET) {
- int available;
-
- status = NvCtrlGetAttribute(t, NV_CTRL_GVO_SUPPORTED,
- &available);
- if (status != NvCtrlSuccess) {
- nv_error_msg("The attribute '%s' specified %s cannot be "
- "%s; error querying SDI availability on "
- "%s (%s).",
- a->name, whence, assign ? "assigned" : "queried",
- t->name, NvCtrlAttributesStrError(status));
- continue;
- }
-
- if (available != NV_CTRL_GVO_SUPPORTED_TRUE) {
- nv_error_msg("The attribute '%s' specified %s cannot be %s; "
- "SDI is not supported/available on %s.",
- a->name, whence, assign ? "assigned" : "queried",
- t->name);
- continue;
- }
- }
-
/* Handle string operations */
if (a->type == CTRL_ATTRIBUTE_TYPE_STRING_OPERATION) {
@@ -2558,87 +2495,6 @@ int nv_process_parsed_attribute(const Options *op,
continue;
}
-
-
- /* Special case the GVO CSC attribute */
-
- if (a->type == CTRL_ATTRIBUTE_TYPE_SDI_CSC) {
- float colorMatrix[3][3];
- float colorOffset[3];
- float colorScale[3];
- int r, c;
-
- if (assign) {
-
- /* Make sure the standard is known */
- if (!p->val.pf) {
- nv_error_msg("The attribute '%s' specified %s cannot be "
- "assigned; valid values are \"ITU_601\", "
- "\"ITU_709\", \"ITU_177\", and \"Identity\".",
- a->name, whence);
- continue;
- }
-
- for (r = 0; r < 3; r++) {
- for (c = 0; c < 3; c++) {
- colorMatrix[r][c] = p->val.pf[r*5 + c];
- }
- colorOffset[r] = p->val.pf[r*5 + 3];
- colorScale[r] = p->val.pf[r*5 + 4];
- }
-
- status = NvCtrlSetGvoColorConversion(t,
- colorMatrix,
- colorOffset,
- colorScale);
- } else {
- status = NvCtrlGetGvoColorConversion(t,
- colorMatrix,
- colorOffset,
- colorScale);
- }
-
- if (status != NvCtrlSuccess) {
- nv_error_msg("The attribute '%s' specified %s cannot be "
- "%s; error on %s (%s).",
- a->name, whence,
- assign ? "assigned" : "queried",
- t->name, NvCtrlAttributesStrError(status));
- continue;
- }
-
-
- /* Print results */
- if (!assign) {
-#define INDENT " "
-
- nv_msg(INDENT, " Red Green Blue Offset Scale");
- nv_msg(INDENT, "----------------------------------------------------");
- nv_msg(INDENT, " Y % -.6f % -.6f % -.6f % -.6f % -.6f",
- colorMatrix[0][0],
- colorMatrix[0][1],
- colorMatrix[0][2],
- colorOffset[0],
- colorScale[0]);
- nv_msg(INDENT, "Cr % -.6f % -.6f % -.6f % -.6f % -.6f",
- colorMatrix[1][0],
- colorMatrix[1][1],
- colorMatrix[1][2],
- colorOffset[1],
- colorScale[1]);
- nv_msg(INDENT, "Cb % -.6f % -.6f % -.6f % -.6f % -.6f",
- colorMatrix[2][0],
- colorMatrix[2][1],
- colorMatrix[2][2],
- colorOffset[2],
- colorScale[2]);
-#undef INDENT
- }
-
- continue;
- }
-
-
/*
* special case the display device mask in the case that it
* was "hijacked" for something other than a display device:
diff --git a/src/src.mk b/src/src.mk
index da4e4be..4bbf179 100644
--- a/src/src.mk
+++ b/src/src.mk
@@ -55,7 +55,6 @@ IMAGE_FILES += image_data/display_config.png
IMAGE_FILES += image_data/framelock.png
IMAGE_FILES += image_data/gpu.png
IMAGE_FILES += image_data/graphics.png
-IMAGE_FILES += image_data/gvi.png
IMAGE_FILES += image_data/help.png
IMAGE_FILES += image_data/led_green.png
IMAGE_FILES += image_data/led_grey.png
@@ -71,14 +70,11 @@ IMAGE_FILES += image_data/right.png
IMAGE_FILES += image_data/rj45_input.png
IMAGE_FILES += image_data/rj45_output.png
IMAGE_FILES += image_data/rj45_unused.png
-IMAGE_FILES += image_data/sdi.png
-IMAGE_FILES += image_data/sdi_shared_sync_bnc.png
IMAGE_FILES += image_data/server_licensing.png
IMAGE_FILES += image_data/slimm.png
IMAGE_FILES += image_data/solaris.png
IMAGE_FILES += image_data/svp_3dvp.png
IMAGE_FILES += image_data/thermal.png
-IMAGE_FILES += image_data/vcs.png
IMAGE_FILES += image_data/vdpau.png
IMAGE_FILES += image_data/x.png
IMAGE_FILES += image_data/xvideo.png
@@ -159,8 +155,6 @@ GTK_SRC += gtk+-2.x/ctkdisplaydevice.c
GTK_SRC += gtk+-2.x/ctkditheringcontrols.c
GTK_SRC += gtk+-2.x/ctkthermal.c
GTK_SRC += gtk+-2.x/ctkpowermizer.c
-GTK_SRC += gtk+-2.x/ctkgvo.c
-GTK_SRC += gtk+-2.x/ctkgvo-csc.c
GTK_SRC += gtk+-2.x/ctkdropdownmenu.c
GTK_SRC += gtk+-2.x/ctkutils.c
GTK_SRC += gtk+-2.x/ctkedid.c
@@ -171,11 +165,7 @@ GTK_SRC += gtk+-2.x/ctkscreen.c
GTK_SRC += gtk+-2.x/ctkslimm.c
GTK_SRC += gtk+-2.x/ctkgpu.c
GTK_SRC += gtk+-2.x/ctkbanner.c
-GTK_SRC += gtk+-2.x/ctkvcs.c
GTK_SRC += gtk+-2.x/ctkdisplayconfig-utils.c
-GTK_SRC += gtk+-2.x/ctkgvo-banner.c
-GTK_SRC += gtk+-2.x/ctkgvo-sync.c
-GTK_SRC += gtk+-2.x/ctkgvi.c
GTK_SRC += gtk+-2.x/ctkecc.c
GTK_SRC += gtk+-2.x/ctkappprofile.c
GTK_SRC += gtk+-2.x/ctkapcprofilemodel.c
@@ -212,8 +202,6 @@ GTK_EXTRA_DIST += gtk+-2.x/ctkditheringcontrols.h
GTK_EXTRA_DIST += gtk+-2.x/ctkconstants.h
GTK_EXTRA_DIST += gtk+-2.x/ctkthermal.h
GTK_EXTRA_DIST += gtk+-2.x/ctkpowermizer.h
-GTK_EXTRA_DIST += gtk+-2.x/ctkgvo.h
-GTK_EXTRA_DIST += gtk+-2.x/ctkgvo-csc.h
GTK_EXTRA_DIST += gtk+-2.x/ctkdropdownmenu.h
GTK_EXTRA_DIST += gtk+-2.x/ctkutils.h
GTK_EXTRA_DIST += gtk+-2.x/ctkedid.h
@@ -224,11 +212,7 @@ GTK_EXTRA_DIST += gtk+-2.x/ctkscreen.h
GTK_EXTRA_DIST += gtk+-2.x/ctkslimm.h
GTK_EXTRA_DIST += gtk+-2.x/ctkgpu.h
GTK_EXTRA_DIST += gtk+-2.x/ctkbanner.h
-GTK_EXTRA_DIST += gtk+-2.x/ctkvcs.h
GTK_EXTRA_DIST += gtk+-2.x/ctkdisplayconfig-utils.h
-GTK_EXTRA_DIST += gtk+-2.x/ctkgvo-banner.h
-GTK_EXTRA_DIST += gtk+-2.x/ctkgvo-sync.h
-GTK_EXTRA_DIST += gtk+-2.x/ctkgvi.h
GTK_EXTRA_DIST += gtk+-2.x/ctkecc.h
GTK_EXTRA_DIST += gtk+-2.x/ctkappprofile.h
GTK_EXTRA_DIST += gtk+-2.x/ctkapcprofilemodel.h
diff --git a/src/version.h b/src/version.h
index 7b16bc3..b646583 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1 +1 @@
-#define NVIDIA_VERSION "440.100"
+#define NVIDIA_VERSION "450.51"
diff --git a/src/version.mk b/src/version.mk
index 7a63ce9..38f9fbf 100644
--- a/src/version.mk
+++ b/src/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 440.100
+NVIDIA_VERSION = 450.51
diff --git a/version.mk b/version.mk
index 7a63ce9..38f9fbf 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 440.100
+NVIDIA_VERSION = 450.51