* [PATCH] drm/i915: Ironlake do_idle_maps w/a may be called w/o struct_mutex
@ 2017-03-30 8:53 Chris Wilson
2017-03-30 10:02 ` Joonas Lahtinen
0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2017-03-30 8:53 UTC (permalink / raw)
To: intel-gfx
Cc: Chris Wilson, Joonas Lahtinen, Daniel Vetter, Jani Nikula,
# v4 . 10+
Since commit 1233e2db199d ("drm/i915: Move object backing storage
manipulation to its own locking"), i915_gem_object_put_pages() and
specifically the i915_gem_gtt_finish_pages() may be called from outside
of the struct_mutex and so we can no longer pass I915_WAIT_LOCKED to
i915_gem_wait_for_idle.
Fixes: 1233e2db199d ("drm/i915: Move object backing storage manipulation to its own locking")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v4.10+
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 895ee27d1d03..de14978fdb2e 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -2364,7 +2364,7 @@ void i915_gem_gtt_finish_pages(struct drm_i915_gem_object *obj,
struct i915_ggtt *ggtt = &dev_priv->ggtt;
if (unlikely(ggtt->do_idle_maps)) {
- if (i915_gem_wait_for_idle(dev_priv, I915_WAIT_LOCKED)) {
+ if (i915_gem_wait_for_idle(dev_priv, 0)) {
DRM_ERROR("Failed to wait for idle; VT'd may hang.\n");
/* Wait a bit, in hopes it avoids the hang */
udelay(10);
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Ironlake do_idle_maps w/a may be called w/o struct_mutex
2017-03-30 8:53 [PATCH] drm/i915: Ironlake do_idle_maps w/a may be called w/o struct_mutex Chris Wilson
@ 2017-03-30 10:02 ` Joonas Lahtinen
2017-03-30 10:11 ` Chris Wilson
0 siblings, 1 reply; 3+ messages in thread
From: Joonas Lahtinen @ 2017-03-30 10:02 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: Daniel Vetter, Jani Nikula, # v4 . 10+
On to, 2017-03-30 at 09:53 +0100, Chris Wilson wrote:
> Since commit 1233e2db199d ("drm/i915: Move object backing storage
> manipulation to its own locking"), i915_gem_object_put_pages() and
> specifically the i915_gem_gtt_finish_pages() may be called from outside
> of the struct_mutex and so we can no longer pass I915_WAIT_LOCKED to
> i915_gem_wait_for_idle.
>
> Fixes: 1233e2db199d ("drm/i915: Move object backing storage manipulation to its own locking")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Cc: <stable@vger.kernel.org> # v4.10+
Is there Bugzilla or did you just hit the assert on your own?
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Ironlake do_idle_maps w/a may be called w/o struct_mutex
2017-03-30 10:02 ` Joonas Lahtinen
@ 2017-03-30 10:11 ` Chris Wilson
0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2017-03-30 10:11 UTC (permalink / raw)
To: Joonas Lahtinen; +Cc: intel-gfx, Daniel Vetter, Jani Nikula, # v4 . 10+
On Thu, Mar 30, 2017 at 01:02:52PM +0300, Joonas Lahtinen wrote:
> On to, 2017-03-30 at 09:53 +0100, Chris Wilson wrote:
> > Since commit 1233e2db199d ("drm/i915: Move object backing storage
> > manipulation to its own locking"), i915_gem_object_put_pages() and
> > specifically the i915_gem_gtt_finish_pages() may be called from outside
> > of the struct_mutex and so we can no longer pass I915_WAIT_LOCKED to
> > i915_gem_wait_for_idle.
> >
> > Fixes: 1233e2db199d ("drm/i915: Move object backing storage manipulation to its own locking")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Daniel Vetter <daniel.vetter@intel.com>
> > Cc: Jani Nikula <jani.nikula@linux.intel.com>
> > Cc: intel-gfx@lists.freedesktop.org
> > Cc: <stable@vger.kernel.org> # v4.10+
>
> Is there Bugzilla or did you just hit the assert on your own?
Just reviewing callers of i915_gem_wait_for_idle() prior to refactor.
Seems like we got the message across about not using Ironlake + VT'd, or
that those that do are using enterprise kernels and won't have lockdep
enabled when they finally get the kernel update in a few years time.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-30 10:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-30 8:53 [PATCH] drm/i915: Ironlake do_idle_maps w/a may be called w/o struct_mutex Chris Wilson
2017-03-30 10:02 ` Joonas Lahtinen
2017-03-30 10:11 ` Chris Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox