xserver: Branch 'master' - 2 commits
Keith Packard
keithp at kemper.freedesktop.org
Thu Aug 21 18:09:18 PDT 2014
hw/xfree86/common/xf86Bus.c | 3 +++
hw/xfree86/common/xf86platformBus.c | 22 ++++++++++++++++++----
hw/xfree86/common/xf86platformBus.h | 1 +
3 files changed, 22 insertions(+), 4 deletions(-)
New commits:
commit 5d133276de9c50146e80ffc69edd429c2afe98e6
Author: Thierry Reding <treding at nvidia.com>
Date: Thu Feb 13 13:36:12 2014 +0100
xfree86: Allow non-PCI devices as primary
On platforms that don't support PCI or have no GPU attached to the PCI
bus, there can still be a primary device on a non-PCI bus.
Signed-off-by: Thierry Reding <treding at nvidia.com>
Reviewed-by: Rob Clark <robdclark at gmail.com>
Tested-by: Rob Clark <robdclark at gmail.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 1bacc49..5ad9b70 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -435,10 +435,9 @@ xf86platformProbeDev(DriverPtr drvp)
/* for non-seat0 servers assume first device is the master */
if (ServerIsNotSeat0())
break;
- if (xf86_platform_devices[j].pdev) {
- if (xf86IsPrimaryPlatform(&xf86_platform_devices[j]))
- break;
- }
+
+ if (xf86IsPrimaryPlatform(&xf86_platform_devices[j]))
+ break;
}
}
commit 2f0183222b4279266e6ef60b923738ff55f0afba
Author: Thierry Reding <treding at nvidia.com>
Date: Thu Feb 13 13:31:31 2014 +0100
xfree86: Fallback to first platform device as primary
When neither of the various bus implementations was able to find a
primary bus and device, fallback to using the platform bus as primary
bus and the first platform device as primary device.
Signed-off-by: Thierry Reding <treding at nvidia.com>
Reviewed-by: Rob Clark <robdclark at gmail.com>
Tested-by: Rob Clark <robdclark at gmail.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index b3b3f8c..bd3e4e3 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -210,6 +210,9 @@ xf86BusProbe(void)
#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
xf86SbusProbe();
#endif
+#ifdef XSERVER_PLATFORM_BUS
+ xf86platformPrimary();
+#endif
}
/*
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 9460399..1bacc49 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -594,4 +594,19 @@ void xf86platformVTProbe(void)
xf86PlatformReprobeDevice(i, xf86_platform_devices[i].attribs);
}
}
+
+void xf86platformPrimary(void)
+{
+ /* use the first platform device as a fallback */
+ if (primaryBus.type == BUS_NONE) {
+ xf86Msg(X_INFO, "no primary bus or device found\n");
+
+ if (xf86_num_platform_devices > 0) {
+ primaryBus.id.plat = &xf86_platform_devices[0];
+ primaryBus.type = BUS_PLATFORM;
+
+ xf86Msg(X_NONE, "\tfalling back to %s\n", primaryBus.id.plat->attribs->syspath);
+ }
+ }
+}
#endif
diff --git a/hw/xfree86/common/xf86platformBus.h b/hw/xfree86/common/xf86platformBus.h
index 317dd24..a7335b9 100644
--- a/hw/xfree86/common/xf86platformBus.h
+++ b/hw/xfree86/common/xf86platformBus.h
@@ -155,6 +155,7 @@ extern _X_EXPORT int
xf86PlatformMatchDriver(char *matches[], int nmatches);
extern void xf86platformVTProbe(void);
+extern void xf86platformPrimary(void);
#endif
#endif
More information about the xorg-commit
mailing list