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

Marek Olšák maraeo at gmail.com
Wed Nov 1 13:39:11 UTC 2017


Yeah, it should be called when the winsys is created.

Marek

On Wed, Nov 1, 2017 at 9:49 AM, Christian König
<ckoenig.leichtzumerken at gmail.com> wrote:
> I'm not 100% sure that patch was correct.
>
> When is amdgpu_ctx_create() called? The VMID is reserved for the whole
> process, not just a context.
>
> Regards,
> Christian.
>
>
> Am 31.10.2017 um 16:57 schrieb Marek Olšák:
>>
>> I addressed the feedback and pushed the patch.
>>
>> Marek
>>
>> On Tue, Oct 31, 2017 at 4:50 PM, Michel Dänzer <michel at daenzer.net> wrote:
>>>
>>> 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".
>>>
>>>
>>> --
>>> Earthling Michel Dänzer               |               http://www.amd.com
>>> Libre software enthusiast             |             Mesa and X developer
>>> _______________________________________________
>>> mesa-dev mailing list
>>> mesa-dev at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
>


More information about the amd-gfx mailing list