diff options
author | Marek Olšák <[email protected]> | 2014-04-14 15:24:04 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-04-17 13:54:18 +0200 |
commit | 3384a41aa9fae6f36205360ac846b1e2ea615cfd (patch) | |
tree | 5554c73673c0450e5d8ef160769df60f4e1e028b /src/gallium/winsys/radeon | |
parent | 75e487538db95271377d36ff09c9e5d9758d0739 (diff) |
winsys/radeon: remove parameter reloc from radeon_get_reloc
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/winsys/radeon')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 12 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_cs.h | 7 |
2 files changed, 8 insertions, 11 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c index 284a404c997..45920e82d0e 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c @@ -199,8 +199,7 @@ static INLINE void update_reloc(struct drm_radeon_cs_reloc *reloc, reloc->flags = MAX2(reloc->flags, priority); } -int radeon_get_reloc(struct radeon_cs_context *csc, struct radeon_bo *bo, - struct drm_radeon_cs_reloc **out_reloc) +int radeon_get_reloc(struct radeon_cs_context *csc, struct radeon_bo *bo) { struct drm_radeon_cs_reloc *reloc = NULL; unsigned hash = bo->handle & (sizeof(csc->is_handle_added)-1); @@ -230,8 +229,6 @@ int radeon_get_reloc(struct radeon_cs_context *csc, struct radeon_bo *bo, } } } - if (out_reloc) - *out_reloc = reloc; return i; } @@ -252,9 +249,10 @@ static unsigned radeon_add_reloc(struct radeon_drm_cs *cs, priority = MIN2(priority, 15); *added_domains = 0; - i = radeon_get_reloc(csc, bo, &reloc); + i = radeon_get_reloc(csc, bo); if (i >= 0) { + reloc = &csc->relocs[i]; update_reloc(reloc, rd, wd, priority, added_domains); /* For async DMA, every add_reloc call must add a buffer to the list @@ -329,7 +327,7 @@ static int radeon_drm_cs_get_reloc(struct radeon_winsys_cs *rcs, { struct radeon_drm_cs *cs = radeon_drm_cs(rcs); - return radeon_get_reloc(cs->csc, (struct radeon_bo*)buf, NULL); + return radeon_get_reloc(cs->csc, (struct radeon_bo*)buf); } static boolean radeon_drm_cs_validate(struct radeon_winsys_cs *rcs) @@ -583,7 +581,7 @@ static boolean radeon_bo_is_referenced(struct radeon_winsys_cs *rcs, if (!bo->num_cs_references) return FALSE; - index = radeon_get_reloc(cs->csc, bo, NULL); + index = radeon_get_reloc(cs->csc, bo); if (index == -1) return FALSE; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.h b/src/gallium/winsys/radeon/drm/radeon_drm_cs.h index 59819a56e0a..4dfc53e5e18 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.h +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.h @@ -80,8 +80,7 @@ struct radeon_drm_cs { struct radeon_bo *trace_buf; }; -int radeon_get_reloc(struct radeon_cs_context *csc, struct radeon_bo *bo, - struct drm_radeon_cs_reloc **out_reloc); +int radeon_get_reloc(struct radeon_cs_context *csc, struct radeon_bo *bo); static INLINE struct radeon_drm_cs * radeon_drm_cs(struct radeon_winsys_cs *base) @@ -95,7 +94,7 @@ radeon_bo_is_referenced_by_cs(struct radeon_drm_cs *cs, { int num_refs = bo->num_cs_references; return num_refs == bo->rws->num_cs || - (num_refs && radeon_get_reloc(cs->csc, bo, NULL) != -1); + (num_refs && radeon_get_reloc(cs->csc, bo) != -1); } static INLINE boolean @@ -107,7 +106,7 @@ radeon_bo_is_referenced_by_cs_for_write(struct radeon_drm_cs *cs, if (!bo->num_cs_references) return FALSE; - index = radeon_get_reloc(cs->csc, bo, NULL); + index = radeon_get_reloc(cs->csc, bo); if (index == -1) return FALSE; |