Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <rodrigo.vivi@intel.com>,
	<matthew.brost@intel.com>, <anshuman.gupta@intel.com>,
	<badal.nilawar@intel.com>, <vinay.belgaumkar@intel.com>,
	<riana.tauro@intel.com>, <karthik.poosa@intel.com>,
	<sk.anirban@intel.com>, <raag.jadav@intel.com>,
	<michal.wajdeczko@intel.com>,
	<aravind.iddamsetty@linux.intel.com>,
	<dnyaneshwar.bhadane@intel.com>
Subject: Re: [PATCH v2 2/3] drm/xe/pcode: Improve PCODE logging using xe_log helper
Date: Wed, 12 Aug 2026 11:02:32 -0700	[thread overview]
Message-ID: <any1OAOi9Xriy+lB@soc-5CG1426VCC.clients.intel.com> (raw)
In-Reply-To: <20260812123449.239480-7-mallesh.koujalagi@intel.com>

On Wed, Aug 12, 2026 at 06:04:52PM +0530, Mallesh Koujalagi wrote:
>Use xe_log helper for PCODE errors instead of drm_err(). This
>adds PCODE component tag, making issues easier to detect and
>track with automated tools.
>
>Signed-off-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
>---
>v2:
>- s/pcode/PCODE. (Michal)
>- Drop PCODE in xe_log_err.
>---
> drivers/gpu/drm/xe/xe_pcode.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_pcode.c b/drivers/gpu/drm/xe/xe_pcode.c
>index ccc3bdeed6bb..c69440ea477b 100644
>--- a/drivers/gpu/drm/xe/xe_pcode.c
>+++ b/drivers/gpu/drm/xe/xe_pcode.c
>@@ -14,6 +14,7 @@
> #include "regs/xe_pmt.h"
> #include "xe_assert.h"
> #include "xe_device.h"
>+#include "xe_log.h"
> #include "xe_mmio.h"
> #include "xe_pcode_api.h"
> #include "xe_pm.h"
>@@ -219,8 +220,8 @@ int xe_pcode_request(struct xe_tile *tile, u32 mbox, u32 request,
> 	 * requests, and for any quirks of the PCODE firmware that delays
> 	 * the request completion.
> 	 */
>-	drm_err(&tile_to_xe(tile)->drm,
>-		"PCODE timeout, retrying with preemption disabled\n");
>+	xe_log_err(tile, PCODE, -ETIMEDOUT,
>+		   "Timeout, retrying with preemption disabled\n");
> 	preempt_disable();
> 	ret = pcode_try_request(tile, mbox, request, reply_mask, reply, &status,
> 				true, 50 * 1000, true);

After this code does a retry, there can still be a failure which the 
current code does not log. I think we should use an xe_log_err after the 
retry fails rather than the above. Here's what I mean:

https://patchwork.freedesktop.org/patch/745830/?series=172039&rev=1

Thanks,
Umesh


>@@ -320,8 +321,8 @@ int xe_pcode_ready(struct xe_device *xe, bool locked)
> 		mutex_unlock(&tile->pcode.lock);
>
> 	if (ret)
>-		drm_err(&xe->drm,
>-			"PCODE initialization timedout after: 3 min\n");
>+		xe_log_err(xe, PCODE, ret,
>+			   "Initialization timedout after: 3 min\n");
>
> 	return ret;
> }
>-- 
>2.48.1
>

  parent reply	other threads:[~2026-08-12 18:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 12:34 [PATCH v2 0/3] drm/xe: Adopt xe_log SIGID API for structured error reporting Mallesh Koujalagi
2026-08-12 12:34 ` [PATCH v2 1/3] drm/xe/log: DO NOT REVIEW Mallesh Koujalagi
2026-08-12 12:49   ` sashiko-bot
2026-08-12 12:34 ` [PATCH v2 2/3] drm/xe/pcode: Improve PCODE logging using xe_log helper Mallesh Koujalagi
2026-08-12 12:44   ` sashiko-bot
2026-08-12 12:53   ` Bhadane, Dnyaneshwar
2026-08-12 13:10     ` Mallesh, Koujalagi
2026-08-12 18:02   ` Umesh Nerlige Ramappa [this message]
2026-08-12 12:34 ` [PATCH v2 3/3] drm/xe/sysctrl: Add better sysctrl error reporting Mallesh Koujalagi
2026-08-12 12:41 ` ✗ CI.checkpatch: warning for drm/xe: Adopt xe_log SIGID API for structured error reporting (rev2) Patchwork
2026-08-12 12:42 ` ✓ CI.KUnit: success " Patchwork
2026-08-12 13:31 ` ✓ Xe.CI.BAT: " 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=any1OAOi9Xriy+lB@soc-5CG1426VCC.clients.intel.com \
    --to=umesh.nerlige.ramappa@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=aravind.iddamsetty@linux.intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=dnyaneshwar.bhadane@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=karthik.poosa@intel.com \
    --cc=mallesh.koujalagi@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=michal.wajdeczko@intel.com \
    --cc=raag.jadav@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=sk.anirban@intel.com \
    --cc=vinay.belgaumkar@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