aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_drm.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2016-07-12 11:57:07 +1000
committerBen Skeggs <bskeggs@redhat.com>2016-07-14 11:55:10 +1000
commit0e67bed2c765ff0fdaec62c963881f5416fe3692 (patch)
treeb67b5c15770dfcee442f0acd1f1c89de21e6bb79 /drivers/gpu/drm/nouveau/nouveau_drm.c
parentdrm/nouveau/ce/gp104: initial support (diff)
downloadlinux-dev-0e67bed2c765ff0fdaec62c963881f5416fe3692.tar.xz
linux-dev-0e67bed2c765ff0fdaec62c963881f5416fe3692.zip
drm/nouveau: check for supported chipset before booting fbdev off the hw
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drm.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 05915c10d07e..6dd396f56884 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -317,7 +317,16 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
if (vga_switcheroo_client_probe_defer(pdev))
return -EPROBE_DEFER;
- /* remove conflicting drivers (vesafb, efifb etc) */
+ /* We need to check that the chipset is supported before booting
+ * fbdev off the hardware, as there's no way to put it back.
+ */
+ ret = nvkm_device_pci_new(pdev, NULL, "error", true, false, 0, &device);
+ if (ret)
+ return ret;
+
+ nvkm_device_del(&device);
+
+ /* Remove conflicting drivers (vesafb, efifb etc). */
aper = alloc_apertures(3);
if (!aper)
return -ENOMEM;