All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhi Wang <zhi.a.wang@intel.com>
To: stable@vger.kernel.org
Cc: Zhi Wang <zhi.a.wang@intel.com>,
	Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	Michal Winiarski <michal.winiarski@intel.com>,
	Michel Thierry <michel.thierry@intel.com>,
	Mika Kuoppala <mika.kuoppala@intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Zhenyu Wang <zhenyuw@linux.intel.com>,
	Zhiyuan Lv <zhiyuan.lv@intel.com>
Subject: [PATCH 3/3] drm/i915: A hotfix for making aliasing PPGTT work for GVT-g
Date: Mon, 27 Mar 2017 09:57:19 +0800	[thread overview]
Message-ID: <1490579839-30371-3-git-send-email-zhi.a.wang@intel.com> (raw)
In-Reply-To: <1490579839-30371-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 GVT-g work.

Fixes: 2ce5179fe826 ("drm/i915/gtt: Free unused lower-level page tables")
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@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> # v4.10+
Cc: stable@vger.kernel.org
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 6cee707..6924a8e 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -735,9 +735,10 @@ 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 (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);
 
-- 
1.9.1

  parent reply	other threads:[~2017-03-27  2:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27  1:57 [PATCH 1/3] drm/i915: Move the release of PT page to the upper caller Zhi Wang
2017-03-27  1:57 ` [PATCH 2/3] drm/i915: Let execlist_update_context() cover !FULL_PPGTT mode Zhi Wang
2017-03-27  1:57 ` Zhi Wang [this message]
2017-04-01  6:08 ` [PATCH 1/3] drm/i915: Move the release of PT page to the upper caller Zhi Wang
2017-04-01  6:51   ` Greg KH
2017-04-01  7:53     ` Zhi Wang
2017-04-01  8:13       ` Greg KH
2017-04-05  6:33 Zhi Wang
2017-04-05  6:33 ` [PATCH 3/3] drm/i915: A hotfix for making aliasing PPGTT work for GVT-g 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=1490579839-30371-3-git-send-email-zhi.a.wang@intel.com \
    --to=zhi.a.wang@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=michal.winiarski@intel.com \
    --cc=michel.thierry@intel.com \
    --cc=mika.kuoppala@intel.com \
    --cc=stable@vger.kernel.org \
    --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.