aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_usif.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_usif.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_usif.c15
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 @@
24 24
25#include "nouveau_drm.h" 25#include "nouveau_drm.h"
26#include "nouveau_usif.h" 26#include "nouveau_usif.h"
27#include "nouveau_abi16.h"
27 28
28#include <nvif/notify.h> 29#include <nvif/notify.h>
29#include <nvif/unpack.h> 30#include <nvif/unpack.h>
@@ -316,11 +317,21 @@ usif_ioctl(struct drm_file *filp, void __user *user, u32 argc)
316 } else 317 } else
317 goto done; 318 goto done;
318 319
320 /* USIF slightly abuses some return-only ioctl members in order
321 * to provide interoperability with the older ABI16 objects
322 */
319 mutex_lock(&cli->mutex); 323 mutex_lock(&cli->mutex);
324 if (argv->v0.route) {
325 if (ret = -EINVAL, argv->v0.route == 0xff)
326 ret = nouveau_abi16_usif(filp, argv, argc);
327 if (ret) {
328 mutex_unlock(&cli->mutex);
329 goto done;
330 }
331 }
332
320 switch (argv->v0.type) { 333 switch (argv->v0.type) {
321 case NVIF_IOCTL_V0_NEW: 334 case NVIF_IOCTL_V0_NEW:
322 /* ... except if we're creating children */
323 argv->v0.owner = NVIF_IOCTL_V0_OWNER_ANY;
324 ret = usif_object_new(filp, data, size, argv, argc); 335 ret = usif_object_new(filp, data, size, argv, argc);
325 break; 336 break;
326 case NVIF_IOCTL_V0_NTFY_NEW: 337 case NVIF_IOCTL_V0_NTFY_NEW: