From d717c69d2b1992688589ae389380fedf0b06c720 Mon Sep 17 00:00:00 2001 From: Sunny He Date: Fri, 30 Jun 2017 14:40:33 -0700 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1514205 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h') 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 @@ /* * GK20A Cycle stats snapshots support (subsystem for gr_gk20a). * - * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -121,6 +121,16 @@ struct gk20a_cs_snapshot { struct gk20a_cs_snapshot_fifo_entry *hw_get; }; -void gk20a_init_css_ops(struct gpu_ops *gops); +inline 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); +void css_hw_disable_snapshot(struct gr_gk20a *gr); +u32 css_gr_allocate_perfmon_ids(struct gk20a_cs_snapshot *data, + u32 count); +u32 css_gr_release_perfmon_ids(struct gk20a_cs_snapshot *data, + u32 start, + u32 count); +int css_hw_check_data_available(struct channel_gk20a *ch, u32 *pending, + bool *hw_overflow); #endif /* CSS_GR_GK20A_H */ -- cgit v1.2.2