Message ID | 1486633161-740-1-git-send-email-zhi.a.wang@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, 09 Feb 2017, Zhi Wang <zhi.a.wang@intel.com> wrote: > This patch makes PPGTT page table non-shrinkable when using aliasing PPGTT > mode. It's just a temporary solution for making aliasing PPGTT mode work. > > v3: > - Fixes the format of "Fixes line". > > v2: > - Add fixes tag. (Chris and Daniel) > > Fixes: 2ce5179fe826 ("drm/i915/gtt: Free unused lower-level page tables") > Cc: Jani Nikula <jani.nikula@linux.intel.com> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch> > Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> > Cc: Michal Winiarski <michal.winiarski@intel.com> > Cc: Michel Thierry <michel.thierry@intel.com> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> > Cc: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Daniel Vetter <daniel.vetter@intel.com> > Cc: Zhenyu Wang <zhenyuw@linux.intel.com> > Cc: Zhiyuan Lv <zhiyuan.lv@intel.com> > Signed-off-by: Zhi Wang <zhi.a.wang@intel.com> > Link: http://patchwork.freedesktop.org/patch/msgid/1486559013-25251-2-git-send-email-zhi.a.wang@intel.com > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.10-rc1+ This won't make it to v4.10, as I've sent the pull request already and I anticipate release this Sunday. Whoever applies this needs to add Cc: stable@vger.kernel.org # v4.10 BR, Jani. > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > --- > drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c > index 22b3374..3233f12 100644 > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c > @@ -756,8 +756,10 @@ static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm, > > bitmap_clear(pt->used_ptes, pte, num_entries); > > - if (bitmap_empty(pt->used_ptes, GEN8_PTES)) > - return true; > + if (USES_FULL_PPGTT(vm->i915)) { > + if (bitmap_empty(pt->used_ptes, GEN8_PTES)) > + return true; > + } > > pt_vaddr = kmap_px(pt);
On Thu, Feb 09, 2017 at 02:23:25PM +0200, Jani Nikula wrote: > On Thu, 09 Feb 2017, Zhi Wang <zhi.a.wang@intel.com> wrote: > > This patch makes PPGTT page table non-shrinkable when using aliasing PPGTT > > mode. It's just a temporary solution for making aliasing PPGTT mode work. > > > > v3: > > - Fixes the format of "Fixes line". > > > > v2: > > - Add fixes tag. (Chris and Daniel) > > > > Fixes: 2ce5179fe826 ("drm/i915/gtt: Free unused lower-level page tables") > > Cc: Jani Nikula <jani.nikula@linux.intel.com> > > Cc: Daniel Vetter <daniel.vetter@ffwll.ch> > > Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> > > Cc: Michal Winiarski <michal.winiarski@intel.com> > > Cc: Michel Thierry <michel.thierry@intel.com> > > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> > > Cc: Chris Wilson <chris@chris-wilson.co.uk> > > Cc: Daniel Vetter <daniel.vetter@intel.com> > > Cc: Zhenyu Wang <zhenyuw@linux.intel.com> > > Cc: Zhiyuan Lv <zhiyuan.lv@intel.com> > > Signed-off-by: Zhi Wang <zhi.a.wang@intel.com> > > Link: http://patchwork.freedesktop.org/patch/msgid/1486559013-25251-2-git-send-email-zhi.a.wang@intel.com > > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> > > Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.10-rc1+ > > This won't make it to v4.10, as I've sent the pull request already and I > anticipate release this Sunday. Whoever applies this needs to add > > Cc: stable@vger.kernel.org # v4.10 Already did. -Chris
Thanks Jani! :P -----Original Message----- From: Jani Nikula [mailto:jani.nikula@linux.intel.com] Sent: Thursday, February 9, 2017 8:23 PM To: Wang, Zhi A <zhi.a.wang@intel.com>; intel-gfx@lists.freedesktop.org Cc: Wang, Zhi A <zhi.a.wang@intel.com>; Daniel Vetter <daniel.vetter@ffwll.ch>; Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>; Winiarski, Michal <michal.winiarski@intel.com>; Thierry, Michel <michel.thierry@intel.com>; Joonas Lahtinen <joonas.lahtinen@linux.intel.com>; Chris Wilson <chris@chris-wilson.co.uk>; Vetter, Daniel <daniel.vetter@intel.com>; Zhenyu Wang <zhenyuw@linux.intel.com>; Lv, Zhiyuan <zhiyuan.lv@intel.com>; drm-intel-fixes@lists.freedesktop.org Subject: Re: [PATCH v3] drm/i915: A hotfix for making aliasing PPGTT work On Thu, 09 Feb 2017, Zhi Wang <zhi.a.wang@intel.com> wrote: > This patch makes PPGTT page table non-shrinkable when using aliasing > PPGTT mode. It's just a temporary solution for making aliasing PPGTT mode work. > > v3: > - Fixes the format of "Fixes line". > > v2: > - Add fixes tag. (Chris and Daniel) > > Fixes: 2ce5179fe826 ("drm/i915/gtt: Free unused lower-level page > tables") > Cc: Jani Nikula <jani.nikula@linux.intel.com> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch> > Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> > Cc: Michal Winiarski <michal.winiarski@intel.com> > Cc: Michel Thierry <michel.thierry@intel.com> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> > Cc: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Daniel Vetter <daniel.vetter@intel.com> > Cc: Zhenyu Wang <zhenyuw@linux.intel.com> > Cc: Zhiyuan Lv <zhiyuan.lv@intel.com> > Signed-off-by: Zhi Wang <zhi.a.wang@intel.com> > Link: > http://patchwork.freedesktop.org/patch/msgid/1486559013-25251-2-git-se > nd-email-zhi.a.wang@intel.com > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.10-rc1+ This won't make it to v4.10, as I've sent the pull request already and I anticipate release this Sunday. Whoever applies this needs to add Cc: stable@vger.kernel.org # v4.10 BR, Jani. > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > --- > drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c > b/drivers/gpu/drm/i915/i915_gem_gtt.c > index 22b3374..3233f12 100644 > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c > @@ -756,8 +756,10 @@ static bool gen8_ppgtt_clear_pt(struct > i915_address_space *vm, > > bitmap_clear(pt->used_ptes, pte, num_entries); > > - if (bitmap_empty(pt->used_ptes, GEN8_PTES)) > - return true; > + if (USES_FULL_PPGTT(vm->i915)) { > + if (bitmap_empty(pt->used_ptes, GEN8_PTES)) > + return true; > + } > > pt_vaddr = kmap_px(pt); -- Jani Nikula, Intel Open Source Technology Center
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 22b3374..3233f12 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -756,8 +756,10 @@ static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm, bitmap_clear(pt->used_ptes, pte, num_entries); - if (bitmap_empty(pt->used_ptes, GEN8_PTES)) - return true; + if (USES_FULL_PPGTT(vm->i915)) { + if (bitmap_empty(pt->used_ptes, GEN8_PTES)) + return true; + } pt_vaddr = kmap_px(pt);