All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhi Wang <zhi.a.wang@intel.com>
To: unlisted-recipients:; (no To-header on input)
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>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Zhenyu Wang <zhenyuw@linux.intel.com>,
	Zhiyuan Lv <zhiyuan.lv@intel.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org
Subject: [PATCH 2/3] drm/i915: Let execlist_update_context() cover !FULL_PPGTT mode.
Date: Wed,  5 Apr 2017 14:33:37 +0800	[thread overview]
Message-ID: <1491374018-20317-2-git-send-email-zhi.a.wang@intel.com> (raw)
In-Reply-To: <1491374018-20317-1-git-send-email-zhi.a.wang@intel.com>

execlist_update_context() will try to update PDPs in a context before a
ELSP submission only for full PPGTT mode, while PDPs was populated during
context initialization. Now the latter code path is removed. Let
execlist_update_context() also cover !FULL_PPGTT mode.

Fixes: 34869776c76b ("drm/i915: check ppgtt validity when init reg state")
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: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhiyuan Lv <zhiyuan.lv@intel.com>
Cc: Greg KH <gregkh@linuxfoundation.org> #v4.10+
Cc: stable@vger.kernel.org
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1486377436-15380-1-git-send-email-zhi.a.wang@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_lrc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index beabc17..2af4522 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -362,7 +362,8 @@ uint64_t intel_lr_context_descriptor(struct i915_gem_context *ctx,
 static u64 execlists_update_context(struct drm_i915_gem_request *rq)
 {
 	struct intel_context *ce = &rq->ctx->engine[rq->engine->id];
-	struct i915_hw_ppgtt *ppgtt = rq->ctx->ppgtt;
+	struct i915_hw_ppgtt *ppgtt =
+		rq->ctx->ppgtt ?: rq->i915->mm.aliasing_ppgtt;
 	u32 *reg_state = ce->lrc_reg_state;
 
 	reg_state[CTX_RING_TAIL+1] = rq->tail;
-- 
1.9.1

  reply	other threads:[~2017-04-05  6:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05  6:33 [PATCH 1/3] drm/i915: Move the release of PT page to the upper caller Zhi Wang
2017-04-05  6:33 ` Zhi Wang [this message]
2017-04-05  6:33 ` [PATCH 3/3] drm/i915: A hotfix for making aliasing PPGTT work for GVT-g Zhi Wang
2017-04-05  6:36 ` [PATCH 1/3] drm/i915: Move the release of PT page to the upper caller Zhi Wang
2017-04-05  8:01   ` Zhi Wang
2017-04-05  8:20     ` Greg KH
2017-04-05  8:14       ` Zhi Wang
2017-04-06  7:59     ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2017-03-27  1:57 Zhi Wang
2017-03-27  1:57 ` [PATCH 2/3] drm/i915: Let execlist_update_context() cover !FULL_PPGTT mode 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=1491374018-20317-2-git-send-email-zhi.a.wang@intel.com \
    --to=zhi.a.wang@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=michal.winiarski@intel.com \
    --cc=michel.thierry@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.