* [PATCH] drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock
@ 2018-09-04 13:12 Chris Wilson
2018-09-04 13:13 ` ✗ Fi.CI.BAT: failure for " Patchwork
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Chris Wilson @ 2018-09-04 13:12 UTC (permalink / raw)
To: intel-gfx; +Cc: Mika Kuoppala
Elsewhere we manipulate uncore.unclaimed_mmio_check and
i915_param.mmio_debug under the irq lock (e.g. preserving the current
value across a user forcewake grab), but do not protect the manipulation
inside intel_uncore_arm_unclaimed_mmio_detection() from concurrent
access, even from itself. This is an issue as we do call
arm_unclaimed_mmio_detection from multiple threads without coordination.
Suggested-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
---
drivers/gpu/drm/i915/intel_uncore.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 05f0cda18501..3ad302c66254 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -2283,8 +2283,12 @@ bool intel_uncore_unclaimed_mmio(struct drm_i915_private *dev_priv)
bool
intel_uncore_arm_unclaimed_mmio_detection(struct drm_i915_private *dev_priv)
{
+ bool ret = false;
+
+ spin_lock_irq(&dev_priv->uncore.lock);
+
if (unlikely(dev_priv->uncore.unclaimed_mmio_check <= 0))
- return false;
+ goto out;
if (unlikely(intel_uncore_unclaimed_mmio(dev_priv))) {
if (!i915_modparams.mmio_debug) {
@@ -2294,10 +2298,13 @@ intel_uncore_arm_unclaimed_mmio_detection(struct drm_i915_private *dev_priv)
i915_modparams.mmio_debug++;
}
dev_priv->uncore.unclaimed_mmio_check--;
- return true;
+ ret = true;
}
- return false;
+out:
+ spin_unlock_irq(&dev_priv->uncore.lock);
+
+ return ret;
}
static enum forcewake_domains
--
2.19.0.rc1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock
2018-09-04 13:12 [PATCH] drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock Chris Wilson
@ 2018-09-04 13:13 ` Patchwork
2018-09-04 13:29 ` [PATCH] " Mika Kuoppala
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-09-04 13:13 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock
URL : https://patchwork.freedesktop.org/series/49128/
State : failure
== Summary ==
Applying: drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/intel_uncore.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/intel_uncore.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_uncore.c
error: Failed to merge in the changes.
Patch failed at 0001 drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock
Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock
2018-09-04 13:12 [PATCH] drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock Chris Wilson
2018-09-04 13:13 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2018-09-04 13:29 ` Mika Kuoppala
2018-09-04 14:57 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-09-04 20:22 ` ✓ Fi.CI.IGT: " Patchwork
3 siblings, 0 replies; 5+ messages in thread
From: Mika Kuoppala @ 2018-09-04 13:29 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Elsewhere we manipulate uncore.unclaimed_mmio_check and
> i915_param.mmio_debug under the irq lock (e.g. preserving the current
> value across a user forcewake grab), but do not protect the manipulation
> inside intel_uncore_arm_unclaimed_mmio_detection() from concurrent
> access, even from itself. This is an issue as we do call
> arm_unclaimed_mmio_detection from multiple threads without coordination.
>
> Suggested-by: Mika Kuoppala <mika.kuoppala@intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> drivers/gpu/drm/i915/intel_uncore.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 05f0cda18501..3ad302c66254 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -2283,8 +2283,12 @@ bool intel_uncore_unclaimed_mmio(struct drm_i915_private *dev_priv)
> bool
> intel_uncore_arm_unclaimed_mmio_detection(struct drm_i915_private *dev_priv)
> {
> + bool ret = false;
> +
> + spin_lock_irq(&dev_priv->uncore.lock);
> +
> if (unlikely(dev_priv->uncore.unclaimed_mmio_check <= 0))
> - return false;
> + goto out;
>
> if (unlikely(intel_uncore_unclaimed_mmio(dev_priv))) {
> if (!i915_modparams.mmio_debug) {
> @@ -2294,10 +2298,13 @@ intel_uncore_arm_unclaimed_mmio_detection(struct drm_i915_private *dev_priv)
> i915_modparams.mmio_debug++;
> }
> dev_priv->uncore.unclaimed_mmio_check--;
> - return true;
> + ret = true;
> }
>
> - return false;
> +out:
> + spin_unlock_irq(&dev_priv->uncore.lock);
> +
> + return ret;
Patchbot didn't see how the future will unfold. I did.
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intelcom>
> }
>
> static enum forcewake_domains
> --
> 2.19.0.rc1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock
2018-09-04 13:12 [PATCH] drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock Chris Wilson
2018-09-04 13:13 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-09-04 13:29 ` [PATCH] " Mika Kuoppala
@ 2018-09-04 14:57 ` Patchwork
2018-09-04 20:22 ` ✓ Fi.CI.IGT: " Patchwork
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-09-04 14:57 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock
URL : https://patchwork.freedesktop.org/series/49128/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4766 -> Patchwork_10081 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/49128/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_10081 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_suspend@basic-s3:
fi-kbl-soraka: NOTRUN -> INCOMPLETE (fdo#107774, fdo#107556)
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: PASS -> DMESG-WARN (fdo#102614)
fi-byt-clapper: PASS -> FAIL (fdo#103167)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-bxt-dsi: PASS -> INCOMPLETE (fdo#103927)
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
fdo#107774 https://bugs.freedesktop.org/show_bug.cgi?id=107774
== Participating hosts (49 -> 46) ==
Additional (2): fi-kbl-soraka fi-hsw-4770r
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4766 -> Patchwork_10081
CI_DRM_4766: 0d35b9d0b3a74c41ac1ffe1a34aa9c98d2a3a0b9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4625: 67fbe2967889484f1248d851c068e1021f2dc332 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10081: c81f7041022f991c7b1b9c1b323653beb538a14b @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
c81f7041022f drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10081/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock
2018-09-04 13:12 [PATCH] drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock Chris Wilson
` (2 preceding siblings ...)
2018-09-04 14:57 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-09-04 20:22 ` Patchwork
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-09-04 20:22 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock
URL : https://patchwork.freedesktop.org/series/49128/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4766_full -> Patchwork_10081_full =
== Summary - SUCCESS ==
No regressions found.
== Known issues ==
Here are the changes found in Patchwork_10081_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions:
shard-hsw: PASS -> FAIL (fdo#103355)
==== Possible fixes ====
igt@drv_suspend@shrink:
shard-hsw: INCOMPLETE (fdo#103540, fdo#106886) -> PASS
igt@gem_exec_await@wide-contexts:
shard-glk: FAIL (fdo#105900) -> PASS
shard-apl: FAIL (fdo#105900, fdo#106680) -> PASS
igt@kms_flip@flip-vs-expired-vblank:
shard-glk: FAIL (fdo#102887, fdo#105363) -> PASS
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-cpu:
shard-glk: FAIL (fdo#103167) -> PASS
igt@kms_setmode@basic:
shard-apl: FAIL (fdo#99912) -> PASS
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
fdo#106680 https://bugs.freedesktop.org/show_bug.cgi?id=106680
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4766 -> Patchwork_10081
CI_DRM_4766: 0d35b9d0b3a74c41ac1ffe1a34aa9c98d2a3a0b9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4625: 67fbe2967889484f1248d851c068e1021f2dc332 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10081: c81f7041022f991c7b1b9c1b323653beb538a14b @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10081/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-09-04 20:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-04 13:12 [PATCH] drm/i915: Pull intel_uncore_arm_unclaimed_mmio_detection() under the spinlock Chris Wilson
2018-09-04 13:13 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-09-04 13:29 ` [PATCH] " Mika Kuoppala
2018-09-04 14:57 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-09-04 20:22 ` ✓ Fi.CI.IGT: " Patchwork
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.