diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c index bf3728598..d1905c86b 100644 --- a/drivers/gpu/nvgpu/common/linux/driver_common.c +++ b/drivers/gpu/nvgpu/common/linux/driver_common.c @@ -139,6 +139,7 @@ static void nvgpu_init_vbios_vars(struct gk20a *g) struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); __nvgpu_set_enabled(g, NVGPU_PMU_RUN_PREOS, platform->run_preos); + g->vbios_min_version = platform->vbios_min_version; } static void nvgpu_init_mm_vars(struct gk20a *g) diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index ab2d0b7fb..8f097cac7 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -1259,6 +1259,9 @@ struct gk20a { * from monitoring power, current and voltage */ bool power_sensor_missing; + /* The minimum VBIOS version supported */ + u32 vbios_min_version; + /* memory training sequence and mclk switch scripts */ u32 mem_config_idx; diff --git a/drivers/gpu/nvgpu/gm206/bios_gm206.c b/drivers/gpu/nvgpu/gm206/bios_gm206.c index 381b38400..7be77ad31 100644 --- a/drivers/gpu/nvgpu/gm206/bios_gm206.c +++ b/drivers/gpu/nvgpu/gm206/bios_gm206.c @@ -22,7 +22,6 @@ #include #include "gk20a/gk20a.h" -#include "gk20a/platform_gk20a.h" #include "gm20b/fifo_gm20b.h" #include "bios_gm206.h" #include "gp106/mclk_gp106.h" @@ -171,7 +170,6 @@ out: int gm206_bios_init(struct gk20a *g) { unsigned int i; - struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); #ifdef CONFIG_DEBUG_FS struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); struct dentry *d; @@ -223,8 +221,7 @@ int gm206_bios_init(struct gk20a *g) if (err) return err; - if (g->gpu_characteristics.vbios_version < - platform->vbios_min_version) { + if (g->gpu_characteristics.vbios_version < g->vbios_min_version) { nvgpu_err(g, "unsupported VBIOS version %08x", g->gpu_characteristics.vbios_version); return -EINVAL;