anv: Inline write_reloc into the only remaining caller

This is writing an address and clflushing, but it's not really about
execbuf relocations.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18208>
This commit is contained in:
Kenneth Graunke
2022-08-31 00:03:20 -07:00
committed by Marge Bot
parent b4677718f3
commit 479a999637
2 changed files with 5 additions and 13 deletions
+5 -3
View File
@@ -385,9 +385,11 @@ anv_batch_bo_link(struct anv_cmd_buffer *cmd_buffer,
assert(((*bb_start >> 29) & 0x07) == 0);
assert(((*bb_start >> 23) & 0x3f) == 49);
write_reloc(cmd_buffer->device,
prev_bbo->bo->map + bb_start_offset + 4,
next_bbo->bo->offset + next_bbo_offset, true);
uint64_t *map = prev_bbo->bo->map + bb_start_offset + 4;
*map = intel_canonical_address(next_bbo->bo->offset + next_bbo_offset);
if (cmd_buffer->device->physical->memory.need_clflush)
intel_flush_range(map, sizeof(uint64_t));
}
static void
-10
View File
@@ -1447,16 +1447,6 @@ anv_batch_emit_reloc(struct anv_batch *batch,
return address_u64;
}
static inline void
write_reloc(const struct anv_device *device, void *p, uint64_t v, bool flush)
{
unsigned reloc_size = sizeof(uint64_t);
*(uint64_t *)p = intel_canonical_address(v);
if (flush && device->physical->memory.need_clflush)
intel_flush_range(p, reloc_size);
}
static inline uint64_t
_anv_combine_address(struct anv_batch *batch, void *location,
const struct anv_address address, uint32_t delta)