Commit f68f4c96 authored by Karol Herbst's avatar Karol Herbst Committed by Ben Skeggs

drm/nouveau/perf: change pcie speed on pstate change

v2: remove error and only set link for pcie devices
v6: remove check for pcie device
Signed-off-by: default avatarKarol Herbst <nouveau@karolherbst.de>
parent d3b378c0
...@@ -176,6 +176,7 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) ...@@ -176,6 +176,7 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei)
{ {
struct nvkm_subdev *subdev = &clk->subdev; struct nvkm_subdev *subdev = &clk->subdev;
struct nvkm_ram *ram = subdev->device->fb->ram; struct nvkm_ram *ram = subdev->device->fb->ram;
struct nvkm_pci *pci = subdev->device->pci;
struct nvkm_pstate *pstate; struct nvkm_pstate *pstate;
int ret, idx = 0; int ret, idx = 0;
...@@ -187,6 +188,8 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) ...@@ -187,6 +188,8 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei)
nvkm_debug(subdev, "setting performance state %d\n", pstatei); nvkm_debug(subdev, "setting performance state %d\n", pstatei);
clk->pstate = pstatei; clk->pstate = pstatei;
nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width);
if (ram && ram->func->calc) { if (ram && ram->func->calc) {
int khz = pstate->base.domain[nv_clk_src_mem]; int khz = pstate->base.domain[nv_clk_src_mem];
do { do {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment