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);
}
}
}
- if (out_reloc)
- *out_reloc = reloc;
return i;
}
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
{
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)
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;
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)
{
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
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;