diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-11-24 13:08:21 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-12-22 13:22:35 +1000 |
commit | 4291eea18fd81ca084935fb09a0e97a6661f4f85 (patch) | |
tree | 92023726dbce1d42a4fa03d75f987b382385255a /nouveau/abi16.c | |
parent | 4c92a9d70725ec393899979bbfc21a37684e88d9 (diff) | |
download | libdrm-4291eea18fd81ca084935fb09a0e97a6661f4f85.tar.gz libdrm-4291eea18fd81ca084935fb09a0e97a6661f4f85.tar.bz2 libdrm-4291eea18fd81ca084935fb09a0e97a6661f4f85.zip |
nouveau: add support for newer kernel interfaces
v2.
- leave client-provided pointer unmodified on sclass_get() failure
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'nouveau/abi16.c')
-rw-r--r-- | nouveau/abi16.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nouveau/abi16.c b/nouveau/abi16.c index 46350b13..ee38c0cb 100644 --- a/nouveau/abi16.c +++ b/nouveau/abi16.c @@ -244,7 +244,8 @@ abi16_object(struct nouveau_object *obj, int (**func)(struct nouveau_object *)) /* nouveau_object::length is (ab)used to determine whether the * object is a legacy object (!=0), or a real NVIF object. */ - if ((parent->length != 0 && parent->oclass == NOUVEAU_DEVICE_CLASS)) { + if ((parent->length != 0 && parent->oclass == NOUVEAU_DEVICE_CLASS) || + (parent->length == 0 && parent->oclass == NV_DEVICE)) { if (obj->oclass == NOUVEAU_FIFO_CHANNEL_CLASS) { struct nouveau_device *dev = (void *)parent; if (dev->chipset < 0xc0) |