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

Grazvydas Ignotas notasas at gmail.com
Thu Dec 15 22:43:09 UTC 2016


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.

Gražvydas


More information about the dri-devel mailing list