1376N/A# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
1376N/A#
1376N/A# Permission is hereby granted, free of charge, to any person obtaining a
1376N/A# copy of this software and associated documentation files (the "Software"),
1376N/A# to deal in the Software without restriction, including without limitation
1376N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
1376N/A# and/or sell copies of the Software, and to permit persons to whom the
1376N/A# Software is furnished to do so, subject to the following conditions:
1376N/A#
1376N/A# The above copyright notice and this permission notice (including the next
1376N/A# paragraph) shall be included in all copies or substantial portions of the
1376N/A# Software.
1376N/A#
1376N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1376N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1376N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1376N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1376N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1376N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1376N/A# DEALINGS IN THE SOFTWARE.
1376N/A17465391: SPARC/autoconfig: kernel driver based probing is redundancy, need to remove
1376N/A
1376N/Adiff --git a/xf86pciBus.c b/xf86pciBus.c
1376N/Aindex 258988a..bfe8151 100644
1376N/A--- a/hw/xfree86/common/xf86pciBus.c
1376N/A+++ b/hw/xfree86/common/xf86pciBus.c
1376N/A@@ -1132,7 +1132,11 @@ xf86VideoPtrToDriverList(struct pci_device *dev,
1376N/A driverList[0] = "ast";
1376N/A break;
1376N/A case 0x1002:
1376N/A+ #if ((defined(__sparc__) || defined(__sparc)) && defined (sun))
1376N/A+ driverList[0] = "efb";
1376N/A+ #else
1376N/A driverList[0] = "ati";
1376N/A+ #endif
1376N/A break;
1376N/A case 0x102c:
1376N/A driverList[0] = "chips";
1376N/A@@ -1219,7 +1223,11 @@ xf86VideoPtrToDriverList(struct pci_device *dev,
1376N/A #ifdef __linux__
1376N/A driverList[idx++] = "nouveau";
1376N/A #endif
1376N/A+#ifdef sun
1376N/A+ driverList[idx++] = "nvidia";
1376N/A+#else
1376N/A driverList[idx++] = "nv";
1376N/A+#endif
1376N/A break;
1376N/A }
1376N/A case 0x1106:
1376N/A
1376N/A
1376N/Adiff --git a/xf86AutoConfig.c b/xf86AutoConfig.c
1376N/Aindex e85a72f..e3367f4 100644
1376N/A--- a/hw/xfree86/common/xf86AutoConfig.c
1376N/A+++ b/hw/xfree86/common/xf86AutoConfig.c
1376N/A@@ -229,58 +229,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
1376N/A #ifdef XSERVER_PLATFORM_BUS
1376N/A i = xf86PlatformMatchDriver(matches, nmatches);
1376N/A #endif
1376N/A-#ifdef sun
1376N/A- /* Check for driver type based on /dev/fb type and if valid, use
1376N/A- it instead of PCI bus probe results */
1376N/A- if (xf86Info.consoleFd >= 0 && (i < (nmatches - 1))) {
1376N/A- struct vis_identifier visid;
1376N/A- const char *cp;
1376N/A- extern char xf86SolarisFbDev[PATH_MAX];
1376N/A- int iret;
1376N/A-
1376N/A- SYSCALL(iret = ioctl(xf86Info.consoleFd, VIS_GETIDENTIFIER, &visid));
1376N/A- if (iret < 0) {
1376N/A- int fbfd;
1376N/A-
1376N/A- fbfd = open(xf86SolarisFbDev, O_RDONLY);
1376N/A- if (fbfd >= 0) {
1376N/A- SYSCALL(iret = ioctl(fbfd, VIS_GETIDENTIFIER, &visid));
1376N/A- close(fbfd);
1376N/A- }
1376N/A- }
1376N/A-
1376N/A- if (iret < 0) {
1376N/A- xf86Msg(X_WARNING,
1376N/A- "could not get frame buffer identifier from %s\n",
1376N/A- xf86SolarisFbDev);
1376N/A- }
1376N/A- else {
1376N/A- xf86Msg(X_PROBED, "console driver: %s\n", visid.name);
1376N/A-
1376N/A- /* Special case from before the general case was set */
1376N/A- if (strcmp(visid.name, "NVDAnvda") == 0) {
1376N/A- matches[i++] = xnfstrdup("nvidia");
1376N/A- }
1376N/A
1376N/A- /* General case - split into vendor name (initial all-caps
1376N/A- prefix) & driver name (rest of the string). */
1376N/A- if (strcmp(visid.name, "SUNWtext") != 0) {
1376N/A- for (cp = visid.name; (*cp != '\0') && isupper(*cp); cp++) {
1376N/A- /* find end of all uppercase vendor section */
1376N/A- }
1376N/A- if ((cp != visid.name) && (*cp != '\0')) {
1376N/A- char *driverName = xnfstrdup(cp);
1376N/A- char *vendorName = xnfstrdup(visid.name);
1376N/A-
1376N/A- vendorName[cp - visid.name] = '\0';
1376N/A-
1376N/A- matches[i++] = vendorName;
1376N/A- matches[i++] = driverName;
1376N/A- }
1376N/A- }
1376N/A- }
1376N/A- }
1376N/A-#endif
1376N/A #ifdef __sparc__
1376N/A if (i < (nmatches - 1))
1376N/A {