Permalink
Browse files

drm: check for supported chipset before booting fbdev off the hw

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information...
1 parent a6443fc commit 11fcd1624b0a1c73fe3b2fa15c3cc45816da0470 @skeggsb committed Jul 12, 2016
Showing with 10 additions and 1 deletion.
  1. +10 −1 drm/nouveau/nouveau_drm.c
View
@@ -325,7 +325,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;

0 comments on commit 11fcd16

Please sign in to comment.