qcacmn: Add delayed register write support in HAL

In case the bus is in low power mode, the register writes (followed by a
memory barrier) may take a long time (~4ms). This can cause the caller
to block till the PCIe write is completed. Thus, even though PCI
writes are posted, it can still block the caller.

Hence, in case the bus is in low power mode (not in M0), or not in high
throughput scenarios, queue the register write in a workqueue. The
register write will happen in the delayed work context. In other cases,
i.e ,when the bus is not in low power mode or in high thoughput
scenarios, do the register writes in caller context.

Change-Id: Idf218e4581545bc6ac67b91d0f70d495387ca90e
CRs-Fixed: 2602029
This commit is contained in:
Mohit Khanna
2020-02-07 11:40:13 -08:00
committed by nshrivas
parent d5a7a4ca89
commit b4429e8278
6 changed files with 525 additions and 7 deletions

View File

@@ -334,6 +334,7 @@ const int dp_stats_mapping_table[][STATS_TYPE_MAX] = {
{TXRX_FW_STATS_INVALID, TXRX_PDEV_CFG_PARAMS},
{TXRX_FW_STATS_INVALID, TXRX_SOC_INTERRUPT_STATS},
{TXRX_FW_STATS_INVALID, TXRX_SOC_FSE_STATS},
{TXRX_FW_STATS_INVALID, TXRX_HAL_REG_WRITE_STATS},
};
/* MCL specific functions */
@@ -7604,6 +7605,7 @@ static void dp_txrx_stats_help(void)
dp_info(" 29 -- Host Soc cfg param Statistics");
dp_info(" 30 -- Host pdev cfg param Statistics");
dp_info(" 31 -- Host FISA stats");
dp_info(" 32 -- Host Register Work stats");
}
/**
@@ -7663,11 +7665,17 @@ dp_print_host_stats(struct dp_vdev *vdev,
break;
case TXRX_NAPI_STATS:
dp_print_napi_stats(pdev->soc);
break;
case TXRX_SOC_INTERRUPT_STATS:
dp_print_soc_interrupt_stats(pdev->soc);
break;
case TXRX_SOC_FSE_STATS:
dp_rx_dump_fisa_table(pdev->soc);
break;
case TXRX_HAL_REG_WRITE_STATS:
hal_dump_reg_write_stats(pdev->soc->hal_soc);
hal_dump_reg_write_srng_stats(pdev->soc->hal_soc);
break;
default:
dp_info("Wrong Input For TxRx Host Stats");
dp_txrx_stats_help();
@@ -9098,6 +9106,7 @@ static QDF_STATUS dp_txrx_dump_stats(struct cdp_soc_t *psoc, uint16_t value,
case CDP_TXRX_PATH_STATS:
dp_txrx_path_stats(soc);
dp_print_soc_interrupt_stats(soc);
hal_dump_reg_write_stats(soc->hal_soc);
break;
case CDP_RX_RING_STATS: