Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Sk Anirban <sk.anirban@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <anshuman.gupta@intel.com>,
	<badal.nilawar@intel.com>, <riana.tauro@intel.com>,
	<karthik.poosa@intel.com>, <raag.jadav@intel.com>,
	<soham.purkait@intel.com>,  <mallesh.koujalagi@intel.com>,
	<hiresh.kumar.yadav@intel.com>
Subject: Re: [PATCH v2 1/2] drm/xe: Skip OCODE late bind if already running
Date: Wed, 25 Nov 2026 10:34:03 -0500	[thread overview]
Message-ID: <awb_6-urPGcB868g@intel.com> (raw)
In-Reply-To: <20261125125011.192907-5-sk.anirban@intel.com>

On Wed, Nov 25, 2026 at 06:20:13PM +0530, Sk Anirban wrote:
> OCODE keeps running across driver reloads and warm resets. Despite
> this, the late-bind worker re-uploads it on every probe and resume.
> The firmware is not expected to handle back-to-back reloads, and the
> extra delay of reloading an active OCODE can lead to firmware issues.
> 
> Check the OCODE status through SysCtrl in the late-bind worker before
> uploading, and skip the upload if OCODE is already initialized. If the
> status query fails or OCODE is not ready, fall back to the existing
> upload.
> 
> As a result, a newer OCODE blob is only used after the next power
> cycle. Comparing the running version against the blob is left for
> later, once firmware provides a reliable way to read it.
> 
> v2: Update commit message (Rodrigo)

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

pushing both patches soon.

Thank you

> 
> Signed-off-by: Sk Anirban <sk.anirban@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_late_bind_fw.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_late_bind_fw.c b/drivers/gpu/drm/xe/xe_late_bind_fw.c
> index 355d7c841871..dfff1693bf1f 100644
> --- a/drivers/gpu/drm/xe/xe_late_bind_fw.c
> +++ b/drivers/gpu/drm/xe/xe_late_bind_fw.c
> @@ -258,6 +258,13 @@ static void xe_late_bind_work(struct work_struct *work)
>  
>  	xe_device_assert_mem_access(xe);
>  
> +	/* TODO: Compare the running OCODE version at probe when available. */
> +	if (lbfw->type == INTEL_LB_TYPE_OCODE && xe_sysctrl_is_oobmsm_fw_ready(xe)) {
> +		drm_dbg(&xe->drm, "%s firmware already loaded, skipping\n",
> +			fw_id_to_name[lbfw->id]);
> +		goto out;
> +	}
> +
>  	/* we can queue this before the component is bound */
>  	for (slept = 0; slept < LB_INIT_TIMEOUT_MS; slept += 100) {
>  		if (late_bind->component.ops)
> -- 
> 2.43.0
> 

  reply	other threads:[~2026-11-25 15:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 12:50 [PATCH v2 0/2] Skip OCODE late bind if already running Sk Anirban
2026-11-25 12:50 ` [PATCH v2 1/2] drm/xe: " Sk Anirban
2026-11-25 15:34   ` Rodrigo Vivi [this message]
2026-11-25 12:50 ` [PATCH v2 2/2] drm/xe: Add debug configfs option to force OCODE load Sk Anirban
2026-11-25 15:33   ` Rodrigo Vivi
2026-11-25 14:05 ` ✓ CI.KUnit: success for Skip OCODE late bind if already running Patchwork
2026-11-25 14:44 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-25 21:34 ` ✗ Xe.CI.FULL: failure " Patchwork

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=awb_6-urPGcB868g@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=hiresh.kumar.yadav@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=karthik.poosa@intel.com \
    --cc=mallesh.koujalagi@intel.com \
    --cc=raag.jadav@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=sk.anirban@intel.com \
    --cc=soham.purkait@intel.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