Message ID | 20220124130328.2376-7-christian.koenig@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/11] drm/radeon: use ttm_resource_manager_debug | expand |
On 1/24/22 14:03, Christian König wrote: > Drivers should not add containers as shared fences to the dma_resv > object, instead each fence should be added individually. > > Signed-off-by: Christian König <christian.koenig@amd.com> > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Is there any indication that this triggers on existing drivers? Thomas
Am 24.01.22 um 17:36 schrieb Thomas Hellström (Intel): > > On 1/24/22 14:03, Christian König wrote: >> Drivers should not add containers as shared fences to the dma_resv >> object, instead each fence should be added individually. >> >> Signed-off-by: Christian König <christian.koenig@amd.com> >> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> > > Is there any indication that this triggers on existing drivers? There used to be a case in amdgpu which triggered this, but at least I'm not aware of any in the current code. Christian. > > Thomas > >
diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c index 6dd9a40b55d4..e8a0c1d51da2 100644 --- a/drivers/dma-buf/dma-resv.c +++ b/drivers/dma-buf/dma-resv.c @@ -256,6 +256,11 @@ void dma_resv_add_shared_fence(struct dma_resv *obj, struct dma_fence *fence) dma_resv_assert_held(obj); + /* Drivers should not add containers here, instead add each fence + * individually. + */ + WARN_ON(dma_fence_is_container(fence)); + fobj = dma_resv_shared_list(obj); count = fobj->shared_count;