From: Karol Herbst Date: Tue, 15 Sep 2015 16:49:32 +0000 (+0200) Subject: drm/nouveau/perf: change pcie speed on pstate change X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f68f4c960a3f39bf1ca30313f690486361639745;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Karol Herbst --- diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c index c769aff04531..889cce2eb727 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c @@ -176,6 +176,7 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) { struct nvkm_subdev *subdev = &clk->subdev; struct nvkm_ram *ram = subdev->device->fb->ram; + struct nvkm_pci *pci = subdev->device->pci; struct nvkm_pstate *pstate; int ret, idx = 0; @@ -187,6 +188,8 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) nvkm_debug(subdev, "setting performance state %d\n", pstatei); clk->pstate = pstatei; + nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width); + if (ram && ram->func->calc) { int khz = pstate->base.domain[nv_clk_src_mem]; do {