Linux Audio

Check our new training course

Loading...
v6.13.7
 1#ifndef __NOUVEAU_MEM_H__
 2#define __NOUVEAU_MEM_H__
 3#include <drm/ttm/ttm_bo.h>
 4struct ttm_tt;
 5
 6#include <nvif/mem.h>
 7#include <nvif/vmm.h>
 8
 
 
 
 
 
 
 9struct nouveau_mem {
10	struct ttm_resource base;
11	struct nouveau_drm *drm;
12	u8 kind;
13	u8 comp;
14	struct nvif_mem mem;
15	struct nvif_vma vma[2];
16};
17
18static inline struct nouveau_mem *
19nouveau_mem(struct ttm_resource *reg)
20{
21	return container_of(reg, struct nouveau_mem, base);
22}
23
24int nouveau_mem_new(struct nouveau_drm *, u8 kind, u8 comp,
25		    struct ttm_resource **);
26void nouveau_mem_del(struct ttm_resource_manager *man,
27		     struct ttm_resource *);
28bool nouveau_mem_intersects(struct ttm_resource *res,
29			    const struct ttm_place *place,
30			    size_t size);
31bool nouveau_mem_compatible(struct ttm_resource *res,
32			    const struct ttm_place *place,
33			    size_t size);
34int nouveau_mem_vram(struct ttm_resource *, bool contig, u8 page);
35int nouveau_mem_host(struct ttm_resource *, struct ttm_tt *);
36void nouveau_mem_fini(struct nouveau_mem *);
37int nouveau_mem_map(struct nouveau_mem *, struct nvif_vmm *, struct nvif_vma *);
38int
39nouveau_mem_map_fixed(struct nouveau_mem *mem,
40		      struct nvif_vmm *vmm,
41		      u8 kind, u64 addr,
42		      u64 offset, u64 range);
43#endif
v4.17
 1#ifndef __NOUVEAU_MEM_H__
 2#define __NOUVEAU_MEM_H__
 3#include <drm/ttm/ttm_bo_api.h>
 4struct ttm_dma_tt;
 5
 6#include <nvif/mem.h>
 7#include <nvif/vmm.h>
 8
 9static inline struct nouveau_mem *
10nouveau_mem(struct ttm_mem_reg *reg)
11{
12	return reg->mm_node;
13}
14
15struct nouveau_mem {
16	struct nouveau_cli *cli;
 
17	u8 kind;
18	u8 comp;
19	struct nvif_mem mem;
20	struct nvif_vma vma[2];
21};
22
23int nouveau_mem_new(struct nouveau_cli *, u8 kind, u8 comp,
24		    struct ttm_mem_reg *);
25void nouveau_mem_del(struct ttm_mem_reg *);
26int nouveau_mem_vram(struct ttm_mem_reg *, bool contig, u8 page);
27int nouveau_mem_host(struct ttm_mem_reg *, struct ttm_dma_tt *);
 
 
 
 
 
 
 
 
 
 
 
 
 
28void nouveau_mem_fini(struct nouveau_mem *);
29int nouveau_mem_map(struct nouveau_mem *, struct nvif_vmm *, struct nvif_vma *);
 
 
 
 
 
30#endif