Re: [PATCH v17 1/1] drm/i915: Allow user to set cache at BO creation

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

 



It is impossible to pass the PAT setting when sharing the fd.

  1. All api , include vaapi, vulkan, gl… need such extension , the impact is huge.  Even these API level accept , some middle ware , such as ffmpeg… also will reject it.
  2. PAT is intel specific implementation , and MTL , LNL has different value and meanings, you could not expect application developer understand the details, it should be transparent to application developer.

Thanks

Carl

 

From: Yang, Fei <fei.yang@xxxxxxxxx>
Sent: Friday, June 9, 2023 11:13 PM
To: Andi Shyti <andi.shyti@xxxxxxxxxxxxxxx>; Zhang, Carl <carl.zhang@xxxxxxxxx>
Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>; Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx>; Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>; Roper, Matthew D <matthew.d.roper@xxxxxxxxx>; Justen, Jordan L <jordan.l.justen@xxxxxxxxx>; Gu, Lihao <lihao.gu@xxxxxxxxx>; Intel GFX <intel-gfx@xxxxxxxxxxxxxxxxxxxxx>; DRI Devel <dri-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH v17 1/1] drm/i915: Allow user to set cache at BO creation

 

> Hi Carl,

> 

>>>> besides this, ask a dumb question.

>>>> How we retrieve the pat_index from a shared resource though dma_buf fd?

>>>> maybe we need to know whether it could be CPU cached if we want map it.

>>>> Of course, looks there are no real usage to access it though CPU.

>>>> Just use it directly without any pat related options ?

>>> 

>>> I am not understanding. Do you want to ask the PAT table to the driver? Are

>>> you referring to the CPU PAT index?

>>> 

>>> In any case, if I understood correctly, you don't necessarily always need to

>>> set the PAT options and the cache options will fall into the default values.

>>> 

>>> Please let me know if I haven't answered the question.

>>> 

>> 

>> If mesa create a resource , then use DRM_IOCTL_PRIME_HANDLE_TO_FD convert it to a dma fd.

>> Then share it to media, media use DRM_IOCTL_PRIME_FD_TO_HANDLE convert it to a gem bo.

>> But media does not know the PAT index , because mesa create it and set it.

>> So, if media want to call DRM_IOCTL_I915_GEM_MMAP_OFFSET, media does not know whether it could be WB.

> 

> That's a good point. To be honest I am not really sure how this

> is handled.

> 

> Fei, Jordan? Do you have suggestion here?

 

Is it possible to pass the PAT setting when sharing the fd?

Or perhaps we should have kept the get_caching ioctl functional?

Joonas, could you chime in here?

 

> Andi


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

  Powered by Linux