diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-11-03 11:21:43 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-11-03 15:02:18 +1000 |
commit | 2621a41647fe783be809e789faa5d8b6b06c8072 (patch) | |
tree | bd0be934e8d49441e16506f6d9bf6980924cc7a3 /drivers/gpu/drm/nouveau/nouveau_usif.c | |
parent | 786a57ef2cebb2d09d7f152b0ed4f1da1d368073 (diff) | |
download | blackbird-op-linux-2621a41647fe783be809e789faa5d8b6b06c8072.tar.gz blackbird-op-linux-2621a41647fe783be809e789faa5d8b6b06c8072.zip |
drm/nouveau/abi16: implement limited interoperability with usif/nvif
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_usif.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_usif.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_usif.c b/drivers/gpu/drm/nouveau/nouveau_usif.c index cb1182d7e80e..89dc4ce63490 100644 --- a/drivers/gpu/drm/nouveau/nouveau_usif.c +++ b/drivers/gpu/drm/nouveau/nouveau_usif.c @@ -24,6 +24,7 @@ #include "nouveau_drm.h" #include "nouveau_usif.h" +#include "nouveau_abi16.h" #include <nvif/notify.h> #include <nvif/unpack.h> @@ -316,11 +317,21 @@ usif_ioctl(struct drm_file *filp, void __user *user, u32 argc) } else goto done; + /* USIF slightly abuses some return-only ioctl members in order + * to provide interoperability with the older ABI16 objects + */ mutex_lock(&cli->mutex); + if (argv->v0.route) { + if (ret = -EINVAL, argv->v0.route == 0xff) + ret = nouveau_abi16_usif(filp, argv, argc); + if (ret) { + mutex_unlock(&cli->mutex); + goto done; + } + } + switch (argv->v0.type) { case NVIF_IOCTL_V0_NEW: - /* ... except if we're creating children */ - argv->v0.owner = NVIF_IOCTL_V0_OWNER_ANY; ret = usif_object_new(filp, data, size, argv, argc); break; case NVIF_IOCTL_V0_NTFY_NEW: |