On Thu, Dec 15, 2016 at 4:12 PM, Christian König deathsimple@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