[PATCH libdrm 0/9] amdgpu:

Michel Dänzer michel at daenzer.net
Tue Jun 25 08:02:39 UTC 2019

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

> I would rather add a new function to export the KMS handle for a certain
> BO/FD pair. Exporting the handle based on a type was also like trying to
> squeeze a round pig through a square hole in the first place.
> KMS, flink and DMA-buf fd are fundamentally different and shouldn't be
> handled by the same function in the first place.

I don't really see the problem. radeonsi & RADV are using
amdgpu_bo_handle_type_kms to get handles for command stream submission,
so those handles have to be valid for the core FD. Now there's
amdgpu_bo_handle_type_kms_user to get a handle valid for the FD passed
to amdgpu_device_initialize. Can you describe a scenario where a handle
valid for yet another file description is needed?

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

More information about the amd-gfx mailing list