summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-06-30 17:40:33 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-24 02:35:03 -0400
commitd717c69d2b1992688589ae389380fedf0b06c720 (patch)
tree5d7596070d8ab7ca53bcd8506135d99789c9b7bb /drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h
parent882a5be5a45702cd94c4eddf9d01e76fd8e039a1 (diff)
gpu: nvgpu: Reorg css HAL initialization
Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the css sub-module of the gpu_ops struct. Perform HAL function assignments in hal_gxxxx.c through the population of a chip-specific copy of gpu_ops. Jira NVGPU-74 Change-Id: I3bf696e13d359982c964c7bc470500a30555c034 Signed-off-by: Sunny He <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1514205 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h
index a95eaeae..804308bc 100644
--- a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * GK20A Cycle stats snapshots support (subsystem for gr_gk20a). 2 * GK20A Cycle stats snapshots support (subsystem for gr_gk20a).
3 * 3 *
4 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -121,6 +121,16 @@ struct gk20a_cs_snapshot {
121 struct gk20a_cs_snapshot_fifo_entry *hw_get; 121 struct gk20a_cs_snapshot_fifo_entry *hw_get;
122}; 122};
123 123
124void gk20a_init_css_ops(struct gpu_ops *gops); 124inline void css_hw_set_handled_snapshots(struct gk20a *g, u32 done);
125int css_hw_enable_snapshot(struct channel_gk20a *ch,
126 struct gk20a_cs_snapshot_client *cs_client);
127void css_hw_disable_snapshot(struct gr_gk20a *gr);
128u32 css_gr_allocate_perfmon_ids(struct gk20a_cs_snapshot *data,
129 u32 count);
130u32 css_gr_release_perfmon_ids(struct gk20a_cs_snapshot *data,
131 u32 start,
132 u32 count);
133int css_hw_check_data_available(struct channel_gk20a *ch, u32 *pending,
134 bool *hw_overflow);
125 135
126#endif /* CSS_GR_GK20A_H */ 136#endif /* CSS_GR_GK20A_H */