License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-2.6-block.git] / drivers / gpu / drm / nouveau / nvkm / engine / gr / priv.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
27f3d6cf
BS
2#ifndef __NVKM_GR_PRIV_H__
3#define __NVKM_GR_PRIV_H__
4#define nvkm_gr(p) container_of((p), struct nvkm_gr, engine)
5#include <engine/gr.h>
c85ee6ca
BS
6#include <core/enum.h>
7struct nvkm_fb_tile;
27f3d6cf
BS
8struct nvkm_fifo_chan;
9
c85ee6ca 10int nvkm_gr_ctor(const struct nvkm_gr_func *, struct nvkm_device *,
56d06fa2 11 int index, bool enable, struct nvkm_gr *);
c85ee6ca
BS
12
13bool nv04_gr_idle(struct nvkm_gr *);
14
27f3d6cf 15struct nvkm_gr_func {
c85ee6ca
BS
16 void *(*dtor)(struct nvkm_gr *);
17 int (*oneinit)(struct nvkm_gr *);
18 int (*init)(struct nvkm_gr *);
d2753f40 19 int (*fini)(struct nvkm_gr *, bool);
c85ee6ca
BS
20 void (*intr)(struct nvkm_gr *);
21 void (*tile)(struct nvkm_gr *, int region, struct nvkm_fb_tile *);
22 int (*tlb_flush)(struct nvkm_gr *);
27f3d6cf
BS
23 int (*chan_new)(struct nvkm_gr *, struct nvkm_fifo_chan *,
24 const struct nvkm_oclass *, struct nvkm_object **);
25 int (*object_get)(struct nvkm_gr *, int, struct nvkm_sclass *);
c85ee6ca
BS
26 /* Returns chipset-specific counts of units packed into an u64.
27 */
28 u64 (*units)(struct nvkm_gr *);
71ce33a2 29 bool (*chsw_load)(struct nvkm_gr *);
27f3d6cf
BS
30 struct nvkm_sclass sclass[];
31};
32
c85ee6ca 33extern const struct nvkm_bitfield nv04_gr_nsource[];
27f3d6cf 34extern const struct nvkm_object_func nv04_gr_object;
c85ee6ca
BS
35
36extern const struct nvkm_bitfield nv10_gr_intr_name[];
37extern const struct nvkm_bitfield nv10_gr_nstatus[];
38
39extern const struct nvkm_enum nv50_data_error_names[];
27f3d6cf 40#endif