[PATCH 13/21] drm/nouveau/nvkm: move pci probe() defer from drm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 



Signed-off-by: Ben Skeggs <bskeggs@xxxxxxxxxx>
---
 drivers/gpu/drm/nouveau/nouveau_drm.c     | 3 ---
 drivers/gpu/drm/nouveau/nvkm/device/pci.c | 5 +++++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 632635c16b88..3f1f93fa7029 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -795,9 +795,6 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
 	struct nouveau_drm *drm;
 	int ret;
 
-	if (vga_switcheroo_client_probe_defer(pdev))
-		return -EPROBE_DEFER;
-
 	/* We need to check that the chipset is supported before booting
 	 * fbdev off the hardware, as there's no way to put it back.
 	 */
diff --git a/drivers/gpu/drm/nouveau/nvkm/device/pci.c b/drivers/gpu/drm/nouveau/nvkm/device/pci.c
index be6433eab814..21ca094df54f 100644
--- a/drivers/gpu/drm/nouveau/nvkm/device/pci.c
+++ b/drivers/gpu/drm/nouveau/nvkm/device/pci.c
@@ -26,6 +26,8 @@
 #include "acpi.h"
 #include "priv.h"
 
+#include <linux/vga_switcheroo.h>
+
 struct nvkm_device_pci_device {
 	u16 device;
 	const char *name;
@@ -1648,6 +1650,9 @@ nvkm_device_pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
 	struct nvkm_device *device;
 	int ret, bits;
 
+	if (vga_switcheroo_client_probe_defer(pci_dev))
+		return -EPROBE_DEFER;
+
 	switch (pci_dev->vendor) {
 	case 0x10de: pcid = nvkm_device_pci_10de; break;
 	default:
-- 
2.44.0




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux