]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2019 12:42:56 +0000 (14:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2019 12:42:56 +0000 (14:42 +0200)
added patches:
drm-rockchip-shutdown-drm-subsystem-on-shutdown.patch
drm-vmwgfx-don-t-send-drm-sysfs-hotplug-events-on-initial-master-set.patch

queue-4.9/drm-rockchip-shutdown-drm-subsystem-on-shutdown.patch [new file with mode: 0644]
queue-4.9/drm-vmwgfx-don-t-send-drm-sysfs-hotplug-events-on-initial-master-set.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/drm-rockchip-shutdown-drm-subsystem-on-shutdown.patch b/queue-4.9/drm-rockchip-shutdown-drm-subsystem-on-shutdown.patch
new file mode 100644 (file)
index 0000000..c355b44
--- /dev/null
@@ -0,0 +1,69 @@
+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
+
+From: Vicente Bergas <vicencb@gmail.com>
+
+commit b8f9d7f37b6af829c34c49d1a4f73ce6ed58e403 upstream.
+
+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
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/rockchip/rockchip_drm_drv.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
++++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+@@ -478,6 +478,14 @@ static int rockchip_drm_platform_remove(
+       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 */ },
+@@ -487,6 +495,7 @@ MODULE_DEVICE_TABLE(of, rockchip_drm_dt_
+ 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,
diff --git a/queue-4.9/drm-vmwgfx-don-t-send-drm-sysfs-hotplug-events-on-initial-master-set.patch b/queue-4.9/drm-vmwgfx-don-t-send-drm-sysfs-hotplug-events-on-initial-master-set.patch
new file mode 100644 (file)
index 0000000..2d9038e
--- /dev/null
@@ -0,0 +1,40 @@
+From 63cb44441826e842b7285575b96db631cc9f2505 Mon Sep 17 00:00:00 2001
+From: Thomas Hellstrom <thellstrom@vmware.com>
+Date: Tue, 7 May 2019 11:07:53 +0200
+Subject: drm/vmwgfx: Don't send drm sysfs hotplug events on initial master set
+
+From: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 63cb44441826e842b7285575b96db631cc9f2505 upstream.
+
+This may confuse user-space clients like plymouth that opens a drm
+file descriptor as a result of a hotplug event and then generates a
+new event...
+
+Cc: <stable@vger.kernel.org>
+Fixes: 5ea1734827bb ("drm/vmwgfx: Send a hotplug event at master_set")
+Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+Reviewed-by: Deepak Rawat <drawat@vmware.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/vmwgfx/vmwgfx_drv.c |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+@@ -1245,7 +1245,13 @@ static int vmw_master_set(struct drm_dev
+       }
+       dev_priv->active_master = vmaster;
+-      drm_sysfs_hotplug_event(dev);
++
++      /*
++       * Inform a new master that the layout may have changed while
++       * it was gone.
++       */
++      if (!from_open)
++              drm_sysfs_hotplug_event(dev);
+       return 0;
+ }
index fd2ac9de58e15436ba6757dc188b2cc334461ce8..b30551eed28804f4d25d9d797e8cee4ca7563312 100644 (file)
@@ -45,3 +45,5 @@ docs-fix-conf.py-for-sphinx-2.0.patch
 staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch
 cifs-cifs_read_allocate_pages-don-t-iterate-through-whole-page-array-on-enomem.patch
 gcc-plugins-fix-build-failures-under-darwin-host.patch
+drm-vmwgfx-don-t-send-drm-sysfs-hotplug-events-on-initial-master-set.patch
+drm-rockchip-shutdown-drm-subsystem-on-shutdown.patch