[01/15] tegra: fetch gpu_speedo_id

Submitted by Alexandre Courbot on June 1, 2016, 8:39 a.m.

Details

Message ID 20160601083929.8555-2-acourbot@nvidia.com
State New
Headers show
Series "clk/tegra: improve code and add DFS support" ( rev: 1 ) in Nouveau

Not browsing as part of any series.

Commit Message

Alexandre Courbot June 1, 2016, 8:39 a.m.
The GPU speedo ID is required to select the right clk/volt parameters on
GM20B.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
 drm/nouveau/include/nvkm/core/tegra.h  | 1 +
 drm/nouveau/nvkm/engine/device/tegra.c | 1 +
 lib/include/nvif/os.h                  | 1 +
 3 files changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drm/nouveau/include/nvkm/core/tegra.h b/drm/nouveau/include/nvkm/core/tegra.h
index b5370cb56e3c..e5c9b6268dcc 100644
--- a/drm/nouveau/include/nvkm/core/tegra.h
+++ b/drm/nouveau/include/nvkm/core/tegra.h
@@ -28,6 +28,7 @@  struct nvkm_device_tegra {
 	} iommu;
 
 	int gpu_speedo;
+	int gpu_speedo_id;
 };
 
 struct nvkm_device_tegra_func {
diff --git a/drm/nouveau/nvkm/engine/device/tegra.c b/drm/nouveau/nvkm/engine/device/tegra.c
index 8edc0a583ae2..9b638bd905ff 100644
--- a/drm/nouveau/nvkm/engine/device/tegra.c
+++ b/drm/nouveau/nvkm/engine/device/tegra.c
@@ -311,6 +311,7 @@  nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func,
 		goto remove;
 
 	tdev->gpu_speedo = tegra_sku_info.gpu_speedo_value;
+	tdev->gpu_speedo_id = tegra_sku_info.gpu_speedo_id;
 	ret = nvkm_device_ctor(&nvkm_device_tegra_func, NULL, &pdev->dev,
 			       NVKM_DEVICE_TEGRA, pdev->id, NULL,
 			       cfg, dbg, detect, mmio, subdev_mask,
diff --git a/lib/include/nvif/os.h b/lib/include/nvif/os.h
index f0710b39c05b..ba253b0f1d37 100644
--- a/lib/include/nvif/os.h
+++ b/lib/include/nvif/os.h
@@ -1546,6 +1546,7 @@  reset_control_deassert(struct reset_control *reset)
  *****************************************************************************/
 struct tegra_sku_info {
 	int gpu_speedo_value;
+	int gpu_speedo_id;
 };
 
 extern struct tegra_sku_info tegra_sku_info;