[PATCH libdrm] amdgpu: add amdgpu_bo_handle_type_kms_noimport

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

 



On Wed, Jul 18, 2018 at 11:55 AM, Michel Dänzer <michel at daenzer.net> wrote:
> On 2018-07-17 08:14 PM, Marek Olšák wrote:
>> Michel, I think you are wasting your time. This change can be misused
>> as easily as any other API. It's not more dangerous that any other
>> amdgpu libdrm function.
>
> That's trivially false.
>
>> You won't achieve anything by optimizing the hash table (= losing time),
>> [...]
>
> I think you're focusing too much on your immediate desire instead of the
> big(ger) picture.
>
> E.g. I see amdgpu_bo_export getting called from surprising places (in
> Xorg), performing a hash table lookup each time. Fixing that would
> achieve something, though probably not much.

I know about the use in Xorg and this patch actually indirectly
mentions it (it mentions Glamor in the code). The flag contains
_noimport to self-document itself to mitigate incorrect usage.

>
> Anyway, adding dangerous API (keep in mind that we don't control all
> libdrm_amdgpu users, or even know how they're using it) for something
> that can also be achieved without is just a bad idea. Avoiding that is
> achievement enough.

We don't need to control other libdrm users. They can control
themselves. :) I'm totally fine with incorrect usage leading to bad
things, like any other bug. Much worse things can be done with the CS
ioctl.

Marek


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

  Powered by Linux