gpu: nvgpu: add intr_0_pbcrc_pending gops for pbdma

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

JIRA NVGPU-9325

Change-Id: Ia08ce7761ac5b9a1af1166efbc1ecba97b54fc87
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2857919
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Rajesh Devaraj
2023-02-14 08:40:56 +00:00
committed by mobile promotions
parent 5aae7df6cd
commit 4bbc766454
5 changed files with 15 additions and 4 deletions

View File

@@ -81,4 +81,5 @@ 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);
u32 ga10b_pbdma_intr_0_pbcrc_pending(void);
#endif /* NVGPU_PBDMA_GA10B_H */

View File

@@ -453,10 +453,12 @@ static bool ga10b_pbdma_handle_intr_0_legacy(struct gk20a *g, u32 pbdma_id,
recover = true;
}
if ((pbdma_intr_0 & pbdma_intr_0_pbcrc_pending_f()) != 0U) {
*error_notifier =
NVGPU_ERR_NOTIFIER_PBDMA_PUSHBUFFER_CRC_MISMATCH;
recover = true;
if (g->ops.pbdma.intr_0_pbcrc_pending != NULL) {
if ((pbdma_intr_0 & g->ops.pbdma.intr_0_pbcrc_pending()) != 0U) {
*error_notifier =
NVGPU_ERR_NOTIFIER_PBDMA_PUSHBUFFER_CRC_MISMATCH;
recover = true;
}
}
if ((pbdma_intr_0 & pbdma_intr_0_device_pending_f()) != 0U) {
@@ -624,6 +626,11 @@ u32 ga10b_pbdma_get_num_of_pbdmas(void)
return pbdma_cfg0__size_1_v();
}
u32 ga10b_pbdma_intr_0_pbcrc_pending(void)
{
return pbdma_intr_0_pbcrc_pending_f();
}
bool ga10b_pbdma_handle_intr_0_acquire(struct gk20a *g, u32 pbdma_id,
u32 pbdma_intr_0, u32 *error_notifier)
{

View File

@@ -1055,6 +1055,7 @@ static const struct gops_pbdma ga100_ops_pbdma = {
#endif
.handle_intr_0 = ga10b_pbdma_handle_intr_0,
.handle_intr_0_acquire = ga10b_pbdma_handle_intr_0_acquire,
.intr_0_pbcrc_pending = ga10b_pbdma_intr_0_pbcrc_pending,
.handle_intr_1 = ga10b_pbdma_handle_intr_1,
.handle_intr = ga10b_pbdma_handle_intr,
.dump_intr_0 = ga10b_pbdma_dump_intr_0,

View File

@@ -1073,6 +1073,7 @@ static const struct gops_pbdma ga10b_ops_pbdma = {
#endif
.handle_intr_0 = ga10b_pbdma_handle_intr_0,
.handle_intr_0_acquire = ga10b_pbdma_handle_intr_0_acquire,
.intr_0_pbcrc_pending = ga10b_pbdma_intr_0_pbcrc_pending,
.handle_intr_1 = ga10b_pbdma_handle_intr_1,
.handle_intr = ga10b_pbdma_handle_intr,
.dump_intr_0 = ga10b_pbdma_dump_intr_0,

View File

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