drm/nouveau/object: rename some functions to avoid upcoming conflicts
authorBen Skeggs <bskeggs@redhat.com>
Thu, 20 Aug 2015 04:54:16 +0000 (14:54 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 28 Aug 2015 02:40:33 +0000 (12:40 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
22 files changed:
drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h
drivers/gpu/drm/nouveau/include/nvkm/core/object.h
drivers/gpu/drm/nouveau/include/nvkm/core/parent.h
drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c
drivers/gpu/drm/nouveau/nvkm/core/ioctl.c
drivers/gpu/drm/nouveau/nvkm/core/object.c
drivers/gpu/drm/nouveau/nvkm/core/subdev.c
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c
drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c
drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv41.c
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c

index 0dd216c055f671aeea18b2e4d6d023267e00b328..46975785ba3c055c0afa4aa7037d7ce2f2387ed6 100644 (file)
@@ -32,8 +32,8 @@ nv_gpuobj(void *obj)
 #define nvkm_gpuobj_create(p,e,c,v,g,s,a,f,d)                               \
        nvkm_gpuobj_create_((p), (e), (c), (v), (g), (s), (a), (f),         \
                               sizeof(**d), (void **)d)
-#define nvkm_gpuobj_init(p) nvkm_object_init(&(p)->object)
-#define nvkm_gpuobj_fini(p,s) nvkm_object_fini(&(p)->object, (s))
+#define nvkm_gpuobj_init(p) _nvkm_object_init(&(p)->object)
+#define nvkm_gpuobj_fini(p,s) _nvkm_object_fini(&(p)->object, (s))
 int  nvkm_gpuobj_create_(struct nvkm_object *, struct nvkm_object *,
                            struct nvkm_oclass *, u32 pclass,
                            struct nvkm_object *, u32 size, u32 align,
index 005cd4a86849109c008be9e24fadd1f8ee30ceb6..39a4962d398219653657827249bc9a7ab96ef1f9 100644 (file)
@@ -50,8 +50,8 @@ nv_object(void *obj)
 int  nvkm_object_create_(struct nvkm_object *, struct nvkm_object *,
                            struct nvkm_oclass *, u32, int size, void **);
 void nvkm_object_destroy(struct nvkm_object *);
-int  nvkm_object_init(struct nvkm_object *);
-int  nvkm_object_fini(struct nvkm_object *, bool suspend);
+int  _nvkm_object_init(struct nvkm_object *);
+int  _nvkm_object_fini(struct nvkm_object *, bool suspend);
 
 int _nvkm_object_ctor(struct nvkm_object *, struct nvkm_object *,
                         struct nvkm_oclass *, void *, u32,
@@ -112,7 +112,7 @@ nv_ofuncs(void *obj)
        return nv_oclass(obj)->ofuncs;
 }
 
-int  nvkm_object_ctor(struct nvkm_object *, struct nvkm_object *,
+int  nvkm_object_old(struct nvkm_object *, struct nvkm_object *,
                      struct nvkm_oclass *, void *, u32,
                      struct nvkm_object **);
 void nvkm_object_ref(struct nvkm_object *, struct nvkm_object **);
index 45d2066ff97a0b303faf03d8a8c0d49f2bee5afb..92270afc666a2b3ed4ab69a8793a762c1ed5f1bc 100644 (file)
@@ -30,9 +30,9 @@ nv_parent(void *obj)
        nvkm_parent_create_((p), (e), (c), (v), (s), (m),                   \
                               sizeof(**d), (void **)d)
 #define nvkm_parent_init(p)                                                 \
-       nvkm_object_init(&(p)->object)
+       _nvkm_object_init(&(p)->object)
 #define nvkm_parent_fini(p,s)                                               \
-       nvkm_object_fini(&(p)->object, (s))
+       _nvkm_object_fini(&(p)->object, (s))
 
 int  nvkm_parent_create_(struct nvkm_object *, struct nvkm_object *,
                            struct nvkm_oclass *, u32 pclass,
@@ -41,8 +41,8 @@ int  nvkm_parent_create_(struct nvkm_object *, struct nvkm_object *,
 void nvkm_parent_destroy(struct nvkm_parent *);
 
 void _nvkm_parent_dtor(struct nvkm_object *);
-#define _nvkm_parent_init nvkm_object_init
-#define _nvkm_parent_fini nvkm_object_fini
+#define _nvkm_parent_init _nvkm_object_init
+#define _nvkm_parent_fini _nvkm_object_fini
 
 int nvkm_parent_sclass(struct nvkm_object *, s32 handle,
                       struct nvkm_object **pengine,
index 6e268332357070444e9e6b85b5280e32f073ab75..1ca5479ee38b28ed5cbfdbfde7257ad08634e0a4 100644 (file)
@@ -223,9 +223,9 @@ nvkm_gpuobj_new(struct nvkm_object *parent, struct nvkm_object *pargpu,
                .flags = flags,
        };
 
-       return nvkm_object_ctor(parent, &parent->engine->subdev.object,
-                               &_nvkm_gpuobj_oclass, &args, sizeof(args),
-                               (struct nvkm_object **)pgpuobj);
+       return nvkm_object_old(parent, &parent->engine->subdev.object,
+                              &_nvkm_gpuobj_oclass, &args, sizeof(args),
+                              (struct nvkm_object **)pgpuobj);
 }
 
 int
@@ -288,8 +288,8 @@ nvkm_gpudup_oclass = {
        .handle = NV_GPUOBJ_CLASS,
        .ofuncs = &(struct nvkm_ofuncs) {
                .dtor = nvkm_gpudup_dtor,
-               .init = nvkm_object_init,
-               .fini = nvkm_object_fini,
+               .init = _nvkm_object_init,
+               .fini = _nvkm_object_fini,
        },
 };
 
index ee6ff01c2b1ba8601fb7b535cf0aea903af9b68d..7a15b15bfce0a6186b412128957943dec326b3b1 100644 (file)
@@ -137,7 +137,7 @@ nvkm_ioctl_new(struct nvkm_handle *handle, void *data, u32 size)
         * between the parent and its children (eg. PGRAPH context)
         */
        if (engine && nv_engine(engine)->cclass) {
-               ret = nvkm_object_ctor(&parent->object, engine,
+               ret = nvkm_object_old(&parent->object, engine,
                                       nv_engine(engine)->cclass,
                                       data, size, &engctx);
                if (ret)
@@ -147,7 +147,7 @@ nvkm_ioctl_new(struct nvkm_handle *handle, void *data, u32 size)
        }
 
        /* finally, create new object and bind it to its handle */
-       ret = nvkm_object_ctor(engctx, engine, oclass, data, size, &object);
+       ret = nvkm_object_old(engctx, engine, oclass, data, size, &object);
        client->data = object;
        if (ret)
                goto fail_ctor;
index 98ba58ec1d3943a64a88042d4abee2db2d615031..1c117f0a7245d1709f56bdecfec4df3dc5e7689a 100644 (file)
@@ -136,13 +136,13 @@ nvkm_object_destroy(struct nvkm_object *object)
 }
 
 int
-nvkm_object_init(struct nvkm_object *object)
+_nvkm_object_init(struct nvkm_object *object)
 {
        return 0;
 }
 
 int
-nvkm_object_fini(struct nvkm_object *object, bool suspend)
+_nvkm_object_fini(struct nvkm_object *object, bool suspend)
 {
        return 0;
 }
@@ -151,12 +151,12 @@ struct nvkm_ofuncs
 nvkm_object_ofuncs = {
        .ctor = _nvkm_object_ctor,
        .dtor = nvkm_object_destroy,
-       .init = nvkm_object_init,
-       .fini = nvkm_object_fini,
+       .init = _nvkm_object_init,
+       .fini = _nvkm_object_fini,
 };
 
 int
-nvkm_object_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
+nvkm_object_old(struct nvkm_object *parent, struct nvkm_object *engine,
                 struct nvkm_oclass *oclass, void *data, u32 size,
                 struct nvkm_object **pobject)
 {
index 25f3503cd37a098922a87b92f8fb9865474b1d29..0c313468d94e502e5a32cae131a550d77b135d47 100644 (file)
@@ -48,7 +48,7 @@ nvkm_subdev_reset(struct nvkm_object *obj)
 int
 nvkm_subdev_init(struct nvkm_subdev *subdev)
 {
-       int ret = nvkm_object_init(&subdev->object);
+       int ret = _nvkm_object_init(&subdev->object);
        if (ret)
                return ret;
 
@@ -72,7 +72,7 @@ nvkm_subdev_fini(struct nvkm_subdev *subdev, bool suspend)
                nvkm_mask(device, 0x000200, subdev->unit, subdev->unit);
        }
 
-       return nvkm_object_fini(&subdev->object, suspend);
+       return _nvkm_object_fini(&subdev->object, suspend);
 }
 
 int
index 479181c839b481c4bf8bbd058364ea5a9dd570d3..b7892e6f080b45c858c2f4d6d07188bd05c3865b 100644 (file)
@@ -152,7 +152,7 @@ nvkm_device_init(struct nvkm_device *device)
 
        for (i = 0, c = 0; i < NVDEV_SUBDEV_NR; i++) {
 #define _(s,m) case s: if (device->oclass[s] && !device->subdev[s]) {          \
-               ret = nvkm_object_ctor(nv_object(device), NULL,                \
+               ret = nvkm_object_old(nv_object(device), NULL,                \
                                       device->oclass[s], NULL,  (s),          \
                                       (struct nvkm_object **)&device->m);     \
                if (ret == -ENODEV) {                                          \
index c13cd9d46a1ab8caf30b367ad7e54f3a5e415f6f..0abee2d21a78ffbb7f990cd1be668424a349224e 100644 (file)
@@ -185,8 +185,8 @@ static struct nvkm_ofuncs
 nvkm_control_ofuncs = {
        .ctor = _nvkm_object_ctor,
        .dtor = nvkm_object_destroy,
-       .init = nvkm_object_init,
-       .fini = nvkm_object_fini,
+       .init = _nvkm_object_init,
+       .fini = _nvkm_object_fini,
        .mthd = nvkm_control_mthd,
 };
 
index d6c0cf0e5a35bb9cc5cbda7402c56dff998c88c8..ab5f8429e680b73ce47ca2fc8074cb2868386359 100644 (file)
@@ -106,8 +106,8 @@ static struct nvkm_ofuncs
 nv04_disp_ofuncs = {
        .ctor = _nvkm_object_ctor,
        .dtor = nvkm_object_destroy,
-       .init = nvkm_object_init,
-       .fini = nvkm_object_fini,
+       .init = _nvkm_object_init,
+       .fini = _nvkm_object_fini,
        .mthd = nv04_disp_mthd,
        .ntfy = nvkm_disp_ntfy,
 };
index 44ae8a0ca65c6c79574ab9fcee8393d66da5f238..c4c210bdbf7e9ae561d911fd9ade0123dbee8e81 100644 (file)
@@ -9,8 +9,8 @@ int nvkm_dmaobj_create_(struct nvkm_object *, struct nvkm_object *,
                        struct nvkm_oclass *, void **, u32 *,
                        int, void **);
 #define _nvkm_dmaobj_dtor nvkm_object_destroy
-#define _nvkm_dmaobj_init nvkm_object_init
-#define _nvkm_dmaobj_fini nvkm_object_fini
+#define _nvkm_dmaobj_init _nvkm_object_init
+#define _nvkm_dmaobj_fini _nvkm_object_fini
 
 int _nvkm_dmaeng_ctor(struct nvkm_object *, struct nvkm_object *,
                      struct nvkm_oclass *, void *, u32,
index 48b526cb8cb5b2c3b846c4d2a1bd047173cd0a60..3562b791162f9347ed88cc5d12859b855fa77a7a 100644 (file)
@@ -272,7 +272,7 @@ gk104_fifo_chan_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
                        .ofuncs = &nvkm_object_ofuncs,
                };
                args->v0.engine = engines;
-               return nvkm_object_ctor(parent, engine, &oclass, NULL, 0, pobject);
+               return nvkm_object_old(parent, engine, &oclass, NULL, 0, pobject);
        }
 
        engines &= args->v0.engine;
index a7141e08930c7a9b15bbf532e020e5cdcf95264b..6afdb20cf304e9c8816d6cb42ff5853cddbb927c 100644 (file)
@@ -228,8 +228,8 @@ struct nvkm_ofuncs
 gf100_fermi_ofuncs = {
        .ctor = _nvkm_object_ctor,
        .dtor = nvkm_object_destroy,
-       .init = nvkm_object_init,
-       .fini = nvkm_object_fini,
+       .init = _nvkm_object_init,
+       .fini = _nvkm_object_fini,
        .mthd = gf100_fermi_mthd,
 };
 
index 323f020166da583312f4998556e08daa2b5b46b8..617161e4fc15d43effa3b8d9d57f304817c2b785 100644 (file)
@@ -1187,7 +1187,7 @@ nv04_gr_context_fini(struct nvkm_object *object, bool suspend)
        nvkm_mask(device, NV04_PGRAPH_FIFO, 0x00000001, 0x00000001);
        spin_unlock_irqrestore(&gr->lock, flags);
 
-       return nvkm_object_fini(&chan->base, suspend);
+       return _nvkm_object_fini(&chan->base, suspend);
 }
 
 static struct nvkm_oclass
@@ -1196,7 +1196,7 @@ nv04_gr_cclass = {
        .ofuncs = &(struct nvkm_ofuncs) {
                .ctor = nv04_gr_context_ctor,
                .dtor = nv04_gr_context_dtor,
-               .init = nvkm_object_init,
+               .init = _nvkm_object_init,
                .fini = nv04_gr_context_fini,
        },
 };
index 94f7dc794d2f1d4f45437d766f818875a125b41c..be92015d8f9e0c34e66a143e97cd7283cd9477b8 100644 (file)
@@ -1111,7 +1111,7 @@ nv10_gr_context_fini(struct nvkm_object *object, bool suspend)
        nvkm_mask(device, NV04_PGRAPH_FIFO, 0x00000001, 0x00000001);
        spin_unlock_irqrestore(&gr->lock, flags);
 
-       return nvkm_object_fini(&chan->base, suspend);
+       return _nvkm_object_fini(&chan->base, suspend);
 }
 
 static struct nvkm_oclass
@@ -1120,7 +1120,7 @@ nv10_gr_cclass = {
        .ofuncs = &(struct nvkm_ofuncs) {
                .ctor = nv10_gr_context_ctor,
                .dtor = nv10_gr_context_dtor,
-               .init = nvkm_object_init,
+               .init = _nvkm_object_init,
                .fini = nv10_gr_context_fini,
        },
 };
index 1586213b0830d5bf1be0d48e1a811c07d251a808..0f02b281f34e01ff954ccfcf802ba88defa5bad7 100644 (file)
@@ -173,8 +173,8 @@ nv31_mpeg_cclass = {
        .ofuncs = &(struct nvkm_ofuncs) {
                .ctor = nv31_mpeg_context_ctor,
                .dtor = nv31_mpeg_context_dtor,
-               .init = nvkm_object_init,
-               .fini = nvkm_object_fini,
+               .init = _nvkm_object_init,
+               .fini = _nvkm_object_fini,
        },
 };
 
index b75395bf8ffa34e27698f8fa13f9a6120bd67330..ac27f511163af3787b09e540fe24fab88fc1dc8d 100644 (file)
@@ -419,8 +419,8 @@ static struct nvkm_ofuncs
 nvkm_perfdom_ofuncs = {
        .ctor = nvkm_perfdom_ctor,
        .dtor = nvkm_perfdom_dtor,
-       .init = nvkm_object_init,
-       .fini = nvkm_object_fini,
+       .init = _nvkm_object_init,
+       .fini = _nvkm_object_fini,
        .mthd = nvkm_perfdom_mthd,
 };
 
index 0cdb49e983ab9334fef8875383a378966da57f00..6fe71b2276cca677d96b920785af984527f650a3 100644 (file)
@@ -94,8 +94,8 @@ nvkm_barobj_oclass = {
        .ofuncs = &(struct nvkm_ofuncs) {
                .ctor = nvkm_barobj_ctor,
                .dtor = nvkm_barobj_dtor,
-               .init = nvkm_object_init,
-               .fini = nvkm_object_fini,
+               .init = _nvkm_object_init,
+               .fini = _nvkm_object_fini,
                .rd32 = nvkm_barobj_rd32,
                .wr32 = nvkm_barobj_wr32,
        },
@@ -106,7 +106,7 @@ nvkm_bar_alloc(struct nvkm_bar *bar, struct nvkm_object *parent,
               struct nvkm_mem *mem, struct nvkm_object **pobject)
 {
        struct nvkm_object *gpuobj;
-       int ret = nvkm_object_ctor(parent, &parent->engine->subdev.object,
+       int ret = nvkm_object_old(parent, &parent->engine->subdev.object,
                                   &nvkm_barobj_oclass, mem, 0, &gpuobj);
        if (ret == 0)
                *pobject = gpuobj;
index 4219eb39cf450962f75f6e61a920f5406297b636..495da913bd1111710d957b831585a09ef9d06ce8 100644 (file)
@@ -72,7 +72,7 @@ nvkm_instmem_alloc(struct nvkm_instmem *imem, struct nvkm_object *parent,
 {
        struct nvkm_instmem_impl *impl = (void *)imem->subdev.object.oclass;
        struct nvkm_instobj_args args = { .size = size, .align = align };
-       return nvkm_object_ctor(parent, &parent->engine->subdev.object,
+       return nvkm_object_old(parent, &parent->engine->subdev.object,
                                impl->instobj, &args, sizeof(args), pobject);
 }
 
index e217ebebd325b84094485e6a7c6d145093b199dd..819f615782cf814a96463a89595c2a2161edfb64 100644 (file)
@@ -18,15 +18,15 @@ struct nvkm_instobj_args {
        _nvkm_instobj_dtor(nv_object(iobj));                                \
 })
 #define nvkm_instobj_init(p)                                                \
-       nvkm_object_init(&(p)->base)
+       _nvkm_object_init(&(p)->base)
 #define nvkm_instobj_fini(p,s)                                              \
-       nvkm_object_fini(&(p)->base, (s))
+       _nvkm_object_fini(&(p)->base, (s))
 
 int  nvkm_instobj_create_(struct nvkm_object *, struct nvkm_object *,
                             struct nvkm_oclass *, int, void **);
 void _nvkm_instobj_dtor(struct nvkm_object *);
-#define _nvkm_instobj_init nvkm_object_init
-#define _nvkm_instobj_fini nvkm_object_fini
+#define _nvkm_instobj_init _nvkm_object_init
+#define _nvkm_instobj_fini _nvkm_object_fini
 
 struct nvkm_instmem_impl {
        struct nvkm_oclass base;
index c44f880120abff36ca3a8555eeda6401c0bfd1c7..26192b91e456d31aad4058de7d9fcc7092a503df 100644 (file)
@@ -96,7 +96,7 @@ nv41_mmu_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
 
        if (pci_find_capability(device->pdev, PCI_CAP_ID_AGP) ||
            !nvkm_boolopt(device->cfgopt, "NvPCIE", true)) {
-               return nvkm_object_ctor(parent, engine, &nv04_mmu_oclass,
+               return nvkm_object_old(parent, engine, &nv04_mmu_oclass,
                                        data, size, pobject);
        }
 
index 3be8a796d797bc4494db0250a451d6a1187e96ed..3e51dc772536d979cbffb160abf466d0fe30c548 100644 (file)
@@ -169,7 +169,7 @@ nv44_mmu_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
 
        if (pci_find_capability(device->pdev, PCI_CAP_ID_AGP) ||
            !nvkm_boolopt(device->cfgopt, "NvPCIE", true)) {
-               return nvkm_object_ctor(parent, engine, &nv04_mmu_oclass,
+               return nvkm_object_old(parent, engine, &nv04_mmu_oclass,
                                        data, size, pobject);
        }