[Intel-gfx] [PATCH 21/29] drm/i915: Support readback of stolen objects upon error
Chris Wilson
chris at chris-wilson.co.uk
Sat Aug 11 16:41:20 CEST 2012
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_irq.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 2ec8ad7..f59eace 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -895,6 +895,14 @@ i915_error_object_create(struct drm_i915_private *dev_priv,
reloc_offset);
memcpy_fromio(d, s, PAGE_SIZE);
io_mapping_unmap_atomic(s);
+ } else if (src->stolen) {
+ unsigned long offset;
+
+ offset = dev_priv->mm.stolen_base;
+ offset += src->stolen->start;
+ offset += i << PAGE_SHIFT;
+
+ memcpy_fromio(d, (void *)offset, PAGE_SIZE);
} else {
struct page *page;
void *s;
--
1.7.10.4
More information about the Intel-gfx
mailing list