diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 04:54:17 (GMT) |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 02:40:36 (GMT) |
commit | d8e83994aaf6749b7124a219f5b46bd1329e2a08 (patch) | |
tree | 7da43672ce2860ff204fbe34f14f37ba49bbd246 /drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h | |
parent | 1de68568d69ac518db076cc6118af91e930b5f90 (diff) | |
download | linux-d8e83994aaf6749b7124a219f5b46bd1329e2a08.tar.xz |
drm/nouveau/imem: improve management of instance memory
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h index 7ba3ff2..2e9e6f0 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h @@ -1,33 +1,22 @@ #ifndef __NVKM_INSTMEM_H__ #define __NVKM_INSTMEM_H__ #include <core/subdev.h> - -struct nvkm_instobj { - struct nvkm_object object; - struct list_head head; - u32 *suspend; - u64 addr; - u32 size; -}; - -static inline struct nvkm_instobj * -nv_memobj(void *obj) -{ -#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - BUG_ON(!nv_iclass(obj, NV_MEMOBJ_CLASS)); -#endif - return obj; -} +struct nvkm_memory; struct nvkm_instmem { struct nvkm_subdev subdev; struct list_head list; u32 reserved; - int (*alloc)(struct nvkm_instmem *, struct nvkm_object *, - u32 size, u32 align, struct nvkm_object **); + int (*alloc)(struct nvkm_instmem *, u32 size, u32 align, bool zero, + struct nvkm_memory **); const struct nvkm_instmem_func *func; + + struct nvkm_gpuobj *vbios; + struct nvkm_ramht *ramht; + struct nvkm_gpuobj *ramro; + struct nvkm_gpuobj *ramfc; }; struct nvkm_instmem_func { |