diff options
| author | Thomas Zimmermann <[email protected]> | 2025-03-07 08:04:03 +0000 |
|---|---|---|
| committer | Thomas Zimmermann <[email protected]> | 2025-03-12 08:04:01 +0000 |
| commit | edd9231f3af4e580bc6679309bde65cbe10783ca (patch) | |
| tree | b5f16636422fa1e57045f6ddc1c8af52b7cd8b41 /drivers/gpu/drm/udl/udl_main.c | |
| parent | drm/gud: Set struct drm_device.dma_dev (diff) | |
| download | kernel-edd9231f3af4e580bc6679309bde65cbe10783ca.tar.gz kernel-edd9231f3af4e580bc6679309bde65cbe10783ca.zip | |
drm/udl: Set struct drm_device.dma_dev
Set the dma_dev field provided by the DRM device. Required for PRIME
dma-buf import. Remove the driver's implementation.
Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/udl/udl_main.c')
| -rw-r--r-- | drivers/gpu/drm/udl/udl_main.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c index 3ebe2ce55dfd..cbb0169cc030 100644 --- a/drivers/gpu/drm/udl/udl_main.c +++ b/drivers/gpu/drm/udl/udl_main.c @@ -308,12 +308,17 @@ int udl_init(struct udl_device *udl) { struct drm_device *dev = &udl->drm; int ret = -ENOMEM; + struct device *dma_dev; DRM_DEBUG("\n"); - udl->dmadev = usb_intf_get_dma_device(to_usb_interface(dev->dev)); - if (!udl->dmadev) + dma_dev = usb_intf_get_dma_device(to_usb_interface(dev->dev)); + if (dma_dev) { + drm_dev_set_dma_dev(dev, dma_dev); + put_device(dma_dev); + } else { drm_warn(dev, "buffer sharing not supported"); /* not an error */ + } mutex_init(&udl->gem_lock); @@ -343,18 +348,13 @@ int udl_init(struct udl_device *udl) err: if (udl->urbs.count) udl_free_urb_list(dev); - put_device(udl->dmadev); DRM_ERROR("%d\n", ret); return ret; } int udl_drop_usb(struct drm_device *dev) { - struct udl_device *udl = to_udl(dev); - udl_free_urb_list(dev); - put_device(udl->dmadev); - udl->dmadev = NULL; return 0; } |
