diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/include')
19 files changed, 155 insertions, 41 deletions
| diff --git a/drivers/gpu/drm/nouveau/include/nvif/cl5070.h b/drivers/gpu/drm/nouveau/include/nvif/cl5070.h index d15c296b5f33..ae49dfd1f97b 100644 --- a/drivers/gpu/drm/nouveau/include/nvif/cl5070.h +++ b/drivers/gpu/drm/nouveau/include/nvif/cl5070.h @@ -34,6 +34,8 @@ struct nv50_disp_mthd_v1 {  #define NV50_DISP_MTHD_V1_SOR_HDMI_PWR                                     0x22  #define NV50_DISP_MTHD_V1_SOR_LVDS_SCRIPT                                  0x23  #define NV50_DISP_MTHD_V1_SOR_DP_PWR                                       0x24 +#define NV50_DISP_MTHD_V1_SOR_DP_MST_LINK                                  0x25 +#define NV50_DISP_MTHD_V1_SOR_DP_MST_VCPI                                  0x26  #define NV50_DISP_MTHD_V1_PIOR_PWR                                         0x30  	__u8  method;  	__u16 hasht; @@ -90,6 +92,21 @@ struct nv50_disp_sor_dp_pwr_v0 {  	__u8  pad02[6];  }; +struct nv50_disp_sor_dp_mst_link_v0 { +	__u8  version; +	__u8  state; +	__u8  pad02[6]; +}; + +struct nv50_disp_sor_dp_mst_vcpi_v0 { +	__u8  version; +	__u8  pad01[1]; +	__u8  start_slot; +	__u8  num_slots; +	__u16 pbn; +	__u16 aligned_pbn; +}; +  struct nv50_disp_pior_pwr_v0 {  	__u8  version;  	__u8  state; diff --git a/drivers/gpu/drm/nouveau/include/nvif/class.h b/drivers/gpu/drm/nouveau/include/nvif/class.h index e6e9537537cf..82235f30277c 100644 --- a/drivers/gpu/drm/nouveau/include/nvif/class.h +++ b/drivers/gpu/drm/nouveau/include/nvif/class.h @@ -52,7 +52,7 @@  #define GM107_DISP                                    /* cl5070.h */ 0x00009470  #define GM200_DISP                                    /* cl5070.h */ 0x00009570  #define GP100_DISP                                    /* cl5070.h */ 0x00009770 -#define GP104_DISP                                    /* cl5070.h */ 0x00009870 +#define GP102_DISP                                    /* cl5070.h */ 0x00009870  #define NV31_MPEG                                                    0x00003174  #define G82_MPEG                                                     0x00008274 @@ -90,7 +90,7 @@  #define GM107_DISP_CORE_CHANNEL_DMA                   /* cl507d.h */ 0x0000947d  #define GM200_DISP_CORE_CHANNEL_DMA                   /* cl507d.h */ 0x0000957d  #define GP100_DISP_CORE_CHANNEL_DMA                   /* cl507d.h */ 0x0000977d -#define GP104_DISP_CORE_CHANNEL_DMA                   /* cl507d.h */ 0x0000987d +#define GP102_DISP_CORE_CHANNEL_DMA                   /* cl507d.h */ 0x0000987d  #define NV50_DISP_OVERLAY_CHANNEL_DMA                 /* cl507e.h */ 0x0000507e  #define G82_DISP_OVERLAY_CHANNEL_DMA                  /* cl507e.h */ 0x0000827e diff --git a/drivers/gpu/drm/nouveau/include/nvif/object.h b/drivers/gpu/drm/nouveau/include/nvif/object.h index 8d815967767f..9e58b305b020 100644 --- a/drivers/gpu/drm/nouveau/include/nvif/object.h +++ b/drivers/gpu/drm/nouveau/include/nvif/object.h @@ -66,6 +66,35 @@ void nvif_object_unmap(struct nvif_object *);  #define nvif_mthd(a,b,c,d) nvif_object_mthd((a), (b), (c), (d)) +struct nvif_mclass { +	s32 oclass; +	int version; +}; + +#define nvif_mclass(o,m) ({                                                    \ +	struct nvif_object *object = (o);                                      \ +	struct nvif_sclass *sclass;                                            \ +	const typeof(m[0]) *mclass = (m);                                      \ +	int ret = -ENODEV;                                                     \ +	int cnt, i, j;                                                         \ +                                                                               \ +	cnt = nvif_object_sclass_get(object, &sclass);                         \ +	if (cnt >= 0) {                                                        \ +		for (i = 0; ret < 0 && mclass[i].oclass; i++) {                \ +			for (j = 0; j < cnt; j++) {                            \ +				if (mclass[i].oclass  == sclass[j].oclass &&   \ +				    mclass[i].version >= sclass[j].minver &&   \ +				    mclass[i].version <= sclass[j].maxver) {   \ +					ret = i;                               \ +					break;                                 \ +				}                                              \ +			}                                                      \ +		}                                                              \ +		nvif_object_sclass_put(&sclass);                               \ +	}                                                                      \ +	ret;                                                                   \ +}) +  /*XXX*/  #include <core/object.h>  #define nvxx_object(a) ({                                                      \ diff --git a/drivers/gpu/drm/nouveau/include/nvkm/engine/ce.h b/drivers/gpu/drm/nouveau/include/nvkm/engine/ce.h index d3d26a1e215d..b93f4c1a95e5 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/engine/ce.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/engine/ce.h @@ -8,5 +8,5 @@ int gk104_ce_new(struct nvkm_device *, int, struct nvkm_engine **);  int gm107_ce_new(struct nvkm_device *, int, struct nvkm_engine **);  int gm200_ce_new(struct nvkm_device *, int, struct nvkm_engine **);  int gp100_ce_new(struct nvkm_device *, int, struct nvkm_engine **); -int gp104_ce_new(struct nvkm_device *, int, struct nvkm_engine **); +int gp102_ce_new(struct nvkm_device *, int, struct nvkm_engine **);  #endif diff --git a/drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h b/drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h index e82049667ce4..970ae753968a 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h @@ -33,5 +33,5 @@ int gk110_disp_new(struct nvkm_device *, int, struct nvkm_disp **);  int gm107_disp_new(struct nvkm_device *, int, struct nvkm_disp **);  int gm200_disp_new(struct nvkm_device *, int, struct nvkm_disp **);  int gp100_disp_new(struct nvkm_device *, int, struct nvkm_disp **); -int gp104_disp_new(struct nvkm_device *, int, struct nvkm_disp **); +int gp102_disp_new(struct nvkm_device *, int, struct nvkm_disp **);  #endif diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/boost.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/boost.h index 934b0ae5521d..2ff64a20c0ec 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/boost.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/boost.h @@ -1,6 +1,6 @@  #ifndef __NVBIOS_BOOST_H__  #define __NVBIOS_BOOST_H__ -u16 nvbios_boostTe(struct nvkm_bios *, u8 *, u8 *, u8 *, u8 *, u8 *, u8 *); +u32 nvbios_boostTe(struct nvkm_bios *, u8 *, u8 *, u8 *, u8 *, u8 *, u8 *);  struct nvbios_boostE {  	u8  pstate; @@ -8,10 +8,10 @@ struct nvbios_boostE {  	u32 max;  }; -u16 nvbios_boostEe(struct nvkm_bios *, int idx, u8 *, u8 *, u8 *, u8 *); -u16 nvbios_boostEp(struct nvkm_bios *, int idx, u8 *, u8 *, u8 *, u8 *, +u32 nvbios_boostEe(struct nvkm_bios *, int idx, u8 *, u8 *, u8 *, u8 *); +u32 nvbios_boostEp(struct nvkm_bios *, int idx, u8 *, u8 *, u8 *, u8 *,  		   struct nvbios_boostE *); -u16 nvbios_boostEm(struct nvkm_bios *, u8, u8 *, u8 *, u8 *, u8 *, +u32 nvbios_boostEm(struct nvkm_bios *, u8, u8 *, u8 *, u8 *, u8 *,  		   struct nvbios_boostE *);  struct nvbios_boostS { @@ -21,7 +21,7 @@ struct nvbios_boostS {  	u32 max;  }; -u16 nvbios_boostSe(struct nvkm_bios *, int, u16, u8 *, u8 *, u8, u8); -u16 nvbios_boostSp(struct nvkm_bios *, int, u16, u8 *, u8 *, u8, u8, +u32 nvbios_boostSe(struct nvkm_bios *, int, u32, u8 *, u8 *, u8, u8); +u32 nvbios_boostSp(struct nvkm_bios *, int, u32, u8 *, u8 *, u8, u8,  		   struct nvbios_boostS *);  #endif diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/cstep.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/cstep.h index 2f0e0c8e83be..76fe7d50a1ce 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/cstep.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/cstep.h @@ -1,6 +1,6 @@  #ifndef __NVBIOS_CSTEP_H__  #define __NVBIOS_CSTEP_H__ -u16 nvbios_cstepTe(struct nvkm_bios *, +u32 nvbios_cstepTe(struct nvkm_bios *,  		   u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *xnr, u8 *xsz);  struct nvbios_cstepE { @@ -8,10 +8,10 @@ struct nvbios_cstepE {  	u8  index;  }; -u16 nvbios_cstepEe(struct nvkm_bios *, int idx, u8 *ver, u8 *hdr); -u16 nvbios_cstepEp(struct nvkm_bios *, int idx, u8 *ver, u8 *hdr, +u32 nvbios_cstepEe(struct nvkm_bios *, int idx, u8 *ver, u8 *hdr); +u32 nvbios_cstepEp(struct nvkm_bios *, int idx, u8 *ver, u8 *hdr,  		   struct nvbios_cstepE *); -u16 nvbios_cstepEm(struct nvkm_bios *, u8 pstate, u8 *ver, u8 *hdr, +u32 nvbios_cstepEm(struct nvkm_bios *, u8 pstate, u8 *ver, u8 *hdr,  		   struct nvbios_cstepE *);  struct nvbios_cstepX { @@ -20,7 +20,7 @@ struct nvbios_cstepX {  	u8  voltage;  }; -u16 nvbios_cstepXe(struct nvkm_bios *, int idx, u8 *ver, u8 *hdr); -u16 nvbios_cstepXp(struct nvkm_bios *, int idx, u8 *ver, u8 *hdr, +u32 nvbios_cstepXe(struct nvkm_bios *, int idx, u8 *ver, u8 *hdr); +u32 nvbios_cstepXp(struct nvkm_bios *, int idx, u8 *ver, u8 *hdr,  		   struct nvbios_cstepX *);  #endif diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/fan.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/fan.h index 693ea7d9ec43..a7513e8406a3 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/fan.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/fan.h @@ -2,5 +2,5 @@  #define __NVBIOS_FAN_H__  #include <subdev/bios/therm.h> -u16 nvbios_fan_parse(struct nvkm_bios *bios, struct nvbios_therm_fan *fan); +u32 nvbios_fan_parse(struct nvkm_bios *bios, struct nvbios_therm_fan *fan);  #endif diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/gpio.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/gpio.h index a47d46dda704..b7a54e605469 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/gpio.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/gpio.h @@ -6,6 +6,7 @@ enum dcb_gpio_func_name {  	DCB_GPIO_TVDAC1 = 0x2d,  	DCB_GPIO_FAN = 0x09,  	DCB_GPIO_FAN_SENSE = 0x3d, +	DCB_GPIO_LOGO_LED_PWM = 0x84,  	DCB_GPIO_UNUSED = 0xff,  	DCB_GPIO_VID0 = 0x04,  	DCB_GPIO_VID1 = 0x05, diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/iccsense.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/iccsense.h index 9cb97477248b..e933d3eede70 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/iccsense.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/iccsense.h @@ -1,10 +1,16 @@  #ifndef __NVBIOS_ICCSENSE_H__  #define __NVBIOS_ICCSENSE_H__ +struct pwr_rail_resistor_t { +	u8 mohm; +	bool enabled; +}; +  struct pwr_rail_t {  	u8 mode;  	u8 extdev_id; -	u8 resistor_mohm; -	u8 rail; +	u8 resistor_count; +	struct pwr_rail_resistor_t resistors[3]; +	u16 config;  };  struct nvbios_iccsense { diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h index d3bd250103d5..478b1c0d2089 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h @@ -1,6 +1,6 @@  #ifndef __NVBIOS_PERF_H__  #define __NVBIOS_PERF_H__ -u16 nvbios_perf_table(struct nvkm_bios *, u8 *ver, u8 *hdr, +u32 nvbios_perf_table(struct nvkm_bios *, u8 *ver, u8 *hdr,  		      u8 *cnt, u8 *len, u8 *snr, u8 *ssz);  struct nvbios_perfE { @@ -17,9 +17,9 @@ struct nvbios_perfE {  	u8  pcie_width;  }; -u16 nvbios_perf_entry(struct nvkm_bios *, int idx, +u32 nvbios_perf_entry(struct nvkm_bios *, int idx,  		      u8 *ver, u8 *hdr, u8 *cnt, u8 *len); -u16 nvbios_perfEp(struct nvkm_bios *, int idx, +u32 nvbios_perfEp(struct nvkm_bios *, int idx,  		  u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_perfE *);  struct nvbios_perfS { diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/timing.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/timing.h index 339a826aa176..38188d4c9ab5 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/timing.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/timing.h @@ -2,10 +2,10 @@  #define __NVBIOS_TIMING_H__  #include <subdev/bios/ramcfg.h> -u16 nvbios_timingTe(struct nvkm_bios *, +u32 nvbios_timingTe(struct nvkm_bios *,  		    u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *snr, u8 *ssz); -u16 nvbios_timingEe(struct nvkm_bios *, int idx, +u32 nvbios_timingEe(struct nvkm_bios *, int idx,  		    u8 *ver, u8 *hdr, u8 *cnt, u8 *len); -u16 nvbios_timingEp(struct nvkm_bios *, int idx, +u32 nvbios_timingEp(struct nvkm_bios *, int idx,  		    u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_ramcfg *);  #endif diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vmap.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vmap.h index 6633c6db9281..bea31cdd1dd1 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vmap.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vmap.h @@ -1,21 +1,24 @@  #ifndef __NVBIOS_VMAP_H__  #define __NVBIOS_VMAP_H__  struct nvbios_vmap { +	u8  max0; +	u8  max1; +	u8  max2;  }; -u16 nvbios_vmap_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len); -u16 nvbios_vmap_parse(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, +u32 nvbios_vmap_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len); +u32 nvbios_vmap_parse(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len,  		      struct nvbios_vmap *);  struct nvbios_vmap_entry { -	u8  unk0; +	u8  mode;  	u8  link;  	u32 min;  	u32 max;  	s32 arg[6];  }; -u16 nvbios_vmap_entry(struct nvkm_bios *, int idx, u8 *ver, u8 *len); -u16 nvbios_vmap_entry_parse(struct nvkm_bios *, int idx, u8 *ver, u8 *len, +u32 nvbios_vmap_entry(struct nvkm_bios *, int idx, u8 *ver, u8 *len); +u32 nvbios_vmap_entry_parse(struct nvkm_bios *, int idx, u8 *ver, u8 *len,  			    struct nvbios_vmap_entry *);  #endif diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/volt.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/volt.h index b0df610cec2b..f0baa2c7de09 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/volt.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/volt.h @@ -13,16 +13,17 @@ struct nvbios_volt {  	u32 base;  	/* GPIO mode */ -	u8  vidmask; -	s16 step; +	bool ranged; +	u8   vidmask; +	s16  step;  	/* PWM mode */  	u32 pwm_freq;  	u32 pwm_range;  }; -u16 nvbios_volt_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len); -u16 nvbios_volt_parse(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, +u32 nvbios_volt_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len); +u32 nvbios_volt_parse(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len,  		      struct nvbios_volt *);  struct nvbios_volt_entry { @@ -30,7 +31,7 @@ struct nvbios_volt_entry {  	u8  vid;  }; -u16 nvbios_volt_entry(struct nvkm_bios *, int idx, u8 *ver, u8 *len); -u16 nvbios_volt_entry_parse(struct nvkm_bios *, int idx, u8 *ver, u8 *len, +u32 nvbios_volt_entry(struct nvkm_bios *, int idx, u8 *ver, u8 *len); +u32 nvbios_volt_entry_parse(struct nvkm_bios *, int idx, u8 *ver, u8 *len,  			    struct nvbios_volt_entry *);  #endif diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vpstate.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vpstate.h new file mode 100644 index 000000000000..87f804fc3a88 --- /dev/null +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vpstate.h @@ -0,0 +1,24 @@ +#ifndef __NVBIOS_VPSTATE_H__ +#define __NVBIOS_VPSTATE_H__ +struct nvbios_vpstate_header { +	u32 offset; + +	u8 version; +	u8 hlen; +	u8 ecount; +	u8 elen; +	u8 scount; +	u8 slen; + +	u8 base_id; +	u8 boost_id; +	u8 tdp_id; +}; +struct nvbios_vpstate_entry { +	u8  pstate; +	u16 clock_mhz; +}; +int nvbios_vpstate_parse(struct nvkm_bios *, struct nvbios_vpstate_header *); +int nvbios_vpstate_entry(struct nvkm_bios *, struct nvbios_vpstate_header *, +			 u8 idx, struct nvbios_vpstate_entry *); +#endif diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/clk.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/clk.h index fb54417bc458..e5275f742977 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/clk.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/clk.h @@ -6,6 +6,10 @@  struct nvbios_pll;  struct nvkm_pll_vals; +#define NVKM_CLK_CSTATE_DEFAULT -1 /* POSTed default */ +#define NVKM_CLK_CSTATE_BASE    -2 /* pstate base */ +#define NVKM_CLK_CSTATE_HIGHEST -3 /* highest possible */ +  enum nv_clk_src {  	nv_clk_src_crystal,  	nv_clk_src_href, @@ -52,6 +56,7 @@ struct nvkm_cstate {  	struct list_head head;  	u8  voltage;  	u32 domain[nv_clk_src_max]; +	u8  id;  };  struct nvkm_pstate { @@ -67,7 +72,8 @@ struct nvkm_pstate {  struct nvkm_domain {  	enum nv_clk_src name;  	u8 bios; /* 0xff for none */ -#define NVKM_CLK_DOM_FLAG_CORE 0x01 +#define NVKM_CLK_DOM_FLAG_CORE    0x01 +#define NVKM_CLK_DOM_FLAG_VPSTATE 0x02  	u8 flags;  	const char *mname;  	int mdiv; @@ -93,10 +99,16 @@ struct nvkm_clk {  	int ustate_ac; /* user-requested (-1 disabled, -2 perfmon) */  	int ustate_dc; /* user-requested (-1 disabled, -2 perfmon) */  	int astate; /* perfmon adjustment (base) */ -	int tstate; /* thermal adjustment (max-) */  	int dstate; /* display adjustment (min+) */ +	u8  temp;  	bool allow_reclock; +#define NVKM_CLK_BOOST_NONE 0x0 +#define NVKM_CLK_BOOST_BIOS 0x1 +#define NVKM_CLK_BOOST_FULL 0x2 +	u8  boost_mode; +	u32 base_khz; +	u32 boost_khz;  	/*XXX: die, these are here *only* to support the completely  	 *     bat-shit insane what-was-nouveau_hw.c code @@ -110,7 +122,7 @@ int nvkm_clk_read(struct nvkm_clk *, enum nv_clk_src);  int nvkm_clk_ustate(struct nvkm_clk *, int req, int pwr);  int nvkm_clk_astate(struct nvkm_clk *, int req, int rel, bool wait);  int nvkm_clk_dstate(struct nvkm_clk *, int req, int rel); -int nvkm_clk_tstate(struct nvkm_clk *, int req, int rel); +int nvkm_clk_tstate(struct nvkm_clk *, u8 temperature);  int nv04_clk_new(struct nvkm_device *, int, struct nvkm_clk **);  int nv40_clk_new(struct nvkm_device *, int, struct nvkm_clk **); diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h index 3a410275fa71..794e432578b2 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h @@ -93,8 +93,9 @@ int gk104_fb_new(struct nvkm_device *, int, struct nvkm_fb **);  int gk20a_fb_new(struct nvkm_device *, int, struct nvkm_fb **);  int gm107_fb_new(struct nvkm_device *, int, struct nvkm_fb **);  int gm200_fb_new(struct nvkm_device *, int, struct nvkm_fb **); +int gm20b_fb_new(struct nvkm_device *, int, struct nvkm_fb **);  int gp100_fb_new(struct nvkm_device *, int, struct nvkm_fb **); -int gp104_fb_new(struct nvkm_device *, int, struct nvkm_fb **); +int gp102_fb_new(struct nvkm_device *, int, struct nvkm_fb **);  #include <subdev/bios.h>  #include <subdev/bios/ramcfg.h> @@ -156,4 +157,6 @@ struct nvkm_ram_func {  	int (*prog)(struct nvkm_ram *);  	void (*tidy)(struct nvkm_ram *);  }; + +extern const u8 gf100_pte_storage_type_map[256];  #endif diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/pmu.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/pmu.h index e61923d5e49c..f37538eb1fe5 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/pmu.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/pmu.h @@ -35,6 +35,8 @@ int gk110_pmu_new(struct nvkm_device *, int, struct nvkm_pmu **);  int gk208_pmu_new(struct nvkm_device *, int, struct nvkm_pmu **);  int gk20a_pmu_new(struct nvkm_device *, int, struct nvkm_pmu **);  int gm107_pmu_new(struct nvkm_device *, int, struct nvkm_pmu **); +int gp100_pmu_new(struct nvkm_device *, int, struct nvkm_pmu **); +int gp102_pmu_new(struct nvkm_device *, int, struct nvkm_pmu **);  /* interface to MEMX process running on PMU */  struct nvkm_memx; diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h index b765f4ffcde6..08ef9983c643 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h @@ -15,12 +15,28 @@ struct nvkm_volt {  	u32 max_uv;  	u32 min_uv; + +	/* +	 * These are fully functional map entries creating a sw ceiling for +	 * the voltage. These all can describe different kind of curves, so +	 * that for any given temperature a different one can return the lowest +	 * value of all three. +	 */ +	u8 max0_id; +	u8 max1_id; +	u8 max2_id; + +	int speedo;  }; +int nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temperature); +int nvkm_volt_map_min(struct nvkm_volt *volt, u8 id);  int nvkm_volt_get(struct nvkm_volt *); -int nvkm_volt_set_id(struct nvkm_volt *, u8 id, int condition); +int nvkm_volt_set_id(struct nvkm_volt *, u8 id, u8 min_id, u8 temp, +		     int condition);  int nv40_volt_new(struct nvkm_device *, int, struct nvkm_volt **); +int gf100_volt_new(struct nvkm_device *, int, struct nvkm_volt **);  int gk104_volt_new(struct nvkm_device *, int, struct nvkm_volt **);  int gk20a_volt_new(struct nvkm_device *, int, struct nvkm_volt **);  int gm20b_volt_new(struct nvkm_device *, int, struct nvkm_volt **); |