From 5fce81ea6d81a75d00ea66f5d23a8293aa9d6911 Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Thu, 16 May 2019 18:43:55 -0700 Subject: [PATCH] gpu: nvgpu: remove gr_priv.h dependnecy from hal gr falcon Removed gr_priv.h dependency in gr_falcon by using gr_utils.h API for getting nvgpu_gr_falcon pointer. JIRA NVGPU-3218 Change-Id: I4f02e8f76b13312b024ff95bf22019725fcf4c98 Signed-off-by: Seshendra Gadagottu Reviewed-on: https://git-master.nvidia.com/r/2120693 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra GVS: Gerrit_Virtual_Submit Reviewed-by: Vinod Gopalakrishnakurup Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/hal/gr/falcon/gr_falcon_gm20b.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/nvgpu/hal/gr/falcon/gr_falcon_gm20b.c b/drivers/gpu/nvgpu/hal/gr/falcon/gr_falcon_gm20b.c index 129dbf0cb..305ff71c5 100644 --- a/drivers/gpu/nvgpu/hal/gr/falcon/gr_falcon_gm20b.c +++ b/drivers/gpu/nvgpu/hal/gr/falcon/gr_falcon_gm20b.c @@ -29,7 +29,7 @@ #include "gr_falcon_gm20b.h" #include "common/gr/gr_falcon_priv.h" -#include "common/gr/gr_priv.h" +#include #include @@ -754,9 +754,9 @@ int gm20b_gr_falcon_submit_fecs_method_op(struct gk20a *g, bool sleepduringwait) { int ret; - struct nvgpu_gr *gr = g->gr; + struct nvgpu_gr_falcon *gr_falcon = nvgpu_gr_get_falcon_ptr(g); - nvgpu_mutex_acquire(&gr->falcon->fecs_mutex); + nvgpu_mutex_acquire(&gr_falcon->fecs_mutex); if (op.mailbox.id != 0U) { nvgpu_writel(g, gr_fecs_ctxsw_mailbox_r(op.mailbox.id), @@ -786,7 +786,7 @@ int gm20b_gr_falcon_submit_fecs_method_op(struct gk20a *g, op.method.data, op.method.addr); } - nvgpu_mutex_release(&gr->falcon->fecs_mutex); + nvgpu_mutex_release(&gr_falcon->fecs_mutex); return ret; } @@ -796,9 +796,9 @@ int gm20b_gr_falcon_submit_fecs_sideband_method_op(struct gk20a *g, struct nvgpu_fecs_method_op op) { int ret; - struct nvgpu_gr *gr = g->gr; + struct nvgpu_gr_falcon *gr_falcon = nvgpu_gr_get_falcon_ptr(g); - nvgpu_mutex_acquire(&gr->falcon->fecs_mutex); + nvgpu_mutex_acquire(&gr_falcon->fecs_mutex); nvgpu_writel(g, gr_fecs_ctxsw_mailbox_clear_r(op.mailbox.id), gr_fecs_ctxsw_mailbox_clear_value_f(op.mailbox.clr)); @@ -816,7 +816,7 @@ int gm20b_gr_falcon_submit_fecs_sideband_method_op(struct gk20a *g, op.method.data, op.method.addr); } - nvgpu_mutex_release(&gr->falcon->fecs_mutex); + nvgpu_mutex_release(&gr_falcon->fecs_mutex); return ret; }