blob: ff5c410355ea46d9d853ecb3a7479c32a9d9cc66 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h,v 1.10 2003/07/31 20:24:29 mvojkovi Exp $ */
2
3#ifndef __NV_PROTO_H__
4#define __NV_PROTO_H__
5
6/* in nv_setup.c */
Antonino A. Daplas918799a2006-01-09 20:53:40 -08007int NVCommonSetup(struct fb_info *info);
Linus Torvalds1da177e2005-04-16 15:20:36 -07008void 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/* in nv_hw.c */
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/* in nvidia-i2c.c */
Benjamin Herrenschmidt85f15032005-11-07 01:00:30 -080034#ifdef CONFIG_FB_NVIDIA_I2C
Linus Torvalds1da177e2005-04-16 15:20:36 -070035void nvidia_create_i2c_busses(struct nvidia_par *par);
36void nvidia_delete_i2c_busses(struct nvidia_par *par);
Antonino A. Daplas094bb652005-09-09 13:04:36 -070037int nvidia_probe_i2c_connector(struct fb_info *info, int conn,
Linus Torvalds1da177e2005-04-16 15:20:36 -070038 u8 ** out_edid);
39#else
40#define nvidia_create_i2c_busses(...)
41#define nvidia_delete_i2c_busses(...)
Benjamin Herrenschmidt85f15032005-11-07 01:00:30 -080042#define nvidia_probe_i2c_connector(p, c, edid) (-1)
43#endif
44
Andrew Mortonc53ca782005-11-13 16:06:31 -080045#ifdef CONFIG_PPC_OF
Benjamin Herrenschmidt85f15032005-11-07 01:00:30 -080046int nvidia_probe_of_connector(struct fb_info *info, int conn,
47 u8 ** out_edid);
48#else
Andrew Morton7f8c54d2005-11-07 01:00:31 -080049static inline int nvidia_probe_of_connector(struct fb_info *info, int conn,
50 u8 ** out_edid)
51{
52 return -1;
53}
Linus Torvalds1da177e2005-04-16 15:20:36 -070054#endif
55
56/* in nv_accel.c */
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);
Michael Hanselmann5474c122006-06-25 05:47:08 -070065
66/* in nv_backlight.h */
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
Linus Torvalds1da177e2005-04-16 15:20:36 -070075#endif /* __NV_PROTO_H__ */