Linux Audio

Check our new training course

Buildroot integration, development and maintenance

Need a Buildroot system for your embedded project?
Loading...
v6.9.4
 1/* SPDX-License-Identifier: MIT */
 2#ifndef __NVKM_INSTMEM_H__
 3#define __NVKM_INSTMEM_H__
 4#include <core/subdev.h>
 5struct nvkm_memory;
 6
 7struct nvkm_instmem {
 8	const struct nvkm_instmem_func *func;
 9	struct nvkm_subdev subdev;
10
11	bool suspend;
12
13	spinlock_t lock;
14	struct list_head list;
15	struct list_head boot;
16	u32 reserved;
17
18	/* <=nv4x: protects NV_PRAMIN/BAR2 MM
19	 * >=nv50: protects BAR2 MM & LRU
20	 */
21	struct mutex mutex;
22
23	struct nvkm_memory *vbios;
24	struct nvkm_ramht  *ramht;
25	struct nvkm_memory *ramro;
26	struct nvkm_memory *ramfc;
27
28	struct {
29		struct sg_table fbsr;
30		bool fbsr_valid;
31	} rm;
32};
33
34u32 nvkm_instmem_rd32(struct nvkm_instmem *, u32 addr);
35void nvkm_instmem_wr32(struct nvkm_instmem *, u32 addr, u32 data);
36int nvkm_instobj_new(struct nvkm_instmem *, u32 size, u32 align, bool zero, bool preserve,
37		     struct nvkm_memory **);
38int nvkm_instobj_wrap(struct nvkm_device *, struct nvkm_memory *, struct nvkm_memory **);
39
40int nv04_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
41int nv40_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
42int nv50_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
43int gk20a_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
 
44#endif
v4.6
 
 1#ifndef __NVKM_INSTMEM_H__
 2#define __NVKM_INSTMEM_H__
 3#include <core/subdev.h>
 4struct nvkm_memory;
 5
 6struct nvkm_instmem {
 7	const struct nvkm_instmem_func *func;
 8	struct nvkm_subdev subdev;
 9
 
 
10	spinlock_t lock;
11	struct list_head list;
 
12	u32 reserved;
13
 
 
 
 
 
14	struct nvkm_memory *vbios;
15	struct nvkm_ramht  *ramht;
16	struct nvkm_memory *ramro;
17	struct nvkm_memory *ramfc;
 
 
 
 
 
18};
19
20u32 nvkm_instmem_rd32(struct nvkm_instmem *, u32 addr);
21void nvkm_instmem_wr32(struct nvkm_instmem *, u32 addr, u32 data);
22int nvkm_instobj_new(struct nvkm_instmem *, u32 size, u32 align, bool zero,
23		     struct nvkm_memory **);
 
24
25
26int nv04_instmem_new(struct nvkm_device *, int, struct nvkm_instmem **);
27int nv40_instmem_new(struct nvkm_device *, int, struct nvkm_instmem **);
28int nv50_instmem_new(struct nvkm_device *, int, struct nvkm_instmem **);
29int gk20a_instmem_new(struct nvkm_device *, int, struct nvkm_instmem **);
30#endif