From 7e8ba851a826f398fb722b9ff26d6fd40f3226ce Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Thu, 15 Nov 2018 15:31:09 +0200 Subject: gpu: nvgpu: delete raw chid lookup This (dangerous) array lookup with no channel references is now unused. Jira NVGPU-1460 Change-Id: Ic6bdbcf19fc8996bc6ff02a40afe3224bdd5bc27 Signed-off-by: Konsta Holtta Reviewed-on: https://git-master.nvidia.com/r/1955402 Signed-off-by: Debarshi Dutta (cherry picked from commit 4a53854a92e7c841fa3cb58da062fa756ae7b5c7 in dev-kernel) Reviewed-on: https://git-master.nvidia.com/r/2008517 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 10 ---------- drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | 3 --- 2 files changed, 13 deletions(-) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index f4a4591d..5e794a55 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -3859,16 +3859,6 @@ u32 gk20a_fifo_get_pbdma_signature(struct gk20a *g) return pbdma_signature_hw_valid_f() | pbdma_signature_sw_zero_f(); } -struct channel_gk20a *gk20a_fifo_channel_from_chid(struct gk20a *g, - u32 chid) -{ - if (chid != FIFO_INVAL_CHANNEL_ID) { - return g->fifo.channel + chid; - } else { - return NULL; - } -} - static const char * const ccsr_chan_status_str[] = { "idle", "pending", diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h index 21922426..2b646a7b 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h @@ -293,9 +293,6 @@ void gk20a_fifo_set_ctx_mmu_error_ch(struct gk20a *g, bool gk20a_fifo_error_tsg(struct gk20a *g, struct tsg_gk20a *tsg); bool gk20a_fifo_error_ch(struct gk20a *g, struct channel_gk20a *refch); -struct channel_gk20a *gk20a_fifo_channel_from_chid(struct gk20a *g, - u32 chid); - void gk20a_fifo_issue_preempt(struct gk20a *g, u32 id, bool is_tsg); int gk20a_fifo_set_runlist_interleave(struct gk20a *g, u32 id, -- cgit v1.2.2