diff options
| author | Ben Skeggs <bskeggs@redhat.com> | 2015-01-13 23:52:58 -0500 |
|---|---|---|
| committer | Ben Skeggs <bskeggs@redhat.com> | 2015-01-21 21:17:52 -0500 |
| commit | 639c308effb945732feb26fe416a6f00f3147ae4 (patch) | |
| tree | a2d2b5fd441c7a526d754df11915232f9739f875 /drivers/gpu/drm/nouveau/include | |
| parent | a8c4362bad2218484870678f5d0c221968883f13 (diff) | |
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')
| -rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/core/os.h | 17 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 128 |
2 files changed, 78 insertions, 67 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/os.h b/drivers/gpu/drm/nouveau/include/nvkm/core/os.h index 2b0fe0e7da8c..9571710e637c 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/os.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/os.h | |||
| @@ -220,5 +220,22 @@ | |||
| 220 | #define nva3_clk_info gt215_clk_info | 220 | #define nva3_clk_info gt215_clk_info |
| 221 | #define nva3_pll_info gt215_pll_info | 221 | #define nva3_pll_info gt215_pll_info |
| 222 | #define nouveau_ibus nvkm_ibus | 222 | #define nouveau_ibus nvkm_ibus |
| 223 | #define nouveau_memx nvkm_memx | ||
| 224 | #define nouveau_memx_block nvkm_memx_block | ||
| 225 | #define nouveau_memx_unblock nvkm_memx_unblock | ||
| 226 | #define nouveau_memx_train nvkm_memx_train | ||
| 227 | #define nouveau_memx_train_result nvkm_memx_train_result | ||
| 228 | #define nouveau_memx_wait_vblank nvkm_memx_wait_vblank | ||
| 229 | #define nouveau_memx_rd32 nvkm_memx_rd32 | ||
| 230 | #define nouveau_memx_wr32 nvkm_memx_wr32 | ||
| 231 | #define nouveau_memx_wait nvkm_memx_wait | ||
| 232 | #define nouveau_memx_init nvkm_memx_init | ||
| 233 | #define nouveau_memx_fini nvkm_memx_fini | ||
| 234 | #define nouveau_memx_nsec nvkm_memx_nsec | ||
| 235 | #define nouveau_ltc nvkm_ltc | ||
| 236 | #define nouveau_pmu nvkm_pmu | ||
| 237 | #define nouveau_fb nvkm_fb | ||
| 238 | #define nouveau_fb_tile nvkm_fb_tile | ||
| 239 | #define nvc0_pte_storage_type_map gf100_pte_storage_type_map | ||
| 223 | 240 | ||
| 224 | #endif | 241 | #endif |
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 @@ | |||
| 1 | #ifndef __NOUVEAU_FB_H__ | 1 | #ifndef __NVKM_FB_H__ |
| 2 | #define __NOUVEAU_FB_H__ | 2 | #define __NVKM_FB_H__ |
| 3 | |||
| 4 | #include <core/subdev.h> | 3 | #include <core/subdev.h> |
| 5 | #include <core/device.h> | ||
| 6 | #include <core/mm.h> | ||
| 7 | 4 | ||
| 8 | #include <subdev/mmu.h> | 5 | #include <subdev/mmu.h> |
| 9 | 6 | ||
| @@ -24,14 +21,14 @@ | |||
| 24 | #define NV_MEM_TYPE_VM 0x7f | 21 | #define NV_MEM_TYPE_VM 0x7f |
| 25 | #define NV_MEM_COMP_VM 0x03 | 22 | #define NV_MEM_COMP_VM 0x03 |
| 26 | 23 | ||
| 27 | struct nouveau_mem { | 24 | struct nvkm_mem { |
| 28 | struct drm_device *dev; | 25 | struct drm_device *dev; |
| 29 | 26 | ||
| 30 | struct nouveau_vma bar_vma; | 27 | struct nvkm_vma bar_vma; |
| 31 | struct nouveau_vma vma[2]; | 28 | struct nvkm_vma vma[2]; |
| 32 | u8 page_shift; | 29 | u8 page_shift; |
| 33 | 30 | ||
| 34 | struct nouveau_mm_node *tag; | 31 | struct nvkm_mm_node *tag; |
| 35 | struct list_head regions; | 32 | struct list_head regions; |
| 36 | dma_addr_t *pages; | 33 | dma_addr_t *pages; |
| 37 | u32 memtype; | 34 | u32 memtype; |
| @@ -40,85 +37,83 @@ struct nouveau_mem { | |||
| 40 | struct sg_table *sg; | 37 | struct sg_table *sg; |
| 41 | }; | 38 | }; |
| 42 | 39 | ||
| 43 | struct nouveau_fb_tile { | 40 | struct nvkm_fb_tile { |
| 44 | struct nouveau_mm_node *tag; | 41 | struct nvkm_mm_node *tag; |
| 45 | u32 addr; | 42 | u32 addr; |
| 46 | u32 limit; | 43 | u32 limit; |
| 47 | u32 pitch; | 44 | u32 pitch; |
| 48 | u32 zcomp; | 45 | u32 zcomp; |
| 49 | }; | 46 | }; |
| 50 | 47 | ||
| 51 | struct nouveau_fb { | 48 | struct nvkm_fb { |
| 52 | struct nouveau_subdev base; | 49 | struct nvkm_subdev base; |
| 53 | 50 | ||
| 54 | bool (*memtype_valid)(struct nouveau_fb *, u32 memtype); | 51 | bool (*memtype_valid)(struct nvkm_fb *, u32 memtype); |
| 55 | 52 | ||
| 56 | struct nouveau_ram *ram; | 53 | struct nvkm_ram *ram; |
| 57 | 54 | ||
| 58 | struct nouveau_mm vram; | 55 | struct nvkm_mm vram; |
| 59 | struct nouveau_mm tags; | 56 | struct nvkm_mm tags; |
| 60 | 57 | ||
| 61 | struct { | 58 | struct { |
| 62 | struct nouveau_fb_tile region[16]; | 59 | struct nvkm_fb_tile region[16]; |
| 63 | int regions; | 60 | int regions; |
| 64 | void (*init)(struct nouveau_fb *, int i, u32 addr, u32 size, | 61 | void (*init)(struct nvkm_fb *, int i, u32 addr, u32 size, |
| 65 | u32 pitch, u32 flags, struct nouveau_fb_tile *); | 62 | u32 pitch, u32 flags, struct nvkm_fb_tile *); |
| 66 | void (*comp)(struct nouveau_fb *, int i, u32 size, u32 flags, | 63 | void (*comp)(struct nvkm_fb *, int i, u32 size, u32 flags, |
| 67 | struct nouveau_fb_tile *); | 64 | struct nvkm_fb_tile *); |
| 68 | void (*fini)(struct nouveau_fb *, int i, | 65 | void (*fini)(struct nvkm_fb *, int i, struct nvkm_fb_tile *); |
| 69 | struct nouveau_fb_tile *); | 66 | void (*prog)(struct nvkm_fb *, int i, struct nvkm_fb_tile *); |
| 70 | void (*prog)(struct nouveau_fb *, int i, | ||
| 71 | struct nouveau_fb_tile *); | ||
| 72 | } tile; | 67 | } tile; |
| 73 | }; | 68 | }; |
| 74 | 69 | ||
| 75 | static inline struct nouveau_fb * | 70 | static inline struct nvkm_fb * |
| 76 | nouveau_fb(void *obj) | 71 | nvkm_fb(void *obj) |
| 77 | { | 72 | { |
| 78 | /* fbram uses this before device subdev pointer is valid */ | 73 | /* fbram uses this before device subdev pointer is valid */ |
| 79 | if (nv_iclass(obj, NV_SUBDEV_CLASS) && | 74 | if (nv_iclass(obj, NV_SUBDEV_CLASS) && |
| 80 | nv_subidx(obj) == NVDEV_SUBDEV_FB) | 75 | nv_subidx(obj) == NVDEV_SUBDEV_FB) |
| 81 | return obj; | 76 | return obj; |
| 82 | 77 | ||
| 83 | return (void *)nouveau_subdev(obj, NVDEV_SUBDEV_FB); | 78 | return (void *)nvkm_subdev(obj, NVDEV_SUBDEV_FB); |
| 84 | } | 79 | } |
| 85 | 80 | ||
| 86 | extern struct nouveau_oclass *nv04_fb_oclass; | 81 | extern struct nvkm_oclass *nv04_fb_oclass; |
| 87 | extern struct nouveau_oclass *nv10_fb_oclass; | 82 | extern struct nvkm_oclass *nv10_fb_oclass; |
| 88 | extern struct nouveau_oclass *nv1a_fb_oclass; | 83 | extern struct nvkm_oclass *nv1a_fb_oclass; |
| 89 | extern struct nouveau_oclass *nv20_fb_oclass; | 84 | extern struct nvkm_oclass *nv20_fb_oclass; |
| 90 | extern struct nouveau_oclass *nv25_fb_oclass; | 85 | extern struct nvkm_oclass *nv25_fb_oclass; |
| 91 | extern struct nouveau_oclass *nv30_fb_oclass; | 86 | extern struct nvkm_oclass *nv30_fb_oclass; |
| 92 | extern struct nouveau_oclass *nv35_fb_oclass; | 87 | extern struct nvkm_oclass *nv35_fb_oclass; |
| 93 | extern struct nouveau_oclass *nv36_fb_oclass; | 88 | extern struct nvkm_oclass *nv36_fb_oclass; |
| 94 | extern struct nouveau_oclass *nv40_fb_oclass; | 89 | extern struct nvkm_oclass *nv40_fb_oclass; |
| 95 | extern struct nouveau_oclass *nv41_fb_oclass; | 90 | extern struct nvkm_oclass *nv41_fb_oclass; |
| 96 | extern struct nouveau_oclass *nv44_fb_oclass; | 91 | extern struct nvkm_oclass *nv44_fb_oclass; |
| 97 | extern struct nouveau_oclass *nv46_fb_oclass; | 92 | extern struct nvkm_oclass *nv46_fb_oclass; |
| 98 | extern struct nouveau_oclass *nv47_fb_oclass; | 93 | extern struct nvkm_oclass *nv47_fb_oclass; |
| 99 | extern struct nouveau_oclass *nv49_fb_oclass; | 94 | extern struct nvkm_oclass *nv49_fb_oclass; |
| 100 | extern struct nouveau_oclass *nv4e_fb_oclass; | 95 | extern struct nvkm_oclass *nv4e_fb_oclass; |
| 101 | extern struct nouveau_oclass *nv50_fb_oclass; | 96 | extern struct nvkm_oclass *nv50_fb_oclass; |
| 102 | extern struct nouveau_oclass *nv84_fb_oclass; | 97 | extern struct nvkm_oclass *g84_fb_oclass; |
| 103 | extern struct nouveau_oclass *nva3_fb_oclass; | 98 | extern struct nvkm_oclass *gt215_fb_oclass; |
| 104 | extern struct nouveau_oclass *nvaa_fb_oclass; | 99 | extern struct nvkm_oclass *mcp77_fb_oclass; |
| 105 | extern struct nouveau_oclass *nvaf_fb_oclass; | 100 | extern struct nvkm_oclass *mcp89_fb_oclass; |
| 106 | extern struct nouveau_oclass *nvc0_fb_oclass; | 101 | extern struct nvkm_oclass *gf100_fb_oclass; |
| 107 | extern struct nouveau_oclass *nve0_fb_oclass; | 102 | extern struct nvkm_oclass *gk104_fb_oclass; |
| 108 | extern struct nouveau_oclass *gk20a_fb_oclass; | 103 | extern struct nvkm_oclass *gk20a_fb_oclass; |
| 109 | extern struct nouveau_oclass *gm107_fb_oclass; | 104 | extern struct nvkm_oclass *gm107_fb_oclass; |
| 110 | 105 | ||
| 111 | #include <subdev/bios.h> | 106 | #include <subdev/bios.h> |
| 112 | #include <subdev/bios/ramcfg.h> | 107 | #include <subdev/bios/ramcfg.h> |
| 113 | 108 | ||
| 114 | struct nouveau_ram_data { | 109 | struct nvkm_ram_data { |
| 115 | struct list_head head; | 110 | struct list_head head; |
| 116 | struct nvbios_ramcfg bios; | 111 | struct nvbios_ramcfg bios; |
| 117 | u32 freq; | 112 | u32 freq; |
| 118 | }; | 113 | }; |
| 119 | 114 | ||
| 120 | struct nouveau_ram { | 115 | struct nvkm_ram { |
| 121 | struct nouveau_object base; | 116 | struct nvkm_object base; |
| 122 | enum { | 117 | enum { |
| 123 | NV_MEM_TYPE_UNKNOWN = 0, | 118 | NV_MEM_TYPE_UNKNOWN = 0, |
| 124 | NV_MEM_TYPE_STOLEN, | 119 | NV_MEM_TYPE_STOLEN, |
| @@ -140,21 +135,20 @@ struct nouveau_ram { | |||
| 140 | int parts; | 135 | int parts; |
| 141 | int part_mask; | 136 | int part_mask; |
| 142 | 137 | ||
| 143 | int (*get)(struct nouveau_fb *, u64 size, u32 align, | 138 | int (*get)(struct nvkm_fb *, u64 size, u32 align, u32 size_nc, |
| 144 | u32 size_nc, u32 type, struct nouveau_mem **); | 139 | u32 type, struct nvkm_mem **); |
| 145 | void (*put)(struct nouveau_fb *, struct nouveau_mem **); | 140 | void (*put)(struct nvkm_fb *, struct nvkm_mem **); |
| 146 | 141 | ||
| 147 | int (*calc)(struct nouveau_fb *, u32 freq); | 142 | int (*calc)(struct nvkm_fb *, u32 freq); |
| 148 | int (*prog)(struct nouveau_fb *); | 143 | int (*prog)(struct nvkm_fb *); |
| 149 | void (*tidy)(struct nouveau_fb *); | 144 | void (*tidy)(struct nvkm_fb *); |
| 150 | u32 freq; | 145 | u32 freq; |
| 151 | u32 mr[16]; | 146 | u32 mr[16]; |
| 152 | u32 mr1_nuts; | 147 | u32 mr1_nuts; |
| 153 | 148 | ||
| 154 | struct nouveau_ram_data *next; | 149 | struct nvkm_ram_data *next; |
| 155 | struct nouveau_ram_data former; | 150 | struct nvkm_ram_data former; |
| 156 | struct nouveau_ram_data xition; | 151 | struct nvkm_ram_data xition; |
| 157 | struct nouveau_ram_data target; | 152 | struct nvkm_ram_data target; |
| 158 | }; | 153 | }; |
| 159 | |||
| 160 | #endif | 154 | #endif |
