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
This commit is contained in:
Jason A. Harmening 2015-03-12 14:18:36 +00:00
parent 8ee4f5ef45
commit edf3c81a5c

View file

@ -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 */