From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: miku@iki.fi
Subject: [PATCH 2/4] drm/i915/gtt: Warn if the next layer scratch dma is invalid
Date: Tue, 30 Jun 2015 18:16:38 +0300 [thread overview]
Message-ID: <1435677400-7630-2-git-send-email-mika.kuoppala@intel.com> (raw)
In-Reply-To: <1435677400-7630-1-git-send-email-mika.kuoppala@intel.com>
When dma page is setup, warn if we try to point the entries
to a uninitialized (zero) dma address. Like we do with gen6
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 23f5896..78bfb88 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -427,6 +427,8 @@ static void gen8_initialize_pt(struct i915_address_space *vm,
{
gen8_pte_t scratch_pte;
+ WARN_ON(px_dma(vm->scratch_page) == 0);
+
scratch_pte = gen8_pte_encode(px_dma(vm->scratch_page),
I915_CACHE_LLC, true);
@@ -488,6 +490,8 @@ static void gen8_initialize_pd(struct i915_address_space *vm,
{
gen8_pde_t scratch_pde;
+ WARN_ON(px_dma(vm->scratch_pt) == 0);
+
scratch_pde = gen8_pde_encode(px_dma(vm->scratch_pt), I915_CACHE_LLC);
fill_px(vm->dev, pd, scratch_pde);
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-06-30 15:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 15:16 [PATCH 1/4] drm/i915/gtt: Reorder page alloc/free/init functions Mika Kuoppala
2015-06-30 15:16 ` Mika Kuoppala [this message]
2015-06-30 16:59 ` [PATCH 2/4] drm/i915/gtt: Warn if the next layer scratch dma is invalid Michel Thierry
2015-06-30 17:11 ` Chris Wilson
2015-07-01 10:55 ` Mika Kuoppala
2015-06-30 15:16 ` [PATCH 3/4] drm/i915/gtt: Return struct i915_scratch_page from alloc_scratch Mika Kuoppala
2015-07-01 12:02 ` Michel Thierry
2015-07-01 13:15 ` Daniel Vetter
2015-06-30 15:16 ` [PATCH 4/4] drm/i915/gtt: Per ppgtt scratch page Mika Kuoppala
2015-07-01 14:05 ` Michel Thierry
2015-07-01 14:26 ` Daniel Vetter
2015-07-01 14:25 ` Michel Thierry
2015-07-01 14:49 ` Daniel Vetter
2015-07-02 14:34 ` shuang.he
2015-06-30 16:58 ` [PATCH 1/4] drm/i915/gtt: Reorder page alloc/free/init functions Michel Thierry
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=1435677400-7630-2-git-send-email-mika.kuoppala@intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=miku@iki.fi \
/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.