From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 3/8] drm/i915/de: Flatten the unclaimed mmio code
Date: Fri, 13 Nov 2026 16:25:10 +0200 [thread overview]
Message-ID: <69786f99ddd814e89a22d32367a97cbb64090752@intel.com> (raw)
In-Reply-To: <20261113134355.14579-4-ville.syrjala@linux.intel.com>
On Fri, 13 Nov 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The unclaimed register access code is nested a few
> too many levels to my linking in places. Flatten it
> all out to make it a bit nicer.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_de.c | 51 ++++++++++++++-----------
> 1 file changed, 29 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_de.c b/drivers/gpu/drm/i915/display/intel_de.c
> index 8a94f3f1d3ee..06d91570bee2 100644
> --- a/drivers/gpu/drm/i915/display/intel_de.c
> +++ b/drivers/gpu/drm/i915/display/intel_de.c
> @@ -250,11 +250,13 @@ static void check_unclaimed_mmio_pre(struct intel_display *display,
> if (!display->params.mmio_debug)
> return;
>
> - if (display->mmio.funcs->check_for_unclaimed_mmio(display))
> - drm_dbg_kms(display->drm,
> - "Unclaimed access detected before %s register 0x%x\n",
> - write ? "write to" : "read from",
> - i915_mmio_reg_offset(reg));
> + if (!display->mmio.funcs->check_for_unclaimed_mmio(display))
> + return;
> +
> + drm_dbg_kms(display->drm,
> + "Unclaimed access detected before %s register 0x%x\n",
> + write ? "write to" : "read from",
> + i915_mmio_reg_offset(reg));
> }
>
> static void check_unclaimed_mmio_post(struct intel_display *display,
> @@ -265,13 +267,16 @@ static void check_unclaimed_mmio_post(struct intel_display *display,
> if (!display->params.mmio_debug)
> return;
>
> - if (drm_WARN(display->drm,
> - display->mmio.funcs->check_for_unclaimed_mmio(display),
> - "Unclaimed %s register 0x%x\n",
> - write ? "write to" : "read from",
> - i915_mmio_reg_offset(reg)))
> - /* Only report the first N failures */
> - display->params.mmio_debug--;
> + if (!display->mmio.funcs->check_for_unclaimed_mmio(display))
> + return;
> +
> + drm_WARN(display->drm, true,
> + "Unclaimed %s register 0x%x\n",
> + write ? "write to" : "read from",
> + i915_mmio_reg_offset(reg));
> +
> + /* Only report the first N failures */
> + display->params.mmio_debug--;
> }
>
> bool intel_de_unclaimed_mmio_detected(struct intel_display *display)
> @@ -300,18 +305,20 @@ bool intel_de_arm_unclaimed_mmio_detection(struct intel_display *display)
> if (display->mmio.unclaimed_mmio_check <= 0)
> goto out;
>
> - if (display->mmio.funcs->check_for_unclaimed_mmio(display)) {
> - if (!display->params.mmio_debug) {
> - drm_dbg_kms(display->drm,
> - "Unclaimed register detected, "
> - "enabling oneshot unclaimed register reporting. "
> - "Please use i915.mmio_debug=N for more information.\n");
> - display->params.mmio_debug++;
> - }
> - display->mmio.unclaimed_mmio_check--;
> - ret = true;
> + if (!display->mmio.funcs->check_for_unclaimed_mmio(display))
> + goto out;
> +
> + if (!display->params.mmio_debug) {
> + drm_dbg_kms(display->drm,
> + "Unclaimed register detected, "
> + "enabling oneshot unclaimed register reporting. "
> + "Please use i915.mmio_debug=N for more information.\n");
> + display->params.mmio_debug++;
> }
>
> + display->mmio.unclaimed_mmio_check--;
> + ret = true;
> +
> out:
> spin_unlock_irq(&display->mmio.lock);
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-11-13 14:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 13:43 [PATCH 0/8] drm/{i915, xe}: Make unclaimed mmio detection lockless and enable it for xe Ville Syrjala
2026-11-13 13:43 ` [PATCH 1/8] drm/i915/de: Uninline intel_de_{read,write}_fw() Ville Syrjala
2026-11-13 14:11 ` Jani Nikula
2026-11-13 13:43 ` [PATCH 2/8] drm/i915/de: Pimp the intel_de_{read,write}_fw() docs Ville Syrjala
2026-11-13 14:12 ` [PATCH 2/8] drm/i915/de: Pimp the intel_de_{read, write}_fw() docs Jani Nikula
2026-11-13 14:31 ` Ville Syrjälä
2026-11-13 13:43 ` [PATCH 3/8] drm/i915/de: Flatten the unclaimed mmio code Ville Syrjala
2026-11-13 14:25 ` Jani Nikula [this message]
2026-11-13 13:43 ` [PATCH 4/8] drm/i915/de: Make mmio_debug lockless Ville Syrjala
2026-11-13 16:30 ` Ville Syrjälä
2026-11-13 13:43 ` [PATCH 5/8] drm/i915/de: Optimize the mmio_debug checks in intel_de_{read, write}() Ville Syrjala
2026-11-13 13:43 ` [PATCH 6/8] drm/i915/de: Make display registers unlocked for TGL+ on i915 Ville Syrjala
2026-11-13 13:43 ` [PATCH 7/8] drm/xe: Enable unclaimed register detection on xe Ville Syrjala
2026-11-13 13:43 ` [PATCH 8/8] drm/i915/de: Nuke driver_is_i915() Ville Syrjala
2026-11-13 14:33 ` ✗ CI.checkpatch: warning for drm/{i915, xe}: Make unclaimed mmio detection lockless and enable it for xe Patchwork
2026-11-13 14:35 ` ✓ CI.KUnit: success " Patchwork
2026-11-13 14:52 ` ✗ CI.checksparse: warning " Patchwork
2026-11-13 15:07 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-11-13 16:41 ` Ville Syrjälä
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=69786f99ddd814e89a22d32367a97cbb64090752@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=ville.syrjala@linux.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