From c9419732776a3f31b3c1ace0cd113151f3a4d7cd Mon Sep 17 00:00:00 2001 From: Peter Daifuku Date: Wed, 8 Nov 2017 19:13:29 -0800 Subject: gpu: nvgpu: ctx_patch_write fixes - Add update_patch_count parameter to ctx_patch_write_begin/end functions If True, the main_image_patch_count register will be updated. Previously, the patch count would be updated if the cpu_va for the graphics context was non-NULL, but this only works for sysmem (cpu_va is always 0 for vidmem) - Remove unused patch parameter for the commit_global_timeslice functions JIRA ESRM-74 Bug 2012077 Change-Id: I35d0a9eb48669a227833bba1d2e63e9fe8fd8aa9 Signed-off-by: Peter Daifuku Reviewed-on: https://git-master.nvidia.com/r/1594790 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gr_gk20a.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h index 2b3b74bc..b437838f 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h @@ -619,9 +619,11 @@ struct channel_ctx_gk20a; void gr_gk20a_ctx_patch_write(struct gk20a *g, struct channel_ctx_gk20a *ch_ctx, u32 addr, u32 data, bool patch); int gr_gk20a_ctx_patch_write_begin(struct gk20a *g, - struct channel_ctx_gk20a *ch_ctx); + struct channel_ctx_gk20a *ch_ctx, + bool update_patch_count); void gr_gk20a_ctx_patch_write_end(struct gk20a *g, - struct channel_ctx_gk20a *ch_ctx); + struct channel_ctx_gk20a *ch_ctx, + bool update_patch_count); void gr_gk20a_commit_global_pagepool(struct gk20a *g, struct channel_ctx_gk20a *ch_ctx, u64 addr, u32 size, bool patch); @@ -745,8 +747,7 @@ int gr_gk20a_resume_from_pause(struct gk20a *g); int gr_gk20a_clear_sm_errors(struct gk20a *g); u32 gr_gk20a_tpc_enabled_exceptions(struct gk20a *g); -int gr_gk20a_commit_global_timeslice(struct gk20a *g, - struct channel_gk20a *c, bool patch); +int gr_gk20a_commit_global_timeslice(struct gk20a *g, struct channel_gk20a *c); void gr_gk20a_init_sm_id_table(struct gk20a *g); -- cgit v1.2.2