]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.8-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Nov 2016 09:45:35 +0000 (10:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Nov 2016 09:45:35 +0000 (10:45 +0100)
added patches:
drm-amdgpu-fix-a-vm_flush-fence-leak.patch
drm-amdgpu-fix-fence-slab-teardown.patch
drm-i915-fix-mismatched-init-power-domain-disabling-during-suspend.patch

queue-4.8/drm-amdgpu-fix-a-vm_flush-fence-leak.patch [new file with mode: 0644]
queue-4.8/drm-amdgpu-fix-fence-slab-teardown.patch [new file with mode: 0644]
queue-4.8/drm-i915-fix-mismatched-init-power-domain-disabling-during-suspend.patch [new file with mode: 0644]
queue-4.8/series

diff --git a/queue-4.8/drm-amdgpu-fix-a-vm_flush-fence-leak.patch b/queue-4.8/drm-amdgpu-fix-a-vm_flush-fence-leak.patch
new file mode 100644 (file)
index 0000000..f102dec
--- /dev/null
@@ -0,0 +1,35 @@
+From 2d7c17be00e0dce3bc1a092a2c277a9f86c69ca9 Mon Sep 17 00:00:00 2001
+From: Grazvydas Ignotas <notasas@gmail.com>
+Date: Sun, 23 Oct 2016 21:31:45 +0300
+Subject: drm/amdgpu: fix a vm_flush fence leak
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Grazvydas Ignotas <notasas@gmail.com>
+
+commit 2d7c17be00e0dce3bc1a092a2c277a9f86c69ca9 upstream.
+
+Looks like .last_flush reference is left at teardown.
+Leak reported by CONFIG_SLUB_DEBUG.
+
+Fixes: 41d9eb2c5a2a ("drm/amdgpu: add a fence after the VM flush")
+Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+@@ -1654,5 +1654,6 @@ void amdgpu_vm_manager_fini(struct amdgp
+               fence_put(adev->vm_manager.ids[i].first);
+               amdgpu_sync_free(&adev->vm_manager.ids[i].active);
+               fence_put(id->flushed_updates);
++              fence_put(id->last_flush);
+       }
+ }
diff --git a/queue-4.8/drm-amdgpu-fix-fence-slab-teardown.patch b/queue-4.8/drm-amdgpu-fix-fence-slab-teardown.patch
new file mode 100644 (file)
index 0000000..bd30ff9
--- /dev/null
@@ -0,0 +1,42 @@
+From 0f10425e811355986907c54f7d1d06703e406092 Mon Sep 17 00:00:00 2001
+From: Grazvydas Ignotas <notasas@gmail.com>
+Date: Sun, 23 Oct 2016 21:31:43 +0300
+Subject: drm/amdgpu: fix fence slab teardown
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Grazvydas Ignotas <notasas@gmail.com>
+
+commit 0f10425e811355986907c54f7d1d06703e406092 upstream.
+
+To free fences, call_rcu() is used, which calls amdgpu_fence_free()
+after a grace period. During teardown, there is no guarantee all
+callbacks have finished, so amdgpu_fence_slab may be destroyed before
+all fences have been freed. If we are lucky, this results in some slab
+warnings, if not, we get a crash in one of rcu threads because callback
+is called after amdgpu has already been unloaded.
+
+Fix it with a rcu_barrier().
+
+Fixes: b44135351a3a ("drm/amdgpu: RCU protected amdgpu_fence_release")
+Acked-by: Chunming Zhou <david1.zhou@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+@@ -68,6 +68,7 @@ int amdgpu_fence_slab_init(void)
+ void amdgpu_fence_slab_fini(void)
+ {
++      rcu_barrier();
+       kmem_cache_destroy(amdgpu_fence_slab);
+ }
+ /*
diff --git a/queue-4.8/drm-i915-fix-mismatched-init-power-domain-disabling-during-suspend.patch b/queue-4.8/drm-i915-fix-mismatched-init-power-domain-disabling-during-suspend.patch
new file mode 100644 (file)
index 0000000..3db8c12
--- /dev/null
@@ -0,0 +1,56 @@
+From fd58753ead86ee289ea89fe26e1842f36e54b36c Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@intel.com>
+Date: Thu, 13 Oct 2016 14:34:06 +0300
+Subject: drm/i915: Fix mismatched INIT power domain disabling during suspend
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Imre Deak <imre.deak@intel.com>
+
+commit fd58753ead86ee289ea89fe26e1842f36e54b36c upstream.
+
+Currently the display INIT power domain disabling/enabling happens in a
+mismatched way in the suspend/resume_early hooks respectively. This can
+leave display power wells incorrectly disabled in the resume hook if the
+suspend sequence is aborted for some reason resulting in the
+suspend/resume hooks getting called but the suspend_late/resume_early
+hooks being skipped. In particular this change fixes "Unclaimed read
+from register 0x1e1204" on BYT/BSW triggered from i915_drm_resume()->
+intel_pps_unlock_regs_wa() when suspending with /sys/power/pm_test set
+to devices.
+
+Fixes: 85e90679335f ("drm/i915: disable power wells on suspend")
+Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Cc: David Weinehall <david.weinehall@intel.com>
+Signed-off-by: Imre Deak <imre.deak@intel.com>
+Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Link: http://patchwork.freedesktop.org/patch/msgid/1476358446-11621-1-git-send-email-imre.deak@intel.com
+(cherry picked from commit 4c494a5769cd0de92638b25960ba0158c36088a6)
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/i915_drv.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/i915/i915_drv.c
++++ b/drivers/gpu/drm/i915/i915_drv.c
+@@ -1490,8 +1490,6 @@ static int i915_drm_suspend(struct drm_d
+       dev_priv->suspend_count++;
+-      intel_display_set_init_power(dev_priv, false);
+-
+       intel_csr_ucode_suspend(dev_priv);
+ out:
+@@ -1508,6 +1506,8 @@ static int i915_drm_suspend_late(struct
+       disable_rpm_wakeref_asserts(dev_priv);
++      intel_display_set_init_power(dev_priv, false);
++
+       fw_csr = !IS_BROXTON(dev_priv) &&
+               suspend_to_idle(dev_priv) && dev_priv->csr.dmc_payload;
+       /*
index ce11966651714af404c081cee3d7ab4e3302093c..75c674610eff44f2ec1a5143cc65c09f777e1c82 100644 (file)
@@ -86,3 +86,6 @@ mmc-mxs-initialize-the-spinlock-prior-to-using-it.patch
 memcg-prevent-memcg-caches-to-be-both-off_slab-objfreelist_slab.patch
 libceph-fix-legacy-layout-decode-with-pool-0.patch
 nfsv4.1-work-around-wmaybe-uninitialized-warning.patch
+drm-amdgpu-fix-fence-slab-teardown.patch
+drm-amdgpu-fix-a-vm_flush-fence-leak.patch
+drm-i915-fix-mismatched-init-power-domain-disabling-during-suspend.patch