diff options
author | 2015-01-14 14:52:58 +1000 | |
---|---|---|
committer | 2015-01-22 12:17:52 +1000 | |
commit | 639c308effb945732feb26fe416a6f00f3147ae4 (patch) | |
tree | a2d2b5fd441c7a526d754df11915232f9739f875 /drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | |
parent | drm/nouveau/devinit: namespace + nvidia gpu names (no binary change) (diff) | |
download | wireguard-linux-639c308effb945732feb26fe416a6f00f3147ae4.tar.xz wireguard-linux-639c308effb945732feb26fe416a6f00f3147ae4.zip |
drm/nouveau/fb: 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/subdev/fb.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 128 |
1 files changed, 61 insertions, 67 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h index b6a210071b22..16da56cf43b0 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h @@ -1,9 +1,6 @@ -#ifndef __NOUVEAU_FB_H__ -#define __NOUVEAU_FB_H__ - +#ifndef __NVKM_FB_H__ +#define __NVKM_FB_H__ #include <core/subdev.h> -#include <core/device.h> -#include <core/mm.h> #include <subdev/mmu.h> @@ -24,14 +21,14 @@ #define NV_MEM_TYPE_VM 0x7f #define NV_MEM_COMP_VM 0x03 -struct nouveau_mem { +struct nvkm_mem { struct drm_device *dev; - struct nouveau_vma bar_vma; - struct nouveau_vma vma[2]; + struct nvkm_vma bar_vma; + struct nvkm_vma vma[2]; u8 page_shift; - struct nouveau_mm_node *tag; + struct nvkm_mm_node *tag; struct list_head regions; dma_addr_t *pages; u32 memtype; @@ -40,85 +37,83 @@ struct nouveau_mem { struct sg_table *sg; }; -struct nouveau_fb_tile { - struct nouveau_mm_node *tag; +struct nvkm_fb_tile { + struct nvkm_mm_node *tag; u32 addr; u32 limit; u32 pitch; u32 zcomp; }; -struct nouveau_fb { - struct nouveau_subdev base; +struct nvkm_fb { + struct nvkm_subdev base; - bool (*memtype_valid)(struct nouveau_fb *, u32 memtype); + bool (*memtype_valid)(struct nvkm_fb *, u32 memtype); - struct nouveau_ram *ram; + struct nvkm_ram *ram; - struct nouveau_mm vram; - struct nouveau_mm tags; + struct nvkm_mm vram; + struct nvkm_mm tags; struct { - struct nouveau_fb_tile region[16]; + struct nvkm_fb_tile region[16]; int regions; - void (*init)(struct nouveau_fb *, int i, u32 addr, u32 size, - u32 pitch, u32 flags, struct nouveau_fb_tile *); - void (*comp)(struct nouveau_fb *, int i, u32 size, u32 flags, - struct nouveau_fb_tile *); - void (*fini)(struct nouveau_fb *, int i, - struct nouveau_fb_tile *); - void (*prog)(struct nouveau_fb *, int i, - struct nouveau_fb_tile *); + void (*init)(struct nvkm_fb *, int i, u32 addr, u32 size, + u32 pitch, u32 flags, struct nvkm_fb_tile *); + void (*comp)(struct nvkm_fb *, int i, u32 size, u32 flags, + struct nvkm_fb_tile *); + void (*fini)(struct nvkm_fb *, int i, struct nvkm_fb_tile *); + void (*prog)(struct nvkm_fb *, int i, struct nvkm_fb_tile *); } tile; }; -static inline struct nouveau_fb * -nouveau_fb(void *obj) +static inline struct nvkm_fb * +nvkm_fb(void *obj) { /* fbram uses this before device subdev pointer is valid */ if (nv_iclass(obj, NV_SUBDEV_CLASS) && nv_subidx(obj) == NVDEV_SUBDEV_FB) return obj; - return (void *)nouveau_subdev(obj, NVDEV_SUBDEV_FB); + return (void *)nvkm_subdev(obj, NVDEV_SUBDEV_FB); } -extern struct nouveau_oclass *nv04_fb_oclass; -extern struct nouveau_oclass *nv10_fb_oclass; -extern struct nouveau_oclass *nv1a_fb_oclass; -extern struct nouveau_oclass *nv20_fb_oclass; -extern struct nouveau_oclass *nv25_fb_oclass; -extern struct nouveau_oclass *nv30_fb_oclass; -extern struct nouveau_oclass *nv35_fb_oclass; -extern struct nouveau_oclass *nv36_fb_oclass; -extern struct nouveau_oclass *nv40_fb_oclass; -extern struct nouveau_oclass *nv41_fb_oclass; -extern struct nouveau_oclass *nv44_fb_oclass; -extern struct nouveau_oclass *nv46_fb_oclass; -extern struct nouveau_oclass *nv47_fb_oclass; -extern struct nouveau_oclass *nv49_fb_oclass; -extern struct nouveau_oclass *nv4e_fb_oclass; -extern struct nouveau_oclass *nv50_fb_oclass; -extern struct nouveau_oclass *nv84_fb_oclass; -extern struct nouveau_oclass *nva3_fb_oclass; -extern struct nouveau_oclass *nvaa_fb_oclass; -extern struct nouveau_oclass *nvaf_fb_oclass; -extern struct nouveau_oclass *nvc0_fb_oclass; -extern struct nouveau_oclass *nve0_fb_oclass; -extern struct nouveau_oclass *gk20a_fb_oclass; -extern struct nouveau_oclass *gm107_fb_oclass; +extern struct nvkm_oclass *nv04_fb_oclass; +extern struct nvkm_oclass *nv10_fb_oclass; +extern struct nvkm_oclass *nv1a_fb_oclass; +extern struct nvkm_oclass *nv20_fb_oclass; +extern struct nvkm_oclass *nv25_fb_oclass; +extern struct nvkm_oclass *nv30_fb_oclass; +extern struct nvkm_oclass *nv35_fb_oclass; +extern struct nvkm_oclass *nv36_fb_oclass; +extern struct nvkm_oclass *nv40_fb_oclass; +extern struct nvkm_oclass *nv41_fb_oclass; +extern struct nvkm_oclass *nv44_fb_oclass; +extern struct nvkm_oclass *nv46_fb_oclass; +extern struct nvkm_oclass *nv47_fb_oclass; +extern struct nvkm_oclass *nv49_fb_oclass; +extern struct nvkm_oclass *nv4e_fb_oclass; +extern struct nvkm_oclass *nv50_fb_oclass; +extern struct nvkm_oclass *g84_fb_oclass; +extern struct nvkm_oclass *gt215_fb_oclass; +extern struct nvkm_oclass *mcp77_fb_oclass; +extern struct nvkm_oclass *mcp89_fb_oclass; +extern struct nvkm_oclass *gf100_fb_oclass; +extern struct nvkm_oclass *gk104_fb_oclass; +extern struct nvkm_oclass *gk20a_fb_oclass; +extern struct nvkm_oclass *gm107_fb_oclass; #include <subdev/bios.h> #include <subdev/bios/ramcfg.h> -struct nouveau_ram_data { +struct nvkm_ram_data { struct list_head head; struct nvbios_ramcfg bios; u32 freq; }; -struct nouveau_ram { - struct nouveau_object base; +struct nvkm_ram { + struct nvkm_object base; enum { NV_MEM_TYPE_UNKNOWN = 0, NV_MEM_TYPE_STOLEN, @@ -140,21 +135,20 @@ struct nouveau_ram { int parts; int part_mask; - int (*get)(struct nouveau_fb *, u64 size, u32 align, - u32 size_nc, u32 type, struct nouveau_mem **); - void (*put)(struct nouveau_fb *, struct nouveau_mem **); + int (*get)(struct nvkm_fb *, u64 size, u32 align, u32 size_nc, + u32 type, struct nvkm_mem **); + void (*put)(struct nvkm_fb *, struct nvkm_mem **); - int (*calc)(struct nouveau_fb *, u32 freq); - int (*prog)(struct nouveau_fb *); - void (*tidy)(struct nouveau_fb *); + int (*calc)(struct nvkm_fb *, u32 freq); + int (*prog)(struct nvkm_fb *); + void (*tidy)(struct nvkm_fb *); u32 freq; u32 mr[16]; u32 mr1_nuts; - struct nouveau_ram_data *next; - struct nouveau_ram_data former; - struct nouveau_ram_data xition; - struct nouveau_ram_data target; + struct nvkm_ram_data *next; + struct nvkm_ram_data former; + struct nvkm_ram_data xition; + struct nvkm_ram_data target; }; - #endif |