diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-05-19 23:59:35 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-06-16 14:04:48 +1000 |
commit | 57b2d73be275f853066aaf5cc33f6c59a94260b2 (patch) | |
tree | d95db4ceb4cf485007977df9d43eb3643d4b21d7 /drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h | |
parent | 14187b007e646c0dbf0813d22f7733cf6eebc099 (diff) |
drm/nouveau/disp: common implementation of scanoutpos method in nvkm_head
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h b/drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h index 68866a7fba01..94f5cb7596a0 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h @@ -8,17 +8,34 @@ struct nvkm_head { int id; struct list_head head; + + struct nvkm_head_state { + u16 htotal; + u16 hsynce; + u16 hblanke; + u16 hblanks; + u16 vtotal; + u16 vsynce; + u16 vblanke; + u16 vblanks; + } arm, asy; }; int nvkm_head_new_(const struct nvkm_head_func *, struct nvkm_disp *, int id); void nvkm_head_del(struct nvkm_head **); +int nvkm_head_mthd_scanoutpos(struct nvkm_object *, + struct nvkm_head *, void *, u32); struct nvkm_head *nvkm_head_find(struct nvkm_disp *, int id); struct nvkm_head_func { + void (*state)(struct nvkm_head *, struct nvkm_head_state *); + void (*rgpos)(struct nvkm_head *, u16 *hline, u16 *vline); void (*vblank_get)(struct nvkm_head *); void (*vblank_put)(struct nvkm_head *); }; +void nv50_head_rgpos(struct nvkm_head *, u16 *, u16 *); + #define HEAD_MSG(h,l,f,a...) do { \ struct nvkm_head *_h = (h); \ nvkm_##l(&_h->disp->engine.subdev, "head-%d: "f"\n", _h->id, ##a); \ |