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 <aalex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1732783
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Antony Clince Alex
2018-05-28 16:05:58 +05:30
committed by mobile promotions
parent 4d94b32d01
commit d27d9ff7a8
10 changed files with 29 additions and 14 deletions

View File

@@ -22,9 +22,6 @@
* DEALINGS IN THE SOFTWARE.
*/
#include <linux/dma-mapping.h>
#include <linux/dma-buf.h>
#include <nvgpu/bitops.h>
#include <nvgpu/kmem.h>
#include <nvgpu/lock.h>
@@ -61,14 +58,14 @@
#define CSS_MAX_PERFMON_IDS 256
/* reports whether the hw queue overflowed */
static inline bool css_hw_get_overflow_status(struct gk20a *g)
bool 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 css_hw_get_pending_snapshots(struct gk20a *g)
{
return gk20a_readl(g, perf_pmasys_mem_bytes_r()) /
sizeof(struct gk20a_cs_snapshot_fifo_entry);
@@ -245,7 +242,7 @@ static void css_gr_free_shared_data(struct gr_gk20a *gr)
}
static struct gk20a_cs_snapshot_client*
struct gk20a_cs_snapshot_client*
css_gr_search_client(struct nvgpu_list_node *clients, u32 perfmon)
{
struct gk20a_cs_snapshot_client *client;

View File

@@ -129,6 +129,8 @@ struct gk20a_cs_snapshot {
struct gk20a_cs_snapshot_fifo_entry *hw_get;
};
bool css_hw_get_overflow_status(struct gk20a *g);
u32 css_hw_get_pending_snapshots(struct gk20a *g);
void css_hw_set_handled_snapshots(struct gk20a *g, u32 done);
int css_hw_enable_snapshot(struct channel_gk20a *ch,
struct gk20a_cs_snapshot_client *cs_client);
@@ -140,5 +142,7 @@ u32 css_gr_release_perfmon_ids(struct gk20a_cs_snapshot *data,
u32 count);
int css_hw_check_data_available(struct channel_gk20a *ch, u32 *pending,
bool *hw_overflow);
struct gk20a_cs_snapshot_client*
css_gr_search_client(struct nvgpu_list_node *clients, u32 perfmon);
#endif /* CSS_GR_GK20A_H */

View File

@@ -1185,6 +1185,8 @@ struct gpu_ops {
u32 count);
int (*detach_snapshot)(struct channel_gk20a *ch,
struct gk20a_cs_snapshot_client *client);
bool (*get_overflow_status)(struct gk20a *g);
u32 (*get_pending_snapshots)(struct gk20a *g);
} css;
#endif
struct {