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

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

 



Hi,

On 1/9/2025 12:22 PM, Krzysztof Karas wrote:
> Hi Jacek,
> 
> On 2025-01-08 at 11:53:46 +0100, Jacek Lawrynowicz wrote:
>> drm_gem_mmap_obj() expects VM_DONTEXPAND flag to be set after mmap
>> callback is executed. Set this flag at the end of i915_gem_dmabuf_mmap()
>> to prevent WARN on mmap in buffers imported from i915 e.g.,
> ...
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> @@ -110,6 +110,7 @@ static int i915_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *
>>  	if (ret)
>>  		return ret;
>>  
>> +	vm_flags_set(vma, VM_DONTEXPAND);
>>  	vma_set_file(vma, obj->base.filp);
>>  
>>  	return 0;
>>
> Is this an existing issue somewhere (on GitLab for example)? The fix
> looks good, I'm just curious how you noticed this problem and if the
> patch should have "Fixes/Closes" labels added.

We noticed the problem while running internal intel_vpu tests that import buffers from vulkan.
These tests will be upstreamed at some point but currently there is no external issue for this bug.
I will add Fixes tag.

Jacek



[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