Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* $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. Daplas | 918799a | 2006-01-09 20:53:40 -0800 | [diff] [blame] | 7 | int NVCommonSetup(struct fb_info *info); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | void NVWriteCrtc(struct nvidia_par *par, u8 index, u8 value); |
| 9 | u8 NVReadCrtc(struct nvidia_par *par, u8 index); |
| 10 | void NVWriteGr(struct nvidia_par *par, u8 index, u8 value); |
| 11 | u8 NVReadGr(struct nvidia_par *par, u8 index); |
| 12 | void NVWriteSeq(struct nvidia_par *par, u8 index, u8 value); |
| 13 | u8 NVReadSeq(struct nvidia_par *par, u8 index); |
| 14 | void NVWriteAttr(struct nvidia_par *par, u8 index, u8 value); |
| 15 | u8 NVReadAttr(struct nvidia_par *par, u8 index); |
| 16 | void NVWriteMiscOut(struct nvidia_par *par, u8 value); |
| 17 | u8 NVReadMiscOut(struct nvidia_par *par); |
| 18 | void NVWriteDacMask(struct nvidia_par *par, u8 value); |
| 19 | void NVWriteDacReadAddr(struct nvidia_par *par, u8 value); |
| 20 | void NVWriteDacWriteAddr(struct nvidia_par *par, u8 value); |
| 21 | void NVWriteDacData(struct nvidia_par *par, u8 value); |
| 22 | u8 NVReadDacData(struct nvidia_par *par); |
| 23 | |
| 24 | /* in nv_hw.c */ |
| 25 | void NVCalcStateExt(struct nvidia_par *par, struct _riva_hw_state *, |
| 26 | int, int, int, int, int, int); |
| 27 | void NVLoadStateExt(struct nvidia_par *par, struct _riva_hw_state *); |
| 28 | void NVUnloadStateExt(struct nvidia_par *par, struct _riva_hw_state *); |
| 29 | void NVSetStartAddress(struct nvidia_par *par, u32); |
| 30 | int NVShowHideCursor(struct nvidia_par *par, int); |
| 31 | void NVLockUnlock(struct nvidia_par *par, int); |
| 32 | |
| 33 | /* in nvidia-i2c.c */ |
Benjamin Herrenschmidt | 85f1503 | 2005-11-07 01:00:30 -0800 | [diff] [blame] | 34 | #ifdef CONFIG_FB_NVIDIA_I2C |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | void nvidia_create_i2c_busses(struct nvidia_par *par); |
| 36 | void nvidia_delete_i2c_busses(struct nvidia_par *par); |
Antonino A. Daplas | 094bb65 | 2005-09-09 13:04:36 -0700 | [diff] [blame] | 37 | int nvidia_probe_i2c_connector(struct fb_info *info, int conn, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | u8 ** out_edid); |
| 39 | #else |
| 40 | #define nvidia_create_i2c_busses(...) |
| 41 | #define nvidia_delete_i2c_busses(...) |
Benjamin Herrenschmidt | 85f1503 | 2005-11-07 01:00:30 -0800 | [diff] [blame] | 42 | #define nvidia_probe_i2c_connector(p, c, edid) (-1) |
| 43 | #endif |
| 44 | |
Andrew Morton | c53ca78 | 2005-11-13 16:06:31 -0800 | [diff] [blame] | 45 | #ifdef CONFIG_PPC_OF |
Benjamin Herrenschmidt | 85f1503 | 2005-11-07 01:00:30 -0800 | [diff] [blame] | 46 | int nvidia_probe_of_connector(struct fb_info *info, int conn, |
| 47 | u8 ** out_edid); |
| 48 | #else |
Andrew Morton | 7f8c54d | 2005-11-07 01:00:31 -0800 | [diff] [blame] | 49 | static inline int nvidia_probe_of_connector(struct fb_info *info, int conn, |
| 50 | u8 ** out_edid) |
| 51 | { |
| 52 | return -1; |
| 53 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | #endif |
| 55 | |
| 56 | /* in nv_accel.c */ |
| 57 | extern void NVResetGraphics(struct fb_info *info); |
| 58 | extern void nvidiafb_copyarea(struct fb_info *info, |
| 59 | const struct fb_copyarea *region); |
| 60 | extern void nvidiafb_fillrect(struct fb_info *info, |
| 61 | const struct fb_fillrect *rect); |
| 62 | extern void nvidiafb_imageblit(struct fb_info *info, |
| 63 | const struct fb_image *image); |
| 64 | extern int nvidiafb_sync(struct fb_info *info); |
Michael Hanselmann | 5474c12 | 2006-06-25 05:47:08 -0700 | [diff] [blame] | 65 | |
| 66 | /* in nv_backlight.h */ |
| 67 | #ifdef CONFIG_FB_NVIDIA_BACKLIGHT |
| 68 | extern void nvidia_bl_init(struct nvidia_par *par); |
| 69 | extern void nvidia_bl_exit(struct nvidia_par *par); |
Michael Hanselmann | e01af03 | 2006-07-10 04:44:45 -0700 | [diff] [blame] | 70 | extern void nvidia_bl_set_power(struct fb_info *info, int power); |
Michael Hanselmann | 5474c12 | 2006-06-25 05:47:08 -0700 | [diff] [blame] | 71 | #else |
| 72 | static inline void nvidia_bl_init(struct nvidia_par *par) {} |
| 73 | static inline void nvidia_bl_exit(struct nvidia_par *par) {} |
Michael Hanselmann | e01af03 | 2006-07-10 04:44:45 -0700 | [diff] [blame] | 74 | static inline void nvidia_bl_set_power(struct fb_info *info, int power) {} |
Michael Hanselmann | 5474c12 | 2006-06-25 05:47:08 -0700 | [diff] [blame] | 75 | #endif |
| 76 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 77 | #endif /* __NV_PROTO_H__ */ |