From 84db72a21ce4076a66acbb936b5a6dabf39c7ee2 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 26 Jun 2018 03:44:55 -0700 Subject: gpu: nvgpu: add HAL to get offset in gpccs segment In gr_gk20a_find_priv_offset_in_buffer() we right now calculate offset of a register in gpccs segment based on register address type Separate out sequence to find offset in gpccs segment and move it to new API gr_gk20a_get_offset_in_gpccs_segment() Introduce new HAL gops.gr.get_offset_in_gpccs_segment() and set above API to this HAL Call HAL from gr_gk20a_find_priv_offset_in_buffer() instead of calling direct API Jira NVGPUT-118 Change-Id: I0df798456cf63e3c3a43131f3c4ca7990b89ede0 Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/1761669 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c') diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c index 5c210519..349548cd 100644 --- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c +++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c @@ -235,6 +235,8 @@ static const struct gpu_ops vgpu_gp10b_ops = { .alloc_global_ctx_buffers = gr_gk20a_alloc_global_ctx_buffers, .map_global_ctx_buffers = gr_gk20a_map_global_ctx_buffers, .commit_global_ctx_buffers = gr_gk20a_commit_global_ctx_buffers, + .get_offset_in_gpccs_segment = + gr_gk20a_get_offset_in_gpccs_segment, }, .fb = { .reset = fb_gk20a_reset, -- cgit v1.2.2