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