diff options
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/acr_gm20b.c | 11 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/acr_gp106.c | 11 |
2 files changed, 14 insertions, 8 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 | /*! |
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 | /*! |