From: Zhi Wang <zhi.a.wang@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
intel-gfx@lists.freedesktop.org,
Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
Michal Winiarski <michal.winiarski@intel.com>,
Michel Thierry <michel.thierry@intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Zhenyu Wang <zhenyuw@linux.intel.com>,
Zhiyuan Lv <zhiyuan.lv@intel.com>
Subject: Re: [PATCH] drm/i915: Let execlist_update_context() cover !FULL_PPGTT mode.
Date: Tue, 07 Feb 2017 17:22:33 +0800 [thread overview]
Message-ID: <589991D9.9040609@intel.com> (raw)
In-Reply-To: <20170206113820.GG12434@nuc-i3427.alporthouse.com>
Hi Chris:
Thanks for the explanation! :P Have you already sent the patch to
keep PD structure under aliasing PPGTT mode? I tried drm-intel-nightly
branch and still got kernel panic under aliasing PPGTT mode. T_T
I fixed it like this, is this acceptable as a hot fix? If it's
acceptable as a hot fix, I can send a patch. :P
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c
b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 22b3374..21e06c9 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -2658,6 +2658,19 @@ static int aliasing_gtt_bind_vma(struct i915_vma
*vma,
if (vma->obj->gt_ro)
pte_flags |= PTE_READ_ONLY;
+ if (flags & I915_VMA_LOCAL_BIND) {
+ struct i915_hw_ppgtt *appgtt = i915->mm.aliasing_ppgtt;
+
+ ret = appgtt->base.allocate_va_range(&appgtt->base,
+ vma->node.start,
+ vma->node.size);
+ if (ret)
+ return ret;
+
+ appgtt->base.insert_entries(&appgtt->base,
+ vma->pages, vma->node.start,
+ cache_level, pte_flags);
+ }
if (flags & I915_VMA_GLOBAL_BIND) {
intel_runtime_pm_get(i915);
@@ -2666,14 +2679,6 @@ static int aliasing_gtt_bind_vma(struct i915_vma
*vma,
cache_level, pte_flags);
intel_runtime_pm_put(i915);
}
-
- if (flags & I915_VMA_LOCAL_BIND) {
- struct i915_hw_ppgtt *appgtt = i915->mm.aliasing_ppgtt;
- appgtt->base.insert_entries(&appgtt->base,
- vma->pages, vma->node.start,
- cache_level, pte_flags);
- }
-
return 0;
}
On 02/06/17 19:38, Chris Wilson wrote:
> On Mon, Feb 06, 2017 at 07:03:39PM +0800, Zhi Wang wrote:
>> Thanks for the merging. I guess that with your patches of keeping PD
>> structure under aliasing PPGTT mode in 32bit page table, the amount
>> of PDPs will not change anymore under aliasing PPGTT mode. :P
>
> Yes. That's the idea atm, we will preallocate the aliasing table
> and then keep the tree intact. The only disadvantage with gen8+ aliasing
> mode (compared to gen6) will be that we still have to walk the va range
> to pin the tree so that when we call clear_range afterwards we don't
> reap. The benefit from my pov, is that the special case for
> aliasing_ppgtt is within the aliasing_ppgtt code and not in the common
> code (which should be optimised for full-ppgtt as that is the
> default/typical use).
> -Chris
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-02-07 9:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-06 10:37 [PATCH] drm/i915: Let execlist_update_context() cover !FULL_PPGTT mode Zhi Wang
2017-02-06 10:58 ` Chris Wilson
2017-02-06 11:03 ` Zhi Wang
2017-02-06 11:38 ` Chris Wilson
2017-02-07 9:22 ` Zhi Wang [this message]
2017-02-07 9:52 ` Chris Wilson
2017-02-06 13:54 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-02-06 15:18 ` Chris Wilson
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=589991D9.9040609@intel.com \
--to=zhi.a.wang@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=michal.winiarski@intel.com \
--cc=michel.thierry@intel.com \
--cc=tvrtko.ursulin@linux.intel.com \
--cc=zhenyuw@linux.intel.com \
--cc=zhiyuan.lv@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 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.