dri-devel Archive on 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 v2] accel/ivpu: Move register poll timeouts to vdev->timeout
Date: Mon, 14 Sep 2026 09:00:46 +0000	[thread overview]
Message-ID: <20260914090047.4C53D1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260914084503.895042-1-karol.wachowski@linux.intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Assigning -1 to microsecond timeouts in IVPU_TEST_MODE_DISABLE_TIMEOUTS creates a finite ~71-minute timeout rather than an infinite wait.
--

commit 73e55519ec65b6a56b9989c4bbb3ea1e656f8c4b
Author: Tomasz Rusinowicz <tomasz.rusinowicz@intel.com>

accel/ivpu: Move register poll timeouts to vdev->timeout
    
Use the vdev->timeout structure for register poll timeouts. This allows
adjusting those timeouts depending on the platform type.
For FPGA set MMU timeouts to 10x.

Link: https://lore.kernel.org/dri-devel/20260914082649.891871-1-karol.wachowski@linux.intel.com/T/#u

[ ... ]

> 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]
Will this assignment result in a finite 71-minute timeout instead of an
infinite wait?

These timeout fields are passed to REGV_POLL_FLD() later on. For example,
in ivpu_mmu_reg_write_cr0():

    return REGV_POLL_FLD(IVPU_MMU_REG_CR0ACK, VAL, val, vdev->timeout.mmu_reg);

REGV_POLL_FLD() passes this value as a u32 timeout_us parameter down to
read_poll_timeout(). When -1 is cast to u32, it becomes 4294967295.

Unlike wait_event_timeout(), read_poll_timeout() explicitly requires 0 to
wait indefinitely. Passing 4294967295 to read_poll_timeout() means it will
loop for ~71.58 minutes before returning -ETIMEDOUT.

Could we assign 0 to these microsecond timeouts instead when
IVPU_TEST_MODE_DISABLE_TIMEOUTS is active?

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

      reply	other threads:[~2026-09-14  9:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14  8:45 [PATCH v2] accel/ivpu: Move register poll timeouts to vdev->timeout Karol Wachowski
2026-09-14  9:00 ` sashiko-bot [this message]

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=20260914090047.4C53D1F00893@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox