diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/driver_common.c | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm206/bios_gm206.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/enabled.h | 3 |
3 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c index bd1b7611..bf372859 100644 --- a/drivers/gpu/nvgpu/common/linux/driver_common.c +++ b/drivers/gpu/nvgpu/common/linux/driver_common.c | |||
@@ -134,6 +134,13 @@ static void nvgpu_init_pm_vars(struct gk20a *g) | |||
134 | g->pmu.aelpg_param[4] = APCTRL_CYCLES_PER_SAMPLE_MAX_DEFAULT; | 134 | g->pmu.aelpg_param[4] = APCTRL_CYCLES_PER_SAMPLE_MAX_DEFAULT; |
135 | } | 135 | } |
136 | 136 | ||
137 | static void nvgpu_init_vbios_vars(struct gk20a *g) | ||
138 | { | ||
139 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); | ||
140 | |||
141 | __nvgpu_set_enabled(g, NVGPU_PMU_RUN_PREOS, platform->run_preos); | ||
142 | } | ||
143 | |||
137 | static void nvgpu_init_mm_vars(struct gk20a *g) | 144 | static void nvgpu_init_mm_vars(struct gk20a *g) |
138 | { | 145 | { |
139 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); | 146 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
@@ -164,6 +171,7 @@ int nvgpu_probe(struct gk20a *g, | |||
164 | nvgpu_init_timeout(g); | 171 | nvgpu_init_timeout(g); |
165 | nvgpu_init_timeslice(g); | 172 | nvgpu_init_timeslice(g); |
166 | nvgpu_init_pm_vars(g); | 173 | nvgpu_init_pm_vars(g); |
174 | nvgpu_init_vbios_vars(g); | ||
167 | 175 | ||
168 | /* Initialize the platform interface. */ | 176 | /* Initialize the platform interface. */ |
169 | err = platform->probe(dev); | 177 | err = platform->probe(dev); |
diff --git a/drivers/gpu/nvgpu/gm206/bios_gm206.c b/drivers/gpu/nvgpu/gm206/bios_gm206.c index e9473414..381b3840 100644 --- a/drivers/gpu/nvgpu/gm206/bios_gm206.c +++ b/drivers/gpu/nvgpu/gm206/bios_gm206.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <nvgpu/timers.h> | 19 | #include <nvgpu/timers.h> |
20 | #include <nvgpu/firmware.h> | 20 | #include <nvgpu/firmware.h> |
21 | #include <nvgpu/falcon.h> | 21 | #include <nvgpu/falcon.h> |
22 | #include <nvgpu/enabled.h> | ||
22 | 23 | ||
23 | #include "gk20a/gk20a.h" | 24 | #include "gk20a/gk20a.h" |
24 | #include "gk20a/platform_gk20a.h" | 25 | #include "gk20a/platform_gk20a.h" |
@@ -254,7 +255,7 @@ int gm206_bios_init(struct gk20a *g) | |||
254 | return err; | 255 | return err; |
255 | } | 256 | } |
256 | 257 | ||
257 | if (platform->run_preos) { | 258 | if (nvgpu_is_enabled(g, NVGPU_PMU_RUN_PREOS)) { |
258 | err = gm206_bios_preos(g); | 259 | err = gm206_bios_preos(g); |
259 | if (err) { | 260 | if (err) { |
260 | nvgpu_err(g, "pre-os failed"); | 261 | nvgpu_err(g, "pre-os failed"); |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h index 5557f31f..354d3e72 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h +++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h | |||
@@ -53,6 +53,9 @@ struct gk20a; | |||
53 | #define NVGPU_PMU_ZBC_SAVE 50 | 53 | #define NVGPU_PMU_ZBC_SAVE 50 |
54 | #define NVGPU_PMU_FECS_BOOTSTRAP_DONE 51 | 54 | #define NVGPU_PMU_FECS_BOOTSTRAP_DONE 51 |
55 | 55 | ||
56 | /* whether to run PREOS binary on dGPUs */ | ||
57 | #define NVGPU_PMU_RUN_PREOS 52 | ||
58 | |||
56 | /* | 59 | /* |
57 | * Must be greater than the largest bit offset in the above list. | 60 | * Must be greater than the largest bit offset in the above list. |
58 | */ | 61 | */ |