]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h
drm/nouveau/disp: introduce object to track per-head functions/state
[karo-tx-linux.git] / drivers / gpu / drm / nouveau / nvkm / engine / disp / head.h
1 #ifndef __NVKM_DISP_HEAD_H__
2 #define __NVKM_DISP_HEAD_H__
3 #include "priv.h"
4
5 struct nvkm_head {
6         const struct nvkm_head_func *func;
7         struct nvkm_disp *disp;
8         int id;
9
10         struct list_head head;
11 };
12
13 int nvkm_head_new_(const struct nvkm_head_func *, struct nvkm_disp *, int id);
14 void nvkm_head_del(struct nvkm_head **);
15 struct nvkm_head *nvkm_head_find(struct nvkm_disp *, int id);
16
17 struct nvkm_head_func {
18 };
19
20 #define HEAD_MSG(h,l,f,a...) do {                                              \
21         struct nvkm_head *_h = (h);                                            \
22         nvkm_##l(&_h->disp->engine.subdev, "head-%d: "f"\n", _h->id, ##a);     \
23 } while(0)
24 #define HEAD_WARN(h,f,a...) HEAD_MSG((h), warn, f, ##a)
25 #define HEAD_DBG(h,f,a...) HEAD_MSG((h), debug, f, ##a)
26
27 int nv04_head_new(struct nvkm_disp *, int id);
28 int nv50_head_new(struct nvkm_disp *, int id);
29 int gf119_head_new(struct nvkm_disp *, int id);
30 #endif