From patchwork Fri Mar 10 04:32:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9614783 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 73C4160415 for ; Fri, 10 Mar 2017 04:50:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6680D286C0 for ; Fri, 10 Mar 2017 04:50:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B8B9286EF; Fri, 10 Mar 2017 04:50:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0585E286C0 for ; Fri, 10 Mar 2017 04:50:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 632ED6EDA7; Fri, 10 Mar 2017 04:50:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk0-x235.google.com (mail-qk0-x235.google.com [IPv6:2607:f8b0:400d:c09::235]) by gabe.freedesktop.org (Postfix) with ESMTPS id 079AA6EDA0 for ; Fri, 10 Mar 2017 04:49:51 +0000 (UTC) Received: by mail-qk0-x235.google.com with SMTP id v125so149149945qkh.2 for ; Thu, 09 Mar 2017 20:49:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8jp9Pl/mNpCrLhYcroIM+fR3qFQItfyWCXc24OVzu1o=; b=DQx0K1QXDFNPaPI6wYvxkwCNxpOFwfo93FEkT4geY6l793+5UNO/LPQzbTDC9AFgDX JQPMEPMtdHNdAOECTRKgVNN35nVoxht3WhXs24OiujtvFUueiorHVH5TueKTQUFXrdqF CNl8CxCohLwA6QP6F7s/epPSUOcPY7FCJ09EM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8jp9Pl/mNpCrLhYcroIM+fR3qFQItfyWCXc24OVzu1o=; b=NoDYdp4QYbL7wFTn8DMmJeX8qqCi21IUdGhcS4xGzaPQUtL+GAOKxyCxygdq/HJMtz XSn9iFOxbmz8HplmaphpR50G15tL3qJdmelYV7702mGnHowQida6POZkLw4qJlDHbRJF RpsmQXvsma+BzIvHMTGAaF6jEEROol2Yq1Xu0Tefz80GFonOAKFdRk/SEwRkCotUs3jY 5DorHJfNvAJZ+wY8o9vq496tn1D2F9788GRtq8ynfABma6NUHL7bNy4fzqaCyL6b1dk0 tcOCrMHuownXkmNYfC9/e4wGun3eIkTcNFqtP8491TwQOXUTbMO210flxpZS6E7zRlMP Ri+Q== X-Gm-Message-State: AMke39kVS84x9ZWywQ387Jm8vxGAqQiooksDWWKNvt6xj6srGZRLFXBj/S62AT4VuyJWaVcr X-Received: by 10.200.2.175 with SMTP id p47mr18634164qtg.35.1489120933348; Thu, 09 Mar 2017 20:42:13 -0800 (PST) Received: from boxwood.roam.corp.google.com (cpe-75-189-128-87.nc.res.rr.com. [75.189.128.87]) by smtp.gmail.com with ESMTPSA id n19sm5697731qtn.35.2017.03.09.20.42.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Mar 2017 20:42:12 -0800 (PST) From: Sean Paul To: linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: [PATCH 37/41] drm/rockchip: analogix_dp: Wire the shutdown callback to disable PSR Date: Thu, 9 Mar 2017 23:32:52 -0500 Message-Id: <20170310043305.17216-38-seanpaul@chromium.org> X-Mailer: git-send-email 2.12.0.246.ga2ecc84866-goog In-Reply-To: <20170310043305.17216-1-seanpaul@chromium.org> References: <20170310043305.17216-1-seanpaul@chromium.org> Cc: Brian Norris , Tomasz Figa , "Kristian H . Kristensen" , linux-arm-kernel@lists.infradead.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index 0a92d9e3ffac..14f68e792e6f 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -468,6 +468,11 @@ static int rockchip_dp_remove(struct platform_device *pdev) return 0; } +static void rockchip_dp_shutdown(struct platform_device *pdev) +{ + analogix_dp_shutdown(&pdev->dev); +} + static const struct dev_pm_ops rockchip_dp_pm_ops = { #ifdef CONFIG_PM_SLEEP .suspend = analogix_dp_suspend, @@ -499,6 +504,7 @@ MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids); static 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,