gpu: nvgpu: add is_sw_method_subch pbdma gops

Add is_sw_method_subch hal to avoid duplication of the entire function
for new chips.

JIRA NVGPU-9325

Change-Id: If18a2d510f77e269cb00dde609ec1c5941622858
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2855046
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: svcacv <svcacv@nvidia.com>
Reviewed-by: Prathap Kumar Valsan <prathapk@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Rajesh Devaraj
2023-02-08 09:45:06 +00:00
committed by mobile promotions
parent 356812d2c4
commit 2e73de831f
5 changed files with 8 additions and 2 deletions

View File

@@ -79,4 +79,6 @@ void ga10b_pbdma_report_error(struct gk20a *g, u32 pbdma_id,
u32 pbdma_intr_0);
void ga10b_pbdma_dump_intr_0(struct gk20a *g, u32 pbdma_id,
u32 pbdma_intr_0);
bool ga10b_pbdma_is_sw_method_subch(struct gk20a *g, u32 pbdma_id,
u32 pbdma_method_index);
#endif /* NVGPU_PBDMA_GA10B_H */

View File

@@ -146,7 +146,7 @@ static const char *const pbdma_intr_fault_type_desc[] = {
"PBSEG badsplit", "SIGNATURE bad"
};
static bool ga10b_pbdma_is_sw_method_subch(struct gk20a *g, u32 pbdma_id,
bool ga10b_pbdma_is_sw_method_subch(struct gk20a *g, u32 pbdma_id,
u32 pbdma_method_index)
{
u32 pbdma_method_stride;
@@ -463,7 +463,7 @@ static bool ga10b_pbdma_handle_intr_0_legacy(struct gk20a *g, u32 pbdma_id,
g->ops.pbdma.reset_header(g, pbdma_id);
for (i = 0U; i < 4U; i++) {
if (ga10b_pbdma_is_sw_method_subch(g,
if (g->ops.pbdma.is_sw_method_subch(g,
pbdma_id, i)) {
ga10b_pbdma_reset_method(g,
pbdma_id, i);

View File

@@ -1080,6 +1080,7 @@ static const struct gops_pbdma ga100_ops_pbdma = {
.set_channel_info_veid = gv11b_pbdma_set_channel_info_veid,
.set_channel_info_chid = ga10b_pbdma_set_channel_info_chid,
.set_intr_notify = ga10b_pbdma_set_intr_notify,
.is_sw_method_subch = ga10b_pbdma_is_sw_method_subch,
.report_error = ga10b_pbdma_report_error,
#ifdef CONFIG_NVGPU_HAL_NON_FUSA
.pbdma_force_ce_split = ga100_pbdma_force_ce_split,

View File

@@ -1098,6 +1098,7 @@ static const struct gops_pbdma ga10b_ops_pbdma = {
.set_channel_info_veid = gv11b_pbdma_set_channel_info_veid,
.set_channel_info_chid = ga10b_pbdma_set_channel_info_chid,
.set_intr_notify = ga10b_pbdma_set_intr_notify,
.is_sw_method_subch = ga10b_pbdma_is_sw_method_subch,
.report_error = ga10b_pbdma_report_error,
.config_userd_writeback_enable = gv11b_pbdma_config_userd_writeback_enable,
.get_mmu_fault_id = ga10b_pbdma_get_mmu_fault_id,

View File

@@ -96,6 +96,8 @@ struct gops_pbdma {
u32 pbdma_intr_0);
bool (*handle_intr_0_acquire)(struct gk20a *g, u32 pbdma_id,
u32 pbdma_intr_0, u32 *error_notifier);
bool (*is_sw_method_subch)(struct gk20a *g, u32 pbdma_id,
u32 pbdma_method_index);
/** NON FUSA */
void (*syncpt_debug_dump)(struct gk20a *g,