]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/nouveau/perf: change pcie speed on pstate change
authorKarol Herbst <nouveau@karolherbst.de>
Tue, 15 Sep 2015 16:49:32 +0000 (18:49 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 11 Jan 2016 01:30:23 +0000 (11:30 +1000)
v2: remove error and only set link for pcie devices
v6: remove check for pcie device

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c

index c769aff04531b881fc236475b9c84604a7c7f7c0..889cce2eb7277aa2d608ca99a6041ff7a43fc7b9 100644 (file)
@@ -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 {