Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030231AbeAORV2 (ORCPT + 1 other); Mon, 15 Jan 2018 12:21:28 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:57864 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967013AbeAORRR (ORCPT ); Mon, 15 Jan 2018 12:17:17 -0500 From: Thierry Escande To: Archit Taneja , Inki Dae , Thierry Reding , Sandy Huang , Sean Paul , David Airlie Cc: Tomasz Figa , Haixia Shi , =?UTF-8?q?=C3=98rjan=20Eide?= , zain wang , Yakir Yang , Lin Huang , Douglas Anderson , Mark Yao , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: [PATCH 33/40] drm/rockchip: analogix_dp: Wire the shutdown callback to disable PSR Date: Mon, 15 Jan 2018 18:16:07 +0100 Message-Id: <20180115171614.14474-34-thierry.escande@collabora.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180115171614.14474-1-thierry.escande@collabora.com> References: <20180115171614.14474-1-thierry.escande@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset = "utf-8" Content-Transfert-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Tomasz Figa We have to disable PSR before shutdown to avoid any asynchronous PSR code to interfere with Rockchip DRM device shutdown. We use the recently added analogix_dp_shutdown() function and rockchip_dp_cleanup() we already use for unregistering PSR at unbind time. Cc: Kristian H. Kristensen Cc: Brian Norris Signed-off-by: Tomasz Figa Signed-off-by: Sean Paul Signed-off-by: Thierry Escande --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index 8c884f9ce713..bd2ff2c429e9 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -415,6 +415,13 @@ static int rockchip_dp_resume(struct device *dev) } #endif +static void rockchip_dp_shutdown(struct platform_device *pdev) +{ + struct rockchip_dp_device *dp = dev_get_drvdata(&pdev->dev); + + analogix_dp_shutdown(dp->adp); +} + static const struct dev_pm_ops rockchip_dp_pm_ops = { #ifdef CONFIG_PM_SLEEP .suspend = rockchip_dp_suspend, @@ -446,6 +453,7 @@ MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids); struct platform_driver rockchip_dp_driver = { .probe = rockchip_dp_probe, .remove = rockchip_dp_remove, + .shutdown = rockchip_dp_shutdown, .driver = { .name = "rockchip-dp", .pm = &rockchip_dp_pm_ops, -- 2.14.1