diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gp106')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/acr_gp106.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gp106/acr_gp106.c b/drivers/gpu/nvgpu/gp106/acr_gp106.c index d7b09220..0dfa8e0e 100644 --- a/drivers/gpu/nvgpu/gp106/acr_gp106.c +++ b/drivers/gpu/nvgpu/gp106/acr_gp106.c | |||
@@ -682,10 +682,12 @@ void lsfm_init_wpr_contents(struct gk20a *g, | |||
682 | struct ls_flcn_mgr_v1 *plsfm, struct nvgpu_mem *ucode) | 682 | struct ls_flcn_mgr_v1 *plsfm, struct nvgpu_mem *ucode) |
683 | { | 683 | { |
684 | struct lsfm_managed_ucode_img_v2 *pnode = plsfm->ucode_img_list; | 684 | struct lsfm_managed_ucode_img_v2 *pnode = plsfm->ucode_img_list; |
685 | struct lsf_wpr_header_v1 last_wpr_hdr; | ||
685 | u32 i; | 686 | u32 i; |
686 | 687 | ||
687 | /* The WPR array is at the base of the WPR */ | 688 | /* The WPR array is at the base of the WPR */ |
688 | pnode = plsfm->ucode_img_list; | 689 | pnode = plsfm->ucode_img_list; |
690 | memset(&last_wpr_hdr, 0, sizeof(struct lsf_wpr_header_v1)); | ||
689 | i = 0; | 691 | i = 0; |
690 | 692 | ||
691 | /* | 693 | /* |
@@ -759,10 +761,11 @@ void lsfm_init_wpr_contents(struct gk20a *g, | |||
759 | } | 761 | } |
760 | 762 | ||
761 | /* Tag the terminator WPR header with an invalid falcon ID. */ | 763 | /* Tag the terminator WPR header with an invalid falcon ID. */ |
762 | nvgpu_mem_wr32(g, ucode, | 764 | last_wpr_hdr.falcon_id = LSF_FALCON_ID_INVALID; |
763 | plsfm->managed_flcn_cnt * sizeof(struct lsf_wpr_header_v1) + | 765 | nvgpu_mem_wr_n(g, ucode, |
764 | offsetof(struct lsf_wpr_header_v1, falcon_id), | 766 | plsfm->managed_flcn_cnt * sizeof(struct lsf_wpr_header_v1), |
765 | LSF_FALCON_ID_INVALID); | 767 | &last_wpr_hdr, |
768 | sizeof(struct lsf_wpr_header_v1)); | ||
766 | } | 769 | } |
767 | 770 | ||
768 | /*! | 771 | /*! |