hasvk: remove softpin (GFX_VERx10 >= 90) related code

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26997>
This commit is contained in:
Tapani Pälli
2024-01-11 07:59:34 +02:00
committed by Marge Bot
parent ed2743258a
commit 30c148fd16
2 changed files with 7 additions and 45 deletions

View File

@@ -463,11 +463,7 @@ anv_bo_unwrap(struct anv_bo *bo)
static inline bool
anv_bo_is_pinned(struct anv_bo *bo)
{
#if defined(GFX_VERx10) && GFX_VERx10 >= 90
/* Sky Lake and later always uses softpin */
assert(bo->flags & EXEC_OBJECT_PINNED);
return true;
#elif defined(GFX_VERx10) && GFX_VERx10 < 80
#if defined(GFX_VERx10) && GFX_VERx10 < 80
/* Haswell and earlier never use softpin */
assert(!(bo->flags & EXEC_OBJECT_PINNED));
assert(!bo->has_fixed_address);
@@ -1100,20 +1096,10 @@ struct anv_device {
struct intel_ds_device ds;
};
#if defined(GFX_VERx10) && GFX_VERx10 >= 90
#define ANV_ALWAYS_SOFTPIN true
#else
#define ANV_ALWAYS_SOFTPIN false
#endif
static inline bool
anv_use_relocations(const struct anv_physical_device *pdevice)
{
#if defined(GFX_VERx10) && GFX_VERx10 >= 90
/* Sky Lake and later always uses softpin */
assert(!pdevice->use_relocations);
return false;
#elif defined(GFX_VERx10) && GFX_VERx10 < 80
#if defined(GFX_VERx10) && GFX_VERx10 < 80
/* Haswell and earlier never use softpin */
assert(pdevice->use_relocations);
return true;
@@ -1396,16 +1382,9 @@ anv_batch_emit_reloc(struct anv_batch *batch,
void *location, struct anv_bo *bo, uint32_t delta)
{
uint64_t address_u64 = 0;
VkResult result;
if (ANV_ALWAYS_SOFTPIN) {
address_u64 = bo->offset + delta;
result = anv_reloc_list_add_bo(batch->relocs, batch->alloc, bo);
} else {
result = anv_reloc_list_add(batch->relocs, batch->alloc,
location - batch->start, bo, delta,
&address_u64);
}
VkResult result = anv_reloc_list_add(batch->relocs, batch->alloc,
location - batch->start, bo, delta,
&address_u64);
if (unlikely(result != VK_SUCCESS)) {
anv_batch_set_error(batch, result);
return 0;

View File

@@ -85,15 +85,6 @@ blorp_surface_reloc(struct blorp_batch *batch, uint32_t ss_offset,
struct anv_cmd_buffer *cmd_buffer = batch->driver_batch;
VkResult result;
if (ANV_ALWAYS_SOFTPIN) {
result = anv_reloc_list_add_bo(&cmd_buffer->surface_relocs,
&cmd_buffer->vk.pool->alloc,
address.buffer);
if (unlikely(result != VK_SUCCESS))
anv_batch_set_error(&cmd_buffer->batch, result);
return;
}
uint64_t address_u64 = 0;
result = anv_reloc_list_add(&cmd_buffer->surface_relocs,
&cmd_buffer->vk.pool->alloc,
@@ -112,16 +103,8 @@ static uint64_t
blorp_get_surface_address(struct blorp_batch *blorp_batch,
struct blorp_address address)
{
if (ANV_ALWAYS_SOFTPIN) {
struct anv_address anv_addr = {
.bo = address.buffer,
.offset = address.offset,
};
return anv_address_physical(anv_addr);
} else {
/* We'll let blorp_surface_reloc write the address. */
return 0;
}
/* We'll let blorp_surface_reloc write the address. */
return 0;
}
static struct blorp_address