diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-10 12:15:22 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-10 14:28:45 +0100 |
commit | 7f9e20ef0f4689d3a47068cd4c32b40982ad9941 (patch) | |
tree | 705b04ee8b43dd99baa45e49fd62b5c68d111e73 | |
parent | drm/i915: drop DPF code for gen8+ (diff) | |
download | linux-7f9e20ef0f4689d3a47068cd4c32b40982ad9941.tar.xz linux-7f9e20ef0f4689d3a47068cd4c32b40982ad9941.zip |
drm/i915: Guard error capture against unpinned vma
If we find an incompletely setup vma inside the request/engine at the
time of a hang, it may not have vma->pages initialised, so skip
capturing the object before we iterate over NULL.
Spotted by Matthew in preparation for using unpinned vma to track engine
state.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190110111522.11023-1-chris@chris-wilson.co.uk
-rw-r--r-- | drivers/gpu/drm/i915/i915_gpu_error.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 5533a741abeb..5eaf586c4d48 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -1034,7 +1034,7 @@ i915_error_object_create(struct drm_i915_private *i915, dma_addr_t dma; int ret; - if (!vma) + if (!vma || !vma->pages) return NULL; num_pages = min_t(u64, vma->size, vma->obj->base.size) >> PAGE_SHIFT; |