]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/gpu/drm/nouveau/nouveau_compat.h
drm/nouveau/mc: port to subdev interfaces
[karo-tx-linux.git] / drivers / gpu / drm / nouveau / nouveau_compat.h
1 #ifndef __NOUVEAU_COMPAT_H__
2 #define __NOUVEAU_COMPAT_H__
3
4 int nvdrm_gart_init(struct drm_device *, u64 *, u64 *);
5
6 u8   _nv_rd08(struct drm_device *, u32);
7 void _nv_wr08(struct drm_device *, u32, u8);
8 u32  _nv_rd32(struct drm_device *, u32);
9 void _nv_wr32(struct drm_device *, u32, u32);
10 u32  _nv_mask(struct drm_device *, u32, u32, u32);
11
12 bool _nv_bios(struct drm_device *, u8 **, u32 *);
13
14 struct dcb_gpio_func;
15 void nouveau_gpio_reset(struct drm_device *);
16 int  nouveau_gpio_find(struct drm_device *, int, u8, u8, struct dcb_gpio_func *);
17 bool nouveau_gpio_func_valid(struct drm_device *, u8 tag);
18 int  nouveau_gpio_func_set(struct drm_device *, u8 tag, int state);
19 int  nouveau_gpio_func_get(struct drm_device *, u8 tag);
20 int  nouveau_gpio_irq(struct drm_device *, int idx, u8 tag, u8 line, bool on);
21 int  nouveau_gpio_isr_add(struct drm_device *, int idx, u8 tag, u8 line,
22                           void (*)(void *, int state), void *data);
23 void nouveau_gpio_isr_del(struct drm_device *, int idx, u8 tag, u8 line,
24                           void (*)(void *, int state), void *data);
25
26 struct nouveau_i2c_port *nouveau_i2c_find(struct drm_device *, u8);
27 bool nouveau_probe_i2c_addr(struct nouveau_i2c_port *, int addr);
28 struct i2c_adapter *nouveau_i2c_adapter(struct nouveau_i2c_port *);
29 int nouveau_i2c_identify(struct drm_device *dev, const char *what,
30                          struct i2c_board_info *info,
31                          bool (*match)(struct nouveau_i2c_port *,
32                                        struct i2c_board_info *), int index);
33
34 int auxch_rd(struct drm_device *, struct nouveau_i2c_port *, u32, u8 *, u8);
35 int auxch_wr(struct drm_device *, struct nouveau_i2c_port *, u32, u8 *, u8);
36
37 struct nvbios_pll;
38 struct nouveau_pll_vals;
39
40 u32 get_pll_register(struct drm_device *dev, u32 type);
41 int get_pll_limits(struct drm_device *, u32, struct nvbios_pll *);
42 int setPLL(struct drm_device *, u32 reg, u32 clk);
43
44 int nouveau_calc_pll_mnp(struct drm_device *, struct nvbios_pll *,
45                          int, struct nouveau_pll_vals *);
46 int nva3_calc_pll(struct drm_device *dev, struct nvbios_pll *info, u32 freq,
47               int *N, int *fN, int *M, int *P);
48 int nouveau_hw_setpll(struct drm_device *, u32, struct nouveau_pll_vals *);
49
50 struct dcb_output;
51 void nouveau_bios_run_init_table(struct drm_device *, u16, struct dcb_output *, int);
52 void nouveau_bios_init_exec(struct drm_device *, u16);
53
54 void nv_intr(struct drm_device *);
55
56 #endif