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: 9614723 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 DD9F260415 for ; Fri, 10 Mar 2017 04:43:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF6D728678 for ; Fri, 10 Mar 2017 04:43:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C409E286F3; Fri, 10 Mar 2017 04:43:01 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8426C28678 for ; Fri, 10 Mar 2017 04:43:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Q6vxA02bMtsIfgGzV4WPKPv6Qf4+NGeP7kEiIpnZ+IU=; b=WODr2bt+ew1BfSEgQq6QPAejDH WReofHc1HBN3MWq4MuwKQWiuGg0ox251GksJrSG6tjp2UPQGqhZjix2MpluHIv7kJarXUmj1doacJ uu3bkjldPu56w2B5tIXhX59DGYt11YWg3iO2NZFUqOsL2iJm1/RnUD3X8dT64hxTpNJ/koKlXD/PS +D9tqQYkEtFWc5KY8wG87PvgKGdiF2OlfJu+f08vTfiTSBAN+6UNUUySNpPZooJRUfW59YeMOfziC SvnOYcyWYj8+T1cipoi5AkbBc811IYeiip2I0QVReRQIu4/GcUtQRmpW4iLZhFkBXrn7X9ObbH2Pc 7WkbXTBA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cmCOK-0005hI-T8; Fri, 10 Mar 2017 04:43:00 +0000 Received: from mail-qk0-x231.google.com ([2607:f8b0:400d:c09::231]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cmCNu-0005Do-7Z for linux-arm-kernel@lists.infradead.org; Fri, 10 Mar 2017 04:42:39 +0000 Received: by mail-qk0-x231.google.com with SMTP id y76so152275423qkb.0 for ; Thu, 09 Mar 2017 20:42:14 -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=k8nVTgo3GZiY0U1E/UCn/iymuQN2p9iVHk3fcZGlS5J7zOuTDB7s95N+mH/MRJBf8b wk+aLE+hiZdJQjU8mLq4GJIKA9D5/aYfYG95ek30b7GcBIwF1ZTuTJI0F1p6ybbDHI9b +Bu8TJDw5PA5BuRiOHnFIoAjzJEoBJ+/+GAAtJaxvdypWnVmnviLHUvMBkpx53WF58/7 8RXhy6rysLSwA2h0Z42Q1XabTOVSTT5DFhYiQH6nFIh0EblzREGNSk0yDaQlWw1a4C8M 1c4eHWJvdvEmmyXnuU5UhR4SI4yxsdXkXOjtmAXsDDIMT4VMD74NaOFpLZ2281eTVwlv R+gQ== X-Gm-Message-State: AMke39lTbJ4/IbR11cd353XMyxMUiJMJyZ3bfMuhWW+z1xguehU3/Pa4E6hTiYmdEiKzpg29 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170309_204234_449196_3C99DC75 X-CRM114-Status: GOOD ( 10.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , David Airlie , Brian Norris , Tomasz Figa , Sean Paul , "Kristian H . Kristensen" , linux-arm-kernel@lists.infradead.org, Mark Yao MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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,