open-src/xserver/xorg/autodetect-kernel-dev-fb.patch
changeset 1419 66a69b108f21
parent 1418 536e3ec8f101
child 1420 a66feea9d14c
--- a/open-src/xserver/xorg/autodetect-kernel-dev-fb.patch	Mon Nov 11 14:46:00 2013 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-# Copyright (c) 2010, 2012, 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.
-
---- a/hw/xfree86/common/xf86AutoConfig.c	Wed Sep 12 11:16:47 2012
-+++ b/hw/xfree86/common/xf86AutoConfig.c	Wed Sep 12 11:35:21 2012
-@@ -220,6 +220,12 @@
- listPossibleVideoDrivers(char *matches[], int nmatches)
- {
-     int i;
-+#ifdef sun
-+    int got_vis_id = 0;
-+    struct vis_identifier visid;
-+    int iret;
-+    extern char xf86SolarisFbDev[PATH_MAX];
-+#endif
- 
-     for (i = 0; i < nmatches; i++) {
-         matches[i] = NULL;
-@@ -233,52 +239,50 @@
-     /* 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;
-+        if (iret >= 0)
-+            got_vis_id = 1;
-+    }
-+    if (!got_vis_id) {
-+        int fbfd;
- 
--            fbfd = open(xf86SolarisFbDev, O_RDONLY);
--            if (fbfd >= 0) {
--                SYSCALL(iret = ioctl(fbfd, VIS_GETIDENTIFIER, &visid));
--                close(fbfd);
--            }
-+        fbfd = open(xf86SolarisFbDev, O_RDONLY);
-+        if (fbfd >= 0) {
-+            SYSCALL(iret = ioctl(fbfd, VIS_GETIDENTIFIER, &visid));
-+            if (iret >= 0)
-+                got_vis_id = 1;
-+            close(fbfd);
-         }
-+    }
-+    if (got_vis_id) {
-+        const char *cp;
- 
--        if (iret < 0) {
--            xf86Msg(X_WARNING,
--                    "could not get frame buffer identifier from %s\n",
--                    xf86SolarisFbDev);
-+        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");
-         }
--        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';
- 
--            /* 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;
--                }
-+                 matches[i++] = vendorName;
-+                 matches[i++] = driverName;
-             }
--        }
-+         }
-+      } else {
-+         xf86Msg(X_WARNING,
-+                "could not get frame buffer identifier from %s\n",
-+                xf86SolarisFbDev);
-     }
- #endif
- #ifdef __sparc__