diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-01-14 15:04:31 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-01-22 12:17:54 +1000 |
commit | 5ecfadeb89a63b414bfd26ad469b39037930485e (patch) | |
tree | 682b4ce91f973bb488eba50abb66faa163a80b5c /drivers/gpu/drm/nouveau/nvkm/subdev/ibus | |
parent | b9ec14246dc4260294ccfb25ec40b113d23e5b9a (diff) | |
download | op-kernel-dev-5ecfadeb89a63b414bfd26ad469b39037930485e.zip op-kernel-dev-5ecfadeb89a63b414bfd26ad469b39037930485e.tar.gz |
drm/nouveau/ibus: namespace + nvidia gpu names (no binary change)
The namespace of NVKM is being changed to nvkm_ instead of nouveau_,
which will be used for the DRM part of the driver. This is being
done in order to make it very clear as to what part of the driver a
given symbol belongs to, and as a minor step towards splitting the
DRM driver out to be able to stand on its own (for virt).
Because there's already a large amount of churn here anyway, this is
as good a time as any to also switch to NVIDIA's device and chipset
naming to ease collaboration with them.
A comparison of objdump disassemblies proves no code changes.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/ibus')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/ibus/Kbuild | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c (renamed from drivers/gpu/drm/nouveau/nvkm/subdev/ibus/nvc0.c) | 47 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c (renamed from drivers/gpu/drm/nouveau/nvkm/subdev/ibus/nve0.c) | 53 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk20a.c | 25 |
4 files changed, 63 insertions, 66 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/Kbuild b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/Kbuild index a006e53..a0b12d2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/Kbuild +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/Kbuild @@ -1,3 +1,3 @@ -nvkm-y += nvkm/subdev/ibus/nvc0.o -nvkm-y += nvkm/subdev/ibus/nve0.o +nvkm-y += nvkm/subdev/ibus/gf100.o +nvkm-y += nvkm/subdev/ibus/gk104.o nvkm-y += nvkm/subdev/ibus/gk20a.o diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/nvc0.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c index 4e977ff..8e578f8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/nvc0.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c @@ -21,15 +21,14 @@ * * Authors: Ben Skeggs */ - #include <subdev/ibus.h> -struct nvc0_ibus_priv { - struct nouveau_ibus base; +struct gf100_ibus_priv { + struct nvkm_ibus base; }; static void -nvc0_ibus_intr_hub(struct nvc0_ibus_priv *priv, int i) +gf100_ibus_intr_hub(struct gf100_ibus_priv *priv, int i) { u32 addr = nv_rd32(priv, 0x122120 + (i * 0x0400)); u32 data = nv_rd32(priv, 0x122124 + (i * 0x0400)); @@ -39,7 +38,7 @@ nvc0_ibus_intr_hub(struct nvc0_ibus_priv *priv, int i) } static void -nvc0_ibus_intr_rop(struct nvc0_ibus_priv *priv, int i) +gf100_ibus_intr_rop(struct gf100_ibus_priv *priv, int i) { u32 addr = nv_rd32(priv, 0x124120 + (i * 0x0400)); u32 data = nv_rd32(priv, 0x124124 + (i * 0x0400)); @@ -49,7 +48,7 @@ nvc0_ibus_intr_rop(struct nvc0_ibus_priv *priv, int i) } static void -nvc0_ibus_intr_gpc(struct nvc0_ibus_priv *priv, int i) +gf100_ibus_intr_gpc(struct gf100_ibus_priv *priv, int i) { u32 addr = nv_rd32(priv, 0x128120 + (i * 0x0400)); u32 data = nv_rd32(priv, 0x128124 + (i * 0x0400)); @@ -59,9 +58,9 @@ nvc0_ibus_intr_gpc(struct nvc0_ibus_priv *priv, int i) } static void -nvc0_ibus_intr(struct nouveau_subdev *subdev) +gf100_ibus_intr(struct nvkm_subdev *subdev) { - struct nvc0_ibus_priv *priv = (void *)subdev; + struct gf100_ibus_priv *priv = (void *)subdev; u32 intr0 = nv_rd32(priv, 0x121c58); u32 intr1 = nv_rd32(priv, 0x121c5c); u32 hubnr = nv_rd32(priv, 0x121c70); @@ -72,7 +71,7 @@ nvc0_ibus_intr(struct nouveau_subdev *subdev) for (i = 0; (intr0 & 0x0000ff00) && i < hubnr; i++) { u32 stat = 0x00000100 << i; if (intr0 & stat) { - nvc0_ibus_intr_hub(priv, i); + gf100_ibus_intr_hub(priv, i); intr0 &= ~stat; } } @@ -80,7 +79,7 @@ nvc0_ibus_intr(struct nouveau_subdev *subdev) for (i = 0; (intr0 & 0xffff0000) && i < ropnr; i++) { u32 stat = 0x00010000 << i; if (intr0 & stat) { - nvc0_ibus_intr_rop(priv, i); + gf100_ibus_intr_rop(priv, i); intr0 &= ~stat; } } @@ -88,36 +87,36 @@ nvc0_ibus_intr(struct nouveau_subdev *subdev) for (i = 0; intr1 && i < gpcnr; i++) { u32 stat = 0x00000001 << i; if (intr1 & stat) { - nvc0_ibus_intr_gpc(priv, i); + gf100_ibus_intr_gpc(priv, i); intr1 &= ~stat; } } } static int -nvc0_ibus_ctor(struct nouveau_object *parent, struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) +gf100_ibus_ctor(struct nvkm_object *parent, struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) { - struct nvc0_ibus_priv *priv; + struct gf100_ibus_priv *priv; int ret; - ret = nouveau_ibus_create(parent, engine, oclass, &priv); + ret = nvkm_ibus_create(parent, engine, oclass, &priv); *pobject = nv_object(priv); if (ret) return ret; - nv_subdev(priv)->intr = nvc0_ibus_intr; + nv_subdev(priv)->intr = gf100_ibus_intr; return 0; } -struct nouveau_oclass -nvc0_ibus_oclass = { +struct nvkm_oclass +gf100_ibus_oclass = { .handle = NV_SUBDEV(IBUS, 0xc0), - .ofuncs = &(struct nouveau_ofuncs) { - .ctor = nvc0_ibus_ctor, - .dtor = _nouveau_ibus_dtor, - .init = _nouveau_ibus_init, - .fini = _nouveau_ibus_fini, + .ofuncs = &(struct nvkm_ofuncs) { + .ctor = gf100_ibus_ctor, + .dtor = _nvkm_ibus_dtor, + .init = _nvkm_ibus_init, + .fini = _nvkm_ibus_fini, }, }; diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/nve0.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c index ebef970..7b6e9a6 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/nve0.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c @@ -21,15 +21,14 @@ * * Authors: Ben Skeggs */ - #include <subdev/ibus.h> -struct nve0_ibus_priv { - struct nouveau_ibus base; +struct gk104_ibus_priv { + struct nvkm_ibus base; }; static void -nve0_ibus_intr_hub(struct nve0_ibus_priv *priv, int i) +gk104_ibus_intr_hub(struct gk104_ibus_priv *priv, int i) { u32 addr = nv_rd32(priv, 0x122120 + (i * 0x0800)); u32 data = nv_rd32(priv, 0x122124 + (i * 0x0800)); @@ -39,7 +38,7 @@ nve0_ibus_intr_hub(struct nve0_ibus_priv *priv, int i) } static void -nve0_ibus_intr_rop(struct nve0_ibus_priv *priv, int i) +gk104_ibus_intr_rop(struct gk104_ibus_priv *priv, int i) { u32 addr = nv_rd32(priv, 0x124120 + (i * 0x0800)); u32 data = nv_rd32(priv, 0x124124 + (i * 0x0800)); @@ -49,7 +48,7 @@ nve0_ibus_intr_rop(struct nve0_ibus_priv *priv, int i) } static void -nve0_ibus_intr_gpc(struct nve0_ibus_priv *priv, int i) +gk104_ibus_intr_gpc(struct gk104_ibus_priv *priv, int i) { u32 addr = nv_rd32(priv, 0x128120 + (i * 0x0800)); u32 data = nv_rd32(priv, 0x128124 + (i * 0x0800)); @@ -59,9 +58,9 @@ nve0_ibus_intr_gpc(struct nve0_ibus_priv *priv, int i) } static void -nve0_ibus_intr(struct nouveau_subdev *subdev) +gk104_ibus_intr(struct nvkm_subdev *subdev) { - struct nve0_ibus_priv *priv = (void *)subdev; + struct gk104_ibus_priv *priv = (void *)subdev; u32 intr0 = nv_rd32(priv, 0x120058); u32 intr1 = nv_rd32(priv, 0x12005c); u32 hubnr = nv_rd32(priv, 0x120070); @@ -72,7 +71,7 @@ nve0_ibus_intr(struct nouveau_subdev *subdev) for (i = 0; (intr0 & 0x0000ff00) && i < hubnr; i++) { u32 stat = 0x00000100 << i; if (intr0 & stat) { - nve0_ibus_intr_hub(priv, i); + gk104_ibus_intr_hub(priv, i); intr0 &= ~stat; } } @@ -80,7 +79,7 @@ nve0_ibus_intr(struct nouveau_subdev *subdev) for (i = 0; (intr0 & 0xffff0000) && i < ropnr; i++) { u32 stat = 0x00010000 << i; if (intr0 & stat) { - nve0_ibus_intr_rop(priv, i); + gk104_ibus_intr_rop(priv, i); intr0 &= ~stat; } } @@ -88,17 +87,17 @@ nve0_ibus_intr(struct nouveau_subdev *subdev) for (i = 0; intr1 && i < gpcnr; i++) { u32 stat = 0x00000001 << i; if (intr1 & stat) { - nve0_ibus_intr_gpc(priv, i); + gk104_ibus_intr_gpc(priv, i); intr1 &= ~stat; } } } static int -nve0_ibus_init(struct nouveau_object *object) +gk104_ibus_init(struct nvkm_object *object) { - struct nve0_ibus_priv *priv = (void *)object; - int ret = nouveau_ibus_init(&priv->base); + struct gk104_ibus_priv *priv = (void *)object; + int ret = nvkm_ibus_init(&priv->base); if (ret == 0) { nv_mask(priv, 0x122318, 0x0003ffff, 0x00001000); nv_mask(priv, 0x12231c, 0x0003ffff, 0x00000200); @@ -112,29 +111,29 @@ nve0_ibus_init(struct nouveau_object *object) } static int -nve0_ibus_ctor(struct nouveau_object *parent, struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) +gk104_ibus_ctor(struct nvkm_object *parent, struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) { - struct nve0_ibus_priv *priv; + struct gk104_ibus_priv *priv; int ret; - ret = nouveau_ibus_create(parent, engine, oclass, &priv); + ret = nvkm_ibus_create(parent, engine, oclass, &priv); *pobject = nv_object(priv); if (ret) return ret; - nv_subdev(priv)->intr = nve0_ibus_intr; + nv_subdev(priv)->intr = gk104_ibus_intr; return 0; } -struct nouveau_oclass -nve0_ibus_oclass = { +struct nvkm_oclass +gk104_ibus_oclass = { .handle = NV_SUBDEV(IBUS, 0xe0), - .ofuncs = &(struct nouveau_ofuncs) { - .ctor = nve0_ibus_ctor, - .dtor = _nouveau_ibus_dtor, - .init = nve0_ibus_init, - .fini = _nouveau_ibus_fini, + .ofuncs = &(struct nvkm_ofuncs) { + .ctor = gk104_ibus_ctor, + .dtor = _nvkm_ibus_dtor, + .init = gk104_ibus_init, + .fini = _nvkm_ibus_fini, }, }; diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk20a.c index 245f0eb..c0fdb89 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk20a.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk20a.c @@ -19,12 +19,11 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ - #include <subdev/ibus.h> #include <subdev/timer.h> struct gk20a_ibus_priv { - struct nouveau_ibus base; + struct nvkm_ibus base; }; static void @@ -42,7 +41,7 @@ gk20a_ibus_init_priv_ring(struct gk20a_ibus_priv *priv) } static void -gk20a_ibus_intr(struct nouveau_subdev *subdev) +gk20a_ibus_intr(struct nvkm_subdev *subdev) { struct gk20a_ibus_priv *priv = (void *)subdev; u32 status0 = nv_rd32(priv, 0x120058); @@ -60,12 +59,12 @@ gk20a_ibus_intr(struct nouveau_subdev *subdev) } static int -gk20a_ibus_init(struct nouveau_object *object) +gk20a_ibus_init(struct nvkm_object *object) { struct gk20a_ibus_priv *priv = (void *)object; int ret; - ret = _nouveau_ibus_init(object); + ret = _nvkm_ibus_init(object); if (ret) return ret; @@ -75,14 +74,14 @@ gk20a_ibus_init(struct nouveau_object *object) } static int -gk20a_ibus_ctor(struct nouveau_object *parent, struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) +gk20a_ibus_ctor(struct nvkm_object *parent, struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) { struct gk20a_ibus_priv *priv; int ret; - ret = nouveau_ibus_create(parent, engine, oclass, &priv); + ret = nvkm_ibus_create(parent, engine, oclass, &priv); *pobject = nv_object(priv); if (ret) return ret; @@ -91,13 +90,13 @@ gk20a_ibus_ctor(struct nouveau_object *parent, struct nouveau_object *engine, return 0; } -struct nouveau_oclass +struct nvkm_oclass gk20a_ibus_oclass = { .handle = NV_SUBDEV(IBUS, 0xea), - .ofuncs = &(struct nouveau_ofuncs) { + .ofuncs = &(struct nvkm_ofuncs) { .ctor = gk20a_ibus_ctor, - .dtor = _nouveau_ibus_dtor, + .dtor = _nvkm_ibus_dtor, .init = gk20a_ibus_init, - .fini = _nouveau_ibus_fini, + .fini = _nvkm_ibus_fini, }, }; |