diff options
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 11 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 1 | ||||
-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 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c | 1 |
12 files changed, 39 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 4ab1cd1b..f64a2b96 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -456,6 +456,10 @@ struct gpu_ops { | |||
456 | u32 *count, u32 *offset, | 456 | u32 *count, u32 *offset, |
457 | u32 max_cnt, u32 base, | 457 | u32 max_cnt, u32 base, |
458 | u32 num_fbpas, u32 stride, u32 mask); | 458 | u32 num_fbpas, u32 stride, u32 mask); |
459 | int (*add_ctxsw_reg_perf_pma)(struct ctxsw_buf_offset_map_entry *map, | ||
460 | struct aiv_list_gk20a *regs, | ||
461 | u32 *count, u32 *offset, | ||
462 | u32 max_cnt, u32 base, u32 mask); | ||
459 | } gr; | 463 | } gr; |
460 | struct { | 464 | struct { |
461 | void (*init_hw)(struct gk20a *g); | 465 | void (*init_hw)(struct gk20a *g); |
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index bec33293..9d85a5ef 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -7568,6 +7568,15 @@ static int add_ctxsw_buffer_map_entries_gpcs(struct gk20a *g, | |||
7568 | return 0; | 7568 | return 0; |
7569 | } | 7569 | } |
7570 | 7570 | ||
7571 | int gr_gk20a_add_ctxsw_reg_perf_pma(struct ctxsw_buf_offset_map_entry *map, | ||
7572 | struct aiv_list_gk20a *regs, | ||
7573 | u32 *count, u32 *offset, | ||
7574 | u32 max_cnt, u32 base, u32 mask) | ||
7575 | { | ||
7576 | return add_ctxsw_buffer_map_entries(map, regs, | ||
7577 | count, offset, max_cnt, base, mask); | ||
7578 | } | ||
7579 | |||
7571 | /* | 7580 | /* |
7572 | * PM CTXSW BUFFER LAYOUT : | 7581 | * PM CTXSW BUFFER LAYOUT : |
7573 | *|---------------------------------------------|0x00 <----PM CTXSW BUFFER BASE | 7582 | *|---------------------------------------------|0x00 <----PM CTXSW BUFFER BASE |
@@ -7671,7 +7680,7 @@ static int gr_gk20a_create_hwpm_ctxsw_buffer_offset_map(struct gk20a *g) | |||
7671 | goto cleanup; | 7680 | goto cleanup; |
7672 | 7681 | ||
7673 | /* Add entries from _LIST_nv_perf_pma_ctx_reg*/ | 7682 | /* Add entries from _LIST_nv_perf_pma_ctx_reg*/ |
7674 | if (add_ctxsw_buffer_map_entries(map, &g->gr.ctx_vars.ctxsw_regs.perf_pma, | 7683 | if (g->ops.gr.add_ctxsw_reg_perf_pma(map, &g->gr.ctx_vars.ctxsw_regs.perf_pma, |
7675 | &count, &offset, hwpm_ctxsw_reg_count_max, 0, ~0)) | 7684 | &count, &offset, hwpm_ctxsw_reg_count_max, 0, ~0)) |
7676 | goto cleanup; | 7685 | goto cleanup; |
7677 | 7686 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h index 5ac363e1..54833028 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h | |||
@@ -817,4 +817,8 @@ int gr_gk20a_add_ctxsw_reg_pm_fbpa(struct gk20a *g, | |||
817 | u32 *count, u32 *offset, | 817 | u32 *count, u32 *offset, |
818 | u32 max_cnt, u32 base, | 818 | u32 max_cnt, u32 base, |
819 | u32 num_fbpas, u32 stride, u32 mask); | 819 | u32 num_fbpas, u32 stride, u32 mask); |
820 | int gr_gk20a_add_ctxsw_reg_perf_pma(struct ctxsw_buf_offset_map_entry *map, | ||
821 | struct aiv_list_gk20a *regs, | ||
822 | u32 *count, u32 *offset, | ||
823 | u32 max_cnt, u32 base, u32 mask); | ||
820 | #endif /*__GR_GK20A_H__*/ | 824 | #endif /*__GR_GK20A_H__*/ |
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index 9de5a4ca..3c1970eb 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c | |||
@@ -315,6 +315,7 @@ static const struct gpu_ops gm20b_ops = { | |||
315 | .handle_notify_pending = gk20a_gr_handle_notify_pending, | 315 | .handle_notify_pending = gk20a_gr_handle_notify_pending, |
316 | .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending, | 316 | .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending, |
317 | .add_ctxsw_reg_pm_fbpa = gr_gk20a_add_ctxsw_reg_pm_fbpa, | 317 | .add_ctxsw_reg_pm_fbpa = gr_gk20a_add_ctxsw_reg_pm_fbpa, |
318 | .add_ctxsw_reg_perf_pma = gr_gk20a_add_ctxsw_reg_perf_pma, | ||
318 | }, | 319 | }, |
319 | .fb = { | 320 | .fb = { |
320 | .reset = fb_gk20a_reset, | 321 | .reset = fb_gk20a_reset, |
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index bab32a92..84e72e98 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -377,6 +377,7 @@ static const struct gpu_ops gp106_ops = { | |||
377 | .handle_notify_pending = gk20a_gr_handle_notify_pending, | 377 | .handle_notify_pending = gk20a_gr_handle_notify_pending, |
378 | .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending, | 378 | .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending, |
379 | .add_ctxsw_reg_pm_fbpa = gr_gk20a_add_ctxsw_reg_pm_fbpa, | 379 | .add_ctxsw_reg_pm_fbpa = gr_gk20a_add_ctxsw_reg_pm_fbpa, |
380 | .add_ctxsw_reg_perf_pma = gr_gk20a_add_ctxsw_reg_perf_pma, | ||
380 | }, | 381 | }, |
381 | .fb = { | 382 | .fb = { |
382 | .reset = gp106_fb_reset, | 383 | .reset = gp106_fb_reset, |
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 843b6ee7..825d11e5 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |||
@@ -345,6 +345,7 @@ static const struct gpu_ops gp10b_ops = { | |||
345 | .handle_notify_pending = gk20a_gr_handle_notify_pending, | 345 | .handle_notify_pending = gk20a_gr_handle_notify_pending, |
346 | .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending, | 346 | .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending, |
347 | .add_ctxsw_reg_pm_fbpa = gr_gk20a_add_ctxsw_reg_pm_fbpa, | 347 | .add_ctxsw_reg_pm_fbpa = gr_gk20a_add_ctxsw_reg_pm_fbpa, |
348 | .add_ctxsw_reg_perf_pma = gr_gk20a_add_ctxsw_reg_perf_pma, | ||
348 | }, | 349 | }, |
349 | .fb = { | 350 | .fb = { |
350 | .reset = fb_gk20a_reset, | 351 | .reset = fb_gk20a_reset, |
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, |
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 1edf67d6..94aa2dc4 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -397,6 +397,7 @@ static const struct gpu_ops gv11b_ops = { | |||
397 | .handle_notify_pending = gk20a_gr_handle_notify_pending, | 397 | .handle_notify_pending = gk20a_gr_handle_notify_pending, |
398 | .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending, | 398 | .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending, |
399 | .add_ctxsw_reg_pm_fbpa = gr_gk20a_add_ctxsw_reg_pm_fbpa, | 399 | .add_ctxsw_reg_pm_fbpa = gr_gk20a_add_ctxsw_reg_pm_fbpa, |
400 | .add_ctxsw_reg_perf_pma = gr_gk20a_add_ctxsw_reg_perf_pma, | ||
400 | }, | 401 | }, |
401 | .fb = { | 402 | .fb = { |
402 | .reset = gv11b_fb_reset, | 403 | .reset = gv11b_fb_reset, |
diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c index 5750fd78..7156a29d 100644 --- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c +++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c | |||
@@ -221,6 +221,7 @@ static const struct gpu_ops vgpu_gp10b_ops = { | |||
221 | .get_max_gfxp_wfi_timeout_count = | 221 | .get_max_gfxp_wfi_timeout_count = |
222 | gr_gp10b_get_max_gfxp_wfi_timeout_count, | 222 | gr_gp10b_get_max_gfxp_wfi_timeout_count, |
223 | .add_ctxsw_reg_pm_fbpa = gr_gk20a_add_ctxsw_reg_pm_fbpa, | 223 | .add_ctxsw_reg_pm_fbpa = gr_gk20a_add_ctxsw_reg_pm_fbpa, |
224 | .add_ctxsw_reg_perf_pma = gr_gk20a_add_ctxsw_reg_perf_pma, | ||
224 | }, | 225 | }, |
225 | .fb = { | 226 | .fb = { |
226 | .reset = fb_gk20a_reset, | 227 | .reset = fb_gk20a_reset, |
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c index 9588f4bd..2c81607d 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c | |||
@@ -257,6 +257,7 @@ static const struct gpu_ops vgpu_gv11b_ops = { | |||
257 | .get_max_gfxp_wfi_timeout_count = | 257 | .get_max_gfxp_wfi_timeout_count = |
258 | gr_gv11b_get_max_gfxp_wfi_timeout_count, | 258 | gr_gv11b_get_max_gfxp_wfi_timeout_count, |
259 | .add_ctxsw_reg_pm_fbpa = gr_gk20a_add_ctxsw_reg_pm_fbpa, | 259 | .add_ctxsw_reg_pm_fbpa = gr_gk20a_add_ctxsw_reg_pm_fbpa, |
260 | .add_ctxsw_reg_perf_pma = gr_gk20a_add_ctxsw_reg_perf_pma, | ||
260 | }, | 261 | }, |
261 | .fb = { | 262 | .fb = { |
262 | .reset = gv11b_fb_reset, | 263 | .reset = gv11b_fb_reset, |