|
|
47f74b |
From ffce7eb36404a96b860586d79f50dac820700e51 Mon Sep 17 00:00:00 2001
|
|
|
47f74b |
From: Adam Jackson <ajax@redhat.com>
|
|
|
47f74b |
Date: Tue, 29 Sep 2015 13:24:31 -0400
|
|
|
47f74b |
Subject: [PATCH] modesetting: Claim PCI devices as PCI not platform
|
|
|
47f74b |
|
|
|
47f74b |
The X -configure code is hideously bad, and the platform bus path in it
|
|
|
47f74b |
doesn't claim devices the same way the PCI path does, nDevToConfig is never
|
|
|
47f74b |
incremented so nothing looks configurable. For most devices we can work
|
|
|
47f74b |
around this by claiming the device as PCI not as platform, since both will
|
|
|
47f74b |
be scanned.
|
|
|
47f74b |
|
|
|
47f74b |
This probably doesn't fix X -configure on non-PCI devices with this driver,
|
|
|
47f74b |
but those are pretty rare in comparison. A proper fix would involve
|
|
|
47f74b |
rewriting the autoconfig code to be comprehensible, which is too invasive
|
|
|
47f74b |
to consider doing downstream.
|
|
|
47f74b |
|
|
|
47f74b |
---
|
|
|
47f74b |
hw/xfree86/drivers/modesetting/driver.c | 5 +++++
|
|
|
47f74b |
1 file changed, 5 insertions(+)
|
|
|
47f74b |
|
|
|
47f74b |
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
|
|
|
47f74b |
index b0c2f17..4989069 100644
|
|
|
47f74b |
--- a/hw/xfree86/drivers/modesetting/driver.c
|
|
|
47f74b |
+++ b/hw/xfree86/drivers/modesetting/driver.c
|
|
|
47f74b |
@@ -370,6 +370,11 @@ ms_platform_probe(DriverPtr driver,
|
|
|
47f74b |
const char *path = xf86_platform_device_odev_attributes(dev)->path;
|
|
|
47f74b |
int scr_flags = 0;
|
|
|
47f74b |
|
|
|
47f74b |
+ if (dev->pdev) {
|
|
|
47f74b |
+ /* claim pci devices later, not here */
|
|
|
47f74b |
+ return FALSE;
|
|
|
47f74b |
+ }
|
|
|
47f74b |
+
|
|
|
47f74b |
if (flags & PLATFORM_PROBE_GPU_SCREEN)
|
|
|
47f74b |
scr_flags = XF86_ALLOCATE_GPU_SCREEN;
|
|
|
47f74b |
|
|
|
47f74b |
--
|
|
|
47f74b |
2.4.3
|
|
|
47f74b |
|