search for: nvbios_pll

Displaying 20 results from an estimated 38 matches for "nvbios_pll".

2015 Oct 12
2
fixing GDDR5 reclocking on kepler cards
this is my first patch on the list through git send-mail and I hope everything is set up right, sorry for the noise here, but I don't want to try with an empty mail :) as the subject already says, this patch fixes one of the more serious issues while reclocking gddr5 on kepler cards. It works for me and for a bunch of others I met on IRC. Karol Herbst (1): pll/gk104: fix PLL instability
2012 Nov 16
0
[PATCH] drm/nouveau: add missing pll_calc calls
...ore/include/subdev/clock.h b/drivers/gpu/drm/nouveau/core/include/subdev/clock.h index 39e73b9..41b7a6a 100644 --- a/drivers/gpu/drm/nouveau/core/include/subdev/clock.h +++ b/drivers/gpu/drm/nouveau/core/include/subdev/clock.h @@ -54,6 +54,7 @@ int nv04_clock_pll_calc(struct nouveau_clock *, struct nvbios_pll *, int clk, struct nouveau_pll_vals *); int nv04_clock_pll_prog(struct nouveau_clock *, u32 reg1, struct nouveau_pll_vals *); - +int nva3_clock_pll_calc(struct nouveau_clock *, struct nvbios_pll *, + int clk, struct nouveau_pll_vals *); #endif diff --git a/drivers/gpu/drm/nouveau/core...
2017 Jul 29
0
[PATCH] nouveau: Fix declarations with incorrect variables.
...veau/dispnv04/hw.h index 3a2be47f..2afda90a 100644 --- a/drm/nouveau/dispnv04/hw.h +++ b/drm/nouveau/dispnv04/hw.h @@ -43,7 +43,7 @@ void NVSetOwner(struct drm_device *, int owner); void NVBlankScreen(struct drm_device *, int head, bool blank); int nouveau_hw_get_pllvals(struct drm_device *, enum nvbios_pll_type plltype, struct nvkm_pll_vals *pllvals); -int nouveau_hw_pllvals_to_clk(struct nvkm_pll_vals *pllvals); +int nouveau_hw_pllvals_to_clk(struct nvkm_pll_vals *pv); int nouveau_hw_get_clock(struct drm_device *, enum nvbios_pll_type plltype); void nouveau_hw_save_vga_fonts(struct drm_devi...
2014 Aug 21
0
[PATCH 2/7] clock/nva3: Set PLL refclk
...k_src src) } int -nva3_clock_info(struct nouveau_clock *clock, int clk, u32 pll, u32 khz, +nva3_clk_info(struct nouveau_clock *clock, int clk, u32 khz, struct nva3_clock_info *info) { - struct nouveau_bios *bios = nouveau_bios(clock); struct nva3_clock_priv *priv = (void *)clock; - struct nvbios_pll limits; - u32 oclk, sclk, sdiv; - int P, N, M, diff; - int ret; + u32 oclk, sclk, sdiv, diff; - info->pll = 0; info->clk = 0; switch (khz) { @@ -188,40 +183,64 @@ nva3_clock_info(struct nouveau_clock *clock, int clk, u32 pll, u32 khz, return khz; default: sclk = read_vco(priv,...
2015 Jan 07
1
[PATCH V2 1/4] clk: allow non-blocking for nouveau_clock_astate()
...diff --git a/nvkm/include/subdev/clock.h b/nvkm/include/subdev/clock.h >> index 36ed035d4d42..6c36f0e4385b 100644 >> --- a/nvkm/include/subdev/clock.h >> +++ b/nvkm/include/subdev/clock.h >> @@ -159,7 +159,7 @@ int nva3_clock_pll_calc(struct nouveau_clock *, struct >> nvbios_pll *, >> int clk, struct nouveau_pll_vals *); >> int nouveau_clock_ustate(struct nouveau_clock *, int req, int pwr); >> -int nouveau_clock_astate(struct nouveau_clock *, int req, int rel); >> +int nouveau_clock_astate(struct nouveau_clock *, int req,...
2014 Aug 21
9
NVA3 clock tree improvements
Following a series of patches to improve nouveaus clock tree parsing. Reclocking these engines (all but memory) is pretty stable on the cards I've tested. Please review and merge when approved. These patches do not solve the problem that core/shader engine doesn't like to be clocked up too far without fb following, with visible corruption as a result. I suspect this problem is unrelated
2014 Aug 23
2
RESEND NVA3 clock tree improvements
Resend of patch #7 to fix behaviour when failing to pause parts of the GPU
2014 Dec 22
7
[PATCH V2 1/4] clk: allow non-blocking for nouveau_clock_astate()
...les changed, 3 insertions(+), 3 deletions(-) diff --git a/nvkm/include/subdev/clock.h b/nvkm/include/subdev/clock.h index 36ed035d4d42..6c36f0e4385b 100644 --- a/nvkm/include/subdev/clock.h +++ b/nvkm/include/subdev/clock.h @@ -159,7 +159,7 @@ int nva3_clock_pll_calc(struct nouveau_clock *, struct nvbios_pll *, int clk, struct nouveau_pll_vals *); int nouveau_clock_ustate(struct nouveau_clock *, int req, int pwr); -int nouveau_clock_astate(struct nouveau_clock *, int req, int rel); +int nouveau_clock_astate(struct nouveau_clock *, int req, int rel, bool wait); int nouveau_clock_dstate(struct no...
2017 Jan 10
0
[bug report] drm/nouveau/devinit: move simple pll setting routines to devinit
...t 35 nv50_devinit_pll_set(struct nvkm_devinit *init, u32 type, u32 freq) 36 { 37 struct nvkm_subdev *subdev = &init->subdev; 38 struct nvkm_device *device = subdev->device; 39 struct nvkm_bios *bios = device->bios; 40 struct nvbios_pll info; 41 int N1, M1, N2, M2, P; 42 int ret; 43 44 ret = nvbios_pll_parse(bios, type, &info); 45 if (ret) { 46 nvkm_error(subdev, "failed to retrieve pll data, %d\n", ret); 47 return ret...
2020 Aug 27
0
[PATCH] drm/nouveau: remove redundant check
...<trix at redhat.com> clang static analysis flags this problem hw.c:271:12: warning: The left operand of '>=' is a garbage value if (pv.M1 >= pll_lim.vco1.min_m ... ~~~~~ ^ This is mostly not a problem because an early check in nouveau_hw_fix_bad_vpll() if (nvbios_pll_parse(bios, pll, &pll_lim)) return; nouveau_hw_get_pllvals(dev, pll, &pv); shadows a similar check in nouveau_hw_get_pllvals() ret = nvbios_pll_parse(bios, plltype, &pll_lim); if (ret || !(reg1 = pll_lim.reg)) return -ENOENT; Since the first check is redundant, remove it and c...
2015 Jan 07
0
[PATCH V2 1/4] clk: allow non-blocking for nouveau_clock_astate()
...3 deletions(-) > > diff --git a/nvkm/include/subdev/clock.h b/nvkm/include/subdev/clock.h > index 36ed035d4d42..6c36f0e4385b 100644 > --- a/nvkm/include/subdev/clock.h > +++ b/nvkm/include/subdev/clock.h > @@ -159,7 +159,7 @@ int nva3_clock_pll_calc(struct nouveau_clock *, struct nvbios_pll *, > int clk, struct nouveau_pll_vals *); > > int nouveau_clock_ustate(struct nouveau_clock *, int req, int pwr); > -int nouveau_clock_astate(struct nouveau_clock *, int req, int rel); > +int nouveau_clock_astate(struct nouveau_clock *, int req, int rel, bool wait); >...
2012 Aug 09
1
[PATCH] drm/nouveau/nv50: Reclock when memory was stolen
Here's a quick-but-I-guess-tidy-fix for faulty behaviour someone reported in NVAF. I'm just not sure if the check for nvaa/nvac should still be in nv50_pm_clocks_pre... I believe this is wrong as they can reclock perfectly well (except the non-existing memory). Anyone has a definite answer to that?
2016 Apr 18
0
[PATCH v4 35/37] clk: set clocks to pre suspend state after suspend
...clk *); void (*tidy)(struct nvkm_clk *); - void (*update)(struct nvkm_clk *, int pstate); + void (*update)(struct nvkm_clk *, int pstate, bool force); struct nvkm_pstate *pstates; int nr_pstates; struct nvkm_domain domains[]; @@ -30,6 +30,6 @@ int nv04_clk_pll_calc(struct nvkm_clk *, struct nvbios_pll *, int clk, struct nvkm_pll_vals *); int nv04_clk_pll_prog(struct nvkm_clk *, u32 reg1, struct nvkm_pll_vals *); -void nv40_clk_update(struct nvkm_clk *, int pstate); -void gf100_clk_update(struct nvkm_clk *, int pstate); +void nv40_clk_update(struct nvkm_clk *, int pstate, bool force);...
2014 Aug 21
0
[PATCH 7/7] clock/nva3: Pause the GPU before reclocking
...lude/subdev/clock.h index 676b49e..52e65b8 100644 --- a/drivers/gpu/drm/nouveau/core/include/subdev/clock.h +++ b/drivers/gpu/drm/nouveau/core/include/subdev/clock.h @@ -146,6 +146,9 @@ int nv04_clock_pll_prog(struct nouveau_clock *, u32 reg1, int nva3_clock_pll_calc(struct nouveau_clock *, struct nvbios_pll *, int clk, struct nouveau_pll_vals *); +int nva3_clock_pre(struct nouveau_clock *clk, unsigned long *flags); +void nva3_clock_post(struct nouveau_clock *clk, unsigned long *flags); + int nouveau_clock_ustate(struct nouveau_clock *, int req); int nouveau_clock_astate(struct nouveau_clock *,...
2014 Aug 23
0
[PATCH] clock/nva3: Pause the GPU before reclocking
...lude/subdev/clock.h index 676b49e..52e65b8 100644 --- a/drivers/gpu/drm/nouveau/core/include/subdev/clock.h +++ b/drivers/gpu/drm/nouveau/core/include/subdev/clock.h @@ -146,6 +146,9 @@ int nv04_clock_pll_prog(struct nouveau_clock *, u32 reg1, int nva3_clock_pll_calc(struct nouveau_clock *, struct nvbios_pll *, int clk, struct nouveau_pll_vals *); +int nva3_clock_pre(struct nouveau_clock *clk, unsigned long *flags); +void nva3_clock_post(struct nouveau_clock *clk, unsigned long *flags); + int nouveau_clock_ustate(struct nouveau_clock *, int req); int nouveau_clock_astate(struct nouveau_clock *,...
2017 Apr 10
0
[PATCH 02/11] nvkm/ramgf100: Calculate timings
...amfuc_reg r_0x10f290; - struct ramfuc_reg r_0x10f294; - struct ramfuc_reg r_0x10f298; - struct ramfuc_reg r_0x10f29c; - struct ramfuc_reg r_0x10f2a0; + struct ramfuc_reg r_0x10f290[5]; struct ramfuc_reg r_0x10f300; struct ramfuc_reg r_0x10f338; @@ -104,6 +100,50 @@ struct gf100_ram { struct nvbios_pll mempll; }; +#define T(t) cfg->timing_10_##t +static int +gf100_ram_timing_calc(struct gf100_ram *ram, u32 *timing) +{ + struct nvbios_ramcfg *cfg = &ram->base.target.bios; + struct nvkm_subdev *subdev = &ram->base.fb->subdev; + struct nvkm_device *device = subdev->device;...
2016 Apr 18
0
[PATCH v4 32/37] clk: only do partial reclocks as required
...clk *, struct nvkm_pstate *, int cstatei); +struct nvkm_cstate * nvkm_cstate_get(struct nvkm_clk *, struct nvkm_pstate *, int cstatei); +struct nvkm_cstate * nvkm_cstate_find_best(struct nvkm_clk *, struct nvkm_pstate *, struct nvkm_cstate *start); int nv04_clk_pll_calc(struct nvkm_clk *, struct nvbios_pll *, int clk, struct nvkm_pll_vals *); int nv04_clk_pll_prog(struct nvkm_clk *, u32 reg1, struct nvkm_pll_vals *); void nv40_clk_update(struct nvkm_clk *, int pstate); +void gf100_clk_update(struct nvkm_clk *, int pstate); #endif -- 2.8.1
2014 Jul 14
0
[PATCH 3/3] drm/gk20a: reclocking support
...nouveau_oclass nvc0_clock_oclass; >> extern struct nouveau_oclass nve0_clock_oclass; >> +extern struct nouveau_oclass gk20a_clock_oclass; >> int nv04_clock_pll_set(struct nouveau_clock *, u32 type, u32 freq); >> int nv04_clock_pll_calc(struct nouveau_clock *, struct nvbios_pll *, >> diff --git a/drivers/gpu/drm/nouveau/core/subdev/clock/gk20a.c >> b/drivers/gpu/drm/nouveau/core/subdev/clock/gk20a.c >> new file mode 100644 >> index 000000000000..e175cfda0a48 >> --- /dev/null >> +++ b/drivers/gpu/drm/nouveau/core/subdev/clock/gk20a.c &gt...
2016 Apr 18
0
[PATCH v4 31/37] clk: split out update code to nv40
...km_clk_ctor(const struct nvkm_clk_func *, struct nvkm_device *, int, int nvkm_clk_new_(const struct nvkm_clk_func *, struct nvkm_device *, int, bool allow_reclock, struct nvkm_clk **); +int nvkm_pstate_prog(struct nvkm_clk *, int pstateid); + int nv04_clk_pll_calc(struct nvkm_clk *, struct nvbios_pll *, int clk, struct nvkm_pll_vals *); int nv04_clk_pll_prog(struct nvkm_clk *, u32 reg1, struct nvkm_pll_vals *); + +void nv40_clk_update(struct nvkm_clk *, int pstate); #endif -- 2.8.1
2014 Jul 10
3
[PATCH 3/3] drm/gk20a: reclocking support
...ern struct nouveau_oclass nvc0_clock_oclass; > extern struct nouveau_oclass nve0_clock_oclass; > +extern struct nouveau_oclass gk20a_clock_oclass; > > int nv04_clock_pll_set(struct nouveau_clock *, u32 type, u32 freq); > int nv04_clock_pll_calc(struct nouveau_clock *, struct nvbios_pll *, > diff --git a/drivers/gpu/drm/nouveau/core/subdev/clock/gk20a.c b/drivers/gpu/drm/nouveau/core/subdev/clock/gk20a.c > new file mode 100644 > index 000000000000..e175cfda0a48 > --- /dev/null > +++ b/drivers/gpu/drm/nouveau/core/subdev/clock/gk20a.c > @@ -0,0 +1,670 @@ > +/*...