From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
alexander.deucher@amd.com
Subject: Re: [PATCH 6/6] drm/amdgpu: use the new drm_exec object for CS v2
Date: Thu, 29 Jun 2023 15:58:10 +0200 [thread overview]
Message-ID: <517a4b60-94bb-e683-b8be-ca3b71509cb5@gmail.com> (raw)
In-Reply-To: <17e929a5-d94f-8370-6aad-cf93490c6ad7@gmail.com>
Am 29.06.23 um 10:20 schrieb Tatsuyuki Ishi:
> On 6/28/23 19:44, Christian König wrote:
>> @@ -958,18 +904,57 @@ static int amdgpu_cs_parser_bos(struct
>> amdgpu_cs_parser *p,
>> e->user_invalidated = userpage_invalidated;
>> }
>> - r = ttm_eu_reserve_buffers(&p->ticket, &p->validated, true,
>> - &duplicates);
>> - if (unlikely(r != 0)) {
>> - if (r != -ERESTARTSYS)
>> - DRM_ERROR("ttm_eu_reserve_buffers failed.\n");
>> - goto out_free_user_pages;
>> + drm_exec_until_all_locked(&p->exec) {
>> + r = amdgpu_vm_lock_pd(&fpriv->vm, &p->exec, 1 + p->gang_size);
>> + drm_exec_retry_on_contention(&p->exec);
>> + if (unlikely(r))
>> + goto out_free_user_pages;
>> +
>> + amdgpu_bo_list_for_each_entry(e, p->bo_list) {
>> + /* One fence for TTM and one for each CS job */
>> + r = drm_exec_prepare_obj(&p->exec, &e->bo->tbo.base,
>> + 1 + p->gang_size);
>> + drm_exec_retry_on_contention(&p->exec);
>> + if (unlikely(r))
>> + goto out_free_user_pages;
>> +
>> + e->bo_va = amdgpu_vm_bo_find(vm, e->bo);
>> + e->range = NULL;
> Still leaking.
Scratching my head, I though I fixed this.
Thanks for pointing this out,
Christian.
>> + }
>> +
>> + if (p->uf_bo) {
>> + r = drm_exec_prepare_obj(&p->exec, &p->uf_bo->tbo.base,
>> + 1 + p->gang_size);
>> + drm_exec_retry_on_contention(&p->exec);
>> + if (unlikely(r))
>> + goto out_free_user_pages;
>> + }
>> }
>
prev parent reply other threads:[~2023-06-29 13:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 10:44 AMDGPU patches for the drm_exec context Christian König
2023-06-28 10:44 ` [PATCH 1/6] drm: execution context for GEM buffers v6 Christian König
2023-06-28 10:44 ` [PATCH 2/6] drm: add drm_exec selftests v4 Christian König
2023-06-28 10:44 ` [PATCH 3/6] drm/amdkfd: switch over to using drm_exec v2 Christian König
2023-06-28 10:44 ` [PATCH 4/6] drm/amdgpu: use drm_exec for GEM and CSA handling Christian König
2023-06-29 8:20 ` Tatsuyuki Ishi
2023-06-28 10:44 ` [PATCH 5/6] drm/amdgpu: use drm_exec for MES testing Christian König
2023-06-28 10:44 ` [PATCH 6/6] drm/amdgpu: use the new drm_exec object for CS v2 Christian König
2023-06-29 8:20 ` Tatsuyuki Ishi
2023-06-29 13:58 ` Christian König [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=517a4b60-94bb-e683-b8be-ca3b71509cb5@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ishitatsuyuki@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.