2019-06-19 20:13:43 -04:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
2015-01-14 12:02:28 +10:00
|
|
|
#ifndef __NV50_GR_H__
|
|
|
|
|
#define __NV50_GR_H__
|
2015-08-20 14:54:19 +10:00
|
|
|
#define nv50_gr(p) container_of((p), struct nv50_gr, base)
|
|
|
|
|
#include "priv.h"
|
|
|
|
|
|
|
|
|
|
struct nv50_gr {
|
|
|
|
|
struct nvkm_gr base;
|
|
|
|
|
const struct nv50_gr_func *func;
|
|
|
|
|
spinlock_t lock;
|
|
|
|
|
u32 size;
|
|
|
|
|
};
|
|
|
|
|
|
2020-12-04 15:38:44 +10:00
|
|
|
int nv50_gr_new_(const struct nvkm_gr_func *, struct nvkm_device *, enum nvkm_subdev_type, int,
|
2015-08-20 14:54:22 +10:00
|
|
|
struct nvkm_gr **);
|
|
|
|
|
int nv50_gr_init(struct nvkm_gr *);
|
|
|
|
|
void nv50_gr_intr(struct nvkm_gr *);
|
|
|
|
|
u64 nv50_gr_units(struct nvkm_gr *);
|
|
|
|
|
|
|
|
|
|
int g84_gr_tlb_flush(struct nvkm_gr *);
|
2015-08-20 14:54:19 +10:00
|
|
|
|
|
|
|
|
#define nv50_gr_chan(p) container_of((p), struct nv50_gr_chan, object)
|
2017-11-01 03:56:19 +10:00
|
|
|
#include <core/object.h>
|
2015-08-20 14:54:19 +10:00
|
|
|
|
|
|
|
|
struct nv50_gr_chan {
|
|
|
|
|
struct nvkm_object object;
|
|
|
|
|
struct nv50_gr *gr;
|
|
|
|
|
};
|
2012-07-20 08:17:34 +10:00
|
|
|
|
2015-08-20 14:54:22 +10:00
|
|
|
int nv50_gr_chan_new(struct nvkm_gr *, struct nvkm_fifo_chan *,
|
|
|
|
|
const struct nvkm_oclass *, struct nvkm_object **);
|
|
|
|
|
|
|
|
|
|
extern const struct nvkm_object_func nv50_gr_object;
|
|
|
|
|
|
2015-01-14 15:29:43 +10:00
|
|
|
int nv50_grctx_init(struct nvkm_device *, u32 *size);
|
|
|
|
|
void nv50_grctx_fill(struct nvkm_device *, struct nvkm_gpuobj *);
|
2012-07-20 08:17:34 +10:00
|
|
|
#endif
|