From: Greg Kroah-Hartman Date: Thu, 17 Nov 2016 09:45:35 +0000 (+0100) Subject: 4.8-stable patches X-Git-Tag: v4.4.33~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8fd2fc8618192d6b2bbd3523e5b212ab7e9f0268;p=thirdparty%2Fkernel%2Fstable-queue.git 4.8-stable patches 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 --- 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 index 00000000000..f102dec625c --- /dev/null +++ b/queue-4.8/drm-amdgpu-fix-a-vm_flush-fence-leak.patch @@ -0,0 +1,35 @@ +From 2d7c17be00e0dce3bc1a092a2c277a9f86c69ca9 Mon Sep 17 00:00:00 2001 +From: Grazvydas Ignotas +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 + +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 +Reviewed-by: Christian König +Signed-off-by: Grazvydas Ignotas +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..bd30ff90d0c --- /dev/null +++ b/queue-4.8/drm-amdgpu-fix-fence-slab-teardown.patch @@ -0,0 +1,42 @@ +From 0f10425e811355986907c54f7d1d06703e406092 Mon Sep 17 00:00:00 2001 +From: Grazvydas Ignotas +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 + +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 +Reviewed-by: Christian König +Signed-off-by: Grazvydas Ignotas +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..3db8c12aafb --- /dev/null +++ b/queue-4.8/drm-i915-fix-mismatched-init-power-domain-disabling-during-suspend.patch @@ -0,0 +1,56 @@ +From fd58753ead86ee289ea89fe26e1842f36e54b36c Mon Sep 17 00:00:00 2001 +From: Imre Deak +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 + +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ä +Cc: David Weinehall +Signed-off-by: Imre Deak +Reviewed-by: Ville Syrjälä +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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; + /* diff --git a/queue-4.8/series b/queue-4.8/series index ce119666517..75c674610ef 100644 --- a/queue-4.8/series +++ b/queue-4.8/series @@ -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