mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: add hal to get_ctx_buffer_offsets
Currently, gr_gk20a_get_ctx_buffer_offsets is defined as a function. However, this function is used in the common code. So, add new GR hal to get_ctx_buffer_offsets. Jira NVGPU-5047 Change-Id: I0cec6ff19194fa726722e6af3a2f11a188dc9087 Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2310352 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Lakshmanan M <lm@nvidia.com> Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
a182be7b8d
commit
00eec69b3f
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Tegra GK20A GPU Debugger Driver Register Ops
|
||||
*
|
||||
* Copyright (c) 2013-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2013-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -352,7 +352,7 @@ static int validate_reg_op_offset(struct gk20a *g,
|
||||
}
|
||||
|
||||
if (valid && (op->type != REGOP(TYPE_GLOBAL))) {
|
||||
err = gr_gk20a_get_ctx_buffer_offsets(g,
|
||||
err = g->ops.gr.get_ctx_buffer_offsets(g,
|
||||
op->offset,
|
||||
1,
|
||||
&buf_offset_lo,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* GK20A Graphics
|
||||
*
|
||||
* Copyright (c) 2011-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2011-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -1554,7 +1554,7 @@ static int gr_exec_ctx_ops(struct nvgpu_channel *ch,
|
||||
continue;
|
||||
}
|
||||
|
||||
err = gr_gk20a_get_ctx_buffer_offsets(g,
|
||||
err = g->ops.gr.get_ctx_buffer_offsets(g,
|
||||
ctx_ops[i].offset,
|
||||
max_offsets,
|
||||
offsets, offset_addrs,
|
||||
|
||||
@@ -234,6 +234,7 @@ static const struct gpu_ops gm20b_ops = {
|
||||
.split_fbpa_broadcast_addr = gr_gk20a_split_fbpa_broadcast_addr,
|
||||
.get_offset_in_gpccs_segment =
|
||||
gr_gk20a_get_offset_in_gpccs_segment,
|
||||
.get_ctx_buffer_offsets = gr_gk20a_get_ctx_buffer_offsets,
|
||||
.set_debug_mode = gm20b_gr_set_debug_mode,
|
||||
.esr_bpt_pending_events = gm20b_gr_esr_bpt_pending_events,
|
||||
#endif /* CONFIG_NVGPU_DEBUGGER */
|
||||
|
||||
@@ -287,6 +287,7 @@ static const struct gpu_ops gp10b_ops = {
|
||||
.split_fbpa_broadcast_addr = gr_gk20a_split_fbpa_broadcast_addr,
|
||||
.get_offset_in_gpccs_segment =
|
||||
gr_gk20a_get_offset_in_gpccs_segment,
|
||||
.get_ctx_buffer_offsets = gr_gk20a_get_ctx_buffer_offsets,
|
||||
.set_debug_mode = gm20b_gr_set_debug_mode,
|
||||
.esr_bpt_pending_events = gm20b_gr_esr_bpt_pending_events,
|
||||
#endif /* CONFIG_NVGPU_DEBUGGER */
|
||||
|
||||
@@ -359,6 +359,7 @@ NVGPU_COV_WHITELIST_BLOCK_END(NVGPU_MISRA(Rule, 8_7))
|
||||
.split_fbpa_broadcast_addr = gr_gk20a_split_fbpa_broadcast_addr,
|
||||
.get_offset_in_gpccs_segment =
|
||||
gr_gk20a_get_offset_in_gpccs_segment,
|
||||
.get_ctx_buffer_offsets = gr_gk20a_get_ctx_buffer_offsets,
|
||||
.set_debug_mode = gm20b_gr_set_debug_mode,
|
||||
.set_mmu_debug_mode = gm20b_gr_set_mmu_debug_mode,
|
||||
.esr_bpt_pending_events = gv11b_gr_esr_bpt_pending_events,
|
||||
|
||||
@@ -383,6 +383,7 @@ static const struct gpu_ops tu104_ops = {
|
||||
.split_fbpa_broadcast_addr = gr_gv100_split_fbpa_broadcast_addr,
|
||||
.get_offset_in_gpccs_segment =
|
||||
gr_tu104_get_offset_in_gpccs_segment,
|
||||
.get_ctx_buffer_offsets = gr_gk20a_get_ctx_buffer_offsets,
|
||||
.set_debug_mode = gm20b_gr_set_debug_mode,
|
||||
.esr_bpt_pending_events = gv11b_gr_esr_bpt_pending_events,
|
||||
#endif /* CONFIG_NVGPU_DEBUGGER */
|
||||
|
||||
@@ -1170,6 +1170,12 @@ struct gops_gr {
|
||||
u32 num_tpcs, u32 num_ppcs,
|
||||
u32 reg_list_ppc_count,
|
||||
u32 *__offset_in_segment);
|
||||
int (*get_ctx_buffer_offsets)(struct gk20a *g,
|
||||
u32 addr,
|
||||
u32 max_offsets,
|
||||
u32 *offsets, u32 *offset_addrs,
|
||||
u32 *num_offsets,
|
||||
bool is_quad, u32 quad);
|
||||
void (*set_debug_mode)(struct gk20a *g, bool enable);
|
||||
int (*set_mmu_debug_mode)(struct gk20a *g,
|
||||
struct nvgpu_channel *ch, bool enable);
|
||||
|
||||
Reference in New Issue
Block a user