6721634.patch revision 943
98N/A# Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
98N/A#
98N/A# Permission is hereby granted, free of charge, to any person obtaining a
98N/A# copy of this software and associated documentation files (the "Software"),
371N/A# to deal in the Software without restriction, including without limitation
98N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
98N/A# and/or sell copies of the Software, and to permit persons to whom the
98N/A# Software is furnished to do so, subject to the following conditions:
98N/A#
98N/A# The above copyright notice and this permission notice (including the next
98N/A# paragraph) shall be included in all copies or substantial portions of the
98N/A# Software.
98N/A#
98N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
98N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
98N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
98N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
98N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
98N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
98N/A# DEALINGS IN THE SOFTWARE.
98N/Adiff -urp -x '*~' -x '*.orig' hw/xfree86/common/xf86AutoConfig.c hw/xfree86/common/xf86AutoConfig.c
98N/A--- hw/xfree86/common/xf86AutoConfig.c 2009-10-08 21:08:28.000000000 -0700
98N/A+++ hw/xfree86/common/xf86AutoConfig.c 2009-11-03 22:29:14.137406985 -0800
98N/A@@ -59,6 +59,18 @@
98N/A "\tIdentifier\t" BUILTIN_DEVICE_NAME "\n" \
98N/A "\tDriver\t\"%s\"\n"
98N/A
98N/A+#ifdef sun
98N/A+/*
98N/A+ * Allow setting an arbitrary number of options.
98N/A+ * Each option should be indented with a tab and newline terminated.
98N/A+ */
493N/A+#define BUILTIN_DEVICE_SECTION_PRE_OPT \
98N/A+ "Section \"Device\"\n" \
98N/A+ "\tIdentifier\t" BUILTIN_DEVICE_NAME "\n" \
98N/A+ "\tDriver\t\"%s\"\n" \
493N/A+ "%s"
98N/A+#endif
98N/A+
493N/A #define BUILTIN_DEVICE_SECTION_POST \
98N/A "EndSection\n\n"
98N/A
98N/A@@ -66,6 +78,13 @@
98N/A BUILTIN_DEVICE_SECTION_PRE \
98N/A BUILTIN_DEVICE_SECTION_POST
98N/A
493N/A+#ifdef sun
493N/A+/* Device section with options */
98N/A+#define BUILTIN_DEVICE_SECTION_OPT \
98N/A+ BUILTIN_DEVICE_SECTION_PRE_OPT \
+ BUILTIN_DEVICE_SECTION_POST
+#endif
+
#define BUILTIN_SCREEN_NAME \
"\"Builtin Default %s Screen %d\""
@@ -247,6 +266,14 @@ xf86AutoConfig(void)
listPossibleVideoDrivers(deviceList, 20);
for (p = deviceList; *p; p++) {
+#ifdef sun
+ const char *nvidia_string = "nvidia";
+ const char *nvidia_opt_no_logo = "\tOption \"NoLogo\" \"True\"\n";
+ if (!strncmp(*p, nvidia_string, sizeof(nvidia_string)))
+ snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION_OPT,
+ *p, 0, *p, nvidia_opt_no_logo);
+ else
+#endif
snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION, *p, 0, *p);
AppendToConfig(buf);
snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION, *p, 0, *p, 0);