aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0286-drm-vc4-Fix-spurious-GPU-resets-due-to-BO-reuse.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2016-07-07 09:22:07 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2016-07-09 16:29:18 +0200
commit20402106a376dcc4a766d3b0cee801ce29ba76d5 (patch)
treecfd93c19a6766663c4e8537ca8b8b82ad50478ee /target/linux/brcm2708/patches-4.4/0286-drm-vc4-Fix-spurious-GPU-resets-due-to-BO-reuse.patch
parentf1765277bacbea47a45ed913ca8fa043e9f71393 (diff)
downloadupstream-20402106a376dcc4a766d3b0cee801ce29ba76d5.tar.gz
upstream-20402106a376dcc4a766d3b0cee801ce29ba76d5.tar.bz2
upstream-20402106a376dcc4a766d3b0cee801ce29ba76d5.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/0286-drm-vc4-Fix-spurious-GPU-resets-due-to-BO-reuse.patch')
-rw-r--r--target/linux/brcm2708/patches-4.4/0286-drm-vc4-Fix-spurious-GPU-resets-due-to-BO-reuse.patch81
1 files changed, 0 insertions, 81 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0286-drm-vc4-Fix-spurious-GPU-resets-due-to-BO-reuse.patch b/target/linux/brcm2708/patches-4.4/0286-drm-vc4-Fix-spurious-GPU-resets-due-to-BO-reuse.patch
deleted file mode 100644
index 367bb562d0..0000000000
--- a/target/linux/brcm2708/patches-4.4/0286-drm-vc4-Fix-spurious-GPU-resets-due-to-BO-reuse.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From cc502edf8c0515a8b3c410d4bfda002a4db88e4f Mon Sep 17 00:00:00 2001
-From: Eric Anholt <eric@anholt.net>
-Date: Mon, 8 Feb 2016 11:19:14 -0800
-Subject: [PATCH 286/381] drm/vc4: Fix spurious GPU resets due to BO reuse.
-
-We were tracking the "where are the head pointers pointing" globally,
-so if another job reused the same BOs and execution was at the same
-point as last time we checked, we'd stop and trigger a reset even
-though the GPU had made progress.
-
-Signed-off-by: Eric Anholt <eric@anholt.net>
-(cherry picked from commit c4ce60dc30912df09b2438f1e5594eae1ef64d1e)
----
- drivers/gpu/drm/vc4/vc4_drv.h | 6 +++++-
- drivers/gpu/drm/vc4/vc4_gem.c | 19 ++++++++++++++-----
- 2 files changed, 19 insertions(+), 6 deletions(-)
-
---- a/drivers/gpu/drm/vc4/vc4_drv.h
-+++ b/drivers/gpu/drm/vc4/vc4_drv.h
-@@ -93,7 +93,6 @@ struct vc4_dev {
- struct work_struct overflow_mem_work;
-
- struct {
-- uint32_t last_ct0ca, last_ct1ca;
- struct timer_list timer;
- struct work_struct reset_work;
- } hangcheck;
-@@ -203,6 +202,11 @@ struct vc4_exec_info {
- /* Sequence number for this bin/render job. */
- uint64_t seqno;
-
-+ /* Last current addresses the hardware was processing when the
-+ * hangcheck timer checked on us.
-+ */
-+ uint32_t last_ct0ca, last_ct1ca;
-+
- /* Kernel-space copy of the ioctl arguments */
- struct drm_vc4_submit_cl *args;
-
---- a/drivers/gpu/drm/vc4/vc4_gem.c
-+++ b/drivers/gpu/drm/vc4/vc4_gem.c
-@@ -271,10 +271,17 @@ vc4_hangcheck_elapsed(unsigned long data
- struct drm_device *dev = (struct drm_device *)data;
- struct vc4_dev *vc4 = to_vc4_dev(dev);
- uint32_t ct0ca, ct1ca;
-+ unsigned long irqflags;
-+ struct vc4_exec_info *exec;
-+
-+ spin_lock_irqsave(&vc4->job_lock, irqflags);
-+ exec = vc4_first_job(vc4);
-
- /* If idle, we can stop watching for hangs. */
-- if (list_empty(&vc4->job_list))
-+ if (!exec) {
-+ spin_unlock_irqrestore(&vc4->job_lock, irqflags);
- return;
-+ }
-
- ct0ca = V3D_READ(V3D_CTNCA(0));
- ct1ca = V3D_READ(V3D_CTNCA(1));
-@@ -282,14 +289,16 @@ vc4_hangcheck_elapsed(unsigned long data
- /* If we've made any progress in execution, rearm the timer
- * and wait.
- */
-- if (ct0ca != vc4->hangcheck.last_ct0ca ||
-- ct1ca != vc4->hangcheck.last_ct1ca) {
-- vc4->hangcheck.last_ct0ca = ct0ca;
-- vc4->hangcheck.last_ct1ca = ct1ca;
-+ if (ct0ca != exec->last_ct0ca || ct1ca != exec->last_ct1ca) {
-+ exec->last_ct0ca = ct0ca;
-+ exec->last_ct1ca = ct1ca;
-+ spin_unlock_irqrestore(&vc4->job_lock, irqflags);
- vc4_queue_hangcheck(dev);
- return;
- }
-
-+ spin_unlock_irqrestore(&vc4->job_lock, irqflags);
-+
- /* We've gone too long with no progress, reset. This has to
- * be done from a work struct, since resetting can sleep and
- * this timer hook isn't allowed to.