Skip to content
Snippets Groups Projects
Commit 7f3ef5de authored by Marc Zyngier's avatar Marc Zyngier Committed by Heiko Stuebner
Browse files

drm/rockchip: Allow driver to be shutdown on reboot/kexec


Leaving the DRM driver enabled on reboot or kexec has the annoying
effect of leaving the display generating transactions whilst the
IOMMU has been shut down.

In turn, the IOMMU driver (which shares its interrupt line with
the VOP) starts warning either on shutdown or when entering the
secondary kernel in the kexec case (nothing is expected on that
front).

A cheap way of ensuring that things are nicely shut down is to
register a shutdown callback in the platform driver.

Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Tested-by: default avatarVicente Bergas <vicencb@gmail.com>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20180805124807.18169-1-marc.zyngier@arm.com
Cc: stable@vger.kernel.org
parent c10802b6
No related branches found
No related tags found
No related merge requests found
...@@ -448,6 +448,11 @@ static int rockchip_drm_platform_remove(struct platform_device *pdev) ...@@ -448,6 +448,11 @@ static int rockchip_drm_platform_remove(struct platform_device *pdev)
return 0; return 0;
} }
static void rockchip_drm_platform_shutdown(struct platform_device *pdev)
{
rockchip_drm_platform_remove(pdev);
}
static const struct of_device_id rockchip_drm_dt_ids[] = { static const struct of_device_id rockchip_drm_dt_ids[] = {
{ .compatible = "rockchip,display-subsystem", }, { .compatible = "rockchip,display-subsystem", },
{ /* sentinel */ }, { /* sentinel */ },
...@@ -457,6 +462,7 @@ MODULE_DEVICE_TABLE(of, rockchip_drm_dt_ids); ...@@ -457,6 +462,7 @@ MODULE_DEVICE_TABLE(of, rockchip_drm_dt_ids);
static struct platform_driver rockchip_drm_platform_driver = { static struct platform_driver rockchip_drm_platform_driver = {
.probe = rockchip_drm_platform_probe, .probe = rockchip_drm_platform_probe,
.remove = rockchip_drm_platform_remove, .remove = rockchip_drm_platform_remove,
.shutdown = rockchip_drm_platform_shutdown,
.driver = { .driver = {
.name = "rockchip-drm", .name = "rockchip-drm",
.of_match_table = rockchip_drm_dt_ids, .of_match_table = rockchip_drm_dt_ids,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment