drm/nouveau/perf: add fields for pci speed and width and use it for the pstates
authorKarol Herbst <nouveau@karolherbst.de>
Tue, 15 Sep 2015 16:49:08 +0000 (18:49 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 11 Jan 2016 01:30:22 +0000 (11:30 +1000)
Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
drivers/gpu/drm/nouveau/include/nvkm/subdev/clk.h
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c

index 22e125fdc29b6d0c88c687b812d60b51f67ab541..6b33bc058924aa3cac00ccd7091b9f2ee1f3da1d 100644 (file)
@@ -2,6 +2,7 @@
 #define __NVKM_CLK_H__
 #include <core/subdev.h>
 #include <core/notify.h>
+#include <subdev/pci.h>
 struct nvbios_pll;
 struct nvkm_pll_vals;
 
@@ -59,6 +60,8 @@ struct nvkm_pstate {
        struct nvkm_cstate base;
        u8 pstate;
        u8 fanspeed;
+       enum nvkm_pcie_speed pcie_speed;
+       u8 pcie_width;
 };
 
 struct nvkm_domain {
index dc8682c91cc74cf6cebd3e1588312ae513ffc428..c769aff04531b881fc236475b9c84604a7c7f7c0 100644 (file)
@@ -330,6 +330,8 @@ nvkm_pstate_new(struct nvkm_clk *clk, int idx)
 
        pstate->pstate = perfE.pstate;
        pstate->fanspeed = perfE.fanspeed;
+       pstate->pcie_speed = perfE.pcie_speed;
+       pstate->pcie_width = perfE.pcie_width;
        cstate->voltage = perfE.voltage;
        cstate->domain[nv_clk_src_core] = perfE.core;
        cstate->domain[nv_clk_src_shader] = perfE.shader;