From f78d8c116c06768cf28b0bf0b61589c3ef07ecfb Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Tue, 6 Jun 2017 10:59:19 -0700 Subject: gpu: nvgpu: backward support for HW2.5 Rev.A Add backward support for HW2.5 Rev.A board: - no INA3221 for voltage, current, and power - use PG418 MCLK switching sequences Allow VBIOS from .53 for PG419 Bug 1929155 Change-Id: Ifacfc8cff6d00f66af92305119d0f0d3b9a1e438 Reviewed-on: http://git-master/r/1497001 Signed-off-by: Thomas Fleury (cherry picked from commit 952778f814916b0b3d5043c43755bfccb467c3d4) Reviewed-on: http://git-master/r/1497295 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/common/linux/pci.c | 2 +- drivers/gpu/nvgpu/gm206/bios_gm206.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c index c0510b72..94ef340d 100644 --- a/drivers/gpu/nvgpu/common/linux/pci.c +++ b/drivers/gpu/nvgpu/common/linux/pci.c @@ -197,7 +197,7 @@ static struct gk20a_platform nvgpu_pci_device[] = { .ch_wdt_timeout_ms = 7000, .honors_aperture = true, - .vbios_min_version = 0x86065600, + .vbios_min_version = 0x86065300, .hardcode_sw_threshold = false, .ina3221_dcb_index = 1, .ina3221_i2c_address = 0x80, diff --git a/drivers/gpu/nvgpu/gm206/bios_gm206.c b/drivers/gpu/nvgpu/gm206/bios_gm206.c index 0bc78724..c32959a3 100644 --- a/drivers/gpu/nvgpu/gm206/bios_gm206.c +++ b/drivers/gpu/nvgpu/gm206/bios_gm206.c @@ -23,6 +23,7 @@ #include "gk20a/platform_gk20a.h" #include "gm20b/fifo_gm20b.h" #include "bios_gm206.h" +#include "gp106/pmu_mclk_gp106.h" #include #include @@ -314,11 +315,16 @@ int gm206_bios_init(struct gk20a *g) return -EINVAL; } - /* WAR for missing INA3221 on HW2.5 RevA */ - g->power_sensor_missing = - (g->pci_vendor_id == PCI_VENDOR_ID_NVIDIA) && + /* WAR for HW2.5 RevA (identified by VBIOS version) + * - INA3221 is missing + * - use PG418 MCLK switching sequences + */ + if ((g->pci_vendor_id == PCI_VENDOR_ID_NVIDIA) && (g->pci_device_id == 0x1c75) && - (g->gpu_characteristics.vbios_version == 0x86065300); + (g->gpu_characteristics.vbios_version == 0x86065300)) { + g->power_sensor_missing = true; + g->mem_config_idx = GP106_MEM_CONFIG_GDDR5_PG418; + } #ifdef CONFIG_DEBUG_FS g->bios_blob.data = g->bios.data; -- cgit v1.2.2