From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Aniket Randive <aniket.randive@oss.qualcomm.com>,
mukesh.savaliya@oss.qualcomm.com,
viken.dadhaniya@oss.qualcomm.com, andi.shyti@kernel.org,
sumit.semwal@linaro.org, christian.koenig@amd.com
Cc: linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
naresh.maramaina@oss.qualcomm.com
Subject: Re: [PATCH v2] i2c: qcom-geni: Add dynamic transfer timeout based on transfer length and frequency
Date: Mon, 6 Jul 2026 13:41:05 +0200 [thread overview]
Message-ID: <4f865aaf-a400-4dc6-acaa-80dc22a36af7@oss.qualcomm.com> (raw)
In-Reply-To: <20260705135739.4038826-1-aniket.randive@oss.qualcomm.com>
On 7/5/26 3:57 PM, Aniket Randive wrote:
> The driver uses a static XFER_TIMEOUT of HZ (1 second) for all transfers
> regardless of message length or bus frequency, causing unnecessary
> delays on error paths.
>
> Compute the timeout dynamically from message length and bus frequency
> with a 10x safety margin over the theoretical wire time and a 300ms
> floor. For GPI multi-descriptor transfers, use the maximum message
> length across all queued messages as the per-completion timeout.
What's the reason for a 0.3 s floor?
Why a 10x safety margin specifically?
[...]
> +static unsigned long geni_i2c_xfer_timeout(struct geni_i2c_dev *gi2c, size_t len)
> +{
> + size_t bit_cnt = len * 9;
> + size_t bit_usec = (bit_cnt * USEC_PER_SEC) / gi2c->clk_freq_out;
mult_frac()
Konrad
next prev parent reply other threads:[~2026-07-06 11:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-05 13:57 Aniket Randive
2026-07-06 11:41 ` Konrad Dybcio [this message]
2026-07-09 6:28 ` Aniket RANDIVE
2026-07-10 9:27 ` Konrad Dybcio
2026-07-10 11:11 ` Aniket RANDIVE
2026-07-07 12:07 ` Mukesh Savaliya
2026-07-09 5:49 ` Aniket RANDIVE
2026-07-09 5:59 Aniket Randive
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=4f865aaf-a400-4dc6-acaa-80dc22a36af7@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=andi.shyti@kernel.org \
--cc=aniket.randive@oss.qualcomm.com \
--cc=christian.koenig@amd.com \
--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=mukesh.savaliya@oss.qualcomm.com \
--cc=naresh.maramaina@oss.qualcomm.com \
--cc=sumit.semwal@linaro.org \
--cc=viken.dadhaniya@oss.qualcomm.com \
/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
Powered by JetHome