All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhi Wang <zhi.a.wang@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Zhiyuan Lv <zhiyuan.lv@intel.com>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: [PATCH] drm/i915: A hotfix for making aliasing PPGTT work
Date: Wed,  8 Feb 2017 21:03:33 +0800	[thread overview]
Message-ID: <1486559013-25251-2-git-send-email-zhi.a.wang@intel.com> (raw)
In-Reply-To: <1486559013-25251-1-git-send-email-zhi.a.wang@intel.com>

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.

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>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 22b3374..3af3b1c 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -754,10 +754,12 @@ static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm,
 
 	GEM_BUG_ON(pte_end > GEN8_PTES);
 
-	bitmap_clear(pt->used_ptes, pte, num_entries);
+	if (USES_FULL_PPGTT(vm->i915)) {
+		bitmap_clear(pt->used_ptes, pte, num_entries);
 
-	if (bitmap_empty(pt->used_ptes, GEN8_PTES))
-		return true;
+		if (bitmap_empty(pt->used_ptes, GEN8_PTES))
+			return true;
+	}
 
 	pt_vaddr = kmap_px(pt);
 
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-02-08 13:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08 13:03 [PATCH] A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x Zhi Wang
2017-02-08 13:03 ` Zhi Wang [this message]
2017-02-09  7:57   ` [PATCH] drm/i915: A hotfix for making aliasing PPGTT work Chris Wilson
2017-02-09  8:27     ` Chris Wilson
2017-02-09  8:10   ` Chris Wilson
2017-02-09  8:46     ` Zhi Wang
2017-02-08 13:22 ` [PATCH] A possible hotfix for aliasing PPGTT in kernel 4.11.x or 4.10.x Chris Wilson
2017-02-09  2:32   ` Zhi Wang
2017-02-09  7:51     ` Chris Wilson
2017-02-09  7:54 ` ✓ Fi.CI.BAT: success for drm/i915: A hotfix for making aliasing PPGTT work Patchwork
2017-02-09  9:33 [PATCH] " Zhi Wang
2017-02-10  1:44 Zhi Wang
2017-02-10  1:44 ` Zhi Wang

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=1486559013-25251-2-git-send-email-zhi.a.wang@intel.com \
    --to=zhi.a.wang@intel.com \
    --cc=daniel.vetter@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --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.