summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_abi16.h
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@nvidia.com>2024-07-26 07:37:59 +0300
committerDanilo Krummrich <dakr@kernel.org>2024-07-27 04:05:22 +0300
commitba6b8479c944c50db7e2a81794885896fa6c48a8 (patch)
tree31b6e8fc23c348d2a65aa54debe39b1113dfe1d9 /drivers/gpu/drm/nouveau/nouveau_abi16.h
parent2e408ad7a55273b55b14ce28f62111dc1c4f7fb6 (diff)
downloadlinux-ba6b8479c944c50db7e2a81794885896fa6c48a8.tar.xz
drm/nouveau: handle limited nvif ioctl in abi16
nouveau_usif.c was already stripped right back a couple of years ago, limiting what userspace could do with it. A follow-on series removes the nvkm side of these interfaces entirely, in order to make it less of a nightmare to add/change internal APIs in the future. Unfortunately. Userspace uses some of this. Fortunately, userspace only ever ended up using a fraction of the APIs, so those are reimplemened here in a more direct manner, and return -EINVAL to userspace for everything else. v2: - simplified struct nouveau_abi16_obj - added a couple of comments v3: - comment harder Signed-off-by: Ben Skeggs <bskeggs@nvidia.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-9-bskeggs@nvidia.com
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_abi16.h')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_abi16.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.h b/drivers/gpu/drm/nouveau/nouveau_abi16.h
index 0a9121e63143..75a883a44e04 100644
--- a/drivers/gpu/drm/nouveau/nouveau_abi16.h
+++ b/drivers/gpu/drm/nouveau/nouveau_abi16.h
@@ -34,13 +34,14 @@ struct nouveau_abi16 {
struct nvif_device device;
struct list_head channels;
u64 handles;
+ struct list_head objects;
};
struct nouveau_abi16 *nouveau_abi16_get(struct drm_file *);
int nouveau_abi16_put(struct nouveau_abi16 *, int);
void nouveau_abi16_fini(struct nouveau_abi16 *);
s32 nouveau_abi16_swclass(struct nouveau_drm *);
-int nouveau_abi16_usif(struct drm_file *, void *data, u32 size);
+int nouveau_abi16_ioctl(struct drm_file *, void __user *user, u32 size);
#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)
#define NOUVEAU_GEM_DOMAIN_GART (1 << 2)