public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
To: "Jyothi Kumar Seerapu" <quic_jseerapu@quicinc.com>,
	"Vinod Koul" <vkoul@kernel.org>,
	"Andi Shyti" <andi.shyti@kernel.org>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	"Christian König" <christian.koenig@amd.com>
Cc: <linux-arm-msm@vger.kernel.org>, <dmaengine@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-i2c@vger.kernel.org>,
	<linux-media@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
	<linaro-mm-sig@lists.linaro.org>, <quic_vtanuku@quicinc.com>
Subject: Re: [PATCH v5 RESEND 1/2] dmaengine: qcom: gpi: Add GPI Block event interrupt support
Date: Wed, 12 Feb 2025 20:33:20 +0530	[thread overview]
Message-ID: <877d421f-18f8-461e-9b5e-e0e02ec3cbf0@quicinc.com> (raw)
In-Reply-To: <20250212120536.28879-2-quic_jseerapu@quicinc.com>



On 2/12/2025 5:35 PM, Jyothi Kumar Seerapu wrote:
> GSI hardware generates an interrupt for each transfer completion.
> For multiple messages within 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 GSI hardware to prevent interrupt generation
> and BEI is disabled when an interrupt is necessary.
> 
> When using BEI, consider splitting a single multi-message transfer into
> chunks of 8 messages internally and so 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.
> 
Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
> Signed-off-by: Jyothi Kumar Seerapu <quic_jseerapu@quicinc.com>
> ---
> 
> v4 -> v5:
>     -  BEI flag naming changed from flags to bei_flag.
>     -  QCOM_GPI_BLOCK_EVENT_IRQ macro is removed from qcom-gpi-dma.h
>        file, and Block event interrupt support is checked with bei_flag.
> 
> v3 -> v4:
>    - API's added for Block event interrupt with multi descriptor support for
>      I2C 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.
> 
> v2-> v3:
>     - Renamed gpi_multi_desc_process to gpi_multi_xfer_timeout_handler
>     - MIN_NUM_OF_MSGS_MULTI_DESC changed from 4 to 2
>     - Added documentation for newly added changes in "qcom-gpi-dma.h" file
>     - Updated commit description.
> 
> v1 -> v2:
>     - Changed dma_addr type from array of pointers to array.
>     - To support BEI functionality with the TRE size of 64 defined in GPI driver,
>       updated QCOM_GPI_MAX_NUM_MSGS to 16 and NUM_MSGS_PER_IRQ to 4.
> 
>   drivers/dma/qcom/gpi.c           | 3 +++
>   include/linux/dma/qcom-gpi-dma.h | 2 ++
>   2 files changed, 5 insertions(+)
> 
> diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c
> index 52a7c8f2498f..d925a8156317 100644
> --- a/drivers/dma/qcom/gpi.c
> +++ b/drivers/dma/qcom/gpi.c
> @@ -1693,6 +1693,9 @@ static int gpi_create_i2c_tre(struct gchan *chan, struct gpi_desc *desc,
>   
>   		tre->dword[3] = u32_encode_bits(TRE_TYPE_DMA, TRE_FLAGS_TYPE);
>   		tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_IEOT);
> +
> +		if (i2c->bei_flag)
> +			tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_BEI);
>   	}
>   
>   	for (i = 0; i < tre_idx; i++)
> diff --git a/include/linux/dma/qcom-gpi-dma.h b/include/linux/dma/qcom-gpi-dma.h
> index 6680dd1a43c6..1060b7eac305 100644
> --- a/include/linux/dma/qcom-gpi-dma.h
> +++ b/include/linux/dma/qcom-gpi-dma.h
> @@ -65,6 +65,7 @@ enum i2c_op {
>    * @rx_len: receive length for buffer
>    * @op: i2c cmd
>    * @muli-msg: is part of multi i2c r-w msgs
> + * @bei_flag: true for block event interrupt support
>    */
>   struct gpi_i2c_config {
>   	u8 set_config;
> @@ -78,6 +79,7 @@ struct gpi_i2c_config {
>   	u32 rx_len;
>   	enum i2c_op op;
>   	bool multi_msg;
> +	bool bei_flag;
>   };
>   
>   #endif /* QCOM_GPI_DMA_H */


  reply	other threads:[~2025-02-12 15:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12 12:05 [PATCH v5 RESEND 0/2] Add Block event interrupt support for I2C protocol Jyothi Kumar Seerapu
2025-02-12 12:05 ` [PATCH v5 RESEND 1/2] dmaengine: qcom: gpi: Add GPI Block event interrupt support Jyothi Kumar Seerapu
2025-02-12 15:03   ` Mukesh Kumar Savaliya [this message]
2025-03-10 21:00   ` Vinod Koul
2025-03-13 12:20     ` Jyothi Kumar Seerapu
2025-03-20  0:26   ` Andi Shyti
2025-02-12 12:05 ` [PATCH v5 RESEND 2/2] i2c: i2c-qcom-geni: Add " Jyothi Kumar Seerapu
2025-02-12 15:04   ` Mukesh Kumar Savaliya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877d421f-18f8-461e-9b5e-e0e02ec3cbf0@quicinc.com \
    --to=quic_msavaliy@quicinc.com \
    --cc=andi.shyti@kernel.org \
    --cc=christian.koenig@amd.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=quic_jseerapu@quicinc.com \
    --cc=quic_vtanuku@quicinc.com \
    --cc=sumit.semwal@linaro.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox