Skip to content

Commit

Permalink
drm/i915: Avoid oops when capturing NULL ring for inactive pinned buf…
Browse files Browse the repository at this point in the history
…fers

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Chris Wilson committed Nov 23, 2010
1 parent 5f75377 commit 3685092
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/i915_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 "";
}
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3685092

Please sign in to comment.