From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACF76C04AAF for ; Thu, 16 May 2019 10:15:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 68E482087B for ; Thu, 16 May 2019 10:15:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="g3Xf3arN"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="AqEuEc+3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 68E482087B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SkdnOI2zrMfoFEmGmEKNWH2VOSsRb9MoYKzz4JztfVE=; b=g3Xf3arN3YVyCL 3ilpiiTW1M+rw9QGFL2yEPtJFVNDUJshJ0il2G68QfSLCcXS0/0/8Bcx0bVXiAb1s/hwiySMbAsUb dxUApzcPoWOorSmxJ5lFEjRgPpaUs+gwRBEcHug2h9yWGEVMzQpWT7KjmLL/I6v5APuM8/nrIHJE8 eIzKj0FfOFcShzRbZprfKCFsv0uFiGXPpGslnwXYEXp3EfiRTUASn2zsTLfg7hOwLi7aO9pGhUQyM BBdJO+IwGiAx9JFUeCtlCoyjSYR8jzV5s1Q6Ll+kW4QDh1Q2bwRL/bkBnx/BixoIYX6+dRI1qj8ob xMR7d9jpDjA2EsS/F+QA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRDPp-0005sH-KK; Thu, 16 May 2019 10:15:09 +0000 Received: from perceval.ideasonboard.com ([2001:4b98:dc2:55:216:3eff:fef7:d647]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRDPl-0004iY-MQ; Thu, 16 May 2019 10:15:07 +0000 Received: from pendragon.ideasonboard.com (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id ED7C3320; Thu, 16 May 2019 12:14:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1558001695; bh=hdHDpOn6XPeT8HCeSsf6x0SVf0Wl4BDWp5vvALPWmUk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AqEuEc+3Hkk+pq/L7bssYGNH3Yllxa/OlVeqwuBQkQdGyAkzaQU6EeJfTk8WVJnPs MjsLwRz1GcjHCRDFkQlUdbPypKpo5WOf0+nyM2iAS+nk86NSrM0MaqfojXDCwZ8JKa 0fz6L4cv85S3qT8xR0hIekDP5rSwZGn5lYYdQ1fc= Date: Thu, 16 May 2019 13:14:38 +0300 From: Laurent Pinchart To: Douglas Anderson Subject: Re: [PATCH 2/2] drm/rockchip: dw_hdmi: Handle suspend/resume Message-ID: <20190516101438.GD4995@pendragon.ideasonboard.com> References: <20190502223808.185180-1-dianders@chromium.org> <20190502223808.185180-2-dianders@chromium.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190502223808.185180-2-dianders@chromium.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190516_031505_891766_8F04D246 X-CRM114-Status: GOOD ( 13.70 ) 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 , linux-rockchip@lists.infradead.org, David Airlie , Neil Armstrong , Sandy Huang , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Andrzej Hajda , mka@chromium.org, Sean Paul , Daniel Vetter , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Douglas, Thank you for the patch. On Thu, May 02, 2019 at 03:38:08PM -0700, Douglas Anderson wrote: > On Rockchip rk3288-based Chromebooks when you do a suspend/resume > cycle: > > 1. You lose the ability to detect an HDMI device being plugged in. > > 2. If you're using the i2c bus built in to dw_hdmi then it stops > working. > > Let's call the core dw-hdmi's suspend/resume functions to restore > things. > > NOTE: in downstream Chrome OS (based on kernel 3.14) we used the > "late/early" versions of suspend/resume because we found that the VOP > was sometimes resuming before dw_hdmi and then calling into us before > we were fully resumed. For now I have gone back to the normal > suspend/resume because I can't reproduce the problems. Should this be solved with device links if needed ? > Signed-off-by: Douglas Anderson > --- > > drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > index 4cdc9f86c2e5..deb0e8c30c03 100644 > --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > @@ -542,11 +542,31 @@ static int dw_hdmi_rockchip_remove(struct platform_device *pdev) > return 0; > } > > +static int __maybe_unused dw_hdmi_rockchip_suspend(struct device *dev) > +{ > + struct rockchip_hdmi *hdmi = dev_get_drvdata(dev); > + > + return dw_hdmi_suspend(hdmi->hdmi); > +} > + > +static int __maybe_unused dw_hdmi_rockchip_resume(struct device *dev) > +{ > + struct rockchip_hdmi *hdmi = dev_get_drvdata(dev); > + > + return dw_hdmi_resume(hdmi->hdmi); > +} > + > +const struct dev_pm_ops dw_hdmi_rockchip_pm = { Missing static keyword ? Apart from this, Reviewed-by: Laurent Pinchart > + SET_SYSTEM_SLEEP_PM_OPS(dw_hdmi_rockchip_suspend, > + dw_hdmi_rockchip_resume) > +}; > + > struct platform_driver dw_hdmi_rockchip_pltfm_driver = { > .probe = dw_hdmi_rockchip_probe, > .remove = dw_hdmi_rockchip_remove, > .driver = { > .name = "dwhdmi-rockchip", > + .pm = &dw_hdmi_rockchip_pm, > .of_match_table = dw_hdmi_rockchip_dt_ids, > }, > }; -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel