From: Jonathan Cavitt <jonathan.cavitt@intel.com>
To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: saurabhg.gupta@intel.com, alex.zuo@intel.com,
jonathan.cavitt@intel.com, raag.jadav@intel.com
Subject: [PATCH v2] drm/{i915, xe}: Refactor generic_handle_irq_safe() error messages
Date: Fri, 5 Jun 2026 04:25:48 +0800 [thread overview]
Message-ID: <20260604202548.3817343-1-jonathan.cavitt@intel.com> (raw)
Currently, all but one uses of generic_handle_irq_safe() report error
messages using .*_err_ratelimited() error reporting helper functions.
These helper functions declare their error messages in the following
form:
"error handling [COMPONENT NAME] irq: %d\n"
.*_err_ratelimited() already logs "error" as a part of the error
message, so declaring the error is redundant. Reword it.
The last usage of generic_handle_irq_safe() is in xe_i2c_irq_present(),
and it currently lacks the same error reporting as in the other cases.
This is not intentional, so put some logging here.
v2:
- Use drm_err_ratelimited() correctly (jcavitt)
Suggested-by: Raag Jadav <raag.jadav@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
---
drivers/gpu/drm/i915/display/intel_lpe_audio.c | 2 +-
drivers/gpu/drm/i915/gt/intel_gsc.c | 2 +-
drivers/gpu/drm/xe/xe_heci_gsc.c | 4 ++--
drivers/gpu/drm/xe/xe_i2c.c | 5 ++++-
4 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_lpe_audio.c b/drivers/gpu/drm/i915/display/intel_lpe_audio.c
index 022ad18044bf..e756ed1d1132 100644
--- a/drivers/gpu/drm/i915/display/intel_lpe_audio.c
+++ b/drivers/gpu/drm/i915/display/intel_lpe_audio.c
@@ -265,7 +265,7 @@ void intel_lpe_audio_irq_handler(struct intel_display *display)
ret = generic_handle_irq_safe(display->audio.lpe.irq);
if (ret)
drm_err_ratelimited(display->drm,
- "error handling LPE audio irq: %d\n", ret);
+ "failed to handle LPE audio irq: %d\n", ret);
}
/**
diff --git a/drivers/gpu/drm/i915/gt/intel_gsc.c b/drivers/gpu/drm/i915/gt/intel_gsc.c
index 050d909fb4f8..c2d76b0bc5fe 100644
--- a/drivers/gpu/drm/i915/gt/intel_gsc.c
+++ b/drivers/gpu/drm/i915/gt/intel_gsc.c
@@ -286,7 +286,7 @@ static void gsc_irq_handler(struct intel_gt *gt, unsigned int intf_id)
ret = generic_handle_irq_safe(gt->gsc.intf[intf_id].irq);
if (ret)
- gt_err_ratelimited(gt, "error handling GSC irq: %d\n", ret);
+ gt_err_ratelimited(gt, "failed to handle GSC irq: %d\n", ret);
}
void intel_gsc_irq_handler(struct intel_gt *gt, u32 iir)
diff --git a/drivers/gpu/drm/xe/xe_heci_gsc.c b/drivers/gpu/drm/xe/xe_heci_gsc.c
index 5af8903e10af..640db27137de 100644
--- a/drivers/gpu/drm/xe/xe_heci_gsc.c
+++ b/drivers/gpu/drm/xe/xe_heci_gsc.c
@@ -224,7 +224,7 @@ void xe_heci_gsc_irq_handler(struct xe_device *xe, u32 iir)
ret = generic_handle_irq_safe(xe->heci_gsc.irq);
if (ret)
- drm_err_ratelimited(&xe->drm, "error handling GSC irq: %d\n", ret);
+ drm_err_ratelimited(&xe->drm, "failed to handle GSC irq: %d\n", ret);
}
void xe_heci_csc_irq_handler(struct xe_device *xe, u32 iir)
@@ -244,5 +244,5 @@ void xe_heci_csc_irq_handler(struct xe_device *xe, u32 iir)
ret = generic_handle_irq_safe(xe->heci_gsc.irq);
if (ret)
- drm_err_ratelimited(&xe->drm, "error handling GSC irq: %d\n", ret);
+ drm_err_ratelimited(&xe->drm, "failed to handle GSC irq: %d\n", ret);
}
diff --git a/drivers/gpu/drm/xe/xe_i2c.c b/drivers/gpu/drm/xe/xe_i2c.c
index 706783863d07..fa5fdf3a1024 100644
--- a/drivers/gpu/drm/xe/xe_i2c.c
+++ b/drivers/gpu/drm/xe/xe_i2c.c
@@ -177,12 +177,15 @@ static bool xe_i2c_irq_present(struct xe_device *xe)
void xe_i2c_irq_handler(struct xe_device *xe, u32 master_ctl)
{
struct xe_mmio *mmio = xe_root_tile_mmio(xe);
+ int ret;
if (!(master_ctl & I2C_IRQ) || !xe_i2c_irq_present(xe))
return;
/* Forward interrupt to I2C adapter */
- generic_handle_irq_safe(xe->i2c->adapter_irq);
+ ret = generic_handle_irq_safe(xe->i2c->adapter_irq);
+ if (ret)
+ drm_err_ratelimited(&xe->drm, "failed to handle i2c irq: %d\n", ret);
/* Deassert after I2C adapter clears the interrupt */
xe_mmio_rmw32(mmio, I2C_CONFIG_CMD, 0, PCI_COMMAND_INTX_DISABLE);
--
2.53.0
next reply other threads:[~2026-06-04 20:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 20:25 Jonathan Cavitt [this message]
2026-06-04 20:32 ` ✓ CI.KUnit: success for drm/{i915, xe}: Refactor generic_handle_irq_safe() error messages (rev2) Patchwork
2026-06-04 21:17 ` ✓ Xe.CI.BAT: " Patchwork
2026-06-04 21:37 ` ✗ i915.CI.BAT: failure for drm/{i915, xe}: Refactor generic_handle_irq_safe() error messages Patchwork
2026-06-05 2:53 ` [PATCH v2] " Raag Jadav
2026-06-05 2:59 ` Raag Jadav
2026-06-05 12:13 ` ✓ Xe.CI.FULL: success for drm/{i915, xe}: Refactor generic_handle_irq_safe() error messages (rev2) 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=20260604202548.3817343-1-jonathan.cavitt@intel.com \
--to=jonathan.cavitt@intel.com \
--cc=alex.zuo@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=raag.jadav@intel.com \
--cc=saurabhg.gupta@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 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.