From: Ben Skeggs Date: Mon, 7 Nov 2016 23:43:50 +0000 (+1000) Subject: drm/nouveau/device/pci: fix oops if no mmu subdev present X-Git-Tag: v4.10-rc1~154^2~26^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9e38b13ea5f9b0a513e4a31f8cc964d267e3d4bd;p=thirdparty%2Fkernel%2Flinux.git drm/nouveau/device/pci: fix oops if no mmu subdev present Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c index 0030cd9543b24..74a1ffa425f73 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c @@ -1687,7 +1687,7 @@ nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg, * This is necessary for platforms where the default DMA mask of 32 * does not cover any system memory, i.e., when all RAM is > 4 GB. */ - if (subdev_mask & BIT(NVKM_SUBDEV_MMU)) + if (pdev->device.mmu) dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(pdev->device.mmu->dma_bits));