From b50b379c192714d0d08c3f2d33e90c95cf795253 Mon Sep 17 00:00:00 2001 From: Sunny He Date: Tue, 1 Aug 2017 15:03:26 -0700 Subject: gpu: nvgpu: Move non-fp pmu members from gpu_ops Move non-function pointer members out of the pmu and pmu_ver substructs of gpu_ops. Ideally gpu_ops will have only function ponters, better matching its intended purpose and improving readability. - g.ops.pmu_ver.cmd_id_zbc_table_update has been changed to g.pmu_ver_cmd_id_zbc_table_update - g.ops.pmu.lspmuwprinitdone has been changed to g.pmu_lsf_pmu_wpr_init_done - g.ops.pmu.lsfloadedfalconid has been changed to g.pmu_lsf_loaded_falcon_id Boolean flags have been implemented using the enabled.h API - g.ops.pmu_ver.is_pmu_zbc_save_supported moved to common flag NVGPU_PMU_ZBC_SAVE - g.ops.pmu.fecsbootstrapdone moved to common flag NVGPU_PMU_FECS_BOOTSTRAP_DONE Jira NVGPU-74 Change-Id: I08fb20f8f382277f2c579f06d561914c000ea6e0 Signed-off-by: Sunny He Reviewed-on: https://git-master.nvidia.com/r/1530981 Reviewed-by: svccoveritychecker Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 47fd3aef..19ea76cb 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -656,9 +656,6 @@ struct gpu_ops { u8 value); void (*pg_cmd_eng_buf_load_set_dma_idx)(struct pmu_pg_cmd *pg, u8 value); - /*used for change of enum zbc update cmd id from ver 0 to ver1*/ - u32 cmd_id_zbc_table_update; - bool is_pmu_zbc_save_supported; } pmu_ver; struct { int (*get_netlist_name)(struct gk20a *g, int index, char *name); @@ -822,9 +819,6 @@ struct gpu_ops { void *lsfm, u32 *p_bl_gen_desc_size, u32 falconid); void (*handle_ext_irq)(struct gk20a *g, u32 intr); void (*set_irqmask)(struct gk20a *g); - u32 lspmuwprinitdone; - u32 lsfloadedfalconid; - bool fecsbootstrapdone; } pmu; struct { int (*init_debugfs)(struct gk20a *g); @@ -1197,6 +1191,10 @@ struct gk20a { struct gpu_ops ops; u32 mc_intr_mask_restore[4]; + /*used for change of enum zbc update cmd id from ver 0 to ver1*/ + u32 pmu_ver_cmd_id_zbc_table_update; + u32 pmu_lsf_pmu_wpr_init_done; + u32 pmu_lsf_loaded_falcon_id; int irqs_enabled; int irq_stall; /* can be same as irq_nonstall in case of PCI */ -- cgit v1.2.2