From patchwork Mon Jun 6 14:53:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 9158511 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 60E9360572 for ; Mon, 6 Jun 2016 14:56:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5194925D91 for ; Mon, 6 Jun 2016 14:56:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4528E2821F; Mon, 6 Jun 2016 14:56:02 +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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 53BE025D91 for ; Mon, 6 Jun 2016 14:56:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b9vvA-0005mg-34; Mon, 06 Jun 2016 14:54:28 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b9vv1-0005jA-Mi; Mon, 06 Jun 2016 14:54:21 +0000 Received: by mail-wm0-x244.google.com with SMTP id n184so17135962wmn.1; Mon, 06 Jun 2016 07:53:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=rl5qLUTjKvq4UEbdmmDfVdQXpcX1s9zaapkVFYBEnrI=; b=zTUCura7VABh2MvZscjC1E3Ms/1C8OvxghtjXHBTJN2LxQ1KDDOm8r2El2SXjdfwfK cYkkpIoIcCpy4dV0MuhBu4o36nn9iI/FvUIoh3kb+t5Jk/YexS9aJP6d7xJnU4Yk1J7T KVE7D4l78651mIltj2l8Er9gXSQF7wczRM5qQVojQfytRiK6nevizgDCSrMfCqzK5tcD P0oGf0P5OF8uNeEhrkh+s/58KjC5P+F03NLd/gEokbnZ4ZCQfkrayikoSfdKxPtvUxRY 7HYAfF4iNJAITV7UDkedcekUr43mvUNOVJFLl6ciAR7urGRq84rNkAF68p+mG5FtNy4e 1kGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=rl5qLUTjKvq4UEbdmmDfVdQXpcX1s9zaapkVFYBEnrI=; b=OOLKrD8pw2Kj4MVbIpCfvQDgQOZHCpys20KaSi1CC4dMvIdtm6mTXHI19yKmFxJazh Ps+G1OqxKfWjYA2HvNTrnwgnK+UQnPz+Lx0D0Om2DiBnAPwuynyv2x+od4yTHhujRyMj 99FKhmyD9zOKRFAqLt3XbU/P2N3gEO00FCi3ZNBQumCmtFtz236Mg7+8+eC9pBDVGS/q r/19s7hfw6iplyyEbftVi09vjD2A6y+b3I65f+/SmtkLvbqRxsySx4PlAE5aiMZoF/Ug X5IcJFiDIDJj8JzY6Lgr1plcWPSEJXwWR2iuo1jjPpED/Wn4YvFEdsvu8ueoYfFjO5UM sURA== X-Gm-Message-State: ALyK8tK+ou2MA7XBVZ6VQhmIldevqxYUGsEfEeKTAr/YJ3ZrkoHUyvACGxMWhG3cC7kVyQ== X-Received: by 10.28.31.213 with SMTP id f204mr11799124wmf.69.1465224837291; Mon, 06 Jun 2016 07:53:57 -0700 (PDT) Received: from cizrna.lan ([109.72.12.27]) by smtp.gmail.com with ESMTPSA id i190sm14511174wmf.10.2016.06.06.07.53.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jun 2016 07:53:56 -0700 (PDT) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Subject: [PATCH 2/2] drm/rockchip: Resume DP early Date: Mon, 6 Jun 2016 16:53:33 +0200 Message-Id: <1465224813-7359-2-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1465224813-7359-1-git-send-email-tomeu.vizoso@collabora.com> References: <1465224813-7359-1-git-send-email-tomeu.vizoso@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160606_075419_892794_988C373F X-CRM114-Status: GOOD ( 10.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Tomeu Vizoso , David Airlie , Douglas Anderson , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Yakir Yang , Caesar Wang , 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 The DP needs to have resumed once the DRM driver calls drm_atomic_helper_resume, otherwise the DP clock is still disabled when the DRM core enables the DP bridge. Would be nice to use device_pm_wait_for_dev to synchronize these devices, but the DRM device doesn't know what specific implementation this bridge has. Signed-off-by: Tomeu Vizoso Cc: Caesar Wang Cc: Douglas Anderson Cc: Heiko Stuebner Cc: Yakir Yang --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index 7f6a55cae27a..c120172add5c 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -349,20 +349,11 @@ static int rockchip_dp_remove(struct platform_device *pdev) return 0; } +static const struct dev_pm_ops rockchip_dp_pm_ops = { #ifdef CONFIG_PM_SLEEP -static int rockchip_dp_suspend(struct device *dev) -{ - return analogix_dp_suspend(dev); -} - -static int rockchip_dp_resume(struct device *dev) -{ - return analogix_dp_resume(dev); -} + .suspend = analogix_dp_suspend, + .resume_early = analogix_dp_resume, #endif - -static const struct dev_pm_ops rockchip_dp_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(rockchip_dp_suspend, rockchip_dp_resume) }; static const struct of_device_id rockchip_dp_dt_ids[] = {