drm/nouveau/devinit: run devinit scripts right after preinit

This ensures we have a valid mask of disabled engines before we start
trying to execute fini()/init() on the subdevs, potentially touching
devices that don't exist.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Ben Skeggs
2015-08-20 14:54:20 +10:00
parent 551d341755
commit 8de65bd090
3 changed files with 15 additions and 11 deletions
@@ -2167,7 +2167,9 @@ nvkm_device_preinit(struct nvkm_device *device)
}
}
/*XXX: devinit */
ret = nvkm_devinit_post(device->devinit, &device->disable_mask);
if (ret)
goto fail;
time = ktime_to_us(ktime_get()) - time;
nvdev_trace(device, "preinit completed in %lldus\n", time);