search for: dma_resv_assert_held

Displaying 5 results from an estimated 5 matches for "dma_resv_assert_held".

2023 Jul 07
0
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...uva *va) > { > - struct drm_gpuva_manager *mgr = va->mgr; > struct drm_gem_object *obj = va->gem.obj; > > if (unlikely(!obj)) > return; > > - if (drm_gpuva_manager_external_lock(mgr)) > - drm_gpuva_manager_ext_assert_held(mgr); > - else > - dma_resv_assert_held(obj->resv); > + drm_gem_gpuva_assert_lock_held(obj); > > list_add_tail(&va->gem.entry, &obj->gpuva.list); > } > @@ -850,16 +844,12 @@ EXPORT_SYMBOL(drm_gpuva_link); > void > drm_gpuva_unlink(struct drm_gpuva *va) > { > - struct drm_gpuva_man...
2020 Aug 20
0
[PATCH 1/2] drm/ttm: fix broken merge between drm-next and drm-misc-next
...; if (ret) return ret; diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index 9aa4fbe386e6..1ccf1ef050d6 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c @@ -50,6 +50,9 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc) dma_resv_assert_held(bo->base.resv); + if (bo->ttm) + return 0; + if (bdev->need_dma32) page_flags |= TTM_PAGE_FLAG_DMA32; @@ -67,7 +70,6 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc) page_flags |= TTM_PAGE_FLAG_SG; break; default: - bo->ttm = NULL; pr_err("I...
2020 Aug 20
3
Moving LRU handling into Nouveau v2
Hi guys, I already tried this a few month ago, but since I don't have NVidia hardware its rather hard to test for me (need to get some ordered). Dave brought up the topic that we should probably try to move the handling into Nouveau once more, so I tried to fix the problem Ben reported and rebased on top of current drm-misc-next. Dave can you test this? At least in theory the approach
2023 Aug 20
3
[PATCH drm-misc-next 0/3] [RFC] DRM GPUVA Manager GPU-VM features
So far the DRM GPUVA manager offers common infrastructure to track GPU VA allocations and mappings, generically connect GPU VA mappings to their backing buffers and perform more complex mapping operations on the GPU VA space. However, there are more design patterns commonly used by drivers, which can potentially be generalized in order to make the DRM GPUVA manager represent a basic GPU-VM
2023 Jun 29
3
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...GEMs dma_resv lock. + */ +void +drm_gpuva_link(struct drm_gpuva *va) +{ + struct drm_gpuva_manager *mgr = va->mgr; + struct drm_gem_object *obj = va->gem.obj; + + if (unlikely(!obj)) + return; + + if (drm_gpuva_manager_external_lock(mgr)) + drm_gpuva_manager_ext_assert_held(mgr); + else + dma_resv_assert_held(obj->resv); + + list_add_tail(&va->gem.entry, &obj->gpuva.list); +} +EXPORT_SYMBOL(drm_gpuva_link); + +/** + * drm_gpuva_unlink - unlink a &drm_gpuva + * @va: the &drm_gpuva to unlink + * + * This removes the given &va from the GPU VA list of the &drm_gem_object it...