All of lore.kernel.org
 help / color / mirror / Atom feed
* Common DRM execution context v4
@ 2023-05-04 11:51 Christian König
  2023-05-04 11:51 ` [PATCH 01/13] drm: execution context for GEM buffers v4 Christian König
                   ` (12 more replies)
  0 siblings, 13 replies; 51+ messages in thread
From: Christian König @ 2023-05-04 11:51 UTC (permalink / raw)
  To: francois.dugast, felix.kuehling, arunpravin.paneerselvam,
	thomas_os, dakr, luben.tuikov, amd-gfx, dri-devel

Hi guys,

so well known patch set by now. I've tried to address all review
comments and extended the set to also replace
drm_gem_lock_reservations() as suggested by Thomas.

I won't have much time to work on this in the next few weeks, so feel
free to pick up this work and commit it when you need it.

Regards,
Christian.



^ permalink raw reply	[flat|nested] 51+ messages in thread
* Re: [PATCH 06/13] drm/amdgpu: use the new drm_exec object for CS v2
@ 2023-06-12  9:06 Tatsuyuki Ishi
  0 siblings, 0 replies; 51+ messages in thread
From: Tatsuyuki Ishi @ 2023-06-12  9:06 UTC (permalink / raw)
  To: Christian König
  Cc: arunpravin.paneerselvam, felix.kuehling, francois.dugast, amd-gfx,
	luben.tuikov, dakr, dri-devel, thomas_os

Hi Christian,

> On May 4, 2023, at 20:51, Christian König <ckoenig.leichtzumerken@gmail.com> wrote:
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index 08eced097bd8..9e751f5d4aa7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -882,25 +840,13 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
>
> mutex_lock(&p->bo_list->bo_list_mutex);
>
> - /* One for TTM and one for the CS job */
> - amdgpu_bo_list_for_each_entry(e, p->bo_list)
> - e->tv.num_shared = 2;
> -
> - amdgpu_bo_list_get_list(p->bo_list, &p->validated);
> -
> - INIT_LIST_HEAD(&duplicates);
> - amdgpu_vm_get_pd_bo(&fpriv->vm, &p->validated, &p->vm_pd);
> -
> - if (p->uf_entry.tv.bo && !ttm_to_amdgpu_bo(p->uf_entry.tv.bo)->parent)
> - list_add(&p->uf_entry.tv.head, &p->validated);
> -
> /* Get userptr backing pages. If pages are updated after registered
> * in amdgpu_gem_userptr_ioctl(), amdgpu_cs_list_validate() will do
> * amdgpu_ttm_backend_bind() to flush and invalidate new pages
> */
> amdgpu_bo_list_for_each_userptr_entry(e, p->bo_list) {
> - struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo);
> bool userpage_invalidated = false;
> + struct amdgpu_bo *bo = e->bo;
> int i;
>
> e->user_pages = kvmalloc_array(bo->tbo.ttm->num_pages,
> @@ -1307,20 +1281,22 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
> }
>
> p->fence = dma_fence_get(&leader->base.s_fence->finished);
> - list_for_each_entry(e, &p->validated, tv.head) {
> + drm_exec_for_each_locked_object(&p->exec, index, gobj) {
> +
> + ttm_bo_move_to_lru_tail_unlocked(&gem_to_amdgpu_bo(gobj)->tbo);
>
> /* Everybody except for the gang leader uses READ */
> for (i = 0; i < p->gang_size; ++i) {
> if (p->jobs[i] == leader)
> continue;
>
> - dma_resv_add_fence(e->tv.bo->base.resv,
> + dma_resv_add_fence(gobj->resv,
>   &p->jobs[i]->base.s_fence->finished,
>   DMA_RESV_USAGE_READ);
> }
>
> - /* The gang leader is remembered as writer */
> - e->tv.num_shared = 0;
> + /* The gang leader as remembered as writer */
> + dma_resv_add_fence(gobj->resv, p->fence, DMA_RESV_USAGE_WRITE);
> }
>
> seq = amdgpu_ctx_add_fence(p->ctx, p->entities[p->gang_leader_idx],

I believe this changes the usage of VM PDs from READ to WRITE.
Maybe we could check if a BO is PD and supply DMA_RESV_USAGE_READ in that case?

Tatsuyuki

^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2023-06-21 13:35 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-04 11:51 Common DRM execution context v4 Christian König
2023-05-04 11:51 ` [PATCH 01/13] drm: execution context for GEM buffers v4 Christian König
2023-05-04 14:02   ` Thomas Hellström (Intel)
2023-05-25 20:42   ` Danilo Krummrich
2023-06-14 12:23   ` Boris Brezillon
2023-06-14 12:30     ` Christian König
2023-06-14 13:02       ` Boris Brezillon
2023-06-17 11:54         ` Boris Brezillon
2023-06-19  8:59           ` Thomas Hellström (Intel)
2023-06-19  9:20             ` Christian König
2023-06-19  9:33               ` Thomas Hellström (Intel)
2023-06-19  9:48                 ` Christian König
2023-06-19 11:06                   ` Thomas Hellström (Intel)
2023-06-21 13:35                     ` Christian König
2023-06-19 10:23               ` Boris Brezillon
2023-06-19 10:12             ` Boris Brezillon
2023-06-19 10:44               ` Christian König
2023-06-19 11:05                 ` Boris Brezillon
2023-06-19 12:01                   ` Boris Brezillon
2023-06-19 12:29                 ` Boris Brezillon
2023-06-20  6:47                   ` Boris Brezillon
2023-06-20  7:28                     ` Christian König
2023-05-04 11:51 ` [PATCH 02/13] drm: add drm_exec selftests v2 Christian König
2023-05-04 12:07   ` Maíra Canal
2023-05-04 12:52     ` Christian König
2023-05-04 11:51 ` [PATCH 03/13] drm/amdkfd: switch over to using drm_exec v2 Christian König
2023-05-04 11:51 ` [PATCH 04/13] drm/amdgpu: use drm_exec for GEM and CSA handling Christian König
2023-05-04 11:51 ` [PATCH 05/13] drm/amdgpu: use drm_exec for MES testing Christian König
2023-05-04 11:51 ` [PATCH 06/13] drm/amdgpu: use the new drm_exec object for CS v2 Christian König
2023-06-12 13:16   ` Tatsuyuki Ishi
2023-06-20  4:07   ` Tatsuyuki Ishi
2023-06-20  4:14     ` Tatsuyuki Ishi
2023-06-20  8:13       ` Christian König
2023-06-20  8:12     ` Christian König
2023-06-20  8:16       ` Tatsuyuki Ishi
2023-06-20  9:04         ` Tatsuyuki Ishi
2023-06-20  8:28       ` Boris Brezillon
2023-06-20  8:44         ` Christian König
2023-06-20  9:09           ` Boris Brezillon
2023-06-20  9:14             ` Christian König
2023-06-20  9:20               ` Boris Brezillon
2023-05-04 11:51 ` [PATCH 07/13] drm/radeon: switch over to drm_exec Christian König
2023-05-04 11:51 ` [PATCH 08/13] drm/qxl: switch to using drm_exec Christian König
2023-06-20  9:13   ` Thomas Zimmermann
2023-06-20  9:15     ` Christian König
2023-05-04 11:51 ` [PATCH 09/13] drm/lima: " Christian König
2023-05-04 11:51 ` [PATCH 10/13] drm/virtgpu: " Christian König
2023-05-04 11:51 ` [PATCH 11/13] drm/panfrost: " Christian König
2023-05-04 11:51 ` [PATCH 12/13] drm/v3d: " Christian König
2023-05-04 11:51 ` [PATCH 13/13] drm: remove drm_gem_(un)lock_reservations Christian König
  -- strict thread matches above, loose matches on Subject: below --
2023-06-12  9:06 [PATCH 06/13] drm/amdgpu: use the new drm_exec object for CS v2 Tatsuyuki Ishi

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.