search for: pcie_speed

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

2017 Apr 05
0
[PATCH] bios/perf: Correctly parse PCIe speeds for ver 0x40
.../nouveau/nvkm/subdev/bios/perf.c +++ b/drm/nouveau/nvkm/subdev/bios/perf.c @@ -146,18 +146,16 @@ nvbios_perfEp(struct nvkm_bios *bios, int idx, break; case 0x40: info->voltage = nvbios_rd08(bios, perf + 0x02); - switch (nvbios_rd08(bios, perf + 0xb) & 0x3) { - case 0: - info->pcie_speed = NVKM_PCIE_SPEED_5_0; - break; - case 3: - case 1: + switch (nvbios_rd08(bios, perf + 0xb) & 0x21) { + case 0x01: info->pcie_speed = NVKM_PCIE_SPEED_2_5; break; - case 2: - info->pcie_speed = NVKM_PCIE_SPEED_8_0; + case 0x20: + info->pcie_speed = NVKM_PCIE_SPEED_5_...
2017 Apr 06
0
[PATCH v2] bios/perf: Parse PCIe speeds correctly for ver 0x40
.../nouveau/nvkm/subdev/bios/perf.c +++ b/drm/nouveau/nvkm/subdev/bios/perf.c @@ -146,18 +146,17 @@ nvbios_perfEp(struct nvkm_bios *bios, int idx, break; case 0x40: info->voltage = nvbios_rd08(bios, perf + 0x02); - switch (nvbios_rd08(bios, perf + 0xb) & 0x3) { - case 0: - info->pcie_speed = NVKM_PCIE_SPEED_5_0; - break; - case 3: - case 1: + switch (nvbios_rd08(bios, perf + 0xb) & 0x21) { + case 0x01: + case 0x21: info->pcie_speed = NVKM_PCIE_SPEED_2_5; break; - case 2: - info->pcie_speed = NVKM_PCIE_SPEED_8_0; + case 0x20: + info->pcie_speed = NVKM...
2019 Sep 17
2
[PATCH v4 3/4] pci: set the pcie link speed to 8.0 when suspending
...> +++ b/drm/nouveau/include/nvkm/subdev/pci.h > @@ -52,6 +52,7 @@ int gk104_pci_new(struct nvkm_device *, int, struct nvkm_pci **); > int gp100_pci_new(struct nvkm_device *, int, struct nvkm_pci **); > > /* pcie functions */ > -int nvkm_pcie_set_link(struct nvkm_pci *, enum nvkm_pcie_speed, u8 width); > +int nvkm_pcie_set_link(struct nvkm_pci *, enum nvkm_pcie_speed, u8 width, > + bool save); > enum nvkm_pcie_speed nvkm_pcie_get_speed(struct nvkm_pci *); > #endif > diff --git a/drm/nouveau/nouveau_drm.c b/drm/nouveau/nouveau_drm.c > index 3d32...
2019 Sep 17
2
[PATCH v4 3/4] pci: set the pcie link speed to 8.0 when suspending
...gt; > > @@ -52,6 +52,7 @@ int gk104_pci_new(struct nvkm_device *, int, struct nvkm_pci **); > > > int gp100_pci_new(struct nvkm_device *, int, struct nvkm_pci **); > > > > > > /* pcie functions */ > > > -int nvkm_pcie_set_link(struct nvkm_pci *, enum nvkm_pcie_speed, u8 width); > > > +int nvkm_pcie_set_link(struct nvkm_pci *, enum nvkm_pcie_speed, u8 width, > > > + bool save); > > > enum nvkm_pcie_speed nvkm_pcie_get_speed(struct nvkm_pci *); > > > #endif > > > diff --git a/drm/nouveau/nouveau...
2016 Jan 01
9
[PATCH v4 0/9] PCIe speed changes
overall it is for the most part the same as my older version. I cleaned up some copyright things, so that it is more like the others. Also I moved the print about the max speed supported into preinit and did some other minor cleanups in the 3rd commit. Happy testing (and performance for prime offloading setups) Karol Herbst (9): pci: add gk104 variant pci: add gf106 variant pci: implement
2019 Sep 13
8
[PATCH v4 0/4] add PCIe workaround to fix runpm on laptops
not much changed since the last time I sent those patches out, but there are a couple of annoying bug fixes, which users would probably never hit unless they do rmmod/modprobe nouveau cycles. Biggest change is that I force the link to a 8.0 speed rather than the speed the GPU came up with. Also this series depends on the PCIe improvement patches I sent out recently. Karol Herbst (4): pci:
2019 Sep 13
0
[PATCH v4 3/4] pci: set the pcie link speed to 8.0 when suspending
...u/include/nvkm/subdev/pci.h +++ b/drm/nouveau/include/nvkm/subdev/pci.h @@ -52,6 +52,7 @@ int gk104_pci_new(struct nvkm_device *, int, struct nvkm_pci **); int gp100_pci_new(struct nvkm_device *, int, struct nvkm_pci **); /* pcie functions */ -int nvkm_pcie_set_link(struct nvkm_pci *, enum nvkm_pcie_speed, u8 width); +int nvkm_pcie_set_link(struct nvkm_pci *, enum nvkm_pcie_speed, u8 width, + bool save); enum nvkm_pcie_speed nvkm_pcie_get_speed(struct nvkm_pci *); #endif diff --git a/drm/nouveau/nouveau_drm.c b/drm/nouveau/nouveau_drm.c index 3d32afe8a..78d55c525 100644 --- a/drm/nouveau/n...
2015 Oct 12
12
[PATCH 0/9] PCIe speed changes
this patch series implements PCIe speed changes for Tesla and newer. The Kepler and Fermi bits are tested on my cards at home. Karol Herbst (9): pci: add gk104 variant pci: add gf106 variant pci: implement generic code for PCIe speed change pci: implement pcie speed change for tesla pci: implement pcie speed change on Fermi pci: implement PCIe speed change for kepler+ bios/perf:
2019 Sep 17
0
[PATCH v4 3/4] pci: set the pcie link speed to 8.0 when suspending
...clude/nvkm/subdev/pci.h > > @@ -52,6 +52,7 @@ int gk104_pci_new(struct nvkm_device *, int, struct nvkm_pci **); > > int gp100_pci_new(struct nvkm_device *, int, struct nvkm_pci **); > > > > /* pcie functions */ > > -int nvkm_pcie_set_link(struct nvkm_pci *, enum nvkm_pcie_speed, u8 width); > > +int nvkm_pcie_set_link(struct nvkm_pci *, enum nvkm_pcie_speed, u8 width, > > + bool save); > > enum nvkm_pcie_speed nvkm_pcie_get_speed(struct nvkm_pci *); > > #endif > > diff --git a/drm/nouveau/nouveau_drm.c b/drm/nouveau/nouv...
2019 Sep 17
0
[PATCH v4 3/4] pci: set the pcie link speed to 8.0 when suspending
...,6 +52,7 @@ int gk104_pci_new(struct nvkm_device *, int, struct nvkm_pci **); > > > > int gp100_pci_new(struct nvkm_device *, int, struct nvkm_pci **); > > > > > > > > /* pcie functions */ > > > > -int nvkm_pcie_set_link(struct nvkm_pci *, enum nvkm_pcie_speed, u8 width); > > > > +int nvkm_pcie_set_link(struct nvkm_pci *, enum nvkm_pcie_speed, u8 width, > > > > + bool save); > > > > enum nvkm_pcie_speed nvkm_pcie_get_speed(struct nvkm_pci *); > > > > #endif > > > > diff --...
2016 Apr 20
2
[PATCH v4 27/37] clk: make pstate a pointer to nvkm_pstate
.../base.c > @@ -288,7 +288,7 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) > } > > nvkm_debug(subdev, "setting performance state %d\n", pstatei); > - clk->pstate = pstatei; > + clk->pstate = pstate; > > nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width); > > @@ -317,15 +317,19 @@ nvkm_clk_update_work(struct work_struct *work) > return; > clk->pwrsrc = power_supply_is_system_supplied(); > > + if (clk->pstate) > + pstate = clk->pstate->pstate; > + else > + pstate = -1; &gt...
2015 Oct 13
12
[PATCH v2 0/9] PCIEs speed change
overall the same as the old stuff, but with better namings and tirivialy improved code here and there Karol Herbst (9): pci: add gk104 variant pci: add gf106 variant pci: implement generic code for PCIe speed change pci: implement pcie speed change for tesla pci: implement pcie speed change on Fermi pci: implement PCIe speed change for kepler+ bios/perf: parse the pci speed from the
2017 Oct 08
1
[RFC PATCH 08/29] clk: We should pass the pstate id around not the index in the list
...> > - nvkm_debug(subdev, "setting performance state %d\n", pstatei); > + if (!pstate) > + return -EINVAL; > + > + nvkm_debug(subdev, "setting performance state %x\n", pstateid); > clk->pstate = pstate; > > nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width); > @@ -329,7 +332,6 @@ nvkm_clk_update_work(struct work_struct *work) > pstate = clk->pwrsrc ? clk->ustate_ac : clk->ustate_dc; > if (clk->state_nr && pstate != -1) { > pstate = (pstate < 0) ? clk->astate : pstate; > - pstate...
2019 Aug 13
3
[PATCH 1/4] pci: enable pcie link changes for pascal
...7 +23,7 @@ */ #include "priv.h" -static int +int gk104_pcie_version_supported(struct nvkm_pci *pci) { return (nvkm_rd32(pci->subdev.device, 0x8c1c0) & 0x4) == 0x4 ? 2 : 1; @@ -108,7 +108,7 @@ gk104_pcie_lnkctl_speed(struct nvkm_pci *pci) return -1; } -static enum nvkm_pcie_speed +enum nvkm_pcie_speed gk104_pcie_max_speed(struct nvkm_pci *pci) { u32 max_speed = nvkm_rd32(pci->subdev.device, 0x8c1c0) & 0x300000; @@ -146,7 +146,7 @@ gk104_pcie_set_link_speed(struct nvkm_pci *pci, enum nvkm_pcie_speed speed) nvkm_mask(device, 0x8c040, 0x1, 0x1); } -static int +...
2017 Oct 08
1
[RFC PATCH 06/29] clk: Make pstate a pointer to nvkm_pstate
..._entry(pstate, &clk->states, head) { > if (idx++ == pstatei) > break; > } > > nvkm_debug(subdev, "setting performance state %d\n", pstatei); > - clk->pstate = pstatei; > + clk->pstate = pstate; > > nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width); > > @@ -306,8 +309,12 @@ nvkm_clk_update_work(struct work_struct *work) > return; > clk->pwrsrc = power_supply_is_system_supplied(); > > + if (clk->pstate) > + pstate = clk->pstate->pstate; > + else > + pstate = NVKM_CLK_PST...
2016 Apr 18
0
[PATCH v4 29/37] clk: we should pass the pstate id around not the index in the list
...state->pstate == pstateid) break; } - nvkm_debug(subdev, "setting performance state %d\n", pstatei); + if (!pstate) + return -EINVAL; + + nvkm_debug(subdev, "setting performance state %x\n", pstateid); clk->pstate = pstate; nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width); @@ -496,30 +499,6 @@ nvkm_pstate_new(struct nvkm_clk *clk, int idx) * Adjustment triggers *****************************************************************************/ static int -nvkm_clk_ustate_update(struct nvkm_clk *clk, int req) -{ - struct nvkm_pstate *pstate; -...
2017 Mar 05
0
[PATCH 5/9] clk: We should pass the pstate id around not the index in the list
...state->pstate == pstateid) break; } - nvkm_debug(subdev, "setting performance state %d\n", pstatei); + if (!pstate) + return -EINVAL; + + nvkm_debug(subdev, "setting performance state %x\n", pstateid); clk->pstate = pstate; nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width); @@ -329,7 +332,6 @@ nvkm_clk_update_work(struct work_struct *work) pstate = clk->pwrsrc ? clk->ustate_ac : clk->ustate_dc; if (clk->state_nr && pstate != -1) { pstate = (pstate < 0) ? clk->astate : pstate; - pstate = min(pstate, clk->sta...
2017 Sep 15
0
[RFC PATCH 08/29] clk: We should pass the pstate id around not the index in the list
...state->pstate == pstateid) break; } - nvkm_debug(subdev, "setting performance state %d\n", pstatei); + if (!pstate) + return -EINVAL; + + nvkm_debug(subdev, "setting performance state %x\n", pstateid); clk->pstate = pstate; nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width); @@ -329,7 +332,6 @@ nvkm_clk_update_work(struct work_struct *work) pstate = clk->pwrsrc ? clk->ustate_ac : clk->ustate_dc; if (clk->state_nr && pstate != -1) { pstate = (pstate < 0) ? clk->astate : pstate; - pstate = min(pstate, clk->sta...
2023 Apr 16
10
[PATCH 0/9] GPU-DRM-nouveau: Adjustments for seven function implementations
Date: Sun, 16 Apr 2023 11:22:23 +0200 Several update suggestions were taken into account from static source code analysis. Markus Elfring (9): debugfs: Move an expression into a function call parameter in nouveau_debugfs_pstate_set() debugfs: Move a variable assignment behind a null pointer check in nouveau_debugfs_pstate_get() debugfs: Use seq_putc() in
2016 Apr 18
0
[PATCH v4 27/37] clk: make pstate a pointer to nvkm_pstate
.../clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -288,7 +288,7 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) } nvkm_debug(subdev, "setting performance state %d\n", pstatei); - clk->pstate = pstatei; + clk->pstate = pstate; nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width); @@ -317,15 +317,19 @@ nvkm_clk_update_work(struct work_struct *work) return; clk->pwrsrc = power_supply_is_system_supplied(); + if (clk->pstate) + pstate = clk->pstate->pstate; + else + pstate = -1; nvkm_trace(subdev, "P %d PWR %d U(AC) %d U(DC...