# in the first entry.
LIBDRM_REQUIRED=2.4.75
LIBDRM_RADEON_REQUIRED=2.4.71
-LIBDRM_AMDGPU_REQUIRED=2.4.85
+LIBDRM_AMDGPU_REQUIRED=2.4.86
LIBDRM_INTEL_REQUIRED=2.4.75
LIBDRM_NVVIEUX_REQUIRED=2.4.66
LIBDRM_NOUVEAU_REQUIRED=2.4.66
{ "dpbb", DBG(DPBB), "Enable DPBB." },
{ "dfsm", DBG(DFSM), "Enable DFSM." },
{ "nooutoforder", DBG(NO_OUT_OF_ORDER), "Disable out-of-order rasterization" },
+ { "reserve_vmid", DBG(RESERVE_VMID), "Force VMID reservation per context." },
DEBUG_NAMED_VALUE_END /* must be last */
};
DBG_NO_DISCARD_RANGE,
DBG_NO_WC,
DBG_CHECK_VM,
+ DBG_RESERVE_VMID,
/* 3D engine options: */
DBG_SWITCH_ON_EOP,
goto error_create;
}
+ if (ctx->ws->reserve_vmid) {
+ r = amdgpu_vm_reserve_vmid(ctx->ctx, 0);
+ if (r) {
+ fprintf(stderr, "amdgpu: amdgpu_vm_reserve_vmid failed. (%i)\n", r);
+ goto error_create;
+ }
+ }
+
alloc_buffer.alloc_size = ctx->ws->info.gart_page_size;
alloc_buffer.phys_alignment = ctx->ws->info.gart_page_size;
alloc_buffer.preferred_heap = AMDGPU_GEM_DOMAIN_GTT;
static inline void amdgpu_ctx_unref(struct amdgpu_ctx *ctx)
{
if (p_atomic_dec_zero(&ctx->refcount)) {
+ if (ctx->ws->reserve_vmid)
+ amdgpu_vm_unreserve_vmid(ctx->ctx, 0);
+
amdgpu_cs_ctx_free(ctx->ctx);
amdgpu_bo_free(ctx->user_fence_bo);
FREE(ctx);
ws->check_vm = strstr(debug_get_option("R600_DEBUG", ""), "check_vm") != NULL;
ws->debug_all_bos = debug_get_option_all_bos();
+ ws->reserve_vmid = strstr(debug_get_option("R600_DEBUG", ""), "reserve_vmid") != NULL;
return true;
bool check_vm;
bool debug_all_bos;
+ bool reserve_vmid;
/* List of all allocated buffers */
mtx_t global_bo_list_lock;