[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241217170424.14703-1-quic_jseerapu@quicinc.com>
Date: Tue, 17 Dec 2024 22:34:22 +0530
From: Jyothi Kumar Seerapu <quic_jseerapu@...cinc.com>
To: Vinod Koul <vkoul@...nel.org>, Andi Shyti <andi.shyti@...nel.org>,
"Sumit
Semwal" <sumit.semwal@...aro.org>,
Christian König
<christian.koenig@....com>
CC: <linux-arm-msm@...r.kernel.org>, <dmaengine@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-i2c@...r.kernel.org>,
<linux-media@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
<linaro-mm-sig@...ts.linaro.org>, <quic_msavaliy@...cinc.com>,
<quic_vtanuku@...cinc.com>
Subject: [PATCH v4 0/2] Add Block event interrupt support for I2C protocol
The I2C driver gets an interrupt upon transfer completion.
When handling multiple messages in a single transfer, this
results in N interrupts for N messages, leading to significant
software interrupt latency.
To mitigate this latency, utilize Block Event Interrupt (BEI)
mechanism. Enabling BEI instructs the hardware to prevent interrupt
generation and BEI is disabled when an interrupt is necessary.
Large I2C transfer can be divided into chunks of 8 messages internally.
Interrupts are not expected for the first 7 message completions, only
the last message triggers an interrupt, indicating the completion of
8 messages. This BEI mechanism enhances overall transfer efficiency.
This optimization reduces transfer time from 168 ms to 48 ms for a
series of 200 I2C write messages in a single transfer, with a
clock frequency support of 100 kHz.
BEI optimizations are currently implemented for I2C write transfers only,
as there is no use case for multiple I2C read messages in a single transfer
at this time.
v3 -> v4:
- API's added for Block event interrupt with multi descriptor support is
moved from qcom-gpi-dma.h file to I2C geni qcom driver file.
- gpi_multi_xfer_timeout_handler function is moved from GPI driver to
I2C driver.
- geni_i2c_gpi_multi_desc_xfer structure is added as a member of
struct geni_i2c_dev.
- Removed the changes of making I2C driver is dependent on GPI driver.
v2 -> v3:
- Updated commit description
- In I2C GENI driver, for i2c_gpi_cb_result moved the logic of
"!is_tx_multi_xfer" to else part.
- MIN_NUM_OF_MSGS_MULTI_DESC changed from 4 to 2
- Changes of I2C GENI driver to depend on the GPI driver moved
to patch3.
- Renamed gpi_multi_desc_process to gpi_multi_xfer_timeout_handler
- Added description for newly added changes in "qcom-gpi-dma.h" file.
v1 -> v2:
- DT changes are reverted for adding dma channel size as a new arg of
dma-cells property.
- DT binding change reveted for dma channel size as a new arg of
dma-cells property.
- In GPI driver, reverted the changes to parse the channel TRE size
from device tree.
- Made the changes in QCOM I2C geni driver to support the BEI
functionality with the existing TRE size of 64.
- Made changes in QCOM I2C geni driver as per the review comments.
- Fixed Kernel test robot reported compiltion issues.
Jyothi Kumar Seerapu (2):
dmaengine: qcom: gpi: Add GPI Block event interrupt support
i2c: i2c-qcom-geni: Add Block event interrupt support
drivers/dma/qcom/gpi.c | 3 +
drivers/i2c/busses/i2c-qcom-geni.c | 275 ++++++++++++++++++++++++++---
include/linux/dma/qcom-gpi-dma.h | 9 +
3 files changed, 262 insertions(+), 25 deletions(-)
--
2.17.1
Powered by blists - more mailing lists