Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296739
b: refs/heads/master
c: d936622
h: refs/heads/master
i:
  296737: f32cf8f
  296735: cff0e17
v: v3
  • Loading branch information
Michel Dänzer authored and Dave Airlie committed Mar 28, 2012
1 parent ae9e7c4 commit 11434dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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: 88f50c80748bf5238c88e70ee26c68ac48b94e68
refs/heads/master: d936622c36273a9ecfbb4aacf26cd29405995159
12 changes: 11 additions & 1 deletion trunk/drivers/gpu/drm/radeon/radeon_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,17 @@ int radeon_bo_pin_restricted(struct radeon_bo *bo, u32 domain, u64 max_offset,
bo->pin_count++;
if (gpu_addr)
*gpu_addr = radeon_bo_gpu_offset(bo);
WARN_ON_ONCE(max_offset != 0);

if (max_offset != 0) {
u64 domain_start;

if (domain == RADEON_GEM_DOMAIN_VRAM)
domain_start = bo->rdev->mc.vram_start;
else
domain_start = bo->rdev->mc.gtt_start;
WARN_ON_ONCE((*gpu_addr - domain_start) > max_offset);
}

return 0;
}
radeon_ttm_placement_from_domain(bo, domain);
Expand Down

0 comments on commit 11434dd

Please sign in to comment.