From edf3c81a5cfd45dcebf1c0fc08148a0674928fbf Mon Sep 17 00:00:00 2001 From: "Jason A. Harmening" Date: Thu, 12 Mar 2015 14:18:36 +0000 Subject: [PATCH] Using parent DMA tag in drm_pci_alloc(). This can allow drm2 devices to work with Intel DMAR enabled for the system, as long as DMAR is disabled for the drm2 device. Approved by: kib (mentor) MFC after: 1 week --- sys/dev/drm2/drm_pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/drm2/drm_pci.c b/sys/dev/drm2/drm_pci.c index 50af71da119..40431fafd5c 100644 --- a/sys/dev/drm2/drm_pci.c +++ b/sys/dev/drm2/drm_pci.c @@ -76,7 +76,9 @@ drm_pci_alloc(struct drm_device *dev, size_t size, if (mtx_owned(&dev->dma_lock)) DRM_ERROR("called while holding dma_lock\n"); - ret = bus_dma_tag_create(NULL, align, 0, /* tag, align, boundary */ + ret = bus_dma_tag_create( + bus_get_dma_tag(dev->device), /* parent */ + align, 0, /* align, boundary */ maxaddr, BUS_SPACE_MAXADDR, /* lowaddr, highaddr */ NULL, NULL, /* filtfunc, filtfuncargs */ size, 1, size, /* maxsize, nsegs, maxsegsize */