qcacmn: Disable CE srng timer interrupt for WCN7850
Disable timer mode interrupt for CE dest and status rings for WCN7850. Change-Id: Ic3459988d7547b63b65f94a9f43defb85ee26210 CRs-Fixed: 3044130
This commit is contained in:

committed by
Madan Koyyalamudi

parent
d3873b0cc6
commit
983df61b28
@@ -1,5 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -22,7 +23,11 @@
|
|||||||
/* Min/Max/default CE status srng timer threshold */
|
/* Min/Max/default CE status srng timer threshold */
|
||||||
#define WLAN_CFG_CE_STATUS_RING_TIMER_THRESH_MIN 0
|
#define WLAN_CFG_CE_STATUS_RING_TIMER_THRESH_MIN 0
|
||||||
#define WLAN_CFG_CE_STATUS_RING_TIMER_THRESH_MAX 4096
|
#define WLAN_CFG_CE_STATUS_RING_TIMER_THRESH_MAX 4096
|
||||||
|
#ifdef WLAN_WAR_CE_DISABLE_SRNG_TIMER_IRQ
|
||||||
|
#define WLAN_CFG_CE_STATUS_RING_TIMER_THRESH_DEFAULT 0
|
||||||
|
#else
|
||||||
#define WLAN_CFG_CE_STATUS_RING_TIMER_THRESH_DEFAULT 4096
|
#define WLAN_CFG_CE_STATUS_RING_TIMER_THRESH_DEFAULT 4096
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Min/Max/default CE status srng batch count threshold */
|
/* Min/Max/default CE status srng batch count threshold */
|
||||||
#define WLAN_CFG_CE_STATUS_RING_BATCH_COUNT_THRESH_MIN 0
|
#define WLAN_CFG_CE_STATUS_RING_BATCH_COUNT_THRESH_MIN 0
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -771,6 +772,40 @@ static void ce_srng_src_ring_setup(struct hif_softc *scn, uint32_t ce_id,
|
|||||||
&ring_params);
|
&ring_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_WAR_CE_DISABLE_SRNG_TIMER_IRQ
|
||||||
|
static void
|
||||||
|
ce_srng_initialize_dest_ring_thresh(struct CE_ring_state *dest_ring,
|
||||||
|
struct hal_srng_params *ring_params)
|
||||||
|
{
|
||||||
|
ring_params->low_threshold = dest_ring->nentries >> 3;
|
||||||
|
ring_params->intr_timer_thres_us = 0;
|
||||||
|
ring_params->intr_batch_cntr_thres_entries = 1;
|
||||||
|
ring_params->flags |= HAL_SRNG_LOW_THRES_INTR_ENABLE;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static void
|
||||||
|
ce_srng_initialize_dest_ring_thresh(struct CE_ring_state *dest_ring,
|
||||||
|
struct hal_srng_params *ring_params)
|
||||||
|
{
|
||||||
|
ring_params->low_threshold = dest_ring->nentries >> 3;
|
||||||
|
ring_params->intr_timer_thres_us = 100000;
|
||||||
|
ring_params->intr_batch_cntr_thres_entries = 0;
|
||||||
|
ring_params->flags |= HAL_SRNG_LOW_THRES_INTR_ENABLE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef WLAN_DISABLE_STATUS_RING_TIMER_WAR
|
||||||
|
static inline bool ce_is_status_ring_timer_thresh_war_needed(void)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline bool ce_is_status_ring_timer_thresh_war_needed(void)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ce_srng_initialize_dest_timer_interrupt_war() - war initialization
|
* ce_srng_initialize_dest_timer_interrupt_war() - war initialization
|
||||||
* @dest_ring: ring being initialized
|
* @dest_ring: ring being initialized
|
||||||
@@ -807,7 +842,6 @@ static void ce_srng_dest_ring_setup(struct hif_softc *scn,
|
|||||||
struct CE_attr *attr)
|
struct CE_attr *attr)
|
||||||
{
|
{
|
||||||
struct hal_srng_params ring_params = {0};
|
struct hal_srng_params ring_params = {0};
|
||||||
bool status_ring_timer_thresh_work_arround = true;
|
|
||||||
|
|
||||||
hif_debug("ce_id: %d", ce_id);
|
hif_debug("ce_id: %d", ce_id);
|
||||||
|
|
||||||
@@ -818,15 +852,13 @@ static void ce_srng_dest_ring_setup(struct hif_softc *scn,
|
|||||||
|
|
||||||
if (!(CE_ATTR_DISABLE_INTR & attr->flags)) {
|
if (!(CE_ATTR_DISABLE_INTR & attr->flags)) {
|
||||||
ce_srng_msi_ring_params_setup(scn, ce_id, &ring_params);
|
ce_srng_msi_ring_params_setup(scn, ce_id, &ring_params);
|
||||||
if (status_ring_timer_thresh_work_arround) {
|
if (ce_is_status_ring_timer_thresh_war_needed()) {
|
||||||
ce_srng_initialize_dest_timer_interrupt_war(
|
ce_srng_initialize_dest_timer_interrupt_war(
|
||||||
dest_ring, &ring_params);
|
dest_ring, &ring_params);
|
||||||
} else {
|
} else {
|
||||||
/* normal behavior for future chips */
|
/* normal behavior for future chips */
|
||||||
ring_params.low_threshold = dest_ring->nentries >> 3;
|
ce_srng_initialize_dest_ring_thresh(dest_ring,
|
||||||
ring_params.intr_timer_thres_us = 100000;
|
&ring_params);
|
||||||
ring_params.intr_batch_cntr_thres_entries = 0;
|
|
||||||
ring_params.flags |= HAL_SRNG_LOW_THRES_INTR_ENABLE;
|
|
||||||
}
|
}
|
||||||
ring_params.prefetch_timer = HAL_SRNG_PREFETCH_TIMER;
|
ring_params.prefetch_timer = HAL_SRNG_PREFETCH_TIMER;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user