From 40ca7cc573430ca4e21fdec4a44394c09d615846 Mon Sep 17 00:00:00 2001 From: Mahantesh Kumbar Date: Tue, 9 May 2017 15:49:43 +0530 Subject: gpu: nvgpu: reorganize PMU IPC - Moved PMU IPC related code to drivers/gpu/nvgpu/common/pmu/pmu_ipc.c file, -Below is the list which are moved seq mutex queue cmd/msg post & process event handling NVGPU-56 Change-Id: Ic380faa27de4e5574d5b22500125e86027fd4b5d Signed-off-by: Mahantesh Kumbar Reviewed-on: http://git-master/r/1478167 GVS: Gerrit_Virtual_Submit Reviewed-by: svccoveritychecker Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 4b0667c5..00b26cf4 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -2629,12 +2629,12 @@ int gk20a_fifo_preempt_channel(struct gk20a *g, u32 hw_chid) for (i = 0; i < g->fifo.max_runlists; i++) nvgpu_mutex_acquire(&f->runlist_info[i].mutex); - mutex_ret = pmu_mutex_acquire(&g->pmu, PMU_MUTEX_ID_FIFO, &token); + mutex_ret = nvgpu_pmu_mutex_acquire(&g->pmu, PMU_MUTEX_ID_FIFO, &token); ret = __locked_fifo_preempt(g, hw_chid, false); if (!mutex_ret) - pmu_mutex_release(&g->pmu, PMU_MUTEX_ID_FIFO, &token); + nvgpu_pmu_mutex_release(&g->pmu, PMU_MUTEX_ID_FIFO, &token); for (i = 0; i < g->fifo.max_runlists; i++) nvgpu_mutex_release(&f->runlist_info[i].mutex); @@ -2656,12 +2656,12 @@ int gk20a_fifo_preempt_tsg(struct gk20a *g, u32 tsgid) for (i = 0; i < g->fifo.max_runlists; i++) nvgpu_mutex_acquire(&f->runlist_info[i].mutex); - mutex_ret = pmu_mutex_acquire(&g->pmu, PMU_MUTEX_ID_FIFO, &token); + mutex_ret = nvgpu_pmu_mutex_acquire(&g->pmu, PMU_MUTEX_ID_FIFO, &token); ret = __locked_fifo_preempt(g, tsgid, true); if (!mutex_ret) - pmu_mutex_release(&g->pmu, PMU_MUTEX_ID_FIFO, &token); + nvgpu_pmu_mutex_release(&g->pmu, PMU_MUTEX_ID_FIFO, &token); for (i = 0; i < g->fifo.max_runlists; i++) nvgpu_mutex_release(&f->runlist_info[i].mutex); @@ -2718,12 +2718,12 @@ void gk20a_fifo_set_runlist_state(struct gk20a *g, u32 runlists_mask, } } - mutex_ret = pmu_mutex_acquire(&g->pmu, PMU_MUTEX_ID_FIFO, &token); + mutex_ret = nvgpu_pmu_mutex_acquire(&g->pmu, PMU_MUTEX_ID_FIFO, &token); gk20a_fifo_sched_disable_rw(g, runlists_mask, runlist_state); if (!mutex_ret) - pmu_mutex_release(&g->pmu, PMU_MUTEX_ID_FIFO, &token); + nvgpu_pmu_mutex_release(&g->pmu, PMU_MUTEX_ID_FIFO, &token); if (!is_runlist_info_mutex_locked) { gk20a_dbg_info("release runlist_info mutex"); @@ -2792,7 +2792,7 @@ int gk20a_fifo_disable_engine_activity(struct gk20a *g, fifo_engine_status_engine_busy_v() && !wait_for_idle) return -EBUSY; - mutex_ret = pmu_mutex_acquire(&g->pmu, PMU_MUTEX_ID_FIFO, &token); + mutex_ret = nvgpu_pmu_mutex_acquire(&g->pmu, PMU_MUTEX_ID_FIFO, &token); gk20a_fifo_set_runlist_state(g, fifo_sched_disable_runlist_m( eng_info->runlist_id), RUNLIST_DISABLED, @@ -2832,7 +2832,7 @@ int gk20a_fifo_disable_engine_activity(struct gk20a *g, clean_up: if (!mutex_ret) - pmu_mutex_release(&g->pmu, PMU_MUTEX_ID_FIFO, &token); + nvgpu_pmu_mutex_release(&g->pmu, PMU_MUTEX_ID_FIFO, &token); if (err) { gk20a_dbg_fn("failed"); @@ -3300,13 +3300,13 @@ int gk20a_fifo_update_runlist(struct gk20a *g, u32 runlist_id, u32 hw_chid, nvgpu_mutex_acquire(&runlist->mutex); - mutex_ret = pmu_mutex_acquire(&g->pmu, PMU_MUTEX_ID_FIFO, &token); + mutex_ret = nvgpu_pmu_mutex_acquire(&g->pmu, PMU_MUTEX_ID_FIFO, &token); ret = gk20a_fifo_update_runlist_locked(g, runlist_id, hw_chid, add, wait_for_finish); if (!mutex_ret) - pmu_mutex_release(&g->pmu, PMU_MUTEX_ID_FIFO, &token); + nvgpu_pmu_mutex_release(&g->pmu, PMU_MUTEX_ID_FIFO, &token); nvgpu_mutex_release(&runlist->mutex); return ret; -- cgit v1.2.2