From 4a53854a92e7c841fa3cb58da062fa756ae7b5c7 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Thu, 15 Nov 2018 15:31:09 +0200 Subject: [PATCH] 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 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(-) diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 5bf183c55..298f59332 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -3894,16 +3894,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 ab9531cb0..05e740b8a 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h @@ -316,9 +316,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,