From: Eric Anholt <eric@anholt.net>
To: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 4/6] drm/vc4: Free hang state before destroying BO cache.
Date: Tue, 26 Jul 2016 13:47:13 -0700 [thread overview]
Message-ID: <1469566035-22006-5-git-send-email-eric@anholt.net> (raw)
In-Reply-To: <1469566035-22006-1-git-send-email-eric@anholt.net>
The BO cache will complain if BOs are still allocated when we try to
destroy it (since freeing those BOs would try to hit the cache). You
could hit this if you were to unload the module after a GPU hang.
Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 214613656b51 ("drm/vc4: Add an interface for capturing the GPU state after a hang.")
---
drivers/gpu/drm/vc4/vc4_gem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
index fb2b1c526646..3f60036834e0 100644
--- a/drivers/gpu/drm/vc4/vc4_gem.c
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
@@ -947,8 +947,8 @@ vc4_gem_destroy(struct drm_device *dev)
vc4->overflow_mem = NULL;
}
- vc4_bo_cache_destroy(dev);
-
if (vc4->hang_state)
vc4_free_hang_state(dev, vc4->hang_state);
+
+ vc4_bo_cache_destroy(dev);
}
--
2.8.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-07-26 20:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-26 20:47 [PATCH 0/6] vc4 miscellaneous v3d fixes Eric Anholt
2016-07-26 20:47 ` [PATCH 1/6] drm/vc4: Use drm_free_large() on handles to match its allocation Eric Anholt
2016-07-26 20:47 ` [PATCH 2/6] drm/vc4: Use drm_malloc_ab to fix large rendering jobs Eric Anholt
2016-07-26 20:47 ` [PATCH 3/6] drm/vc4: Fix handling of a pm_runtime_get_sync() success case Eric Anholt
2016-07-26 20:47 ` Eric Anholt [this message]
2016-07-26 20:47 ` [PATCH 5/6] drm/vc4: Fix overflow mem unreferencing when the binner runs dry Eric Anholt
2016-07-26 21:10 ` Rob Clark
2016-07-26 23:11 ` Eric Anholt
2016-07-26 23:37 ` Rob Clark
2016-07-27 5:37 ` Eric Anholt
2016-07-27 11:18 ` Rob Clark
2016-07-26 20:47 ` [PATCH 6/6] drm/vc4: Fix oops when userspace hands in a bad BO Eric Anholt
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=1469566035-22006-5-git-send-email-eric@anholt.net \
--to=eric@anholt.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox