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