Re: [PATCH v4 09/21] drm/etnaviv: Prepare to dynamic dma-buf locking specification
To whoom it may belong: Deepest sorrow to inform you that my husband Helmut passed by on July 21. This access will be cleared in a view days. Irene Ursprüngliche Nachricht Von: Christian König Datum: 01.09.22 08:50 (GMT+01:00) An: Dmitry Osipenko , David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gert Wollny , Gustavo Padovan , Daniel Stone , Tomeu Vizoso , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Clark , Sumit Semwal , "Pan, Xinhui" , Thierry Reding , Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Alex Deucher , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Thomas Hellström , Qiang Yu , Srinivas Kandagatla , Amol Maheshwari , Jason Gunthorpe , Leon Romanovsky , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Tomi Valkeinen , Russell King , Lucas Stach , Christian Gmeiner Cc: dri-de...@lists.freedesktop.org, linux-ker...@vger.kernel.org, Dmitry Osipenko , linux-me...@vger.kernel.org, linaro-mm-...@lists.linaro.org, amd-gfx@lists.freedesktop.org, intel-...@lists.freedesktop.org, ker...@collabora.com, virtualizat...@lists.linux-foundation.org, linux-r...@vger.kernel.org, linux-arm-...@vger.kernel.org Betreff: Re: [PATCH v4 09/21] drm/etnaviv: Prepare to dynamic dma-buf locking specification Am 31.08.22 um 17:37 schrieb Dmitry Osipenko:> Prepare Etnaviv driver to the common dynamic dma-buf locking convention> by starting to use the unlocked versions of dma-buf API functions.>> Signed-off-by: Dmitry Osipenko Interesting, where is the matching vmap()?Anyway, this patch is Acked-by: Christian König > ---> drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +-> 1 file changed, 1 insertion(+), 1 deletion(-)>> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c> index 3fa2da149639..7031db145a77 100644> --- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c> @@ -65,7 +65,7 @@ static void etnaviv_gem_prime_release(struct etnaviv_gem_object *etnaviv_obj)> struct iosys_map map = IOSYS_MAP_INIT_VADDR(etnaviv_obj->vaddr);> > if (etnaviv_obj->vaddr)> - dma_buf_vunmap(etnaviv_obj->base.import_attach->dmabuf, &map);> + dma_buf_vunmap_unlocked(etnaviv_obj->base.import_attach->dmabuf, &map);> > /* Don't drop the pages for imported dmabuf, as they are not> * ours, just free the array we allocated:
Re: [PATCH v4 09/21] drm/etnaviv: Prepare to dynamic dma-buf locking specification
On 9/1/22 09:50, Christian König wrote: > Am 31.08.22 um 17:37 schrieb Dmitry Osipenko: >> Prepare Etnaviv driver to the common dynamic dma-buf locking convention >> by starting to use the unlocked versions of dma-buf API functions. >> >> Signed-off-by: Dmitry Osipenko > > Interesting, where is the matching vmap()? > > Anyway, this patch is Acked-by: Christian König Etnaviv maps GEM only once and then unmaps it when GEM is destroyed. The dma-buf vmapping should happen under the reservation lock, hence only the release function needs to be changed to the unlocked variant. Lucas/Christian(Gmeiner), could you please check that I haven't missed anything? >> --- >> drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c >> b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c >> index 3fa2da149639..7031db145a77 100644 >> --- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c >> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c >> @@ -65,7 +65,7 @@ static void etnaviv_gem_prime_release(struct >> etnaviv_gem_object *etnaviv_obj) >> struct iosys_map map = IOSYS_MAP_INIT_VADDR(etnaviv_obj->vaddr); >> if (etnaviv_obj->vaddr) >> - dma_buf_vunmap(etnaviv_obj->base.import_attach->dmabuf, &map); >> + >> dma_buf_vunmap_unlocked(etnaviv_obj->base.import_attach->dmabuf, &map); >> /* Don't drop the pages for imported dmabuf, as they are not >> * ours, just free the array we allocated: > -- Best regards, Dmitry
Re: [PATCH v4 09/21] drm/etnaviv: Prepare to dynamic dma-buf locking specification
Am 31.08.22 um 17:37 schrieb Dmitry Osipenko: Prepare Etnaviv driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Signed-off-by: Dmitry Osipenko Interesting, where is the matching vmap()? Anyway, this patch is Acked-by: Christian König --- drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c index 3fa2da149639..7031db145a77 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c @@ -65,7 +65,7 @@ static void etnaviv_gem_prime_release(struct etnaviv_gem_object *etnaviv_obj) struct iosys_map map = IOSYS_MAP_INIT_VADDR(etnaviv_obj->vaddr); if (etnaviv_obj->vaddr) - dma_buf_vunmap(etnaviv_obj->base.import_attach->dmabuf, &map); + dma_buf_vunmap_unlocked(etnaviv_obj->base.import_attach->dmabuf, &map); /* Don't drop the pages for imported dmabuf, as they are not * ours, just free the array we allocated: