[PATCH] amdgpu: Add R600_DEBUG flag to reserve VMID per ctx.

Christian König ckoenig.leichtzumerken at gmail.com
Wed Nov 1 08:43:53 UTC 2017


Am 31.10.2017 um 16:50 schrieb Michel Dänzer:
> On 31/10/17 04:40 PM, Andrey Grodzovsky wrote:
>> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
> [...]
>
>> diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
>> index 8f43e93..1155492 100644
>> --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
>> +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
>> @@ -256,6 +256,14 @@ static struct radeon_winsys_ctx *amdgpu_ctx_create(struct radeon_winsys *ws)
>>         goto error_create;
>>      }
>>   
>> +   if (ctx->ws->reserve_vmid) {
>> +	   r = amdgpu_vm_reserve_vmid(ctx->ctx, 0);
>> +	   if (r) {
>> +		fprintf(stderr, "amdgpu: amdgpu_cs_ctx_create failed. (%i)\n", r);
> This should say "amdgpu: amdgpu_vm_reserve_vmid failed. (%i)\n".


Not sure when amdgpu_ctx_create() is called, but the VMID is reserved 
per process not per context.

Christian.



More information about the amd-gfx mailing list