Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
b8bf04e1 BS |
2 | #ifndef __NV50_GR_H__ |
3 | #define __NV50_GR_H__ | |
27f3d6cf BS |
4 | #define nv50_gr(p) container_of((p), struct nv50_gr, base) |
5 | #include "priv.h" | |
6 | ||
7 | struct nv50_gr { | |
8 | struct nvkm_gr base; | |
9 | const struct nv50_gr_func *func; | |
10 | spinlock_t lock; | |
11 | u32 size; | |
12 | }; | |
13 | ||
c85ee6ca BS |
14 | int nv50_gr_new_(const struct nvkm_gr_func *, struct nvkm_device *, int index, |
15 | struct nvkm_gr **); | |
16 | int nv50_gr_init(struct nvkm_gr *); | |
17 | void nv50_gr_intr(struct nvkm_gr *); | |
18 | u64 nv50_gr_units(struct nvkm_gr *); | |
19 | ||
20 | int g84_gr_tlb_flush(struct nvkm_gr *); | |
27f3d6cf BS |
21 | |
22 | #define nv50_gr_chan(p) container_of((p), struct nv50_gr_chan, object) | |
23 | ||
24 | struct nv50_gr_chan { | |
25 | struct nvkm_object object; | |
26 | struct nv50_gr *gr; | |
27 | }; | |
ebb945a9 | 28 | |
c85ee6ca BS |
29 | int nv50_gr_chan_new(struct nvkm_gr *, struct nvkm_fifo_chan *, |
30 | const struct nvkm_oclass *, struct nvkm_object **); | |
31 | ||
32 | extern const struct nvkm_object_func nv50_gr_object; | |
33 | ||
e3c71eb2 BS |
34 | int nv50_grctx_init(struct nvkm_device *, u32 *size); |
35 | void nv50_grctx_fill(struct nvkm_device *, struct nvkm_gpuobj *); | |
ebb945a9 | 36 | #endif |