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 at redhat.com>
---
 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

Reply via email to