aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0542-drm-vc4-Free-hang-state-before-destroying-BO-cache.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2016-12-02 11:50:26 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2016-12-04 12:32:04 +0100
commit011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e (patch)
treebe53d4f11f7625508ee3aea9889e854ab5b5f263 /target/linux/brcm2708/patches-4.4/0542-drm-vc4-Free-hang-state-before-destroying-BO-cache.patch
parent4257f6548b9480cdb436115b63d5c134c5e91303 (diff)
downloadupstream-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.tar.gz
upstream-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.tar.bz2
upstream-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.zip
brcm2708: update linux 4.4 patches to latest version
As usual these patches were extracted and rebased from the raspberry pi repo: https://github.com/raspberrypi/linux/tree/rpi-4.4.y Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0542-drm-vc4-Free-hang-state-before-destroying-BO-cache.patch')
-rw-r--r--target/linux/brcm2708/patches-4.4/0542-drm-vc4-Free-hang-state-before-destroying-BO-cache.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0542-drm-vc4-Free-hang-state-before-destroying-BO-cache.patch b/target/linux/brcm2708/patches-4.4/0542-drm-vc4-Free-hang-state-before-destroying-BO-cache.patch
new file mode 100644
index 0000000000..1aaedde4fc
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.4/0542-drm-vc4-Free-hang-state-before-destroying-BO-cache.patch
@@ -0,0 +1,29 @@
+From 12588d06f8dca8bfdffae3d7e9c181160c2fbf6e Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Tue, 26 Jul 2016 13:47:13 -0700
+Subject: [PATCH] drm/vc4: Free hang state before destroying BO cache.
+
+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.")
+(cherry picked from commit def96527707e1978a0c88e75d13b082f51460d5c)
+---
+ drivers/gpu/drm/vc4/vc4_gem.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/vc4/vc4_gem.c
++++ b/drivers/gpu/drm/vc4/vc4_gem.c
+@@ -968,8 +968,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);
+ }