diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index e7199d35..7bcda89f 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -2706,10 +2706,16 @@ static int pmu_process_init_msg(struct pmu_gk20a *pmu, | |||
2706 | for (i = 0; i < PMU_QUEUE_COUNT; i++) | 2706 | for (i = 0; i < PMU_QUEUE_COUNT; i++) |
2707 | pmu_queue_init(pmu, i, init); | 2707 | pmu_queue_init(pmu, i, init); |
2708 | 2708 | ||
2709 | if (!pmu->dmem.alloc) | 2709 | if (!pmu->dmem.alloc) { |
2710 | gk20a_allocator_init(&pmu->dmem, "gk20a_pmu_dmem", | 2710 | /*Align start and end addresses*/ |
2711 | pv->get_pmu_init_msg_pmu_sw_mg_off(init), | 2711 | u32 start = ALIGN(pv->get_pmu_init_msg_pmu_sw_mg_off(init), |
2712 | pv->get_pmu_init_msg_pmu_sw_mg_size(init)); | 2712 | PMU_DMEM_ALLOC_ALIGNMENT); |
2713 | u32 end = (pv->get_pmu_init_msg_pmu_sw_mg_off(init) + | ||
2714 | pv->get_pmu_init_msg_pmu_sw_mg_size(init)) & | ||
2715 | ~(PMU_DMEM_ALLOC_ALIGNMENT - 1); | ||
2716 | u32 size = end - start; | ||
2717 | gk20a_allocator_init(&pmu->dmem, "gk20a_pmu_dmem", start, size); | ||
2718 | } | ||
2713 | 2719 | ||
2714 | pmu->pmu_ready = true; | 2720 | pmu->pmu_ready = true; |
2715 | pmu->pmu_state = PMU_STATE_INIT_RECEIVED; | 2721 | pmu->pmu_state = PMU_STATE_INIT_RECEIVED; |