summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2013-11-06 08:29:44 -0800
committerAaron Plattner <aplattner@nvidia.com>2013-11-06 08:29:44 -0800
commitcdee886d3b6998f22e203d5654df89543ab73b93 (patch)
treee5cc3a407f35b10986833559920a8664d364d7b4
parent3bd4691de8cdea4060b1c58a3bbd9c208e761061 (diff)
331.20331.20
-rw-r--r--doc/nvidia-settings.1.m42
-rw-r--r--doc/version.mk2
-rw-r--r--samples/version.mk2
-rw-r--r--src/command-line.c4
-rw-r--r--src/common-utils/common-utils.h5
-rw-r--r--src/msg.c20
-rw-r--r--src/msg.h1
-rw-r--r--src/option-table.h11
-rw-r--r--src/parse.c18
-rw-r--r--src/query-assign.c13
-rw-r--r--src/version.mk2
-rw-r--r--version.mk2
12 files changed, 58 insertions, 24 deletions
diff --git a/doc/nvidia-settings.1.m4 b/doc/nvidia-settings.1.m4
index 3a3e4da..9dc44a2 100644
--- a/doc/nvidia-settings.1.m4
+++ b/doc/nvidia-settings.1.m4
@@ -27,7 +27,7 @@ nvidia\-settings \- configure the NVIDIA graphics driver
Options:
.BI "[\-vh] [\-\-config=" configfile "] [\-c " ctrl-display "]"
.br
-.I " \fB[\-\-verbose=\fP{\fIerrors \fP|\fI warnings \fP|\fI all\fP}\fB]"
+.I " \fB[\-\-verbose=\fP{\fInone \fP|\fI errors \fP|\fI deprecations \fP|\fI warnings \fP|\fI all\fP}\fB]"
.br
.I " \fB[\-\-describe=\fP{\fIall \fP|\fI list \fP|\fI attribute_name\fP}\fB]"
.PP
diff --git a/doc/version.mk b/doc/version.mk
index a04ff36..0d4860a 100644
--- a/doc/version.mk
+++ b/doc/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 331.17
+NVIDIA_VERSION = 331.20
diff --git a/samples/version.mk b/samples/version.mk
index a04ff36..0d4860a 100644
--- a/samples/version.mk
+++ b/samples/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 331.17
+NVIDIA_VERSION = 331.20
diff --git a/src/command-line.c b/src/command-line.c
index d884617..06db883 100644
--- a/src/command-line.c
+++ b/src/command-line.c
@@ -45,7 +45,7 @@ static void print_help(void);
* information (used by msg.c).
*/
-int __verbosity = VERBOSITY_DEFAULT;
+int __verbosity = VERBOSITY_DEPRECATED;
int __terse = NV_FALSE;
int __display_device_string = NV_FALSE;
int __verbosity_level_changed = NV_FALSE;
@@ -238,6 +238,8 @@ Options *parse_command_line(int argc, char *argv[], char *dpy,
__verbosity = VERBOSITY_NONE;
} else if (nv_strcasecmp(strval, "errors") == NV_TRUE) {
__verbosity = VERBOSITY_ERROR;
+ } else if (nv_strcasecmp(strval, "deprecations") == NV_TRUE) {
+ __verbosity = VERBOSITY_DEPRECATED;
} else if (nv_strcasecmp(strval, "warnings") == NV_TRUE) {
__verbosity = VERBOSITY_WARNING;
} else if (nv_strcasecmp(strval, "all") == NV_TRUE) {
diff --git a/src/common-utils/common-utils.h b/src/common-utils/common-utils.h
index 3bc934f..e9d505e 100644
--- a/src/common-utils/common-utils.h
+++ b/src/common-utils/common-utils.h
@@ -40,8 +40,9 @@
#define VERBOSITY_NONE 0 /* nothing */
#define VERBOSITY_ERROR 1 /* errors only */
-#define VERBOSITY_WARNING 2 /* errors and warnings */
-#define VERBOSITY_ALL 3 /* errors, warnings and other info */
+#define VERBOSITY_DEPRECATED 2 /* errors, deprecation messages and warnings */
+#define VERBOSITY_WARNING 3 /* errors and warnings */
+#define VERBOSITY_ALL 4 /* errors, warnings and other info */
#define VERBOSITY_DEFAULT VERBOSITY_ERROR
diff --git a/src/msg.c b/src/msg.c
index 8c3798d..7887daa 100644
--- a/src/msg.c
+++ b/src/msg.c
@@ -69,6 +69,26 @@ void nv_error_msg(const char *fmt, ...)
/*
+ * nv_deprecated_msg() - print a deprecation message, nicely formatted using
+ * the format() function.
+ *
+ * This function should be used for all deprecation messages.
+ */
+
+void nv_deprecated_msg(const char *fmt, ...)
+{
+ if (__verbosity < VERBOSITY_DEPRECATED) return;
+
+ fprintf(stderr, "\n");
+
+ NV_FORMAT(stderr, "DEPRECATED: ", fmt, False);
+
+ fprintf(stderr, "\n");
+}
+
+
+
+/*
* nv_warning_msg() - print a warning message, nicely formatted using
* the format() function.
*
diff --git a/src/msg.h b/src/msg.h
index d580775..9be5ab2 100644
--- a/src/msg.h
+++ b/src/msg.h
@@ -26,6 +26,7 @@
#include "common-utils.h"
void nv_error_msg(const char*, ...) NV_ATTRIBUTE_PRINTF(1, 2);
+void nv_deprecated_msg(const char*, ...) NV_ATTRIBUTE_PRINTF(1, 2);
void nv_warning_msg(const char*, ...) NV_ATTRIBUTE_PRINTF(1, 2);
void nv_info_msg(const char*, const char*, ...) NV_ATTRIBUTE_PRINTF(2, 3);
void nv_msg(const char*, const char*, ...) NV_ATTRIBUTE_PRINTF(2, 3);
diff --git a/src/option-table.h b/src/option-table.h
index 403f19c..02c7ee6 100644
--- a/src/option-table.h
+++ b/src/option-table.h
@@ -68,11 +68,12 @@ static const NVGetoptOption __options[] = {
{ "verbose", 'V',
NVGETOPT_STRING_ARGUMENT | NVGETOPT_ARGUMENT_IS_OPTIONAL |
NVGETOPT_HELP_ALWAYS, NULL,
- "Controls how much information is printed. By default, the verbosity "
- "is ^errors^ and only error messages are printed. Valid values are "
- "^'none'^ (do not print messages), ^'errors'^ (print error messages), "
- "^'warnings'^ (print error and warning messages), and "
- "^'all'^ (print error, warning and other informational messages)." },
+ "Controls how much information is printed. Valid values are ^'none'^ "
+ "(do not print status messages), ^'errors'^ (print error messages), "
+ "^'deprecations'^ (print error and deprecation messages), ^'warnings'^ "
+ "(print error, deprecation, and warning messages), and ^'all'^ (print "
+ "error, deprecation, warning and other informational messages). By "
+ "default, ^'deprecations'^ is set." },
{ "assign", 'a', NVGETOPT_STRING_ARGUMENT | NVGETOPT_HELP_ALWAYS, NULL,
"The &ASSIGN& argument to the ^'--assign'^ command line option is of the "
diff --git a/src/parse.c b/src/parse.c
index 7aa50b1..6dc9b4b 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -87,10 +87,10 @@ const AttributeTableEntry attributeTable[] = {
{ "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." },
- { "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|D, "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." },
+ { "ConnectedDisplays", NV_CTRL_CONNECTED_DISPLAYS, D, "DEPRECATED: use \"-q dpys\" instead." },
+ { "EnabledDisplays", NV_CTRL_ENABLED_DISPLAYS, D, "DEPRECATED: use \"-q dpys\" instead." },
+ { "AssociatedDisplays", NV_CTRL_ASSOCIATED_DISPLAY_DEVICES, N|D, "DEPRECATED: use \"-q xscreens -V all\" instead." },
+ { "ProbeDisplays", NV_CTRL_PROBE_DISPLAYS, A|D, "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, N, "Controls where X pixmaps are initially created." },
{ "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." },
@@ -98,7 +98,7 @@ const AttributeTableEntry attributeTable[] = {
{ "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." },
+ { "NotebookInternalLCD", NV_CTRL_NOTEBOOK_INTERNAL_LCD, N|D, "DEPRECATED." },
{ "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." },
{ "XServerUniqueId", NV_CTRL_X_SERVER_UNIQUE_ID, N, "Returns a pseudo-unique identification number for the X server." },
@@ -193,7 +193,7 @@ const AttributeTableEntry attributeTable[] = {
/* 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." },
+ { "FrameLockMaster", NV_CTRL_FRAMELOCK_MASTER, N|F|G|D, "DEPRECATED: use \"FrameLockDisplayConfig\" instead." },
{ "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." },
@@ -209,9 +209,9 @@ const AttributeTableEntry attributeTable[] = {
{ "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|D, "Returns whether the display device(s) can be set as the master of the frame lock group. Returns a bitmask indicating which of the given display devices can be set as a frame lock master." },
- { "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." },
+ { "FrameLockSlaves", NV_CTRL_FRAMELOCK_SLAVES, N|F|G|D, "DEPRECATED: use \"FrameLockDisplayConfig\" instead." },
+ { "FrameLockMasterable", NV_CTRL_FRAMELOCK_MASTERABLE, N|F|G|D, "DEPRECATED: use \"FrameLockDisplayConfig\" instead." },
+ { "FrameLockSlaveable", NV_CTRL_FRAMELOCK_SLAVEABLE, N|F|G|D, "DEPRECATED: use \"FrameLockDisplayConfig\" instead." },
{ "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)." },
{ "FrameLockSyncDelayResolution", NV_CTRL_FRAMELOCK_SYNC_DELAY_RESOLUTION, N|F|G, "Returns the number of nanoseconds that one unit of FrameLockSyncDelay corresponds to." },
diff --git a/src/query-assign.c b/src/query-assign.c
index 4bee53f..ea25bae 100644
--- a/src/query-assign.c
+++ b/src/query-assign.c
@@ -1410,7 +1410,8 @@ Bool nv_get_attribute_perms(CtrlHandles *h, int attr, uint32 flags,
* error codes that detail the particular parsing error.
*/
-static int resolve_attribute_targets(ParsedAttribute *a, CtrlHandles *h)
+static int resolve_attribute_targets(ParsedAttribute *a, CtrlHandles *h,
+ const char *whence)
{
NVCTRLAttributePermissionsRec perms;
Bool status;
@@ -1510,6 +1511,14 @@ static int resolve_attribute_targets(ParsedAttribute *a, CtrlHandles *h)
if (a->flags & NV_PARSER_HAS_DISPLAY_DEVICE) {
display_mask =
expand_display_device_mask_wildcards(a->display_device_mask);
+
+ /* Warn that this usage is deprecated */
+
+ nv_warning_msg("Display mask usage as specified %s has been "
+ "deprecated and will be removed in the future."
+ "Please use display names and/or display target "
+ "specification instead.",
+ whence);
} else {
display_mask = VALID_DISPLAY_DEVICES_MASK;
}
@@ -2919,7 +2928,7 @@ int nv_process_parsed_attribute(ParsedAttribute *a, CtrlHandles *h,
* allocated.
*/
- ret = resolve_attribute_targets(a, h);
+ ret = resolve_attribute_targets(a, h, whence);
if (ret != NV_PARSER_STATUS_SUCCESS) {
nv_error_msg("Error resolving target specification '%s' "
"(%s), specified %s.",
diff --git a/src/version.mk b/src/version.mk
index a04ff36..0d4860a 100644
--- a/src/version.mk
+++ b/src/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 331.17
+NVIDIA_VERSION = 331.20
diff --git a/version.mk b/version.mk
index a04ff36..0d4860a 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 331.17
+NVIDIA_VERSION = 331.20