Back to home page

OSCL-LXR

 
 

    


0001 #ifndef __NV50_KMS_HEAD_H__
0002 #define __NV50_KMS_HEAD_H__
0003 #define nv50_head(c) container_of((c), struct nv50_head, base.base)
0004 #include <linux/workqueue.h>
0005 
0006 #include "disp.h"
0007 #include "atom.h"
0008 #include "crc.h"
0009 #include "lut.h"
0010 
0011 #include "nouveau_crtc.h"
0012 #include "nouveau_encoder.h"
0013 
0014 struct nv50_head {
0015     const struct nv50_head_func *func;
0016     struct nouveau_crtc base;
0017     struct nv50_crc crc;
0018     struct nv50_lut olut;
0019     struct nv50_msto *msto;
0020 };
0021 
0022 struct nv50_head *nv50_head_create(struct drm_device *, int index);
0023 void nv50_head_flush_set(struct nv50_head *head, struct nv50_head_atom *asyh);
0024 void nv50_head_flush_set_wndw(struct nv50_head *head, struct nv50_head_atom *asyh);
0025 void nv50_head_flush_clr(struct nv50_head *head,
0026              struct nv50_head_atom *asyh, bool flush);
0027 
0028 struct nv50_head_func {
0029     int (*view)(struct nv50_head *, struct nv50_head_atom *);
0030     int (*mode)(struct nv50_head *, struct nv50_head_atom *);
0031     bool (*olut)(struct nv50_head *, struct nv50_head_atom *, int);
0032     bool (*ilut_check)(int size);
0033     bool olut_identity;
0034     int  olut_size;
0035     int (*olut_set)(struct nv50_head *, struct nv50_head_atom *);
0036     int (*olut_clr)(struct nv50_head *);
0037     void (*core_calc)(struct nv50_head *, struct nv50_head_atom *);
0038     int (*core_set)(struct nv50_head *, struct nv50_head_atom *);
0039     int (*core_clr)(struct nv50_head *);
0040     int (*curs_layout)(struct nv50_head *, struct nv50_wndw_atom *,
0041                struct nv50_head_atom *);
0042     int (*curs_format)(struct nv50_head *, struct nv50_wndw_atom *,
0043                struct nv50_head_atom *);
0044     int (*curs_set)(struct nv50_head *, struct nv50_head_atom *);
0045     int (*curs_clr)(struct nv50_head *);
0046     int (*base)(struct nv50_head *, struct nv50_head_atom *);
0047     int (*ovly)(struct nv50_head *, struct nv50_head_atom *);
0048     int (*dither)(struct nv50_head *, struct nv50_head_atom *);
0049     int (*procamp)(struct nv50_head *, struct nv50_head_atom *);
0050     int (*or)(struct nv50_head *, struct nv50_head_atom *);
0051     void (*static_wndw_map)(struct nv50_head *, struct nv50_head_atom *);
0052 };
0053 
0054 extern const struct nv50_head_func head507d;
0055 int head507d_view(struct nv50_head *, struct nv50_head_atom *);
0056 int head507d_mode(struct nv50_head *, struct nv50_head_atom *);
0057 bool head507d_olut(struct nv50_head *, struct nv50_head_atom *, int);
0058 void head507d_core_calc(struct nv50_head *, struct nv50_head_atom *);
0059 int head507d_core_clr(struct nv50_head *);
0060 int head507d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *,
0061              struct nv50_head_atom *);
0062 int head507d_curs_format(struct nv50_head *, struct nv50_wndw_atom *,
0063              struct nv50_head_atom *);
0064 int head507d_base(struct nv50_head *, struct nv50_head_atom *);
0065 int head507d_ovly(struct nv50_head *, struct nv50_head_atom *);
0066 int head507d_dither(struct nv50_head *, struct nv50_head_atom *);
0067 int head507d_procamp(struct nv50_head *, struct nv50_head_atom *);
0068 
0069 extern const struct nv50_head_func head827d;
0070 
0071 extern const struct nv50_head_func head907d;
0072 int head907d_view(struct nv50_head *, struct nv50_head_atom *);
0073 int head907d_mode(struct nv50_head *, struct nv50_head_atom *);
0074 bool head907d_olut(struct nv50_head *, struct nv50_head_atom *, int);
0075 bool head907d_ilut_check(int size);
0076 int head907d_olut_set(struct nv50_head *, struct nv50_head_atom *);
0077 int head907d_olut_clr(struct nv50_head *);
0078 int head907d_core_set(struct nv50_head *, struct nv50_head_atom *);
0079 int head907d_core_clr(struct nv50_head *);
0080 int head907d_curs_set(struct nv50_head *, struct nv50_head_atom *);
0081 int head907d_curs_clr(struct nv50_head *);
0082 int head907d_ovly(struct nv50_head *, struct nv50_head_atom *);
0083 int head907d_procamp(struct nv50_head *, struct nv50_head_atom *);
0084 int head907d_or(struct nv50_head *, struct nv50_head_atom *);
0085 
0086 extern const struct nv50_head_func head917d;
0087 int head917d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *,
0088              struct nv50_head_atom *);
0089 
0090 extern const struct nv50_head_func headc37d;
0091 int headc37d_view(struct nv50_head *, struct nv50_head_atom *);
0092 int headc37d_curs_format(struct nv50_head *, struct nv50_wndw_atom *,
0093              struct nv50_head_atom *);
0094 int headc37d_curs_set(struct nv50_head *, struct nv50_head_atom *);
0095 int headc37d_curs_clr(struct nv50_head *);
0096 int headc37d_dither(struct nv50_head *, struct nv50_head_atom *);
0097 void headc37d_static_wndw_map(struct nv50_head *, struct nv50_head_atom *);
0098 
0099 extern const struct nv50_head_func headc57d;
0100 #endif