diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2016-07-12 11:57:07 +1000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-20 18:10:59 +0200 |
commit | 840b80ba6cc75089808b23a36213d9d088bc6b2d (patch) | |
tree | 263b6ffd86ed24c31b1ac7517fb9651b8d8876ee /drivers | |
parent | fa3e1c4de2815800a72b781840214b8f7e8e6d09 (diff) |
drm/nouveau: check for supported chipset before booting fbdev off the hw
commit 0e67bed2c765ff0fdaec62c963881f5416fe3692 upstream.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drm.c | 11 |
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 11f8dd9c0edb..d6c134b01833 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -324,7 +324,16 @@ static int nouveau_drm_probe(struct pci_dev *pdev, !vga_switcheroo_handler_flags()) 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; |