[Intel-gfx] [PATCH] drm/i915/gem: Allow importing of shmemfs objects into any device

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Thu Jan 21 11:00:25 UTC 2021


On 20/01/2021 20:59, Chris Wilson wrote:
> Quoting Chris Wilson (2021-01-20 18:06:08)
>> Quoting Matthew Auld (2021-01-20 17:46:10)
>>> On Wed, 20 Jan 2021 at 15:40, Chris Wilson <chris at chris-wilson.co.uk> wrote:
>>>>
>>>> If we import a shmemfs object between devices, for example from
>>>> Tigerlake to DG1, we can simply reuse the native object and its backing
>>>> store.
>>>
>>> Hmmm interesting, so does that include re-using the actual sg mapping
>>> for the backing pages? Does that work out-of-the-box between different
>>> devices assuming we have iommu enabled?
>>
>> Indeed interesting; the dma_addr_t are supposed to be local to a device.
> 
> On reflection, we are expected to use cross-device dma_addr_t with
> dma-buf. It's the exporter who assigns the dma_addr_t for the importer
> to use, and they are always given from the original device.
> 
> Maybe not so bad. Definitely needs testing to see what happens in
> practice.

What about object migration? I did not spot anything preventing it once 
object was exported like this so owning device could move it to device 
memory afterwards which would probably be bad.

Regards,

Tvrtko


More information about the Intel-gfx mailing list