qcacmn: Add Link stats check before ring access directly
Throughput based RTPM logic of ring access may fail and lead to NOC error in some corner cases. Change is aimed to add additional link states check to prevent invalid SRNG access. Change-Id: I7e7edbadfd21b4857efa4faff0ada6d94d682f2c CRs-Fixed: 3256702
This commit is contained in:

committed by
Madan Koyyalamudi

parent
899d504312
commit
11df417c3b
@@ -1520,7 +1520,11 @@ dp_tx_check_and_flush_hp(struct dp_soc *soc,
|
|||||||
#ifdef FEATURE_RUNTIME_PM
|
#ifdef FEATURE_RUNTIME_PM
|
||||||
static inline int dp_get_rtpm_tput_policy_requirement(struct dp_soc *soc)
|
static inline int dp_get_rtpm_tput_policy_requirement(struct dp_soc *soc)
|
||||||
{
|
{
|
||||||
return qdf_atomic_read(&soc->rtpm_high_tput_flag);
|
int ret;
|
||||||
|
|
||||||
|
ret = qdf_atomic_read(&soc->rtpm_high_tput_flag) &&
|
||||||
|
(hif_rtpm_get_state() <= HIF_RTPM_STATE_ON);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* dp_tx_ring_access_end_wrapper() - Wrapper for ring access end
|
* dp_tx_ring_access_end_wrapper() - Wrapper for ring access end
|
||||||
|
@@ -1516,6 +1516,13 @@ int hif_runtime_resume(struct hif_opaque_softc *hif_ctx);
|
|||||||
* fastpath only applicable to legacy copy engine
|
* fastpath only applicable to legacy copy engine
|
||||||
*/
|
*/
|
||||||
void hif_fastpath_resume(struct hif_opaque_softc *hif_ctx);
|
void hif_fastpath_resume(struct hif_opaque_softc *hif_ctx);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hif_rtpm_get_state(): get rtpm link state
|
||||||
|
*
|
||||||
|
* Return: state
|
||||||
|
*/
|
||||||
|
int hif_rtpm_get_state(void);
|
||||||
#else
|
#else
|
||||||
static inline
|
static inline
|
||||||
QDF_STATUS hif_rtpm_register(uint32_t id, void (*hif_rpm_cbk)(void))
|
QDF_STATUS hif_rtpm_register(uint32_t id, void (*hif_rpm_cbk)(void))
|
||||||
|
@@ -1025,6 +1025,11 @@ void hif_rtpm_set_state(enum hif_rtpm_state state)
|
|||||||
qdf_atomic_set(&gp_hif_rtpm_ctx->pm_state, state);
|
qdf_atomic_set(&gp_hif_rtpm_ctx->pm_state, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int hif_rtpm_get_state(void)
|
||||||
|
{
|
||||||
|
return qdf_atomic_read(&gp_hif_rtpm_ctx->pm_state);
|
||||||
|
}
|
||||||
|
|
||||||
int hif_pre_runtime_suspend(struct hif_opaque_softc *hif_ctx)
|
int hif_pre_runtime_suspend(struct hif_opaque_softc *hif_ctx)
|
||||||
{
|
{
|
||||||
if (!hif_can_suspend_link(hif_ctx)) {
|
if (!hif_can_suspend_link(hif_ctx)) {
|
||||||
|
Reference in New Issue
Block a user