Re: [PATCH v2] drm/i915: Add VM_DONTEXPAND to exported buffers

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

 



Hi,

On 2/19/2025 11:55 AM, Joonas Lahtinen wrote:
> Quoting Jacek Lawrynowicz (2025-02-11 17:57:03)
>> Hi, can I submit this to drm-misc or should someone commit this to drm-intel?
> 
> Is the this happening in linux-next or is it still completely out-of-tree?
The patch is not merged so it is happening everywhere.

> Feels weird that the splat would not have happened in any hybrid GPU
> systems in the past. Did you look what is the difference between your
> driver and amdgpu/nouveau?

It looks like imported buffers are just never mmaped.

This is a call chain when mmapping imported buffer in amdgpu:
drm_gem_mmap()->drm_gem_mmap_obj()->amdgpu_gem_object_mmap()->drm_gem_ttm_mmap()->ttm_bo_mmap_obj()

And this is intel_vpu call chain:
drm_gem_mmap()->drm_gem_mmap_obj()->drm_gem_shmem_object_mmap()->drm_gem_shmem_mmap()->dma_buf_mmap()->i915_gem_dmabuf_mmap()

amdgpu does not check if the object is imported and just calls drm_gem_ttm_mmap() and dma_buf_mmap() is never called.
Same with xe and nouveau. All drivers using drm_gem_shmem seems ok but besides them only couple small drivers check for import_attach in mmap.
Looks like most drivers do not support mmapping imported buffers.
Is this really possible? Do you have test coverage for this?

PS.
you may also want to add VM_PFNMAP, VM_DONTDUMP and VM_IO that you are setting for i915 buffers in i915_gem_object_mmap().

Jacek



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux