summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/acr_gm20b.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/acr_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/acr_gm20b.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c
index 0655b739..a39cdf2c 100644
--- a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c
@@ -652,10 +652,12 @@ static void lsfm_init_wpr_contents(struct gk20a *g, struct ls_flcn_mgr *plsfm,
652 struct nvgpu_mem *ucode) 652 struct nvgpu_mem *ucode)
653{ 653{
654 struct lsfm_managed_ucode_img *pnode = plsfm->ucode_img_list; 654 struct lsfm_managed_ucode_img *pnode = plsfm->ucode_img_list;
655 struct lsf_wpr_header last_wpr_hdr;
655 u32 i; 656 u32 i;
656 657
657 /* The WPR array is at the base of the WPR */ 658 /* The WPR array is at the base of the WPR */
658 pnode = plsfm->ucode_img_list; 659 pnode = plsfm->ucode_img_list;
660 memset(&last_wpr_hdr, 0, sizeof(struct lsf_wpr_header));
659 i = 0; 661 i = 0;
660 662
661 /* 663 /*
@@ -729,10 +731,11 @@ static void lsfm_init_wpr_contents(struct gk20a *g, struct ls_flcn_mgr *plsfm,
729 } 731 }
730 732
731 /* Tag the terminator WPR header with an invalid falcon ID. */ 733 /* Tag the terminator WPR header with an invalid falcon ID. */
732 nvgpu_mem_wr32(g, ucode, 734 last_wpr_hdr.falcon_id = LSF_FALCON_ID_INVALID;
733 plsfm->managed_flcn_cnt * sizeof(struct lsf_wpr_header) + 735 nvgpu_mem_wr_n(g, ucode,
734 offsetof(struct lsf_wpr_header, falcon_id), 736 plsfm->managed_flcn_cnt * sizeof(struct lsf_wpr_header),
735 LSF_FALCON_ID_INVALID); 737 &last_wpr_hdr,
738 sizeof(struct lsf_wpr_header));
736} 739}
737 740
738/*! 741/*!