提交 3685092b 编写于 作者: C Chris Wilson

drm/i915: Avoid oops when capturing NULL ring for inactive pinned buffers

Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
上级 5f75377d
......@@ -572,9 +572,9 @@ static int i915_ringbuffer_info(struct seq_file *m, void *data)
static const char *ring_str(int ring)
{
switch (ring) {
case RING_RENDER: return "render";
case RING_BSD: return "bsd";
case RING_BLT: return "blt";
case RING_RENDER: return " render";
case RING_BSD: return " bsd";
case RING_BLT: return " blt";
default: return "";
}
}
......
......@@ -575,7 +575,7 @@ static u32 capture_bo_list(struct drm_i915_error_buffer *err,
err->tiling = obj->tiling_mode;
err->dirty = obj->dirty;
err->purgeable = obj->madv != I915_MADV_WILLNEED;
err->ring = obj->ring->id;
err->ring = obj->ring ? obj->ring->id : 0;
if (++i == count)
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册