From 0dc80244eea4c7e504976d8028a3ddb72ba60b0e Mon Sep 17 00:00:00 2001 From: Sunny He Date: Thu, 22 Jun 2017 16:43:51 -0700 Subject: gpu: nvgpu: Reorganize ltc HAL initialization Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the ltc 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: I1110e301e57b502cf7f97e6739424cb33cc52a69 Signed-off-by: Sunny He Reviewed-on: https://git-master/r/1507564 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/ltc_gk20a.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/ltc_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/ltc_gk20a.h b/drivers/gpu/nvgpu/gk20a/ltc_gk20a.h index 30d4163f..ee7d7f91 100644 --- a/drivers/gpu/nvgpu/gk20a/ltc_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/ltc_gk20a.h @@ -16,8 +16,26 @@ #ifndef LTC_GK20A_H #define LTC_GK20A_H struct gpu_ops; +struct gr_gk20a; +struct zbc_entry; +enum gk20a_cbc_op; -void gk20a_init_ltc(struct gpu_ops *gops); +int gk20a_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr); +int gk20a_ltc_cbc_ctrl(struct gk20a *g, enum gk20a_cbc_op op, + u32 min, u32 max); +void gk20a_ltc_init_fs_state(struct gk20a *g); +void gk20a_ltc_isr(struct gk20a *g); +int gk20a_determine_L2_size_bytes(struct gk20a *g); +void gk20a_ltc_set_zbc_color_entry(struct gk20a *g, + struct zbc_entry *color_val, + u32 index); +void gk20a_ltc_set_zbc_depth_entry(struct gk20a *g, + struct zbc_entry *depth_val, + u32 index); +void gk20a_ltc_init_cbc(struct gk20a *g, struct gr_gk20a *gr); +#ifdef CONFIG_DEBUG_FS +void gk20a_ltc_sync_debugfs(struct gk20a *g); +#endif int gk20a_ltc_alloc_phys_cbc(struct gk20a *g, size_t compbit_backing_size); int gk20a_ltc_alloc_virt_cbc(struct gk20a *g, size_t compbit_backing_size); #endif -- cgit v1.2.2