diff options
Diffstat (limited to 'src/parse.c')
-rw-r--r-- | src/parse.c | 387 |
1 files changed, 213 insertions, 174 deletions
diff --git a/src/parse.c b/src/parse.c index 9a0aa87..95cd9e0 100644 --- a/src/parse.c +++ b/src/parse.c @@ -53,7 +53,7 @@ static char *nv_strndup(char *s, int n); #define F NV_PARSER_TYPE_FRAMELOCK #define C NV_PARSER_TYPE_COLOR_ATTRIBUTE #define N NV_PARSER_TYPE_NO_CONFIG_WRITE -#define G NV_PARSER_TYPE_GUI_ATTRIUBUTE +#define G NV_PARSER_TYPE_GUI_ATTRIBUTE #define V NV_PARSER_TYPE_XVIDEO_ATTRIBUTE #define P NV_PARSER_TYPE_PACKED_ATTRIBUTE #define D NV_PARSER_TYPE_VALUE_IS_DISPLAY @@ -67,179 +67,198 @@ static char *nv_strndup(char *s, int n); AttributeTableEntry attributeTable[] = { - /* name constant flags */ + /* name constant flags description */ + + /* Version information */ + { "OperatingSystem", NV_CTRL_OPERATING_SYSTEM, N, "The operating system on which the X server is running. (0-Linux, 1-FreeBSD, 2-SunOS.)" }, + { "NvidiaDriverVersion", NV_CTRL_STRING_NVIDIA_DRIVER_VERSION, S|N, "The NVIDIA X driver version." }, + { "NvControlVersion", NV_CTRL_STRING_NV_CONTROL_VERSION, S|N, "The NV-CONTROL X driver extension version." }, + { "GLXServerVersion", NV_CTRL_STRING_GLX_SERVER_VERSION, S|N, "The GLX X server extension version." }, + { "GLXClientVersion", NV_CTRL_STRING_GLX_CLIENT_VERSION, S|N, "The GLX client version." }, + { "OpenGLVersion", NV_CTRL_STRING_GLX_OPENGL_VERSION, S|N, "The OpenGL version." }, + { "XRandRVersion", NV_CTRL_STRING_XRANDR_VERSION, S|N, "The X RandR version." }, + { "XF86VidModeVersion", NV_CTRL_STRING_XF86VIDMODE_VERSION, S|N, "The XF86 Video Mode X extension version." }, + { "XvVersion", NV_CTRL_STRING_XV_VERSION, S|N, "The Xv X extension version." }, - { "FlatpanelDithering", NV_CTRL_FLATPANEL_DITHERING, 0 }, - { "DigitalVibrance", NV_CTRL_DIGITAL_VIBRANCE, 0 }, - { "ImageSharpening", NV_CTRL_IMAGE_SHARPENING, 0 }, - { "BusType", NV_CTRL_BUS_TYPE, 0 }, - { "BusRate", NV_CTRL_BUS_RATE, 0 }, - { "VideoRam", NV_CTRL_VIDEO_RAM, 0 }, - { "Irq", NV_CTRL_IRQ, 0 }, - { "OperatingSystem", NV_CTRL_OPERATING_SYSTEM, 0 }, - { "SyncToVBlank", NV_CTRL_SYNC_TO_VBLANK, 0 }, - { "AllowFlipping", NV_CTRL_FLIPPING_ALLOWED, 0 }, - { "ForceStereoFlipping", NV_CTRL_FORCE_STEREO, 0 }, - { "XineramaStereoFlipping",NV_CTRL_XINERAMA_STEREO, 0 }, - { "LogAniso", NV_CTRL_LOG_ANISO, 0 }, - { "FSAA", NV_CTRL_FSAA_MODE, 0 }, - { "TextureSharpen", NV_CTRL_TEXTURE_SHARPEN, 0 }, - { "Ubb", NV_CTRL_UBB, 0 }, - { "Overlay", NV_CTRL_OVERLAY, 0 }, - { "HWOverlay", NV_CTRL_HWOVERLAY, 0 }, - { "Stereo", NV_CTRL_STEREO, 0 }, - { "StereoEyesExchange", NV_CTRL_STEREO_EYES_EXCHANGE, 0 }, - { "TwinView", NV_CTRL_TWINVIEW, 0 }, - { "ConnectedDisplays", NV_CTRL_CONNECTED_DISPLAYS, D }, - { "EnabledDisplays", NV_CTRL_ENABLED_DISPLAYS, D }, - { "NotebookInternalLCD", NV_CTRL_NOTEBOOK_INTERNAL_LCD, N|D }, - { "NotebookDisplayChangeLidEvent", NV_CTRL_NOTEBOOK_DISPLAY_CHANGE_LID_EVENT, N }, - { "SwitchToDisplays", NV_CTRL_SWITCH_TO_DISPLAYS, D|N|W }, - { "AssociatedDisplays", NV_CTRL_ASSOCIATED_DISPLAY_DEVICES, N|D }, - { "ProbeDisplays", NV_CTRL_PROBE_DISPLAYS, A }, - { "Depth30Allowed", NV_CTRL_DEPTH_30_ALLOWED, N }, - { "NoScanout", NV_CTRL_NO_SCANOUT, N }, - { "ForceGenericCpu", NV_CTRL_FORCE_GENERIC_CPU, N }, - { "GammaCorrectedAALinesValue", NV_CTRL_OPENGL_AA_LINE_GAMMA_VALUE, 0 }, - { "GammaCorrectedAALines", NV_CTRL_OPENGL_AA_LINE_GAMMA, 0 }, - { "ShowSLIHUD", NV_CTRL_SHOW_SLI_HUD, 0 }, - { "CursorShadow", NV_CTRL_CURSOR_SHADOW, 0 }, - { "CursorShadowXOffset", NV_CTRL_CURSOR_SHADOW_X_OFFSET, 0 }, - { "CursorShadowYOffset", NV_CTRL_CURSOR_SHADOW_Y_OFFSET, 0 }, - { "CursorShadowAlpha", NV_CTRL_CURSOR_SHADOW_ALPHA, 0 }, - { "CursorShadowRed", NV_CTRL_CURSOR_SHADOW_RED, 0 }, - { "CursorShadowGreen", NV_CTRL_CURSOR_SHADOW_GREEN, 0 }, - { "CursorShadowBlue", NV_CTRL_CURSOR_SHADOW_BLUE, 0 }, - { "FSAAAppControlled", NV_CTRL_FSAA_APPLICATION_CONTROLLED, 0 }, - { "LogAnisoAppControlled", NV_CTRL_LOG_ANISO_APPLICATION_CONTROLLED,0 }, - { "RefreshRate", NV_CTRL_REFRESH_RATE, N|H }, - { "RefreshRate3", NV_CTRL_REFRESH_RATE_3, N|K }, - { "InitialPixmapPlacement",NV_CTRL_INITIAL_PIXMAP_PLACEMENT, N }, - { "GlyphCache", NV_CTRL_GLYPH_CACHE, N }, - { "PCIBus", NV_CTRL_PCI_BUS, N }, - { "PCIDevice", NV_CTRL_PCI_DEVICE, N }, - { "PCIFunc", NV_CTRL_PCI_FUNCTION, N }, - { "DynamicTwinview", NV_CTRL_DYNAMIC_TWINVIEW, N }, - { "MultiGpuDisplayOwner", NV_CTRL_MULTIGPU_DISPLAY_OWNER, N }, - { "GPUScaling", NV_CTRL_GPU_SCALING, P }, - { "FrontendResolution", NV_CTRL_FRONTEND_RESOLUTION, N|P }, - { "BackendResolution", NV_CTRL_BACKEND_RESOLUTION, N|P }, - { "FlatpanelNativeResolution", NV_CTRL_FLATPANEL_NATIVE_RESOLUTION, N|P }, - { "FlatpanelBestFitResolution", NV_CTRL_FLATPANEL_BEST_FIT_RESOLUTION, N|P }, - { "GPUScalingActive", NV_CTRL_GPU_SCALING_ACTIVE, N }, - { "DFPScalingActive", NV_CTRL_DFP_SCALING_ACTIVE, N }, - { "FSAAAppEnhanced", NV_CTRL_FSAA_APPLICATION_ENHANCED, 0 }, - { "GPUErrors", NV_CTRL_NUM_GPU_ERRORS_RECOVERED, N }, - { "OnDemandVBlankInterrupts", NV_CTRL_ONDEMAND_VBLANK_INTERRUPTS, 0 }, - - { "FrameLockMaster", NV_CTRL_FRAMELOCK_MASTER, N|F|G|D }, - { "FrameLockSlaves", NV_CTRL_FRAMELOCK_SLAVES, N|F|G|D }, - { "FramelockUseHouseSync", NV_CTRL_USE_HOUSE_SYNC, N|F|G }, - { "FrameLockSyncInterval", NV_CTRL_FRAMELOCK_SYNC_INTERVAL, N|F|G }, - { "FrameLockPolarity", NV_CTRL_FRAMELOCK_POLARITY, N|F|G }, - { "FrameLockVideoMode", NV_CTRL_FRAMELOCK_VIDEO_MODE, N|F|G }, - { "FrameLockSyncDelay", NV_CTRL_FRAMELOCK_SYNC_DELAY, N|F|G }, - { "FrameLockEnable", NV_CTRL_FRAMELOCK_SYNC, N|F|G }, - { "FrameLockAvailable", NV_CTRL_FRAMELOCK, N|F|G }, - { "FrameLockPort0Status", NV_CTRL_FRAMELOCK_PORT0_STATUS, N|F|G }, - { "FrameLockPort1Status", NV_CTRL_FRAMELOCK_PORT1_STATUS, N|F|G }, - { "FrameLockHouseStatus", NV_CTRL_FRAMELOCK_HOUSE_STATUS, N|F|G }, - { "FrameLockSyncReady", NV_CTRL_FRAMELOCK_SYNC_READY, N|F|G }, - { "FrameLockStereoSync", NV_CTRL_FRAMELOCK_STEREO_SYNC, N|F|G }, - { "FrameLockTestSignal", NV_CTRL_FRAMELOCK_TEST_SIGNAL, N|F|G }, - { "FrameLockEthDetected", NV_CTRL_FRAMELOCK_ETHERNET_DETECTED, N|F|G }, - { "FrameLockSyncRate", NV_CTRL_FRAMELOCK_SYNC_RATE, N|F|G }, - { "FrameLockSyncRate4", NV_CTRL_FRAMELOCK_SYNC_RATE_4, N|F|G }, - { "FrameLockTiming", NV_CTRL_FRAMELOCK_TIMING, N|F|G }, - { "FrameLockMasterable", NV_CTRL_FRAMELOCK_MASTERABLE, N|F|G }, - { "FrameLockFPGARevision", NV_CTRL_FRAMELOCK_FPGA_REVISION, N|F|G }, - - { "GvoSupported", NV_CTRL_GVO_SUPPORTED, I|N }, - { "GvoSyncMode", NV_CTRL_GVO_SYNC_MODE, I }, - { "GvoSyncSource", NV_CTRL_GVO_SYNC_SOURCE, I }, - { "GvoOutputVideoFormat", NV_CTRL_GVO_OUTPUT_VIDEO_FORMAT, I }, - { "GvoInputVideoFormat", NV_CTRL_GVO_INPUT_VIDEO_FORMAT, I|N }, - { "GvoDataFormat", NV_CTRL_GVO_DATA_FORMAT, I }, - { "GvoDisplayXScreen", NV_CTRL_GVO_DISPLAY_X_SCREEN, I|N }, - { "GvoCompositeSyncInputDetected", NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECTED, I|N }, - { "GvoCompositeSyncInputDetectMode", NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE, I|N }, - { "GvoSdiSyncInputDetected", NV_CTRL_GVO_SDI_SYNC_INPUT_DETECTED, I|N }, - { "GvoVideoOutputs", NV_CTRL_GVO_VIDEO_OUTPUTS, I|N }, - { "GvoSyncDelayPixels", NV_CTRL_GVO_SYNC_DELAY_PIXELS, I }, - { "GvoSyncDelayLines", NV_CTRL_GVO_SYNC_DELAY_LINES, I }, - { "GvoGlxLocked", NV_CTRL_GVO_GLX_LOCKED, I|N }, - { "GvoXScreenPanX", NV_CTRL_GVO_X_SCREEN_PAN_X, I }, - { "GvoXScreenPanY", NV_CTRL_GVO_X_SCREEN_PAN_Y, I }, - { "GvoOverrideHwCsc", NV_CTRL_GVO_OVERRIDE_HW_CSC, I }, - { "GvoCapabilities", NV_CTRL_GVO_CAPABILITIES, I|N }, - { "GvoCompositeTermination", NV_CTRL_GVO_COMPOSITE_TERMINATION, I }, - { "GvoFlipQueueSize", NV_CTRL_GVO_FLIP_QUEUE_SIZE, I }, - { "GvoFirmwareVersion", NV_CTRL_STRING_GVO_FIRMWARE_VERSION, I|S|N }, - { "GvoLockOwner", NV_CTRL_GVO_LOCK_OWNER, I|N }, - { "GvoOutputVideoLocked", NV_CTRL_GVO_OUTPUT_VIDEO_LOCKED, I|N }, - { "GvoSyncLockStatus", NV_CTRL_GVO_SYNC_LOCK_STATUS, I|N }, - { "GvoANCTimeCodeGeneration", NV_CTRL_GVO_ANC_TIME_CODE_GENERATION, I }, - { "GvoComposite", NV_CTRL_GVO_COMPOSITE, I }, - { "GvoCompositeAlphaKey", NV_CTRL_GVO_COMPOSITE_ALPHA_KEY, I }, - { "GvoCompositeNumKeyRanges", NV_CTRL_GVO_COMPOSITE_NUM_KEY_RANGES, I|N }, - { "GvoSyncToDisplay", NV_CTRL_GVO_SYNC_TO_DISPLAY, I|N }, - - { "Brightness", BRIGHTNESS_VALUE|ALL_CHANNELS, N|C|G }, - { "RedBrightness", BRIGHTNESS_VALUE|RED_CHANNEL, C|G }, - { "GreenBrightness", BRIGHTNESS_VALUE|GREEN_CHANNEL, C|G }, - { "BlueBrightness", BRIGHTNESS_VALUE|BLUE_CHANNEL, C|G }, - { "Contrast", CONTRAST_VALUE|ALL_CHANNELS, N|C|G }, - { "RedContrast", CONTRAST_VALUE|RED_CHANNEL, C|G }, - { "GreenContrast", CONTRAST_VALUE|GREEN_CHANNEL, C|G }, - { "BlueContrast", CONTRAST_VALUE|BLUE_CHANNEL, C|G }, - { "Gamma", GAMMA_VALUE|ALL_CHANNELS, N|C|G }, - { "RedGamma", GAMMA_VALUE|RED_CHANNEL, C|G }, - { "GreenGamma", GAMMA_VALUE|GREEN_CHANNEL, C|G }, - { "BlueGamma", GAMMA_VALUE|BLUE_CHANNEL, C|G }, - { "TVOverScan", NV_CTRL_TV_OVERSCAN, 0 }, - { "TVFlickerFilter", NV_CTRL_TV_FLICKER_FILTER, 0 }, - { "TVBrightness", NV_CTRL_TV_BRIGHTNESS, 0 }, - { "TVHue", NV_CTRL_TV_HUE, 0 }, - { "TVContrast", NV_CTRL_TV_CONTRAST, 0 }, - { "TVSaturation", NV_CTRL_TV_SATURATION, 0 }, - { "GPUCoreTemp", NV_CTRL_GPU_CORE_TEMPERATURE, N }, - { "GPUAmbientTemp", NV_CTRL_AMBIENT_TEMPERATURE, N }, - { "OpenGLImageSettings", NV_CTRL_IMAGE_SETTINGS, 0 }, - - { "XVideoOverlaySaturation", NV_CTRL_ATTR_XV_OVERLAY_SATURATION, V }, - { "XVideoOverlayContrast", NV_CTRL_ATTR_XV_OVERLAY_CONTRAST, V }, - { "XVideoOverlayBrightness", NV_CTRL_ATTR_XV_OVERLAY_BRIGHTNESS, V }, - { "XVideoOverlayHue", NV_CTRL_ATTR_XV_OVERLAY_HUE, V }, - { "XVideoTextureBrightness", NV_CTRL_ATTR_XV_TEXTURE_BRIGHTNESS, V }, - { "XVideoTextureContrast", NV_CTRL_ATTR_XV_TEXTURE_CONTRAST, V }, - { "XVideoTextureHue", NV_CTRL_ATTR_XV_TEXTURE_HUE, V }, - { "XVideoTextureSaturation", NV_CTRL_ATTR_XV_TEXTURE_SATURATION, V }, - { "XVideoTextureSyncToVBlank", NV_CTRL_ATTR_XV_TEXTURE_SYNC_TO_VBLANK, V }, - { "XVideoBlitterSyncToVBlank", NV_CTRL_ATTR_XV_BLITTER_SYNC_TO_VBLANK, V }, - { "XVideoSyncToDisplay", NV_CTRL_XV_SYNC_TO_DISPLAY, D|Z }, - - { "GPUOverclockingState", NV_CTRL_GPU_OVERCLOCKING_STATE, N }, - { "GPUDefault2DClockFreqs", NV_CTRL_GPU_DEFAULT_2D_CLOCK_FREQS, N|P }, - { "GPUDefault3DClockFreqs", NV_CTRL_GPU_DEFAULT_3D_CLOCK_FREQS, N|P }, - { "GPU2DClockFreqs", NV_CTRL_GPU_2D_CLOCK_FREQS, N|P }, - { "GPU3DClockFreqs", NV_CTRL_GPU_3D_CLOCK_FREQS, N|P }, - { "GPUCurrentClockFreqs", NV_CTRL_GPU_CURRENT_CLOCK_FREQS, N|P }, - { "GPUPerfModes", NV_CTRL_STRING_PERFORMANCE_MODES, S|N }, - - { "NvidiaDriverVersion", NV_CTRL_STRING_NVIDIA_DRIVER_VERSION, S|N }, - { "NvControlVersion", NV_CTRL_STRING_NV_CONTROL_VERSION, S|N }, - { "GLXServerVersion", NV_CTRL_STRING_GLX_SERVER_VERSION, S|N }, - { "GLXClientVersion", NV_CTRL_STRING_GLX_CLIENT_VERSION, S|N }, - { "OpenGLVersion", NV_CTRL_STRING_GLX_OPENGL_VERSION, S|N }, - { "XRandRVersion", NV_CTRL_STRING_XRANDR_VERSION, S|N }, - { "XF86VidModeVersion", NV_CTRL_STRING_XF86VIDMODE_VERSION, S|N }, - { "XvVersion", NV_CTRL_STRING_XV_VERSION, S|N }, - { "SLIMode", NV_CTRL_STRING_SLI_MODE, S|N }, - { "GPUCurrentPerfMode", NV_CTRL_GPU_CURRENT_PERFORMANCE_MODE, N }, - { "GPUCurrentPerfLevel", NV_CTRL_GPU_CURRENT_PERFORMANCE_LEVEL, N }, - { "GPUAdaptiveClockState", NV_CTRL_GPU_ADAPTIVE_CLOCK_STATE, N }, - { "GPUPowerSource", NV_CTRL_GPU_POWER_SOURCE, N }, - { NULL, 0, 0 } + /* X screen */ + { "Ubb", NV_CTRL_UBB, 0, "Is UBB enabled for the specified X screen." }, + { "Overlay", NV_CTRL_OVERLAY, 0, "Is the RGB overlay enabled for the specified X screen." }, + { "Stereo", NV_CTRL_STEREO, 0, "The stereo mode for the specified X screen." }, + { "TwinView", NV_CTRL_TWINVIEW, 0, "Is TwinView enabled for the specified X screen." }, + { "ConnectedDisplays", NV_CTRL_CONNECTED_DISPLAYS, D, "Display mask indicating the last cached state of the display devices connected to the GPU." }, + { "EnabledDisplays", NV_CTRL_ENABLED_DISPLAYS, D, "Display mask indicating what display devices are enabled for use on the specified X screen or GPU." }, + { "CursorShadow", NV_CTRL_CURSOR_SHADOW, 0, "Hardware cursor shadow." }, + { "CursorShadowAlpha", NV_CTRL_CURSOR_SHADOW_ALPHA, 0, "Hardware cursor shadow alpha (transparency) value." }, + { "CursorShadowRed", NV_CTRL_CURSOR_SHADOW_RED, 0, "Hardware cursor shadow red color." }, + { "CursorShadowGreen", NV_CTRL_CURSOR_SHADOW_GREEN, 0, "Hardware cursor shadow green color." }, + { "CursorShadowBlue", NV_CTRL_CURSOR_SHADOW_BLUE, 0, "Hardware cursor shadow blue color." }, + { "CursorShadowXOffset", NV_CTRL_CURSOR_SHADOW_X_OFFSET, 0, "Hardware cursor shadow X offset." }, + { "CursorShadowYOffset", NV_CTRL_CURSOR_SHADOW_Y_OFFSET, 0, "Hardware cursor shadow Y offset." }, + { "AssociatedDisplays", NV_CTRL_ASSOCIATED_DISPLAY_DEVICES, N|D, "Display device mask indicating which display devices are \"associated\" with the specified X screen (i.e., are available for displaying the desktop)." }, + { "ProbeDisplays", NV_CTRL_PROBE_DISPLAYS, A, "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. Returns a display mask of the currently connected display devices." }, + { "InitialPixmapPlacement", NV_CTRL_INITIAL_PIXMAP_PLACEMENT, N, "Controls where X pixmaps are initially created." }, + { "DynamicTwinview", NV_CTRL_DYNAMIC_TWINVIEW, N, "Does the X screen support dynamic TwinView." }, + { "MultiGpuDisplayOwner", NV_CTRL_MULTIGPU_DISPLAY_OWNER, N, "GPU ID of the GPU that has the display device(s) used for showing the X screen." }, + { "HWOverlay", NV_CTRL_HWOVERLAY, 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." }, + { "OnDemandVBlankInterrupts", NV_CTRL_ONDEMAND_VBLANK_INTERRUPTS, 0, "Enable/Disable/Query of on-demand vertical blanking interrupt control on the GPU. The 'OnDemandVBlankInterrupts' X server configuration option must be enabled for this option to be available." }, + { "GlyphCache", NV_CTRL_GLYPH_CACHE, N, "Enable or disable caching of glyphs (text) in video memory." }, + { "SwitchToDisplays", NV_CTRL_SWITCH_TO_DISPLAYS, D|N|W, "Used to set which displays should be active." }, + { "NotebookDisplayChangeLidEvent", NV_CTRL_NOTEBOOK_DISPLAY_CHANGE_LID_EVENT, N, "Reports notebook lid open/close events." }, + { "NotebookInternalLCD", NV_CTRL_NOTEBOOK_INTERNAL_LCD, N|D, "Returns the display device mask of the internal LCD of a notebook." }, + { "Depth30Allowed", NV_CTRL_DEPTH_30_ALLOWED, N, "Returns whether the NVIDIA X driver supports depth 30 on the specified X screen or GPU." }, + { "NoScanout", NV_CTRL_NO_SCANOUT, N, "Returns whether the special \"NoScanout\" mode is enabled on the specified X screen or GPU." }, + { "PixmapCache", NV_CTRL_PIXMAP_CACHE, N, "Controls whether pixmaps are allocated in a cache." }, + { "PixmapCacheRoundSizeKB", NV_CTRL_PIXMAP_CACHE_ROUNDING_SIZE_KB, N, "Controls the number of kilobytes to add to the pixmap cache when there is not enough room." }, + + /* OpenGL */ + { "SyncToVBlank", NV_CTRL_SYNC_TO_VBLANK, 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, 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, 0, "The full screen antialiasing setting for OpenGL clients. This setting only takes effect on OpenGL clients started after it is set." }, + { "TextureSharpen", NV_CTRL_TEXTURE_SHARPEN, 0, "Enables texture sharpening for OpenGL clients. This setting only takes effect on OpenGL clients started after it is set." }, + { "ForceGenericCpu", NV_CTRL_FORCE_GENERIC_CPU, N, "Inhibit the use of CPU-specific features such as MMX, SSE, or 3DNOW! for OpenGL clients; this option may result in performance loss, but may be useful in conjunction with software such as the Valgrind memory debugger. This setting only takes effect on OpenGL clients started after it is set." }, + { "GammaCorrectedAALines", NV_CTRL_OPENGL_AA_LINE_GAMMA, 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." }, + + { "AllowFlipping", NV_CTRL_FLIPPING_ALLOWED, 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, 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, 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, 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, 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, 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, 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." }, + { "FSAAAppEnhanced", NV_CTRL_FSAA_APPLICATION_ENHANCED, 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, 0, "Returns the gamma value used by OpenGL when gamma-corrected antialiased lines are enabled." }, + { "StereoEyesExchange", NV_CTRL_STEREO_EYES_EXCHANGE, 0, "Swaps the left and right eyes of stereo images." }, + { "SLIMode", NV_CTRL_STRING_SLI_MODE, S|N, "Returns a string describing the current SLI mode, if any." }, + + /* GPU */ + { "BusType", NV_CTRL_BUS_TYPE, 0, "Returns the type of bus connecting the GPU driving the specified X screen to the computer." }, + { "VideoRam", NV_CTRL_VIDEO_RAM, 0, "Returns the total amount of memory available to the specified GPU (or the GPU driving the specified X screen). Note: if the GPU supports TurboCache(TM), the value reported may exceed the amount of video memory installed on the GPU. The value reported for integrated GPUs may likewise exceed the amount of dedicated system memory set aside by the system BIOS for use by the integrated GPU." }, + { "Irq", NV_CTRL_IRQ, 0, "Returns the interrupt request line used by the GPU driving the specified X screen." }, + { "GPUCoreTemp", NV_CTRL_GPU_CORE_TEMPERATURE, N, "Reports the current core temperature in Celsius of the GPU driving the X screen." }, + { "GPUAmbientTemp", NV_CTRL_AMBIENT_TEMPERATURE, N, "Reports the current temperature in Celsius of the immediate neighborhood of the GPU driving the X screen." }, + { "GPUOverclockingState", NV_CTRL_GPU_OVERCLOCKING_STATE, N, "The current overclocking state; the value of this attribute controls the availability of additional overclocking attributes. Note that this attribute is unavailable unless overclocking support has been enabled by the system administrator." }, + { "GPU2DClockFreqs", NV_CTRL_GPU_2D_CLOCK_FREQS, N|P, "The GPU and memory clock frequencies when operating in 2D mode. New clock frequencies are tested before being applied, and may be rejected. Note that if the target clocks are too aggressive, their testing may render the system unresponsive. Also note that while this attribute may always be queried, it cannot be set unless GPUOverclockingState is set to MANUAL. Since the target clocks may be rejected, the requester should read this attribute after the set to determine success or failure." }, + { "GPU3DClockFreqs", NV_CTRL_GPU_3D_CLOCK_FREQS, N|P, "The GPU and memory clock frequencies when operating in 3D mode. New clock frequencies are tested before being applied, and may be rejected. Note that if the target clocks are too aggressive, their testing may render the system unresponsive. Also note that while this attribute may always be queried, it cannot be set unless GPUOverclockingState is set to MANUAL. Since the target clocks may be rejected, the requester should read this attribute after the set to determine success or failure." }, + { "GPUDefault2DClockFreqs", NV_CTRL_GPU_DEFAULT_2D_CLOCK_FREQS, N|P, "Returns the default memory and GPU core clocks when operating in 2D mode." }, + { "GPUDefault3DClockFreqs", NV_CTRL_GPU_DEFAULT_3D_CLOCK_FREQS, N|P, "Returns the default memory and GPU core clocks when operating in 3D mode." }, + { "GPUCurrentClockFreqs", NV_CTRL_GPU_CURRENT_CLOCK_FREQS, N|P, "Returns the current GPU and memory clocks of the graphics device driving the X screen." }, + { "BusRate", NV_CTRL_BUS_RATE, 0, "If the GPU is on an AGP bus, then BusRate returns the configured AGP rate. If the GPU is on a PCI Express bus, then this attribute returns the width of the physical link." }, + { "PCIBus", NV_CTRL_PCI_BUS, N, "Returns the PCI bus number the GPU is using." }, + { "PCIDevice", NV_CTRL_PCI_DEVICE, N, "Returns the PCI device number the GPU is using." }, + { "PCIFunc", NV_CTRL_PCI_FUNCTION, N, "Returns the PCI function number the GPU is using." }, + { "GPUErrors", NV_CTRL_NUM_GPU_ERRORS_RECOVERED, N, "Returns the number of GPU errors occurred." }, + { "GPUPowerSource", NV_CTRL_GPU_POWER_SOURCE, N, "Reports the type of power source of the GPU." }, + { "GPUCurrentPerfMode", NV_CTRL_GPU_CURRENT_PERFORMANCE_MODE, N, "Reports the current performance mode of the GPU driving the X screen. Running a 3D app, for example, will change this performance mode if Adaptive Clocking is enabled." }, + { "GPUCurrentPerfLevel", NV_CTRL_GPU_CURRENT_PERFORMANCE_LEVEL, N, "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, N, "Reports if Adaptive Clocking is Enabled on the GPU driving the X screen." }, + { "GPUPerfModes", NV_CTRL_STRING_PERFORMANCE_MODES, S|N, "Returns a string with all the performance modes defined for this GPU along with their associated NV Clock and Memory Clock values." }, + + /* Framelock */ + { "FrameLockAvailable", NV_CTRL_FRAMELOCK, N|F|G, "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, N|F|G|D, "Get/set which display device to use as the frame lock master for the entire sync group. Note that only one node in the sync group should be configured as the master." }, + { "FrameLockPolarity", NV_CTRL_FRAMELOCK_POLARITY, N|F|G, "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, N|F|G, "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, N|F|G, "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, N|F|G, "Input/Output status of the RJ45 port0." }, + { "FrameLockPort1Status", NV_CTRL_FRAMELOCK_PORT1_STATUS, N|F|G, "Input/Output status of the RJ45 port1." }, + { "FrameLockHouseStatus", NV_CTRL_FRAMELOCK_HOUSE_STATUS, N|F|G, "Returns whether or not the house sync signal was detected on the BNC connector of the frame lock board." }, + { "FrameLockEnable", NV_CTRL_FRAMELOCK_SYNC, N|F|G, "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, N|F|G, "Reports whether a slave frame lock board is receiving sync, whether or not any display devices are using the signal." }, + { "FrameLockStereoSync", NV_CTRL_FRAMELOCK_STEREO_SYNC, N|F|G, "This indicates that the GPU stereo signal is in sync with the frame lock stereo signal." }, + { "FrameLockTestSignal", NV_CTRL_FRAMELOCK_TEST_SIGNAL, N|F|G, "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, N|F|G, "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, N|F|G, "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, N|F|G, "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, N|F|G, "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, N|F|G, "When 1, 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." }, + { "FrameLockSlaves", NV_CTRL_FRAMELOCK_SLAVES, N|F|G|D, "Get/set whether the display device(s) given should listen or ignore the master's sync signal." }, + { "FrameLockMasterable", NV_CTRL_FRAMELOCK_MASTERABLE, N|F|G, "Returns whether the display device(s) can be set as the master of the frame lock group. Returns 1 if the GPU driving the display device is connected to the \"primary\" connector on the frame lock board." }, + { "FrameLockSlaveable", NV_CTRL_FRAMELOCK_SLAVEABLE, N|F|G|D, "Returns whether the display device(s) can be set as slave(s) of the frame lock group." }, + { "FrameLockFPGARevision", NV_CTRL_FRAMELOCK_FPGA_REVISION, N|F|G, "Returns the FPGA revision of the Frame Lock device." }, + { "FrameLockSyncRate4", NV_CTRL_FRAMELOCK_SYNC_RATE_4, N|F|G, "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.)" }, + + /* GVO */ + { "GvoSupported", NV_CTRL_GVO_SUPPORTED, I|N, "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, I, "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, I, "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." }, + { "GvoOutputVideoFormat", NV_CTRL_GVO_OUTPUT_VIDEO_FORMAT, I, "Specifies the output video format coming out of the GVO device." }, + { "GvoInputVideoFormat", NV_CTRL_GVO_INPUT_VIDEO_FORMAT, I|N, "Returns the input video format detected by the GVO device." }, + { "GvoDataFormat", NV_CTRL_GVO_DATA_FORMAT, I, "Configures how the data in the source (either the X screen or the GLX pbuffer) is interpreted and displayed by the GVO device." }, + { "GvoDisplayXScreen", NV_CTRL_GVO_DISPLAY_X_SCREEN, I|N, "Enable/disable GVO output of the X screen (in Clone mode)." }, + { "GvoCompositeSyncInputDetected", NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECTED, I|N, "Indicates whether Composite Sync input is detected." }, + { "GvoCompositeSyncInputDetectMode", NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECT_MODE, I|N, "Get/set the Composite Sync input detect mode." }, + { "GvoSdiSyncInputDetected", NV_CTRL_GVO_SDI_SYNC_INPUT_DETECTED, I|N, "Indicates whether SDI Sync input is detected, and what type." }, + { "GvoVideoOutputs", NV_CTRL_GVO_VIDEO_OUTPUTS, I|N, "Indicates which GVO video output connectors are currently transmitting data." }, + { "GvoSyncDelayPixels", NV_CTRL_GVO_SYNC_DELAY_PIXELS, I, "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, I, "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, I|N, "Forces input detection to reacquire the input format." }, + { "GvoGlxLocked", NV_CTRL_GVO_GLX_LOCKED, I|N, "Indicates that GVO configuration is locked by GLX; this occurs when the GLX_NV_video_out function calls glXGetVideoDeviceNV(). All GVO output resources are locked until either glXReleaseVideoDeviceNV() is called or the X Display used when calling glXGetVideoDeviceNV() is closed." }, + { "GvoXScreenPanX", NV_CTRL_GVO_X_SCREEN_PAN_X, I, "When GVO output of the X screen is enabled, the pan x/y attributes control which portion of the X screen is displayed by GVO. These attributes can be updated while GVO output is enabled, or before enabling GVO output. The pan values will be clamped so that GVO output is not panned beyond the end of the X screen." }, + { "GvoXScreenPanY", NV_CTRL_GVO_X_SCREEN_PAN_Y, I, "When GVO output of the X screen is enabled, the pan x/y attributes control which portion of the X screen is displayed by GVO. These attributes can be updated while GVO output is enabled, or before enabling GVO output. The pan values will be clamped so that GVO output is not panned beyond the end of the X screen." }, + { "GvoOverrideHwCsc", NV_CTRL_GVO_OVERRIDE_HW_CSC, I, "Override the SDI hardware's Color Space Conversion with the values controlled through XNVCTRLSetGvoColorConversion() and XNVCTRLGetGvoColorConversion()." }, + { "GvoCapabilities", NV_CTRL_GVO_CAPABILITIES, I|N, "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, I, "Enable or disable 75 ohm termination of the SDI composite input signal." }, + { "GvoFlipQueueSize", NV_CTRL_GVO_FLIP_QUEUE_SIZE, I, "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, I|N, "Indicates that the GVO device is available or in use (by GLX, Clone Mode, TwinView etc.)" }, + { "GvoOutputVideoLocked", NV_CTRL_GVO_OUTPUT_VIDEO_LOCKED, I|N, "Returns whether or not the GVO output video is locked to the GPU output signal." }, + { "GvoSyncLockStatus", NV_CTRL_GVO_SYNC_LOCK_STATUS, I|N, "Returns whether or not the GVO device is locked to the input reference signal." }, + { "GvoANCTimeCodeGeneration", NV_CTRL_GVO_ANC_TIME_CODE_GENERATION, I, "Controls whether the GVO device generates time codes in the ANC region of the SDI video output stream." }, + { "GvoComposite", NV_CTRL_GVO_COMPOSITE, I, "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, I, "When SDI compositing is enabled, this enables/disables alpha blending." }, + { "GvoCompositeNumKeyRanges", NV_CTRL_GVO_COMPOSITE_NUM_KEY_RANGES, I|N, "Returns the number of ranges available for each channel (Y/Luma, Cr, and Cb) that are used SDI compositing through color keying." }, + { "GvoFirmwareVersion", NV_CTRL_STRING_GVO_FIRMWARE_VERSION, I|S|N, "Indicates the version of the firmware on the GVO device." }, + { "GvoSyncToDisplay", NV_CTRL_GVO_SYNC_TO_DISPLAY, I|N, "Controls synchronization of the non-SDI display to the SDI display when both are active." }, + { "IsGvoDisplay", NV_CTRL_IS_GVO_DISPLAY, N|D, "Returns whether or not the given display device is driven by the GVO device." }, + + /* Display */ + { "Brightness", BRIGHTNESS_VALUE|ALL_CHANNELS, N|C|G, "Controls the overall brightness of the display." }, + { "RedBrightness", BRIGHTNESS_VALUE|RED_CHANNEL, C|G, "Controls the brightness of the color red in the display." }, + { "GreenBrightness", BRIGHTNESS_VALUE|GREEN_CHANNEL, C|G, "Controls the brightness of the color green in the display." }, + { "BlueBrightness", BRIGHTNESS_VALUE|BLUE_CHANNEL, C|G, "Controls the brightness of the color blue in the display." }, + { "Contrast", CONTRAST_VALUE|ALL_CHANNELS, N|C|G, "Controls the overall contrast of the display." }, + { "RedContrast", CONTRAST_VALUE|RED_CHANNEL, C|G, "Controls the contrast of the color red in the display." }, + { "GreenContrast", CONTRAST_VALUE|GREEN_CHANNEL, C|G, "Controls the contrast of the color green in the display." }, + { "BlueContrast", CONTRAST_VALUE|BLUE_CHANNEL, C|G, "Controls the contrast of the color blue in the display." }, + { "Gamma", GAMMA_VALUE|ALL_CHANNELS, N|C|G, "Controls the overall gamma of the display." }, + { "RedGamma", GAMMA_VALUE|RED_CHANNEL, C|G, "Controls the gamma of the color red in the display." }, + { "GreenGamma", GAMMA_VALUE|GREEN_CHANNEL, C|G, "Controls the gamma of the color green in the display." }, + { "BlueGamma", GAMMA_VALUE|BLUE_CHANNEL, C|G, "Controls the gamma of the color blue in the display." }, + { "FlatpanelDithering", NV_CTRL_FLATPANEL_DITHERING, 0, "This is the current state of flat panel dithering. (This attribute has been deprecated.)" }, + { "DigitalVibrance", NV_CTRL_DIGITAL_VIBRANCE, 0, "Sets the digital vibrance level of the display device." }, + { "ImageSharpening", NV_CTRL_IMAGE_SHARPENING, 0, "Adjusts the sharpness of the display's image quality by amplifying high frequency content. Valid values will normally be in the range [0,32). Only available on GeForceFX or newer." }, + { "FrontendResolution", NV_CTRL_FRONTEND_RESOLUTION, N|P, "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, N|P, "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, N|P, "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, N|P, "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, N, "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, P, "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." }, + { "GPUScalingActive", NV_CTRL_GPU_SCALING_ACTIVE, N, "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, N|H, "Returns the refresh rate of the specified display device in cHz (Centihertz) (i.e. to get the refresh rate in Hz, divide the returned value by 100.)" }, + { "RefreshRate3", NV_CTRL_REFRESH_RATE_3, N|K, "Returns the refresh rate of the specified display device in mHz (Millihertz) (i.e. to get the refresh rate in Hz, divide the returned value by 1000.)" }, + + /* TV */ + { "TVOverScan", NV_CTRL_TV_OVERSCAN, 0, "Adjusts the amount of overscan on the specified display device." }, + { "TVFlickerFilter", NV_CTRL_TV_FLICKER_FILTER, 0, "Adjusts the amount of flicker filter on the specified display device." }, + { "TVBrightness", NV_CTRL_TV_BRIGHTNESS, 0, "Adjusts the amount of brightness on the specified display device." }, + { "TVHue", NV_CTRL_TV_HUE, 0, "Adjusts the amount of hue on the specified display device." }, + { "TVContrast", NV_CTRL_TV_CONTRAST, 0, "Adjusts the amount of contrast on the specified display device." }, + { "TVSaturation", NV_CTRL_TV_SATURATION, 0, "Adjusts the amount of saturation on the specified display device." }, + + /* X Video */ + { "XVideoOverlaySaturation", NV_CTRL_ATTR_XV_OVERLAY_SATURATION, V, "Controls the amount of saturation in the X video overlay." }, + { "XVideoOverlayContrast", NV_CTRL_ATTR_XV_OVERLAY_CONTRAST, V, "Controls the amount of contrast in the X video overlay." }, + { "XVideoOverlayBrightness", NV_CTRL_ATTR_XV_OVERLAY_BRIGHTNESS, V, "Controls the amount of brightness in the X video overlay." }, + { "XVideoOverlayHue", NV_CTRL_ATTR_XV_OVERLAY_HUE, V, "Controls the amount of hue in the X video overlay." }, + { "XVideoTextureBrightness", NV_CTRL_ATTR_XV_TEXTURE_BRIGHTNESS, V, "Controls the amount of brightness in the X video texture adaptor." }, + { "XVideoTextureContrast", NV_CTRL_ATTR_XV_TEXTURE_CONTRAST, V, "Controls the amount of contrast in the X video texture adaptor." }, + { "XVideoTextureHue", NV_CTRL_ATTR_XV_TEXTURE_HUE, V, "Controls the amount of hue in the X video texture adaptor." }, + { "XVideoTextureSaturation", NV_CTRL_ATTR_XV_TEXTURE_SATURATION, V, "Controls the amount of saturation in the X video texture adaptor." }, + + { "XVideoTextureSyncToVBlank", NV_CTRL_ATTR_XV_TEXTURE_SYNC_TO_VBLANK, V, "Enables sync to vertical blanking for X video texture adaptor." }, + { "XVideoBlitterSyncToVBlank", NV_CTRL_ATTR_XV_BLITTER_SYNC_TO_VBLANK, V, "Enables sync to vertical blanking for X video blitter adaptor." }, + { "XVideoSyncToDisplay", NV_CTRL_XV_SYNC_TO_DISPLAY, D|Z, "Controls which display device is synced to by the texture and blitter adaptors when they are set to synchronize to the vertical blanking." }, + + { NULL, 0, 0, NULL } }; #undef F @@ -264,7 +283,7 @@ AttributeTableEntry attributeTable[] = { * about. */ -#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_GVO_SYNC_TO_DISPLAY +#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_IS_GVO_DISPLAY #warning "Have you forgotten to add a new integer attribute to attributeTable?" #endif @@ -1336,6 +1355,26 @@ static int count_number_of_chars(char *o, char d) /* + * count_number_of_bits() - return the number of bits set + * in the int. + */ + +int count_number_of_bits(unsigned int mask) +{ + int count = 0; + + while (mask) { + count++; + mask &= (mask-1); + } + + return count; + +} /* count_number_of_bits() */ + + + +/* * nv_strndup() - this function takes a pointer to a string and a * length n, mallocs a new string of n+1, copies the first n chars * from the original string into the new, and null terminates the new |