diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-01-14 14:11:21 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-01-22 12:17:49 +1000 |
commit | 5025407b9862349d17b1dff25737aaef6520a439 (patch) | |
tree | 6d11493365d06c00d79daf5818b42dfa2d421c1e /drivers/gpu/drm/nouveau/include/nvkm/core/engine.h | |
parent | 989aa5b76ad2af7653353cf01bdebec2ba9436aa (diff) |
drm/nouveau/core: 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/include/nvkm/core/engine.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/core/engine.h | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/engine.h b/drivers/gpu/drm/nouveau/include/nvkm/core/engine.h index d7ebd35ef1ad..faf0fd2f0638 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/engine.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/engine.h @@ -1,25 +1,23 @@ -#ifndef __NOUVEAU_ENGINE_H__ -#define __NOUVEAU_ENGINE_H__ - -#include <core/object.h> +#ifndef __NVKM_ENGINE_H__ +#define __NVKM_ENGINE_H__ #include <core/subdev.h> #define NV_ENGINE_(eng,var) (NV_ENGINE_CLASS | ((var) << 8) | (eng)) #define NV_ENGINE(name,var) NV_ENGINE_(NVDEV_ENGINE_##name, (var)) -struct nouveau_engine { - struct nouveau_subdev subdev; - struct nouveau_oclass *cclass; - struct nouveau_oclass *sclass; +struct nvkm_engine { + struct nvkm_subdev subdev; + struct nvkm_oclass *cclass; + struct nvkm_oclass *sclass; struct list_head contexts; spinlock_t lock; - void (*tile_prog)(struct nouveau_engine *, int region); - int (*tlb_flush)(struct nouveau_engine *); + void (*tile_prog)(struct nvkm_engine *, int region); + int (*tlb_flush)(struct nvkm_engine *); }; -static inline struct nouveau_engine * +static inline struct nvkm_engine * nv_engine(void *obj) { #if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA @@ -30,30 +28,29 @@ nv_engine(void *obj) } static inline int -nv_engidx(struct nouveau_engine *engine) +nv_engidx(struct nvkm_engine *engine) { return nv_subidx(&engine->subdev); } -struct nouveau_engine *nouveau_engine(void *obj, int idx); +struct nvkm_engine *nvkm_engine(void *obj, int idx); -#define nouveau_engine_create(p,e,c,d,i,f,r) \ - nouveau_engine_create_((p), (e), (c), (d), (i), (f), \ +#define nvkm_engine_create(p,e,c,d,i,f,r) \ + nvkm_engine_create_((p), (e), (c), (d), (i), (f), \ sizeof(**r),(void **)r) -#define nouveau_engine_destroy(p) \ - nouveau_subdev_destroy(&(p)->subdev) -#define nouveau_engine_init(p) \ - nouveau_subdev_init(&(p)->subdev) -#define nouveau_engine_fini(p,s) \ - nouveau_subdev_fini(&(p)->subdev, (s)) +#define nvkm_engine_destroy(p) \ + nvkm_subdev_destroy(&(p)->subdev) +#define nvkm_engine_init(p) \ + nvkm_subdev_init(&(p)->subdev) +#define nvkm_engine_fini(p,s) \ + nvkm_subdev_fini(&(p)->subdev, (s)) -int nouveau_engine_create_(struct nouveau_object *, struct nouveau_object *, - struct nouveau_oclass *, bool, const char *, +int nvkm_engine_create_(struct nvkm_object *, struct nvkm_object *, + struct nvkm_oclass *, bool, const char *, const char *, int, void **); -#define _nouveau_engine_dtor _nouveau_subdev_dtor -#define _nouveau_engine_init _nouveau_subdev_init -#define _nouveau_engine_fini _nouveau_subdev_fini - +#define _nvkm_engine_dtor _nvkm_subdev_dtor +#define _nvkm_engine_init _nvkm_subdev_init +#define _nvkm_engine_fini _nvkm_subdev_fini #endif |