1#ifndef __NV50_KMS_HEAD_H__ 2#define __NV50_KMS_HEAD_H__ 3#define nv50_head(c) container_of((c), struct nv50_head, base.base) 4#include <linux/workqueue.h> 5 6#include "disp.h" 7#include "atom.h" 8#include "crc.h" 9#include "lut.h" 10 11#include "nouveau_crtc.h" 12#include "nouveau_encoder.h" 13 14struct nv50_head { 15 const struct nv50_head_func *func; 16 struct nouveau_crtc base; 17 struct nv50_crc crc; 18 struct nv50_lut olut; 19 struct nv50_msto *msto; 20}; 21 22struct nv50_head *nv50_head_create(struct drm_device *, int index); 23void nv50_head_flush_set(struct nv50_head *head, struct nv50_head_atom *asyh); 24void nv50_head_flush_set_wndw(struct nv50_head *head, struct nv50_head_atom *asyh); 25void nv50_head_flush_clr(struct nv50_head *head, 26 struct nv50_head_atom *asyh, bool flush); 27 28struct nv50_head_func { 29 int (*view)(struct nv50_head *, struct nv50_head_atom *); 30 int (*mode)(struct nv50_head *, struct nv50_head_atom *); 31 bool (*olut)(struct nv50_head *, struct nv50_head_atom *, int); 32 bool olut_identity; 33 int olut_size; 34 int (*olut_set)(struct nv50_head *, struct nv50_head_atom *); 35 int (*olut_clr)(struct nv50_head *); 36 void (*core_calc)(struct nv50_head *, struct nv50_head_atom *); 37 int (*core_set)(struct nv50_head *, struct nv50_head_atom *); 38 int (*core_clr)(struct nv50_head *); 39 int (*curs_layout)(struct nv50_head *, struct nv50_wndw_atom *, 40 struct nv50_head_atom *); 41 int (*curs_format)(struct nv50_head *, struct nv50_wndw_atom *, 42 struct nv50_head_atom *); 43 int (*curs_set)(struct nv50_head *, struct nv50_head_atom *); 44 int (*curs_clr)(struct nv50_head *); 45 int (*base)(struct nv50_head *, struct nv50_head_atom *); 46 int (*ovly)(struct nv50_head *, struct nv50_head_atom *); 47 int (*dither)(struct nv50_head *, struct nv50_head_atom *); 48 int (*procamp)(struct nv50_head *, struct nv50_head_atom *); 49 int (*or)(struct nv50_head *, struct nv50_head_atom *); 50 void (*static_wndw_map)(struct nv50_head *, struct nv50_head_atom *); 51}; 52 53extern const struct nv50_head_func head507d; 54int head507d_view(struct nv50_head *, struct nv50_head_atom *); 55int head507d_mode(struct nv50_head *, struct nv50_head_atom *); 56bool head507d_olut(struct nv50_head *, struct nv50_head_atom *, int); 57void head507d_core_calc(struct nv50_head *, struct nv50_head_atom *); 58int head507d_core_clr(struct nv50_head *); 59int head507d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *, 60 struct nv50_head_atom *); 61int head507d_curs_format(struct nv50_head *, struct nv50_wndw_atom *, 62 struct nv50_head_atom *); 63int head507d_base(struct nv50_head *, struct nv50_head_atom *); 64int head507d_ovly(struct nv50_head *, struct nv50_head_atom *); 65int head507d_dither(struct nv50_head *, struct nv50_head_atom *); 66int head507d_procamp(struct nv50_head *, struct nv50_head_atom *); 67 68extern const struct nv50_head_func head827d; 69 70extern const struct nv50_head_func head907d; 71int head907d_view(struct nv50_head *, struct nv50_head_atom *); 72int head907d_mode(struct nv50_head *, struct nv50_head_atom *); 73bool head907d_olut(struct nv50_head *, struct nv50_head_atom *, int); 74int head907d_olut_set(struct nv50_head *, struct nv50_head_atom *); 75int head907d_olut_clr(struct nv50_head *); 76int head907d_core_set(struct nv50_head *, struct nv50_head_atom *); 77int head907d_core_clr(struct nv50_head *); 78int head907d_curs_set(struct nv50_head *, struct nv50_head_atom *); 79int head907d_curs_clr(struct nv50_head *); 80int head907d_ovly(struct nv50_head *, struct nv50_head_atom *); 81int head907d_procamp(struct nv50_head *, struct nv50_head_atom *); 82int head907d_or(struct nv50_head *, struct nv50_head_atom *); 83 84extern const struct nv50_head_func head917d; 85int head917d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *, 86 struct nv50_head_atom *); 87 88extern const struct nv50_head_func headc37d; 89int headc37d_view(struct nv50_head *, struct nv50_head_atom *); 90int headc37d_curs_format(struct nv50_head *, struct nv50_wndw_atom *, 91 struct nv50_head_atom *); 92int headc37d_curs_set(struct nv50_head *, struct nv50_head_atom *); 93int headc37d_curs_clr(struct nv50_head *); 94int headc37d_dither(struct nv50_head *, struct nv50_head_atom *); 95void headc37d_static_wndw_map(struct nv50_head *, struct nv50_head_atom *); 96 97extern const struct nv50_head_func headc57d; 98#endif 99