Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: sashiko-reviews@lists.linux.dev
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 4/6] drm/i915/de: Make mmio_debug lockless
Date: Fri, 20 Nov 2026 18:16:59 +0200	[thread overview]
Message-ID: <awBye5pEqpnsrpzl@intel.com> (raw)
In-Reply-To: <sashiko-outbox-224079@kernel.org>

On Thu, Nov 19, 2026 at 08:57:33PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Low] drm/i915/de: intel_de_arm_unclaimed_mmio_detection() logs
>   invalid mmio_debug=Y
> --
> 
> commit 61affa910ea8da633b71cb74783032c77e14188a
> Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> drm/i915/de: Make mmio_debug lockless
> 
> This commit converts the unclaimed MMIO debug tracking from lock-protected
> read-modify-write counters to lockless booleans, while keeping the
> mmio_debug module parameter as an int for compatibility.
> 
> > diff --git a/drivers/gpu/drm/i915/display/intel_de.c b/drivers/gpu/drm/i915/display/intel_de.c
> > index 17954963ddf98..82ed1c6a55c96 100644
> > --- a/drivers/gpu/drm/i915/display/intel_de.c
> > +++ b/drivers/gpu/drm/i915/display/intel_de.c
> 
> [ ... ]
> 
> > @@ -286,43 +287,36 @@ bool intel_de_unclaimed_mmio_detected(struct intel_display *display)
> >  	if (!display->mmio.funcs->check_for_unclaimed_mmio)
> >  		return false;
> >  
> > -	spin_lock_irq(&display->mmio.lock);
> > -	ret = display->mmio.funcs->check_for_unclaimed_mmio(display);
> > -	spin_unlock_irq(&display->mmio.lock);
> > +	if (display->mmio.funcs->check_for_unclaimed_mmio_needs_lock) {
> > +		spin_lock_irq(&display->mmio.lock);
> > +		ret = display->mmio.funcs->check_for_unclaimed_mmio(display);
> > +		spin_unlock_irq(&display->mmio.lock);
> > +	} else {
> > +		ret = display->mmio.funcs->check_for_unclaimed_mmio(display);
> > +	}
> >  
> >  	return ret;
> >  }
> >  
> >  bool intel_de_arm_unclaimed_mmio_detection(struct intel_display *display)
> >  {
> > -	bool ret = false;
> > -
> > -	if (!display->mmio.funcs->check_for_unclaimed_mmio)
> > +	if (!READ_ONCE(display->mmio.unclaimed_mmio_check))
> >  		return false;
> >  
> > -	spin_lock_irq(&display->mmio.lock);
> > -
> > -	if (display->mmio.unclaimed_mmio_check <= 0)
> > -		goto out;
> > -
> > -	if (!display->mmio.funcs->check_for_unclaimed_mmio(display))
> > -		goto out;
> > +	if (!intel_de_unclaimed_mmio_detected(display))
> > +		return false;
> >  
> > -	if (!display->params.mmio_debug) {
> > +	if (!READ_ONCE(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++;
> > +			    "Please use i915.mmio_debug=Y for more information.\n");
> > +		WRITE_ONCE(display->mmio.mmio_debug_oneshot, true);
> >  	}
> 
> [Severity: Low]
> Should this message suggest i915.mmio_debug=1 instead of i915.mmio_debug=Y?

Ack. I forgot to undo that change when going back to the int.

> 
> Because mmio_debug remains an int module parameter, param_set_int() rejects
> "Y" with -EINVAL and prevents the i915 module from loading when a user
> passes i915.mmio_debug=Y on the command line.
> 
> -- 
> Sashiko AI review · https://sashiko.dev/#/patchset/20261119205040.31935-1-ville.syrjala@linux.intel.com?part=4

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2026-11-20 16:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 20:50 [PATCH 0/6] drm/i915: Make register accesses and unclaimed mmio detection lockless for TGL+ Ville Syrjala
2026-11-19 20:50 ` [PATCH 1/6] drm/i915/de: Uninline intel_de_{read,write}_fw() Ville Syrjala
2026-11-19 20:50 ` [PATCH 2/6] drm/i915/de: Pimp the intel_de_{read,write}_fw() docs Ville Syrjala
2026-11-19 20:50 ` [PATCH 3/6] drm/i915/de: Flatten the unclaimed mmio code Ville Syrjala
2026-11-19 20:50 ` [PATCH 4/6] drm/i915/de: Make mmio_debug lockless Ville Syrjala
2026-11-19 20:57   ` sashiko-bot
2026-11-20 16:16     ` Ville Syrjälä [this message]
2026-11-19 20:50 ` [PATCH 5/6] drm/i915/de: Optimize the mmio_debug checks in intel_de_{read, write}() Ville Syrjala
2026-11-19 20:50 ` [PATCH 6/6] drm/i915/de: Make display registers unlocked for TGL+ on i915 Ville Syrjala
2026-11-20  1:01 ` ✓ CI.KUnit: success for drm/i915: Make register accesses and unclaimed mmio detection lockless for TGL+ Patchwork
2026-11-20  1:51 ` ✓ 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=awBye5pEqpnsrpzl@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@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