mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
Bluetooth: btintel_pcie: Increase the tx and rx descriptor count
[ Upstream commit2dd711102c
] This change addresses latency issues observed in HID use cases where events arrive in bursts. By increasing the Rx descriptor count to 64, the firmware can handle bursty data more effectively, reducing latency and preventing buffer overflows. Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com> Signed-off-by: Kiran K <kiran.k@intel.com> Fixes:c2b636b3f7
("Bluetooth: btintel_pcie: Add support for PCIe transport") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a075e10cfb
commit
b104a6f5d5
|
@ -1148,8 +1148,8 @@ static int btintel_pcie_alloc(struct btintel_pcie_data *data)
|
||||||
* + size of index * Number of queues(2) * type of index array(4)
|
* + size of index * Number of queues(2) * type of index array(4)
|
||||||
* + size of context information
|
* + size of context information
|
||||||
*/
|
*/
|
||||||
total = (sizeof(struct tfd) + sizeof(struct urbd0) + sizeof(struct frbd)
|
total = (sizeof(struct tfd) + sizeof(struct urbd0)) * BTINTEL_PCIE_TX_DESCS_COUNT;
|
||||||
+ sizeof(struct urbd1)) * BTINTEL_DESCS_COUNT;
|
total += (sizeof(struct frbd) + sizeof(struct urbd1)) * BTINTEL_PCIE_RX_DESCS_COUNT;
|
||||||
|
|
||||||
/* Add the sum of size of index array and size of ci struct */
|
/* Add the sum of size of index array and size of ci struct */
|
||||||
total += (sizeof(u16) * BTINTEL_PCIE_NUM_QUEUES * 4) + sizeof(struct ctx_info);
|
total += (sizeof(u16) * BTINTEL_PCIE_NUM_QUEUES * 4) + sizeof(struct ctx_info);
|
||||||
|
@ -1174,36 +1174,36 @@ static int btintel_pcie_alloc(struct btintel_pcie_data *data)
|
||||||
data->dma_v_addr = v_addr;
|
data->dma_v_addr = v_addr;
|
||||||
|
|
||||||
/* Setup descriptor count */
|
/* Setup descriptor count */
|
||||||
data->txq.count = BTINTEL_DESCS_COUNT;
|
data->txq.count = BTINTEL_PCIE_TX_DESCS_COUNT;
|
||||||
data->rxq.count = BTINTEL_DESCS_COUNT;
|
data->rxq.count = BTINTEL_PCIE_RX_DESCS_COUNT;
|
||||||
|
|
||||||
/* Setup tfds */
|
/* Setup tfds */
|
||||||
data->txq.tfds_p_addr = p_addr;
|
data->txq.tfds_p_addr = p_addr;
|
||||||
data->txq.tfds = v_addr;
|
data->txq.tfds = v_addr;
|
||||||
|
|
||||||
p_addr += (sizeof(struct tfd) * BTINTEL_DESCS_COUNT);
|
p_addr += (sizeof(struct tfd) * BTINTEL_PCIE_TX_DESCS_COUNT);
|
||||||
v_addr += (sizeof(struct tfd) * BTINTEL_DESCS_COUNT);
|
v_addr += (sizeof(struct tfd) * BTINTEL_PCIE_TX_DESCS_COUNT);
|
||||||
|
|
||||||
/* Setup urbd0 */
|
/* Setup urbd0 */
|
||||||
data->txq.urbd0s_p_addr = p_addr;
|
data->txq.urbd0s_p_addr = p_addr;
|
||||||
data->txq.urbd0s = v_addr;
|
data->txq.urbd0s = v_addr;
|
||||||
|
|
||||||
p_addr += (sizeof(struct urbd0) * BTINTEL_DESCS_COUNT);
|
p_addr += (sizeof(struct urbd0) * BTINTEL_PCIE_TX_DESCS_COUNT);
|
||||||
v_addr += (sizeof(struct urbd0) * BTINTEL_DESCS_COUNT);
|
v_addr += (sizeof(struct urbd0) * BTINTEL_PCIE_TX_DESCS_COUNT);
|
||||||
|
|
||||||
/* Setup FRBD*/
|
/* Setup FRBD*/
|
||||||
data->rxq.frbds_p_addr = p_addr;
|
data->rxq.frbds_p_addr = p_addr;
|
||||||
data->rxq.frbds = v_addr;
|
data->rxq.frbds = v_addr;
|
||||||
|
|
||||||
p_addr += (sizeof(struct frbd) * BTINTEL_DESCS_COUNT);
|
p_addr += (sizeof(struct frbd) * BTINTEL_PCIE_RX_DESCS_COUNT);
|
||||||
v_addr += (sizeof(struct frbd) * BTINTEL_DESCS_COUNT);
|
v_addr += (sizeof(struct frbd) * BTINTEL_PCIE_RX_DESCS_COUNT);
|
||||||
|
|
||||||
/* Setup urbd1 */
|
/* Setup urbd1 */
|
||||||
data->rxq.urbd1s_p_addr = p_addr;
|
data->rxq.urbd1s_p_addr = p_addr;
|
||||||
data->rxq.urbd1s = v_addr;
|
data->rxq.urbd1s = v_addr;
|
||||||
|
|
||||||
p_addr += (sizeof(struct urbd1) * BTINTEL_DESCS_COUNT);
|
p_addr += (sizeof(struct urbd1) * BTINTEL_PCIE_RX_DESCS_COUNT);
|
||||||
v_addr += (sizeof(struct urbd1) * BTINTEL_DESCS_COUNT);
|
v_addr += (sizeof(struct urbd1) * BTINTEL_PCIE_RX_DESCS_COUNT);
|
||||||
|
|
||||||
/* Setup data buffers for txq */
|
/* Setup data buffers for txq */
|
||||||
err = btintel_pcie_setup_txq_bufs(data, &data->txq);
|
err = btintel_pcie_setup_txq_bufs(data, &data->txq);
|
||||||
|
|
|
@ -81,8 +81,11 @@ enum {
|
||||||
/* Default interrupt timeout in msec */
|
/* Default interrupt timeout in msec */
|
||||||
#define BTINTEL_DEFAULT_INTR_TIMEOUT_MS 3000
|
#define BTINTEL_DEFAULT_INTR_TIMEOUT_MS 3000
|
||||||
|
|
||||||
/* The number of descriptors in TX/RX queues */
|
/* The number of descriptors in TX queues */
|
||||||
#define BTINTEL_DESCS_COUNT 16
|
#define BTINTEL_PCIE_TX_DESCS_COUNT 32
|
||||||
|
|
||||||
|
/* The number of descriptors in RX queues */
|
||||||
|
#define BTINTEL_PCIE_RX_DESCS_COUNT 64
|
||||||
|
|
||||||
/* Number of Queue for TX and RX
|
/* Number of Queue for TX and RX
|
||||||
* It indicates the index of the IA(Index Array)
|
* It indicates the index of the IA(Index Array)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user