1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h,v 1.10 2003/07/31 20:24:29 mvojkovi Exp $ */
3 
4 #ifndef __NV_PROTO_H__
5 #define __NV_PROTO_H__
6 
7 /* in nv_setup.c */
8 int NVCommonSetup(struct fb_info *info);
9 void NVWriteCrtc(struct nvidia_par *par, u8 index, u8 value);
10 u8 NVReadCrtc(struct nvidia_par *par, u8 index);
11 void NVWriteGr(struct nvidia_par *par, u8 index, u8 value);
12 u8 NVReadGr(struct nvidia_par *par, u8 index);
13 void NVWriteSeq(struct nvidia_par *par, u8 index, u8 value);
14 u8 NVReadSeq(struct nvidia_par *par, u8 index);
15 void NVWriteAttr(struct nvidia_par *par, u8 index, u8 value);
16 u8 NVReadAttr(struct nvidia_par *par, u8 index);
17 void NVWriteMiscOut(struct nvidia_par *par, u8 value);
18 u8 NVReadMiscOut(struct nvidia_par *par);
19 void NVWriteDacMask(struct nvidia_par *par, u8 value);
20 void NVWriteDacReadAddr(struct nvidia_par *par, u8 value);
21 void NVWriteDacWriteAddr(struct nvidia_par *par, u8 value);
22 void NVWriteDacData(struct nvidia_par *par, u8 value);
23 u8 NVReadDacData(struct nvidia_par *par);
24 
25 /* in nv_hw.c */
26 void NVCalcStateExt(struct nvidia_par *par, struct _riva_hw_state *,
27 		    int, int, int, int, int, int);
28 void NVLoadStateExt(struct nvidia_par *par, struct _riva_hw_state *);
29 void NVUnloadStateExt(struct nvidia_par *par, struct _riva_hw_state *);
30 void NVSetStartAddress(struct nvidia_par *par, u32);
31 int NVShowHideCursor(struct nvidia_par *par, int);
32 void NVLockUnlock(struct nvidia_par *par, int);
33 
34 /* in nvidia-i2c.c */
35 #ifdef CONFIG_FB_NVIDIA_I2C
36 void nvidia_create_i2c_busses(struct nvidia_par *par);
37 void nvidia_delete_i2c_busses(struct nvidia_par *par);
38 int nvidia_probe_i2c_connector(struct fb_info *info, int conn,
39 			       u8 ** out_edid);
40 #else
41 #define nvidia_create_i2c_busses(...)
42 #define nvidia_delete_i2c_busses(...)
43 #define nvidia_probe_i2c_connector(p, c, edid) (-1)
44 #endif
45 
46 int nvidia_probe_of_connector(struct fb_info *info, int conn,
47 			      u8 ** out_edid);
48 
49 /* in nv_accel.c */
50 extern void NVResetGraphics(struct fb_info *info);
51 extern void nvidiafb_copyarea(struct fb_info *info,
52 			      const struct fb_copyarea *region);
53 extern void nvidiafb_fillrect(struct fb_info *info,
54 			      const struct fb_fillrect *rect);
55 extern void nvidiafb_imageblit(struct fb_info *info,
56 			       const struct fb_image *image);
57 extern int nvidiafb_sync(struct fb_info *info);
58 
59 /* in nv_backlight.h */
60 #ifdef CONFIG_FB_NVIDIA_BACKLIGHT
61 extern void nvidia_bl_init(struct nvidia_par *par);
62 extern void nvidia_bl_exit(struct nvidia_par *par);
63 #else
64 static inline void nvidia_bl_init(struct nvidia_par *par) {}
65 static inline void nvidia_bl_exit(struct nvidia_par *par) {}
66 #endif
67 
68 #endif				/* __NV_PROTO_H__ */
69