[PATCH 139/156] drm/nouveau/nvif: remove ctxdma from object rb
Ben Skeggs
bskeggs at nvidia.com
Tue Apr 16 23:39:45 UTC 2024
- no more users
Signed-off-by: Ben Skeggs <bskeggs at nvidia.com>
---
drivers/gpu/drm/nouveau/include/nvif/driverif.h | 3 +--
drivers/gpu/drm/nouveau/include/nvkm/engine/dma.h | 2 --
drivers/gpu/drm/nouveau/nvif/device.c | 2 +-
drivers/gpu/drm/nouveau/nvkm/device/user.c | 6 +++---
drivers/gpu/drm/nouveau/nvkm/engine/dma/user.c | 13 -------------
5 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/include/nvif/driverif.h b/drivers/gpu/drm/nouveau/include/nvif/driverif.h
index de9c55dea9bf..fac23a6ddc6d 100644
--- a/drivers/gpu/drm/nouveau/include/nvif/driverif.h
+++ b/drivers/gpu/drm/nouveau/include/nvif/driverif.h
@@ -533,8 +533,7 @@ struct nvif_device_impl {
struct {
int (*new)(struct nvif_device_priv *, s32 oclass, void *argv, u32 argc,
- const struct nvif_ctxdma_impl **, struct nvif_ctxdma_priv **,
- u64 handle);
+ const struct nvif_ctxdma_impl **, struct nvif_ctxdma_priv **);
} ctxdma;
struct nvif_device_impl_fifo {
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/engine/dma.h b/drivers/gpu/drm/nouveau/include/nvkm/engine/dma.h
index a003da39fd13..5a7ccdf8ae5c 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/engine/dma.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/engine/dma.h
@@ -21,8 +21,6 @@ struct nvkm_dma {
struct nvkm_engine engine;
};
-struct nvkm_dmaobj *nvkm_dmaobj_search(struct nvkm_client *, u64 object);
-
int nv04_dma_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_dma **);
int nv50_dma_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_dma **);
int gf100_dma_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_dma **);
diff --git a/drivers/gpu/drm/nouveau/nvif/device.c b/drivers/gpu/drm/nouveau/nvif/device.c
index 555c63e96660..40bb0dd518e9 100644
--- a/drivers/gpu/drm/nouveau/nvif/device.c
+++ b/drivers/gpu/drm/nouveau/nvif/device.c
@@ -33,7 +33,7 @@ nvif_device_ctxdma_ctor(struct nvif_device *device, const char *name, s32 oclass
int ret;
ret = device->impl->ctxdma.new(device->priv, oclass, argv, argc,
- &ctxdma->impl, &ctxdma->priv, nvif_handle(&ctxdma->object));
+ &ctxdma->impl, &ctxdma->priv);
NVIF_ERRON(ret, &device->object, "[NEW ctxdma%04x]", oclass);
if (ret)
return ret;
diff --git a/drivers/gpu/drm/nouveau/nvkm/device/user.c b/drivers/gpu/drm/nouveau/nvkm/device/user.c
index c1ccb75db3c1..efa675c8098f 100644
--- a/drivers/gpu/drm/nouveau/nvkm/device/user.c
+++ b/drivers/gpu/drm/nouveau/nvkm/device/user.c
@@ -152,8 +152,7 @@ nvkm_udevice_ctxdma_impl = {
static int
nvkm_udevice_ctxdma_new(struct nvif_device_priv *udev, s32 oclass, void *argv, u32 argc,
- const struct nvif_ctxdma_impl **pimpl, struct nvif_ctxdma_priv **ppriv,
- u64 handle)
+ const struct nvif_ctxdma_impl **pimpl, struct nvif_ctxdma_priv **ppriv)
{
struct nvkm_dma *dma = udev->device->dma;
struct nvkm_dmaobj *dmaobj;
@@ -167,7 +166,8 @@ nvkm_udevice_ctxdma_new(struct nvif_device_priv *udev, s32 oclass, void *argv, u
*pimpl = &nvkm_udevice_ctxdma_impl;
*ppriv = (void *)dmaobj;
- return nvkm_object_link_rb(udev->object.client, &udev->object, handle, &dmaobj->object);
+ nvkm_object_link(&udev->object, &dmaobj->object);
+ return 0;
}
static int
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/dma/user.c b/drivers/gpu/drm/nouveau/nvkm/engine/dma/user.c
index 463600e4f368..96634f503310 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/dma/user.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/dma/user.c
@@ -30,19 +30,6 @@
#include <nvif/cl0002.h>
#include <nvif/unpack.h>
-static const struct nvkm_object_func nvkm_dmaobj_func;
-struct nvkm_dmaobj *
-nvkm_dmaobj_search(struct nvkm_client *client, u64 handle)
-{
- struct nvkm_object *object;
-
- object = nvkm_object_search(client, handle, &nvkm_dmaobj_func);
- if (IS_ERR(object))
- return (void *)object;
-
- return nvkm_dmaobj(object);
-}
-
static int
nvkm_dmaobj_bind(struct nvkm_object *base, struct nvkm_gpuobj *gpuobj,
int align, struct nvkm_gpuobj **pgpuobj)
--
2.41.0
More information about the Nouveau
mailing list