https://bugzilla.kernel.org/show_bug.cgi?id=214621 --- Comment #10 from Lang Yu (Lang.Yu@xxxxxxx) --- (In reply to Christian König from comment #9) > (In reply to Lang Yu from comment #8) > > (In reply to Christian König from comment #7) > > > Yeah, that won't work. As far as I can see the problem is not inside > > amdgpu, > > > but rather inside the driver which is importing buffers from amdgpu. > > > > At least, we should call drm_prime_gem_destroy() to detach dma-buf(if > > exists) before WARN_ON_ONCE(bo->pin_count). > > Nope, that's incorrect. You are mixing things up here. > > This is for the case when amdgpu imports a buffer, but the warning happens > when amdgpu exports a buffer. > > And on import you indeed only want to drop the attachment after the BO is > really destroyed or not when the GEM handle is destroyed. Otherwise you > could potentially unmap memory while it is still used by the hardware. > > > And do you think if clients don't unmap/detach amdgpu dma-buf properly, > > should amdgpu do that work? Thanks! > > No. That rather looks like the importer is messing up some reference count > and forgets to destroy the attachment before the dma-buf. There is > absolutely nothing the exporter can do in that situation. > > There is the slightly chance that the bug is indeed somewhere inside amdgpu > or the dma-buf framework itself (Michel and I are huntin a similar issue at > the moment), but it does work with other driver combinations. Thanks for your clarification. Seems hard to reproduce the issue. -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.