All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 214621] WARNING: CPU: 3 PID: 521 at drivers/gpu/drm/ttm/ttm_bo.c:409 ttm_bo_release+0xb64/0xe40 [ttm]
Date: Thu, 04 Nov 2021 08:05:24 +0000	[thread overview]
Message-ID: <bug-214621-2300-Q90x79jymi@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-214621-2300@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=214621

--- Comment #9 from Christian König (christian.koenig@amd.com) ---
(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.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

  parent reply	other threads:[~2021-11-04  8:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04 23:41 [Bug 214621] New: WARNING: CPU: 3 PID: 521 at drivers/gpu/drm/ttm/ttm_bo.c:409 ttm_bo_release+0xb64/0xe40 [ttm] bugzilla-daemon
2021-10-04 23:41 ` [Bug 214621] " bugzilla-daemon
2021-10-20 15:15 ` bugzilla-daemon
2021-10-27  7:12 ` bugzilla-daemon
2021-10-27 13:50 ` bugzilla-daemon
2021-11-01  8:46 ` bugzilla-daemon
2021-11-03 18:01 ` bugzilla-daemon
2021-11-04  7:19 ` bugzilla-daemon
2021-11-04  7:54 ` bugzilla-daemon
2021-11-04  8:05 ` bugzilla-daemon [this message]
2021-11-04 10:09 ` bugzilla-daemon
2021-11-04 10:16 ` bugzilla-daemon
2021-11-04 12:15 ` bugzilla-daemon
2021-11-04 12:39 ` bugzilla-daemon
2021-11-04 13:02 ` bugzilla-daemon
2021-11-04 14:13 ` bugzilla-daemon
2021-11-04 14:17 ` bugzilla-daemon
2021-11-04 14:18 ` bugzilla-daemon
2021-11-12 10:10 ` bugzilla-daemon
2021-11-12 11:08 ` bugzilla-daemon
2021-11-12 12:43 ` bugzilla-daemon
2022-02-17 13:12 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-214621-2300-Q90x79jymi@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.