1
2
3#ifndef __NV_PROTO_H__
4#define __NV_PROTO_H__
5
6
7int NVCommonSetup(struct fb_info *info);
8void NVWriteCrtc(struct nvidia_par *par, u8 index, u8 value);
9u8 NVReadCrtc(struct nvidia_par *par, u8 index);
10void NVWriteGr(struct nvidia_par *par, u8 index, u8 value);
11u8 NVReadGr(struct nvidia_par *par, u8 index);
12void NVWriteSeq(struct nvidia_par *par, u8 index, u8 value);
13u8 NVReadSeq(struct nvidia_par *par, u8 index);
14void NVWriteAttr(struct nvidia_par *par, u8 index, u8 value);
15u8 NVReadAttr(struct nvidia_par *par, u8 index);
16void NVWriteMiscOut(struct nvidia_par *par, u8 value);
17u8 NVReadMiscOut(struct nvidia_par *par);
18void NVWriteDacMask(struct nvidia_par *par, u8 value);
19void NVWriteDacReadAddr(struct nvidia_par *par, u8 value);
20void NVWriteDacWriteAddr(struct nvidia_par *par, u8 value);
21void NVWriteDacData(struct nvidia_par *par, u8 value);
22u8 NVReadDacData(struct nvidia_par *par);
23
24
25void NVCalcStateExt(struct nvidia_par *par, struct _riva_hw_state *,
26 int, int, int, int, int, int);
27void NVLoadStateExt(struct nvidia_par *par, struct _riva_hw_state *);
28void NVUnloadStateExt(struct nvidia_par *par, struct _riva_hw_state *);
29void NVSetStartAddress(struct nvidia_par *par, u32);
30int NVShowHideCursor(struct nvidia_par *par, int);
31void NVLockUnlock(struct nvidia_par *par, int);
32
33
34#ifdef CONFIG_FB_NVIDIA_I2C
35void nvidia_create_i2c_busses(struct nvidia_par *par);
36void nvidia_delete_i2c_busses(struct nvidia_par *par);
37int nvidia_probe_i2c_connector(struct fb_info *info, int conn,
38 u8 ** out_edid);
39#else
40#define nvidia_create_i2c_busses(...)
41#define nvidia_delete_i2c_busses(...)
42#define nvidia_probe_i2c_connector(p, c, edid) (-1)
43#endif
44
45#ifdef CONFIG_PPC_OF
46int nvidia_probe_of_connector(struct fb_info *info, int conn,
47 u8 ** out_edid);
48#else
49static inline int nvidia_probe_of_connector(struct fb_info *info, int conn,
50 u8 ** out_edid)
51{
52 return -1;
53}
54#endif
55
56
57extern void NVResetGraphics(struct fb_info *info);
58extern void nvidiafb_copyarea(struct fb_info *info,
59 const struct fb_copyarea *region);
60extern void nvidiafb_fillrect(struct fb_info *info,
61 const struct fb_fillrect *rect);
62extern void nvidiafb_imageblit(struct fb_info *info,
63 const struct fb_image *image);
64extern int nvidiafb_sync(struct fb_info *info);
65
66
67#ifdef CONFIG_FB_NVIDIA_BACKLIGHT
68extern void nvidia_bl_init(struct nvidia_par *par);
69extern void nvidia_bl_exit(struct nvidia_par *par);
70#else
71static inline void nvidia_bl_init(struct nvidia_par *par) {}
72static inline void nvidia_bl_exit(struct nvidia_par *par) {}
73#endif
74
75#endif
76