diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-01-14 15:36:34 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-01-19 15:42:03 +1000 |
commit | 7c92bfba4d743710dedb4b4c412ce0e62482cd72 (patch) | |
tree | 7f796da0446be3afdc85c5e159079fc63a56aa8f /lib | |
parent | f614350d44564f52b5e13ddfc5ab114cf35cfe4c (diff) | |
download | nouveau-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')
-rw-r--r-- | lib/drm.c | 2 | ||||
-rw-r--r-- | lib/main.c | 22 | ||||
-rw-r--r-- | lib/null.c | 26 | ||||
-rw-r--r-- | lib/priv.h | 2 |
4 files changed, 26 insertions, 26 deletions
@@ -179,7 +179,7 @@ drm_client_init(const char *name, u64 device, const char *cfg, continue; if ((ver = drmGetVersion(drm->fd)) == NULL) continue; - if (!strcmp(ver->name, "nouveau")) + if (!strcmp(ver->name, "nvkm")) break; free(ver); } 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; diff --git a/lib/null.c b/lib/null.c index 32afe568a..45f613e85 100644 --- a/lib/null.c +++ b/lib/null.c @@ -35,7 +35,7 @@ static DEFINE_MUTEX(null_mutex); static int null_client_nr = 0; -static struct nouveau_device *null_device; +static struct nvkm_device *null_device; static struct pci_dev null_pci_dev = { .pdev = &(struct pci_device) { @@ -45,16 +45,16 @@ null_pci_dev = { static void null_fini(void) { - nouveau_object_ref(NULL, (struct nouveau_object **)&null_device); - nouveau_object_debug(); + nvkm_object_ref(NULL, (struct nvkm_object **)&null_device); + nvkm_object_debug(); } static int null_init(const char *cfg, const char *dbg, bool init) { - return nouveau_device_create(&null_pci_dev, NVKM_BUS_PCI, - ~0ULL, "0000:00:00.0", cfg, dbg, - &null_device); + return nvkm_device_create(&null_pci_dev, NVKM_BUS_PCI, + ~0ULL, "0000:00:00.0", cfg, dbg, + &null_device); } static void @@ -77,23 +77,23 @@ null_client_ioctl(void *priv, bool super, void *data, u32 size, void **hack) static int null_client_resume(void *priv) { - return nouveau_client_init(priv); + return nvkm_client_init(priv); } static int null_client_suspend(void *priv) { - return nouveau_client_fini(priv, true); + return nvkm_client_fini(priv, true); } static void null_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(&null_mutex); if (--null_client_nr == 0) @@ -105,7 +105,7 @@ static int null_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(&null_mutex); @@ -113,7 +113,7 @@ null_client_init(const char *name, u64 device, const char *cfg, null_init(cfg, dbg, true); mutex_unlock(&null_mutex); - ret = nouveau_client_create(name, ~0ULL, cfg, dbg, &client); + ret = nvkm_client_create(name, ~0ULL, cfg, dbg, &client); *ppriv = client; if (ret == 0) client->ntfy = nvif_notify; diff --git a/lib/priv.h b/lib/priv.h index f9a12f23b..00e304680 100644 --- a/lib/priv.h +++ b/lib/priv.h @@ -7,7 +7,7 @@ #include <unistd.h> struct os_device { - struct nouveau_device base; + struct nvkm_device base; struct list_head head; char *name; char *cfg; |