All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Karol Wachowski" <karol.wachowski@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] accel/ivpu: Move register poll timeouts to vdev->timeout
Date: Mon, 14 Sep 2026 08:41:01 +0000	[thread overview]
Message-ID: <20260914084101.95BCB1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260914082649.891871-1-karol.wachowski@linux.intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Setting microsecond poll timeouts to -1 to disable them results in a finite 71.5-minute timeout instead of an infinite wait, violating the read_poll_timeout API.
--

commit 6c5311f9650a7506bd940962ab4f3fafb765f71e
Author: Tomasz Rusinowicz <tomasz.rusinowicz@intel.com>

accel/ivpu: Move register poll timeouts to vdev->timeout

This patch moves the register poll timeouts into the vdev->timeout
structure. This allows the driver to adjust these timeouts based on
platform type, such as increasing MMU timeouts by 10x on FPGA.

[ ... ]

> diff --git a/drivers/accel/ivpu/ivpu_hw.c b/drivers/accel/ivpu/ivpu_hw.c
> index 647dc045c231a..613bcdbc364cc 100644
> --- a/drivers/accel/ivpu/ivpu_hw.c
> +++ b/drivers/accel/ivpu/ivpu_hw.c
> @@ -99,13 +99,19 @@ static void wa_init(struct ivpu_device *vdev)
>  static void timeouts_init(struct ivpu_device *vdev)
>  {
>  	if (ivpu_test_mode & IVPU_TEST_MODE_DISABLE_TIMEOUTS) {
> +		/* in milliseconds */
>  		vdev->timeout.boot = -1;
>  		vdev->timeout.jsm = -1;
>  		vdev->timeout.tdr = -1;
>  		vdev->timeout.inference = -1;
>  		vdev->timeout.autosuspend = -1;
>  		vdev->timeout.d0i3_entry_msg = -1;
> +		/* in microseconds */
> +		vdev->timeout.mmu_reg = -1;
> +		vdev->timeout.mmu_queue = -1;
> +		vdev->timeout.pwr_island_status = -1;

[Severity: Medium]
When initializing the microsecond timeouts in timeouts_init(), is it intended
to set these fields to -1?

The read_poll_timeout() macro expects a timeout_us value of 0 to indicate
that it should wait indefinitely. Because the timeout_us argument is typically
handled as an unsigned 32-bit integer, passing -1 results in a value of
0xFFFFFFFF.

Instead of completely disabling the timeout as the
IVPU_TEST_MODE_DISABLE_TIMEOUTS flag implies, wouldn't this result in
read_poll_timeout() calculating a finite deadline of roughly 4294 seconds
(71.5 minutes)?

Should these microsecond timeouts be set to 0 instead of -1 to properly
instruct read_poll_timeout() to wait forever?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260914082649.891871-1-karol.wachowski@linux.intel.com?part=1

  reply	other threads:[~2026-09-14  8:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14  8:26 [PATCH] accel/ivpu: Move register poll timeouts to vdev->timeout Karol Wachowski
2026-09-14  8:41 ` sashiko-bot [this message]
2026-10-02 16:54 ` Jeff Hugo

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=20260914084101.95BCB1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=karol.wachowski@linux.intel.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.