diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2018-03-16 08:25:18 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-21 09:04:38 -0400 |
commit | 77b806fe7e68e853676f7c4bad14349aba1affa5 (patch) | |
tree | 2b0933a730d8b7f5144e0d51dfc89e3cb19a28f0 /drivers/gpu/nvgpu/gv100 | |
parent | 66751bc05d7a1efca3668d59a2820e3e92985f91 (diff) |
gpu: nvgpu: gv100: fix PMA list alignment in ctxsw buffer
GV100 ucode is changed so that it expects LIST_nv_perf_pma_ctx_reg list in
ctxsw buffer to be 256 byte aligned but same change is not applied to other
chip ucodes
ADD new HAL (*add_ctxsw_reg_perf_pma) to configure PMA register list and
define a common HAL gr_gk20a_add_ctxsw_reg_perf_pma() for all other
chips except GV100
Define a separate HAL for GV100 gr_gv100_add_ctxsw_reg_perf_pma() and fix
the required alignment in this function
Bug 1998067
Change-Id: Ie172fe90e2cdbac2509f2ece953cd8552e66fc56
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1676655
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv100')
-rw-r--r-- | drivers/gpu/nvgpu/gv100/gr_gv100.c | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/gr_gv100.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/hal_gv100.c | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv100/gr_gv100.c b/drivers/gpu/nvgpu/gv100/gr_gv100.c index 3aed7a19..c6273733 100644 --- a/drivers/gpu/nvgpu/gv100/gr_gv100.c +++ b/drivers/gpu/nvgpu/gv100/gr_gv100.c | |||
@@ -373,3 +373,13 @@ int gr_gv100_add_ctxsw_reg_pm_fbpa(struct gk20a *g, | |||
373 | *offset = off; | 373 | *offset = off; |
374 | return 0; | 374 | return 0; |
375 | } | 375 | } |
376 | |||
377 | int gr_gv100_add_ctxsw_reg_perf_pma(struct ctxsw_buf_offset_map_entry *map, | ||
378 | struct aiv_list_gk20a *regs, | ||
379 | u32 *count, u32 *offset, | ||
380 | u32 max_cnt, u32 base, u32 mask) | ||
381 | { | ||
382 | *offset = ALIGN(*offset, 256); | ||
383 | return gr_gk20a_add_ctxsw_reg_perf_pma(map, regs, | ||
384 | count, offset, max_cnt, base, mask); | ||
385 | } | ||
diff --git a/drivers/gpu/nvgpu/gv100/gr_gv100.h b/drivers/gpu/nvgpu/gv100/gr_gv100.h index e1174686..7b107db2 100644 --- a/drivers/gpu/nvgpu/gv100/gr_gv100.h +++ b/drivers/gpu/nvgpu/gv100/gr_gv100.h | |||
@@ -39,4 +39,8 @@ int gr_gv100_add_ctxsw_reg_pm_fbpa(struct gk20a *g, | |||
39 | u32 *count, u32 *offset, | 39 | u32 *count, u32 *offset, |
40 | u32 max_cnt, u32 base, | 40 | u32 max_cnt, u32 base, |
41 | u32 num_fbpas, u32 stride, u32 mask); | 41 | u32 num_fbpas, u32 stride, u32 mask); |
42 | int gr_gv100_add_ctxsw_reg_perf_pma(struct ctxsw_buf_offset_map_entry *map, | ||
43 | struct aiv_list_gk20a *regs, | ||
44 | u32 *count, u32 *offset, | ||
45 | u32 max_cnt, u32 base, u32 mask); | ||
42 | #endif | 46 | #endif |
diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index 08fc7c34..cfac8e0e 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c | |||
@@ -430,6 +430,7 @@ static const struct gpu_ops gv100_ops = { | |||
430 | .handle_notify_pending = gk20a_gr_handle_notify_pending, | 430 | .handle_notify_pending = gk20a_gr_handle_notify_pending, |
431 | .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending, | 431 | .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending, |
432 | .add_ctxsw_reg_pm_fbpa = gr_gv100_add_ctxsw_reg_pm_fbpa, | 432 | .add_ctxsw_reg_pm_fbpa = gr_gv100_add_ctxsw_reg_pm_fbpa, |
433 | .add_ctxsw_reg_perf_pma = gr_gv100_add_ctxsw_reg_perf_pma, | ||
433 | }, | 434 | }, |
434 | .fb = { | 435 | .fb = { |
435 | .reset = gv100_fb_reset, | 436 | .reset = gv100_fb_reset, |