dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Andrzej Kacprowski" <andrzej.kacprowski@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] accel/ivpu: Improve IVPU_TEST_MODE_FW_TEST handling
Date: Wed, 07 Oct 2026 16:30:38 +0000	[thread overview]
Message-ID: <sashiko-outbox-163195@kernel.org> (raw)
In-Reply-To: <20261007161323.2737682-1-andrzej.kacprowski@linux.intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] accel/ivpu: PM runtime autosuspend loop in FW_TEST mode
--

commit e12f731149f041dc1d9f11e61a8bd4c155f14399
Author: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>

accel/ivpu: Improve IVPU_TEST_MODE_FW_TEST handling

This commit modifies ivpu_boot() to exit early when IVPU_TEST_MODE_FW_TEST
is enabled, bypassing post-boot initialization. This avoids sending an IPC
message that was timing out since the firmware boot is not fully waited for
in this mode.

> diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c
> index 0f215392d42de..fee1dde0b7467 100644
> --- a/drivers/accel/ivpu/ivpu_drv.c
> +++ b/drivers/accel/ivpu/ivpu_drv.c
> @@ -498,6 +498,9 @@ int ivpu_boot(struct ivpu_device *vdev)
>  	ivpu_ipc_enable(vdev);
>  
>  	if (!ivpu_fw_is_warm_boot(vdev)) {
> +		if (ivpu_test_mode & IVPU_TEST_MODE_FW_TEST)
> +			return 0;
> +

[Severity: High]
Does this early return shift the IPC timeout into the runtime PM autosuspend
path?

If driver probe succeeds because of this early return, PM runtime autosuspend
will be enabled. After the autosuspend delay, won't
ivpu_pm_runtime_suspend_cb() unconditionally attempt to send an IPC message?

drivers/accel/ivpu/ivpu_pm.c:ivpu_pm_runtime_suspend_cb() {
    ...
	ret_d0i3 = ivpu_jsm_pwr_d0i3_enter(vdev);
	if (ret_d0i3)
		ivpu_err(vdev, "Failed to prepare for d0i3: %d\n", ret_d0i3);
    ...
	if (!is_idle || ret_d0i3) {
		ivpu_err(vdev, "Forcing cold boot due to previous errors\n");
		atomic_inc(&vdev->pm->reset_counter);
		ivpu_dev_coredump(vdev);
		ivpu_pm_prepare_cold_boot(vdev);
	}
    ...
}

Since the firmware is unresponsive in IVPU_TEST_MODE_FW_TEST mode, this
IPC message will inevitably time out. Could this lead to an inescapable
background loop of timeouts, coredumps, and resets?

>  		ret = ivpu_pm_dct_init(vdev);
>  		if (ret)
>  			goto err_disable_ipc;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261007161323.2737682-1-andrzej.kacprowski@linux.intel.com?part=1

      reply	other threads:[~2026-10-07 16:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 16:13 [PATCH v2] accel/ivpu: Improve IVPU_TEST_MODE_FW_TEST handling Andrzej Kacprowski
2026-10-07 16:30 ` 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=sashiko-outbox-163195@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=andrzej.kacprowski@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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