Commit 912a29c3 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/bsp: 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: default avatarBen Skeggs <bskeggs@redhat.com>
parent de3aaa66
#ifndef __NOUVEAU_BSP_H__ #ifndef __NVKM_BSP_H__
#define __NOUVEAU_BSP_H__ #define __NVKM_BSP_H__
extern struct nouveau_oclass nv84_bsp_oclass; #include <core/engine.h>
extern struct nvkm_oclass g84_bsp_oclass;
#endif #endif
nvkm-y += nvkm/engine/bsp/nv84.o nvkm-y += nvkm/engine/bsp/g84.o
...@@ -21,9 +21,8 @@ ...@@ -21,9 +21,8 @@
* *
* Authors: Ben Skeggs, Ilia Mirkin * Authors: Ben Skeggs, Ilia Mirkin
*/ */
#include <engine/xtensa.h>
#include <engine/bsp.h> #include <engine/bsp.h>
#include <engine/xtensa.h>
#include <core/engctx.h> #include <core/engctx.h>
...@@ -31,9 +30,9 @@ ...@@ -31,9 +30,9 @@
* BSP object classes * BSP object classes
******************************************************************************/ ******************************************************************************/
static struct nouveau_oclass static struct nvkm_oclass
nv84_bsp_sclass[] = { g84_bsp_sclass[] = {
{ 0x74b0, &nouveau_object_ofuncs }, { 0x74b0, &nvkm_object_ofuncs },
{}, {},
}; };
...@@ -41,16 +40,16 @@ nv84_bsp_sclass[] = { ...@@ -41,16 +40,16 @@ nv84_bsp_sclass[] = {
* BSP context * BSP context
******************************************************************************/ ******************************************************************************/
static struct nouveau_oclass static struct nvkm_oclass
nv84_bsp_cclass = { g84_bsp_cclass = {
.handle = NV_ENGCTX(BSP, 0x84), .handle = NV_ENGCTX(BSP, 0x84),
.ofuncs = &(struct nouveau_ofuncs) { .ofuncs = &(struct nvkm_ofuncs) {
.ctor = _nouveau_xtensa_engctx_ctor, .ctor = _nvkm_xtensa_engctx_ctor,
.dtor = _nouveau_engctx_dtor, .dtor = _nvkm_engctx_dtor,
.init = _nouveau_engctx_init, .init = _nvkm_engctx_init,
.fini = _nouveau_engctx_fini, .fini = _nvkm_engctx_fini,
.rd32 = _nouveau_engctx_rd32, .rd32 = _nvkm_engctx_rd32,
.wr32 = _nouveau_engctx_wr32, .wr32 = _nvkm_engctx_wr32,
}, },
}; };
...@@ -59,36 +58,36 @@ nv84_bsp_cclass = { ...@@ -59,36 +58,36 @@ nv84_bsp_cclass = {
******************************************************************************/ ******************************************************************************/
static int static int
nv84_bsp_ctor(struct nouveau_object *parent, struct nouveau_object *engine, g84_bsp_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
struct nouveau_oclass *oclass, void *data, u32 size, struct nvkm_oclass *oclass, void *data, u32 size,
struct nouveau_object **pobject) struct nvkm_object **pobject)
{ {
struct nouveau_xtensa *priv; struct nvkm_xtensa *priv;
int ret; int ret;
ret = nouveau_xtensa_create(parent, engine, oclass, 0x103000, true, ret = nvkm_xtensa_create(parent, engine, oclass, 0x103000, true,
"PBSP", "bsp", &priv); "PBSP", "bsp", &priv);
*pobject = nv_object(priv); *pobject = nv_object(priv);
if (ret) if (ret)
return ret; return ret;
nv_subdev(priv)->unit = 0x04008000; nv_subdev(priv)->unit = 0x04008000;
nv_engine(priv)->cclass = &nv84_bsp_cclass; nv_engine(priv)->cclass = &g84_bsp_cclass;
nv_engine(priv)->sclass = nv84_bsp_sclass; nv_engine(priv)->sclass = g84_bsp_sclass;
priv->fifo_val = 0x1111; priv->fifo_val = 0x1111;
priv->unkd28 = 0x90044; priv->unkd28 = 0x90044;
return 0; return 0;
} }
struct nouveau_oclass struct nvkm_oclass
nv84_bsp_oclass = { g84_bsp_oclass = {
.handle = NV_ENGINE(BSP, 0x84), .handle = NV_ENGINE(BSP, 0x84),
.ofuncs = &(struct nouveau_ofuncs) { .ofuncs = &(struct nvkm_ofuncs) {
.ctor = nv84_bsp_ctor, .ctor = g84_bsp_ctor,
.dtor = _nouveau_xtensa_dtor, .dtor = _nvkm_xtensa_dtor,
.init = _nouveau_xtensa_init, .init = _nvkm_xtensa_init,
.fini = _nouveau_xtensa_fini, .fini = _nvkm_xtensa_fini,
.rd32 = _nouveau_xtensa_rd32, .rd32 = _nvkm_xtensa_rd32,
.wr32 = _nouveau_xtensa_wr32, .wr32 = _nvkm_xtensa_wr32,
}, },
}; };
...@@ -112,7 +112,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -112,7 +112,7 @@ nv50_identify(struct nouveau_device *device)
device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass;
device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass;
device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass;
device->oclass[NVDEV_ENGINE_BSP ] = &nv84_bsp_oclass; device->oclass[NVDEV_ENGINE_BSP ] = &g84_bsp_oclass;
device->oclass[NVDEV_ENGINE_DISP ] = nv84_disp_oclass; device->oclass[NVDEV_ENGINE_DISP ] = nv84_disp_oclass;
device->oclass[NVDEV_ENGINE_PM ] = nv84_pm_oclass; device->oclass[NVDEV_ENGINE_PM ] = nv84_pm_oclass;
break; break;
...@@ -141,7 +141,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -141,7 +141,7 @@ nv50_identify(struct nouveau_device *device)
device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass;
device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass;
device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass;
device->oclass[NVDEV_ENGINE_BSP ] = &nv84_bsp_oclass; device->oclass[NVDEV_ENGINE_BSP ] = &g84_bsp_oclass;
device->oclass[NVDEV_ENGINE_DISP ] = nv84_disp_oclass; device->oclass[NVDEV_ENGINE_DISP ] = nv84_disp_oclass;
device->oclass[NVDEV_ENGINE_PM ] = nv84_pm_oclass; device->oclass[NVDEV_ENGINE_PM ] = nv84_pm_oclass;
break; break;
...@@ -170,7 +170,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -170,7 +170,7 @@ nv50_identify(struct nouveau_device *device)
device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass;
device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass;
device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass;
device->oclass[NVDEV_ENGINE_BSP ] = &nv84_bsp_oclass; device->oclass[NVDEV_ENGINE_BSP ] = &g84_bsp_oclass;
device->oclass[NVDEV_ENGINE_DISP ] = nv84_disp_oclass; device->oclass[NVDEV_ENGINE_DISP ] = nv84_disp_oclass;
device->oclass[NVDEV_ENGINE_PM ] = nv84_pm_oclass; device->oclass[NVDEV_ENGINE_PM ] = nv84_pm_oclass;
break; break;
...@@ -199,7 +199,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -199,7 +199,7 @@ nv50_identify(struct nouveau_device *device)
device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass;
device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass;
device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass;
device->oclass[NVDEV_ENGINE_BSP ] = &nv84_bsp_oclass; device->oclass[NVDEV_ENGINE_BSP ] = &g84_bsp_oclass;
device->oclass[NVDEV_ENGINE_DISP ] = nv94_disp_oclass; device->oclass[NVDEV_ENGINE_DISP ] = nv94_disp_oclass;
device->oclass[NVDEV_ENGINE_PM ] = nv84_pm_oclass; device->oclass[NVDEV_ENGINE_PM ] = nv84_pm_oclass;
break; break;
...@@ -228,7 +228,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -228,7 +228,7 @@ nv50_identify(struct nouveau_device *device)
device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass;
device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass;
device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass;
device->oclass[NVDEV_ENGINE_BSP ] = &nv84_bsp_oclass; device->oclass[NVDEV_ENGINE_BSP ] = &g84_bsp_oclass;
device->oclass[NVDEV_ENGINE_DISP ] = nv94_disp_oclass; device->oclass[NVDEV_ENGINE_DISP ] = nv94_disp_oclass;
device->oclass[NVDEV_ENGINE_PM ] = nv84_pm_oclass; device->oclass[NVDEV_ENGINE_PM ] = nv84_pm_oclass;
break; break;
...@@ -286,7 +286,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -286,7 +286,7 @@ nv50_identify(struct nouveau_device *device)
device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass;
device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass;
device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass;
device->oclass[NVDEV_ENGINE_BSP ] = &nv84_bsp_oclass; device->oclass[NVDEV_ENGINE_BSP ] = &g84_bsp_oclass;
device->oclass[NVDEV_ENGINE_DISP ] = nva0_disp_oclass; device->oclass[NVDEV_ENGINE_DISP ] = nva0_disp_oclass;
device->oclass[NVDEV_ENGINE_PM ] = nv84_pm_oclass; device->oclass[NVDEV_ENGINE_PM ] = nv84_pm_oclass;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment