nv50: fix g98+ vdec class allocation
authorBen Skeggs <bskeggs@redhat.com>
Tue, 24 Nov 2015 23:01:32 +0000 (09:01 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 22 Dec 2015 03:24:10 +0000 (13:24 +1000)
commit33a3ba8c59a095892f33bd7de62a0aac30afc195
tree4812af5bce275e2e5862c1941c458f1980377ec0
parent791a3e18508c851177488fe88ffdaabc8f1a6284
nv50: fix g98+ vdec class allocation

The kernel previously exposed incorrect classes for some of the chipsets
that this code supports.  It no longer does, but the older object ioctls
have compatibility to avoid breaking userspace.

This needs to be fixed before switching over to the newer interfaces.

Rather than hardcoding chipset->class like the rest of the driver does,
this makes use of (new) sclass queries to determine what's available.

v2.
- update to use symbolic class identifier from <nvif/class.h>

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/drivers/nouveau/nv50/nv98_video.c