diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/acr_gm20b.c | 15 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/acr_gm20b.h | 4 |
2 files changed, 7 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c index 1e07f139..2e33c3f0 100644 --- a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c | |||
@@ -216,7 +216,7 @@ int prepare_ucode_blob(struct gk20a *g) | |||
216 | struct ls_flcn_mgr lsfm_l, *plsfm; | 216 | struct ls_flcn_mgr lsfm_l, *plsfm; |
217 | struct pmu_gk20a *pmu = &g->pmu; | 217 | struct pmu_gk20a *pmu = &g->pmu; |
218 | 218 | ||
219 | if (g->acr.ucode_blob_start) { | 219 | if (g->acr.ucode_blob.cpu_va) { |
220 | /*Recovery case, we do not need to form | 220 | /*Recovery case, we do not need to form |
221 | non WPR blob of ucodes*/ | 221 | non WPR blob of ucodes*/ |
222 | err = gk20a_init_pmu(pmu); | 222 | err = gk20a_init_pmu(pmu); |
@@ -238,23 +238,20 @@ int prepare_ucode_blob(struct gk20a *g) | |||
238 | if (err) | 238 | if (err) |
239 | return err; | 239 | return err; |
240 | 240 | ||
241 | if (plsfm->managed_flcn_cnt && !plsfm->mem.cpu_va) { | 241 | if (plsfm->managed_flcn_cnt && !g->acr.ucode_blob.cpu_va) { |
242 | /* Generate WPR requirements*/ | 242 | /* Generate WPR requirements*/ |
243 | err = lsf_gen_wpr_requirements(g, plsfm); | 243 | err = lsf_gen_wpr_requirements(g, plsfm); |
244 | if (err) | 244 | if (err) |
245 | return err; | 245 | return err; |
246 | 246 | ||
247 | /*Alloc memory to hold ucode blob contents*/ | 247 | /*Alloc memory to hold ucode blob contents*/ |
248 | err = gk20a_gmmu_alloc(g, plsfm->wpr_size, &plsfm->mem); | 248 | err = gk20a_gmmu_alloc(g, plsfm->wpr_size, &g->acr.ucode_blob); |
249 | if (err) | 249 | if (err) |
250 | return err; | 250 | return err; |
251 | 251 | ||
252 | gm20b_dbg_pmu("managed LS falcon %d, WPR size %d bytes.\n", | 252 | gm20b_dbg_pmu("managed LS falcon %d, WPR size %d bytes.\n", |
253 | plsfm->managed_flcn_cnt, plsfm->wpr_size); | 253 | plsfm->managed_flcn_cnt, plsfm->wpr_size); |
254 | lsfm_init_wpr_contents(g, plsfm, plsfm->mem.cpu_va); | 254 | lsfm_init_wpr_contents(g, plsfm, g->acr.ucode_blob.cpu_va); |
255 | g->acr.ucode_blob_start = g->ops.mm.get_iova_addr(g, | ||
256 | plsfm->mem.sgt->sgl, 0); | ||
257 | g->acr.ucode_blob_size = plsfm->wpr_size; | ||
258 | } else { | 255 | } else { |
259 | gm20b_dbg_pmu("LSFM is managing no falcons.\n"); | 256 | gm20b_dbg_pmu("LSFM is managing no falcons.\n"); |
260 | } | 257 | } |
@@ -880,8 +877,8 @@ int gm20b_bootstrap_hs_flcn(struct gk20a *g) | |||
880 | u32 *acr_ucode_header_t210_load; | 877 | u32 *acr_ucode_header_t210_load; |
881 | u32 *acr_ucode_data_t210_load; | 878 | u32 *acr_ucode_data_t210_load; |
882 | 879 | ||
883 | start = acr->ucode_blob_start; | 880 | start = g->ops.mm.get_iova_addr(g, acr->ucode_blob.sgt->sgl, 0); |
884 | size = acr->ucode_blob_size; | 881 | size = acr->ucode_blob.size; |
885 | 882 | ||
886 | gm20b_dbg_pmu(""); | 883 | gm20b_dbg_pmu(""); |
887 | 884 | ||
diff --git a/drivers/gpu/nvgpu/gm20b/acr_gm20b.h b/drivers/gpu/nvgpu/gm20b/acr_gm20b.h index 557acbc7..8970bf55 100644 --- a/drivers/gpu/nvgpu/gm20b/acr_gm20b.h +++ b/drivers/gpu/nvgpu/gm20b/acr_gm20b.h | |||
@@ -259,7 +259,6 @@ struct lsfm_managed_ucode_img { | |||
259 | struct ls_flcn_mgr { | 259 | struct ls_flcn_mgr { |
260 | u16 managed_flcn_cnt; | 260 | u16 managed_flcn_cnt; |
261 | u32 wpr_size; | 261 | u32 wpr_size; |
262 | struct mem_desc mem; | ||
263 | u32 disable_mask; | 262 | u32 disable_mask; |
264 | struct lsfm_managed_ucode_img *ucode_img_list; | 263 | struct lsfm_managed_ucode_img *ucode_img_list; |
265 | void *wpr_client_req_state;/*PACR_CLIENT_REQUEST_STATE originally*/ | 264 | void *wpr_client_req_state;/*PACR_CLIENT_REQUEST_STATE originally*/ |
@@ -373,8 +372,7 @@ struct acr_fw_header { | |||
373 | }; | 372 | }; |
374 | 373 | ||
375 | struct acr_gm20b { | 374 | struct acr_gm20b { |
376 | u64 ucode_blob_start; | 375 | struct mem_desc ucode_blob; |
377 | u32 ucode_blob_size; | ||
378 | struct bin_hdr *bl_bin_hdr; | 376 | struct bin_hdr *bl_bin_hdr; |
379 | struct hsflcn_bl_desc *pmu_hsbl_desc; | 377 | struct hsflcn_bl_desc *pmu_hsbl_desc; |
380 | struct bin_hdr *hsbin_hdr; | 378 | struct bin_hdr *hsbin_hdr; |