multi-session-with-isolateDevice.patch revision 1415
1415N/Adiff --git a/config/hal.c.orig b/config/hal.c
1415N/Aindex 24d4ca6..66abdd0 100644
1415N/A--- a/config/hal.c.orig
1415N/A+++ b/config/hal.c
1415N/A@@ -1,7 +1,7 @@
1415N/A /*
1415N/A * Copyright © 2007 Daniel Stone
1415N/A * Copyright © 2007 Red Hat, Inc.
1415N/A- * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
1415N/A+ * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All Rights Reserved.
1415N/A *
1415N/A * Permission is hereby granted, free of charge, to any person obtaining a
1415N/A * copy of this software and associated documentation files (the "Software"),
1415N/A@@ -151,7 +151,7 @@ Bool check_inactive_session(char const *path) {
1415N/A char *ptr;
1415N/A char disppath[PATH_MAX];
1415N/A
1415N/A- if ((num_session_disp_dev == num_total_disp_dev) || !disp_dev_path[0])
1415N/A+ if (((num_session_disp_dev & 0xFF) == num_total_disp_dev) || !disp_dev_path[0])
1415N/A return FALSE;
1415N/A
1415N/A if (lstat(path, &statbuf) == 0 &&
1415N/A@@ -533,7 +533,7 @@ device_added(LibHalContext * hal_ctx, const char *udi)
1415N/A }
1415N/A
1415N/A #if ((defined(__sparc__) || defined(__sparc)) && defined(SUNSOFT))
1415N/A- if ((num_session_disp_dev < num_total_disp_dev) &&
1415N/A+ if ((num_session_disp_dev < (num_total_disp_dev & 0x0FF)) &&
1415N/A (!strcmp(name, "keyboard") || !strcmp(name, "mouse"))) {
1415N/A int i;
1415N/A
1415N/Adiff --git a/hw/xfree86/common/xf86AutoConfig.c.orig b/hw/xfree86/common/xf86AutoConfig.c
1415N/Aindex ebf93cf..2f97e37 100644
1415N/A--- a/hw/xfree86/common/xf86AutoConfig.c.orig
1415N/A+++ b/hw/xfree86/common/xf86AutoConfig.c
1415N/A@@ -1,7 +1,7 @@
1415N/A /*
1415N/A * Copyright 2003 by David H. Dawes.
1415N/A * Copyright 2003 by X-Oz Technologies.
1415N/A- * Copyright (c) 2013 Oracle and/or its affiliates.
1415N/A+ * Copyright (c) 2013, 2014 Oracle and/or its affiliates.
1415N/A * All rights reserved.
1415N/A *
1415N/A * Permission is hereby granted, free of charge, to any person obtaining a
1415N/A@@ -51,6 +51,7 @@
1415N/A #include <ctype.h>
1415N/A #if (defined(__sparc__) || defined(__sparc))
1415N/A static Bool MultiSessionConfig (void);
1415N/A+extern int num_total_disp_dev;
1415N/A #endif
1415N/A #endif
1415N/A
1415N/A@@ -173,7 +174,8 @@ xf86AutoConfig(void)
1415N/A ConfigStatus ret;
1415N/A
1415N/A #if ((defined(__sparc__) || defined(__sparc)) && defined (sun))
1415N/A- if (!MultiSessionConfig()) {
1415N/A+ /* Do not do MultiSessionConfig() when invoked with -isolateDevice option */
1415N/A+ if ((num_total_disp_dev & 0x1000)|| !MultiSessionConfig()) {
1415N/A #endif
1415N/A
1415N/A listPossibleVideoDrivers(deviceList, 20);
1415N/Adiff --git a/hw/xfree86/common/xf86Xinput.c.orig b/hw/xfree86/common/xf86Xinput.c
1415N/Aindex b60166c..c7d771b 100644
1415N/A--- a/hw/xfree86/common/xf86Xinput.c.orig
1415N/A+++ b/hw/xfree86/common/xf86Xinput.c
1415N/A@@ -46,7 +46,7 @@
1415N/A * authorization from the copyright holder(s) and author(s).
1415N/A */
1415N/A /*
1415N/A- * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
1415N/A+ * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All Rights Reserved.
1415N/A */
1415N/A
1415N/A #ifdef HAVE_XORG_CONFIG_H
1415N/A@@ -1446,7 +1446,7 @@ xf86DisableDevice(DeviceIntPtr dev, Bool panic)
1415N/A }
1415N/A
1415N/A #if ((defined(__sparc__) || defined(__sparc)) && defined(sun))
1415N/A- if (num_session_disp_dev < num_total_disp_dev) {
1415N/A+ if (num_session_disp_dev < (num_total_disp_dev & 0x0FFF)) {
1415N/A int i;
1415N/A
1415N/A for (i = 0; i < MAX_DEVICES; i++) {
1415N/Adiff --git a/hw/xfree86/common/xf86pciBus.c.old b/hw/xfree86/common/xf86pciBus.c
1415N/Aindex e1fb321..745b04e 100644
1415N/A--- a/hw/xfree86/common/xf86pciBus.c.old
1415N/A+++ b/hw/xfree86/common/xf86pciBus.c
1415N/A@@ -1,6 +1,6 @@
1415N/A /*
1415N/A * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
1415N/A- * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
1415N/A+ * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All Rights Reserved.
1415N/A *
1415N/A * Permission is hereby granted, free of charge, to any person obtaining a
1415N/A * copy of this software and associated documentation files (the "Software"),
1415N/A@@ -131,6 +131,27 @@ xf86PciProbe(void)
1415N/A }
1415N/A free(iter);
1415N/A
1415N/A+#if ((defined(__sparc__) || defined(__sparc)) && defined (sun))
1415N/A+ /*
1415N/A+ * num_total_disp_dev does not reflect accurate number of display
1415N/A+ * device when xf86IsolateDevice is set, redo it.
1415N/A+ */
1415N/A+ if (xf86IsolateDevice.domain != PCI_MATCH_ANY) {
1415N/A+ num_total_disp_dev = 0x1000;
1415N/A+
1415N/A+ iter = pci_slot_match_iterator_create (NULL);
1415N/A+ while ((info = pci_device_next(iter)) != NULL) {
1415N/A+ if (PCIINFOCLASSES(info->device_class)) {
1415N/A+ pci_device_probe(info);
1415N/A+
1415N/A+ if (IS_VGA(info->device_class))
1415N/A+ num_total_disp_dev++;
1415N/A+ }
1415N/A+ }
1415N/A+ }
1415N/A+ free(iter);
1415N/A+#endif
1415N/A+
1415N/A /* If we haven't found a primary device try a different heuristic */
1415N/A if (primaryBus.type == BUS_NONE && num) {
1415N/A for (i = 0; i < num; i++) {