[Nouveau] [PATCH 9/9] perf: change pcie speed on pstate change
Roy Spliet
seven at nimrod-online.com
Mon Oct 12 14:16:11 PDT 2015
Comment in-line.
Cheers,
Roy
Op 12-10-15 om 21:27 schreef Karol Herbst:
> Signed-off-by: Karol Herbst <nouveau at karolherbst.de>
> ---
> drm/nouveau/nvkm/subdev/clk/base.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c
> index 7ae4f26..4e5122b 100644
> --- a/drm/nouveau/nvkm/subdev/clk/base.c
> +++ b/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,12 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei)
> nvkm_debug(subdev, "setting performance state %d\n", pstatei);
> clk->pstate = pstatei;
>
> + if (pci) {
> + ret = nvkm_pci_set_pcie_link(pci, pstate->pcie_speed, pstate->pcie_width);
> + if (ret < 0)
> + nvkm_error(subdev, "failed changing pcie speed with: %i\n", ret);
Is this an error? It makes it sound like a serious issue, even though
this is expected behaviour eg. when the motherboard doesn't support the
desired PCIe speed. Maybe a "debug" message is more appropriate here.
> + }
> +
> if (ram && ram->func->calc) {
> int khz = pstate->base.domain[nv_clk_src_mem];
> do {
More information about the Nouveau
mailing list