Home Home > GIT Browse > openSUSE-42.3
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2019-05-20 09:52:10 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2019-05-20 09:52:10 +0200
commit2aebdc3c438590c904d876cd6f8dfab3c5dd42b2 (patch)
treeb8d7859b9478574010a755b808988eaf5eec7391
parent75ec1de5575848167e3b94ebf4ce3a04bbd32006 (diff)
drm/rockchip: shutdown drm subsystem on shutdown (bsc#1106929)
-rw-r--r--patches.fixes/0002-drm-rockchip-shutdown-drm-subsystem-on-shutdown.patch72
-rw-r--r--series.conf1
2 files changed, 73 insertions, 0 deletions
diff --git a/patches.fixes/0002-drm-rockchip-shutdown-drm-subsystem-on-shutdown.patch b/patches.fixes/0002-drm-rockchip-shutdown-drm-subsystem-on-shutdown.patch
new file mode 100644
index 0000000000..634671be21
--- /dev/null
+++ b/patches.fixes/0002-drm-rockchip-shutdown-drm-subsystem-on-shutdown.patch
@@ -0,0 +1,72 @@
+From b8f9d7f37b6af829c34c49d1a4f73ce6ed58e403 Mon Sep 17 00:00:00 2001
+From: Vicente Bergas <vicencb@gmail.com>
+Date: Tue, 2 Apr 2019 13:37:53 +0200
+Subject: drm/rockchip: shutdown drm subsystem on shutdown
+Git-commit: b8f9d7f37b6af829c34c49d1a4f73ce6ed58e403
+Patch-mainline: v5.2-rc1
+References: bsc#1106929
+
+As explained by Robin Murphy:
+> the IOMMU shutdown disables paging, so if the VOP is still
+> scanning out then that will result in whatever IOVAs it was using now going
+> straight out onto the bus as physical addresses.
+
+We had a more radical approach before in commit
+7f3ef5dedb14 ("drm/rockchip: Allow driver to be shutdown on reboot/kexec")
+but that resulted in new warnings and oopses on shutdown on rk3399
+chromeos devices.
+
+So second try is resurrecting Vicentes shutdown change which should
+achieve the same result but in a less drastic way.
+
+Fixes: 63238173b2fa ("Revert "drm/rockchip: Allow driver to be shutdown on reboot/kexec"")
+Cc: Jeffy Chen <jeffy.chen@rock-chips.com>
+Cc: Robin Murphy <robin.murphy@arm.com>
+Cc: Marc Zyngier <marc.zyngier@arm.com>
+Cc: Brian Norris <briannorris@chromium.org>
+Cc: Doug Anderson <dianders@chromium.org>
+Cc: stable@vger.kernel.org
+Suggested-by: JeffyChen <jeffy.chen@rock-chips.com>
+Suggested-by: Robin Murphy <robin.murphy@arm.com>
+Signed-off-by: Vicente Bergas <vicencb@gmail.com>
+[adapted commit message to explain the history]
+Signed-off-by: Heiko Stuebner <heiko@sntech.de>
+Tested-by: Brian Norris <briannorris@chromium.org>
+Tested-by: Douglas Anderson <dianders@chromium.org>
+Acked-by: Marc Zyngier <marc.zyngier@arm.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20190402113753.10118-1-heiko@sntech.de
+Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
+---
+ drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+index 8d7a634c12c2..cb938d3cd3c2 100644
+--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
++++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+@@ -448,6 +448,14 @@ static int rockchip_drm_platform_remove(struct platform_device *pdev)
+ return 0;
+ }
+
++static void rockchip_drm_platform_shutdown(struct platform_device *pdev)
++{
++ struct drm_device *drm = platform_get_drvdata(pdev);
++
++ if (drm)
++ drm_atomic_helper_shutdown(drm);
++}
++
+ static const struct of_device_id rockchip_drm_dt_ids[] = {
+ { .compatible = "rockchip,display-subsystem", },
+ { /* sentinel */ },
+@@ -457,6 +465,7 @@ MODULE_DEVICE_TABLE(of, rockchip_drm_dt_ids);
+ static struct platform_driver rockchip_drm_platform_driver = {
+ .probe = rockchip_drm_platform_probe,
+ .remove = rockchip_drm_platform_remove,
++ .shutdown = rockchip_drm_platform_shutdown,
+ .driver = {
+ .name = "rockchip-drm",
+ .of_match_table = rockchip_drm_dt_ids,
+--
+2.21.0
+
diff --git a/series.conf b/series.conf
index c5814fa9e8..a4c08219aa 100644
--- a/series.conf
+++ b/series.conf
@@ -25346,6 +25346,7 @@
patches.fixes/ipmi-ssif-compare-block-number-correctly-for-multi-p.patch
patches.fixes/0001-drm-i915-Fix-I915_EXEC_RING_MASK.patch
patches.fixes/0002-drm-fb-helper-dpms_legacy-Only-set-on-connectors-in-.patch
+ patches.fixes/0002-drm-rockchip-shutdown-drm-subsystem-on-shutdown.patch
patches.arch/powerpc-numa-improve-control-of-topology-updates.patch
patches.arch/powerpc-numa-document-topology_updates_enabled-disab.patch
patches.drivers/iommu-vt-d-don-t-request-page-request-irq-under-dmar_global_lock