[PATCH 1/1] drm/amd/amdgpu: get maximum and used UVD handles (v3)

Christian König christian.koenig at amd.com
Mon Jan 2 10:16:19 UTC 2017


Am 15.12.2016 um 23:43 schrieb Grazvydas Ignotas:
> On Thu, Dec 15, 2016 at 4:12 PM, Christian König
> <deathsimple at vodafone.de> wrote:
>> Regarding which error code to return I think that Emil has the right idea
>> here.
>>
>> Returning -EINVAL usually means that userspace provided an invalid value,
>> but in this case it doesn't matter which value the UMD provide all of them
>> would be invalid because starting with Polaris the hardware/firmware simply
>> doesn't work this way any more.
>>
>> So using -ENODEV or maybe -ENODATA indeed sound like the right think to do
>> here.
> What about ERANGE then, "Math result not representable" aka infinity?
> To me ENODEV is more like "the GPU you are asking about is not there"
> and ENODATA "information you ask for is not known", although the later
> still somewhat makes sense.

Sorry for the delayed reply.

I think EDATA would still make more sense than ERANGE, because the 
number of open sessions is simply not known any more.

That the maximum number of sessions is now unlimited is just a side 
effect of the new handling if you ask me.

Regards,
Christian.

>
> Gražvydas




More information about the amd-gfx mailing list