[PATCH] drm/udl: avoid swiotlb for imported vmap buffers.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since we ask the dmabuf owner to map the dma-buf into our device
address space, but for udl at present that is the CPU address space,
since we don't DMA directly from the mapped buffer.

However if we don't set a dma mask on the usb device, the mapping
ends up using swiotlb on machines that have it enabled, which
is less than desireable.

Signed-off-by: Dave Airlie <airlied@xxxxxxxxxx>
---
 drivers/gpu/drm/udl/udl_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c
index 0ce2d71..6770e1b 100644
--- a/drivers/gpu/drm/udl/udl_main.c
+++ b/drivers/gpu/drm/udl/udl_main.c
@@ -293,6 +293,7 @@ int udl_driver_load(struct drm_device *dev, unsigned long flags)
 	udl->ddev = dev;
 	dev->dev_private = udl;
 
+	dma_set_mask(dev->dev, DMA_BIT_MASK(64));
 	if (!udl_parse_vendor_descriptor(dev, dev->usbdev)) {
 		DRM_ERROR("firmware not recognized. Assume incompatible device\n");
 		goto err;
-- 
1.8.2

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux