]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - drivers/gpu/drm/nouveau/include/nvkm/core/engine.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NVKM_ENGINE_H__
3 #define __NVKM_ENGINE_H__
4 #define nvkm_engine(p) container_of((p), struct nvkm_engine, subdev)
5 #include <core/subdev.h>
10 const struct nvkm_engine_func
*func
;
11 struct nvkm_subdev subdev
;
17 struct nvkm_engine_func
{
18 void *(*dtor
)(struct nvkm_engine
*);
19 int (*oneinit
)(struct nvkm_engine
*);
20 int (*init
)(struct nvkm_engine
*);
21 int (*fini
)(struct nvkm_engine
*, bool suspend
);
22 void (*intr
)(struct nvkm_engine
*);
23 void (*tile
)(struct nvkm_engine
*, int region
, struct nvkm_fb_tile
*);
24 bool (*chsw_load
)(struct nvkm_engine
*);
27 int (*sclass
)(struct nvkm_oclass
*, int index
,
28 const struct nvkm_device_oclass
**);
32 int (*cclass
)(struct nvkm_fifo_chan
*,
33 const struct nvkm_oclass
*,
34 struct nvkm_object
**);
35 int (*sclass
)(struct nvkm_oclass
*, int index
);
38 const struct nvkm_object_func
*cclass
;
39 struct nvkm_sclass sclass
[];
42 int nvkm_engine_ctor(const struct nvkm_engine_func
*, struct nvkm_device
*,
43 int index
, bool enable
, struct nvkm_engine
*);
44 int nvkm_engine_new_(const struct nvkm_engine_func
*, struct nvkm_device
*,
45 int index
, bool enable
, struct nvkm_engine
**);
46 struct nvkm_engine
*nvkm_engine_ref(struct nvkm_engine
*);
47 void nvkm_engine_unref(struct nvkm_engine
**);
48 void nvkm_engine_tile(struct nvkm_engine
*, int region
);
49 bool nvkm_engine_chsw_load(struct nvkm_engine
*);