[PATCH libdrm 0/9] amdgpu:

Michel Dänzer michel at daenzer.net
Tue Jun 25 10:07:22 UTC 2019


On 2019-06-25 11:44 a.m., Koenig, Christian wrote:
> Am 25.06.19 um 10:02 schrieb Michel Dänzer:
>> On 2019-06-24 7:31 p.m., Christian König wrote:
>>> Patches #1 - #3 look good to me, but I'm not sure if the rest is such a
>>> good idea.
>>>
>>> Basically you not only want to use the same FD for CS, but also for
>>> basically all buffer functions and as far as I can see we break that here.
>> How so? The core FD is used for everything except flink and
>> amdgpu_bo_handle_type_kms_user.
> 
> IIRC in the Mesa winsys we compare the amdgpu_device and amdgpu_bo 
> pointers to figure out if an opened device or imported BO is the same as 
> one we already know.
> 
> With this patch that won't work any more and for example OpenGL and 
> VA-API could potentially use separate amdgpu_bo pointers for the same 
> underlying buffer. That in turn would break synchronization.

Hmm, I was hoping patch 6 would cover this, but it looks like OpenGL and
VA-API pass file descriptors referencing different file descriptions to
amdgpu_device_initialize, so you're right. :(


>>> I would rather add a new function to export the KMS handle for a certain
>>> BO/FD pair.

I'll try this approach then.


-- 
Earthling Michel Dänzer               |              https://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list