mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
gpu: nvgpu: Copy vbios_min_version to struct gk20a
Accessing vbios_min_version in gk20a_platform creates an extra dependency to Linux. Copy it to struct gk20a at driver initialization. Change-Id: I9ff5dbeb1fecc6dc44a62f7affc24fd52c2bab26 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1542837 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
7b65427806
commit
af9e70f4d1
@@ -139,6 +139,7 @@ static void nvgpu_init_vbios_vars(struct gk20a *g)
|
|||||||
struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g));
|
struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g));
|
||||||
|
|
||||||
__nvgpu_set_enabled(g, NVGPU_PMU_RUN_PREOS, platform->run_preos);
|
__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)
|
static void nvgpu_init_mm_vars(struct gk20a *g)
|
||||||
|
|||||||
@@ -1259,6 +1259,9 @@ struct gk20a {
|
|||||||
* from monitoring power, current and voltage */
|
* from monitoring power, current and voltage */
|
||||||
bool power_sensor_missing;
|
bool power_sensor_missing;
|
||||||
|
|
||||||
|
/* The minimum VBIOS version supported */
|
||||||
|
u32 vbios_min_version;
|
||||||
|
|
||||||
/* memory training sequence and mclk switch scripts */
|
/* memory training sequence and mclk switch scripts */
|
||||||
u32 mem_config_idx;
|
u32 mem_config_idx;
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
#include <nvgpu/enabled.h>
|
#include <nvgpu/enabled.h>
|
||||||
|
|
||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
#include "gk20a/platform_gk20a.h"
|
|
||||||
#include "gm20b/fifo_gm20b.h"
|
#include "gm20b/fifo_gm20b.h"
|
||||||
#include "bios_gm206.h"
|
#include "bios_gm206.h"
|
||||||
#include "gp106/mclk_gp106.h"
|
#include "gp106/mclk_gp106.h"
|
||||||
@@ -171,7 +170,6 @@ out:
|
|||||||
int gm206_bios_init(struct gk20a *g)
|
int gm206_bios_init(struct gk20a *g)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g));
|
|
||||||
#ifdef CONFIG_DEBUG_FS
|
#ifdef CONFIG_DEBUG_FS
|
||||||
struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
|
struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
|
||||||
struct dentry *d;
|
struct dentry *d;
|
||||||
@@ -223,8 +221,7 @@ int gm206_bios_init(struct gk20a *g)
|
|||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (g->gpu_characteristics.vbios_version <
|
if (g->gpu_characteristics.vbios_version < g->vbios_min_version) {
|
||||||
platform->vbios_min_version) {
|
|
||||||
nvgpu_err(g, "unsupported VBIOS version %08x",
|
nvgpu_err(g, "unsupported VBIOS version %08x",
|
||||||
g->gpu_characteristics.vbios_version);
|
g->gpu_characteristics.vbios_version);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|||||||
Reference in New Issue
Block a user