Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 371175
b: refs/heads/master
c: d0d045e
h: refs/heads/master
i:
  371173: f26d034
  371171: fbd73de
  371167: dc46c67
v: v3
  • Loading branch information
Ben Widawsky authored and Daniel Vetter committed Mar 4, 2013
1 parent fbde8c4 commit 2a5d5a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ebd37ce1f74e1b735dc094334ad99d17ec66926b
refs/heads/master: d0d045e8f5164da9f1a06c1214e4f7ec235ca104
18 changes: 10 additions & 8 deletions trunk/drivers/gpu/drm/i915/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,24 +956,23 @@ static void i915_get_extra_instdone(struct drm_device *dev,

#ifdef CONFIG_DEBUG_FS
static struct drm_i915_error_object *
i915_error_object_create(struct drm_i915_private *dev_priv,
struct drm_i915_gem_object *src)
i915_error_object_create_sized(struct drm_i915_private *dev_priv,
struct drm_i915_gem_object *src,
const int num_pages)
{
struct drm_i915_error_object *dst;
int i, count;
int i;
u32 reloc_offset;

if (src == NULL || src->pages == NULL)
return NULL;

count = src->base.size / PAGE_SIZE;

dst = kmalloc(sizeof(*dst) + count * sizeof(u32 *), GFP_ATOMIC);
dst = kmalloc(sizeof(*dst) + num_pages * sizeof(u32 *), GFP_ATOMIC);
if (dst == NULL)
return NULL;

reloc_offset = src->gtt_offset;
for (i = 0; i < count; i++) {
for (i = 0; i < num_pages; i++) {
unsigned long flags;
void *d;

Expand Down Expand Up @@ -1023,7 +1022,7 @@ i915_error_object_create(struct drm_i915_private *dev_priv,

reloc_offset += PAGE_SIZE;
}
dst->page_count = count;
dst->page_count = num_pages;
dst->gtt_offset = src->gtt_offset;

return dst;
Expand All @@ -1034,6 +1033,9 @@ i915_error_object_create(struct drm_i915_private *dev_priv,
kfree(dst);
return NULL;
}
#define i915_error_object_create(dev_priv, src) \
i915_error_object_create_sized((dev_priv), (src), \
(src)->base.size>>PAGE_SHIFT)

static void
i915_error_object_free(struct drm_i915_error_object *obj)
Expand Down

0 comments on commit 2a5d5a1

Please sign in to comment.