From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Double check we didn't miss an unclaimed register access
Date: Tue, 04 Sep 2018 15:56:07 +0300 [thread overview]
Message-ID: <87k1o15sm0.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <153606480826.2853.4803152408895122805@skylake-alporthouse-com>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Quoting Chris Wilson (2018-09-04 13:38:27)
>> Quoting Mika Kuoppala (2018-09-04 13:34:12)
>> > Chris Wilson <chris@chris-wilson.co.uk> writes:
>> >
>> > > Currently, if the user has enabled mmio-debug around each register
>> > > access, we presume that we have then checked them all. However, it is
>> > > still possible through omission (raw register access) or external
>> > > interaction that the unclaimed access was not highlighted.
>> > >
>> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> > > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>> > > ---
>> > > drivers/gpu/drm/i915/intel_uncore.c | 13 +++++++------
>> > > 1 file changed, 7 insertions(+), 6 deletions(-)
>> > >
>> > > diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
>> > > index 20f2f5ad9c3f..05f0cda18501 100644
>> > > --- a/drivers/gpu/drm/i915/intel_uncore.c
>> > > +++ b/drivers/gpu/drm/i915/intel_uncore.c
>> > > @@ -2283,15 +2283,16 @@ bool intel_uncore_unclaimed_mmio(struct drm_i915_private *dev_priv)
>> > > bool
>> > > intel_uncore_arm_unclaimed_mmio_detection(struct drm_i915_private *dev_priv)
>> > > {
>> > > - if (unlikely(i915_modparams.mmio_debug ||
>> > > - dev_priv->uncore.unclaimed_mmio_check <= 0))
>> > > + if (unlikely(dev_priv->uncore.unclaimed_mmio_check <= 0))
>> > > return false;
>> > >
>> >
>> > We could catch the readers attention by marking this as READ_ONCE.
>> >
>> >
>> > And then take spinlock here before checking for unclaimed.
>>
>> Could do, feels like overkill, but not contentious.
>
> Implied here, is improving unclaimed_mmio_check a fundamental
> requirement for this patch or additional work? I think the latter.
Additional work. Was just thinking aloud about the
possible races in this area.
Patch does what it says.
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-09-04 12:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-04 11:17 [PATCH] drm/i915: Double check we didn't miss an unclaimed register access Chris Wilson
2018-09-04 11:48 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-09-04 12:34 ` [PATCH] " Mika Kuoppala
2018-09-04 12:38 ` Chris Wilson
2018-09-04 12:40 ` Chris Wilson
2018-09-04 12:56 ` Mika Kuoppala [this message]
2018-09-04 13:36 ` Chris Wilson
2018-09-04 14:40 ` ✓ Fi.CI.IGT: success for " 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=87k1o15sm0.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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