summaryrefslogtreecommitdiff
path: root/lib/main.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-01-14 15:36:34 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-01-19 15:42:03 +1000
commit7c92bfba4d743710dedb4b4c412ce0e62482cd72 (patch)
tree7f796da0446be3afdc85c5e159079fc63a56aa8f /lib/main.c
parentf614350d44564f52b5e13ddfc5ab114cf35cfe4c (diff)
downloadnouveau-7c92bfba4d743710dedb4b4c412ce0e62482cd72.tar.gz
drm: finalise nvkm namespace switch (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 'lib/main.c')
-rw-r--r--lib/main.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/main.c b/lib/main.c
index 4ec98a2d8..ac03c9684 100644
--- a/lib/main.c
+++ b/lib/main.c
@@ -159,8 +159,8 @@ os_init_device(struct pci_device *pdev, u64 handle, const char *cfg, const char
ldev->subsystem_device = pdev->subdevice_id;
name = strdup(_name);
- ret = nouveau_device_create(ldev, NVKM_BUS_PCI, handle, name,
- cfg, dbg, &odev);
+ ret = nvkm_device_create(ldev, NVKM_BUS_PCI, handle, name,
+ cfg, dbg, &odev);
if (ret) {
fprintf(stderr, "failed to create device, %d\n", ret);
return ret;
@@ -218,11 +218,11 @@ os_fini(void)
struct pci_dev *ldev = odev->base.pdev;
char *name = odev->name;
list_del(&odev->head);
- nouveau_object_ref(NULL, (struct nouveau_object **)&odev);
+ nvkm_object_ref(NULL, (struct nvkm_object **)&odev);
free(name); free(ldev);
}
- nouveau_object_debug();
+ nvkm_object_debug();
pci_system_cleanup();
}
@@ -247,23 +247,23 @@ os_client_ioctl(void *priv, bool super, void *data, u32 size, void **hack)
static int
os_client_resume(void *priv)
{
- return nouveau_client_init(priv);
+ return nvkm_client_init(priv);
}
static int
os_client_suspend(void *priv)
{
- return nouveau_client_fini(priv, true);
+ return nvkm_client_fini(priv, true);
}
static void
os_client_fini(void *priv)
{
- struct nouveau_object *object = priv;
+ struct nvkm_object *object = priv;
- nouveau_client_fini(nv_client(object), false);
+ nvkm_client_fini(nv_client(object), false);
atomic_set(&object->refcount, 1);
- nouveau_object_ref(NULL, &object);
+ nvkm_object_ref(NULL, &object);
mutex_lock(&os_mutex);
if (--os_client_nr == 0)
@@ -275,7 +275,7 @@ static int
os_client_init(const char *name, u64 device, const char *cfg,
const char *dbg, void **ppriv)
{
- struct nouveau_client *client;
+ struct nvkm_client *client;
int ret;
mutex_lock(&os_mutex);
@@ -283,7 +283,7 @@ os_client_init(const char *name, u64 device, const char *cfg,
os_init(cfg, dbg, true);
mutex_unlock(&os_mutex);
- ret = nouveau_client_create(name, device, cfg, dbg, &client);
+ ret = nvkm_client_create(name, device, cfg, dbg, &client);
*ppriv = client;
if (ret == 0)
client->ntfy = nvif_notify;