From d27d9ff7a89ab1a590a9cc8367af7f3a3ea698a8 Mon Sep 17 00:00:00 2001 From: Antony Clince Alex Date: Mon, 28 May 2018 16:05:58 +0530 Subject: gpu: nvgpu: removed linux includes from CSS HAL - removed inclusion of linux includes. - replaced with nvgpu/*.h's - reformated the function signature of "css_hw_get_pending_snapshot" and "css_hw_get_overflow_status" be global instead of static. - added get_pending_snapshot and get_overflow_status to ops->css. JIRA: VQRM-3699 Change-Id: I177904c263e143b414924c2c28ad6fd3cfd00132 Signed-off-by: Antony Clince Alex Reviewed-on: https://git-master.nvidia.com/r/1732783 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c') diff --git a/drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c index b4e2cb79..7f03be64 100644 --- a/drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c @@ -22,9 +22,6 @@ * DEALINGS IN THE SOFTWARE. */ -#include -#include - #include #include #include @@ -33,7 +30,9 @@ #include #include #include +#include #include +#include #include "gk20a/gk20a.h" #include "gk20a/css_gr_gk20a.h" @@ -44,14 +43,14 @@ /* reports whether the hw queue overflowed */ -static inline bool css_hw_get_overflow_status(struct gk20a *g) +bool gv11b_css_hw_get_overflow_status(struct gk20a *g) { const u32 st = perf_pmasys_control_membuf_status_overflowed_f(); return st == (gk20a_readl(g, perf_pmasys_control_r()) & st); } /* returns how many pending snapshot entries are pending */ -static inline u32 css_hw_get_pending_snapshots(struct gk20a *g) +u32 gv11b_css_hw_get_pending_snapshots(struct gk20a *g) { return gk20a_readl(g, perf_pmasys_mem_bytes_r()) / sizeof(struct gk20a_cs_snapshot_fifo_entry); @@ -74,7 +73,7 @@ static void gv11b_css_hw_reset_streaming(struct gk20a *g) perf_pmasys_control_membuf_clear_status_doit_f()); /* pointing all pending snapshots as handled */ - gv11b_css_hw_set_handled_snapshots(g, css_hw_get_pending_snapshots(g)); + gv11b_css_hw_set_handled_snapshots(g, gv11b_css_hw_get_pending_snapshots(g)); } /* informs hw how many snapshots have been processed (frees up fifo space) */ @@ -199,10 +198,10 @@ int gv11b_css_hw_check_data_available(struct channel_gk20a *ch, u32 *pending, if (!css->hw_snapshot) return -EINVAL; - *pending = css_hw_get_pending_snapshots(g); + *pending = gv11b_css_hw_get_pending_snapshots(g); if (!*pending) return 0; - *hw_overflow = css_hw_get_overflow_status(g); + *hw_overflow = gv11b_css_hw_get_overflow_status(g); return 0; } -- cgit v1.2.2