diff options
| author | Dave Airlie <airlied@redhat.com> | 2025-09-12 12:56:19 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2025-09-12 12:58:17 +1000 |
| commit | 8d04ea1a92b843890b874551959a9b21bc7f30d4 (patch) | |
| tree | 012fbe0e39782b38736f08e2999dc9b876b3289f /drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | |
| parent | Merge tag 'drm-intel-next-2025-09-05' of https://gitlab.freedesktop.org/drm/i... (diff) | |
| parent | xe: populate buffers before exporting them. (diff) | |
| download | linux-8d04ea1a92b843890b874551959a9b21bc7f30d4.tar.gz linux-8d04ea1a92b843890b874551959a9b21bc7f30d4.zip | |
Merge tag 'drm-misc-next-2025-09-11' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next
drm-misc-next for v6.18:
UAPI Changes:
- Provide 'boot_display' attribute on boot-up devices
amdxdma:
- Add ioctl DRM_IOCTL_AMDXDNA_GET_ARRAY
Cross-subsystem Changes:
bindings:
- Add Mayqueen vendor prefix mayqueen-
pci:
- vgaarb: Use screen_info helpers
Core Changes:
ttm:
- Add interface to populate buffers
Driver Changes:
amdgpu:
- Pre-populate exported buffers
ast:
- Clean up detection of DRAM config
bochs:
- Clean up
bridge:
- adv7511: Write full Audio infoframe
- ite6263: Support vendor-specific infoframes
- simple: Add support for Realtek RTD2171 DP-to-HDMI plus DT bindings
- Clean up
gma500:
- Clean up
nouveau:
- Pre-populate exported buffers
panel:
- edp: Add support for additonal mt8189 Chromebook panels
- lvds: Add DT bindings for EDT ETML0700Z8DHA
- Clean up
pixpaper:
- Add support for Mayqueen Pixpaper plus DT bindings
rcar-du:
- Use RUNTIME_PM_OPS
- Add support for DSI commands
vkms:
- Support variants of ARGB8888, ARGB16161616, RGB565, RGB888 and P01x
- Spport YUV with 16-bit components
xe:
- Pre-populate exported buffers
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250911091737.GA39831@linux.fritz.box
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c index ff98c87b2e0b..878b13efd154 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c @@ -313,11 +313,23 @@ struct dma_buf *amdgpu_gem_prime_export(struct drm_gem_object *gobj, { struct amdgpu_bo *bo = gem_to_amdgpu_bo(gobj); struct dma_buf *buf; + struct ttm_operation_ctx ctx = { + .interruptible = true, + .no_wait_gpu = true, + /* We opt to avoid OOM on system pages allocations */ + .gfp_retry_mayfail = true, + .allow_res_evict = false, + }; + int ret; if (amdgpu_ttm_tt_get_usermm(bo->tbo.ttm) || bo->flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID) return ERR_PTR(-EPERM); + ret = ttm_bo_setup_export(&bo->tbo, &ctx); + if (ret) + return ERR_PTR(ret); + buf = drm_gem_prime_export(gobj, flags); if (!IS_ERR(buf)) buf->ops = &amdgpu_dmabuf_ops; |
