Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp961772yba; Wed, 15 May 2019 13:05:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1dbDfJ1xJm8CZC99wO5gPB/A0vmFqs4NdKkXd1mlKEcZeBcXfVqZ04/6hU768BDm9wFKW X-Received: by 2002:a65:5687:: with SMTP id v7mr46057903pgs.299.1557950726975; Wed, 15 May 2019 13:05:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557950726; cv=none; d=google.com; s=arc-20160816; b=QFjNI8dQrOpxF3SBsR/W9KN8WDVF0runSptZOLPtovQmYMaVXemq5PZlfnTlbud21O iXTPR/mWFJZxQ2RQ4WjgR/oaEicHPSKqMHGSePsJXv3XEknfSwxfx58pWRE2p+i8uz3F TbSI2XUDRPeJSQtdTbHJwH+U7cD1+zme4HjXpDO8PsrYnQQ9BHAYFm9/F3Fs2kItgIY4 4guE8QbYvpRP5B6gYz3X58kb3a+5RTx6iRywj4XfTzYQpgr4//bVwtZT3cgN+s/CMz5r uc69RgzDP3haXQXX7k2GTOIddPg2c5tgiq8sbNu2dCszFh7pOaWyeXcoL3/dQ6KRqc5k Mllw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=JOcXGpIFe6Iv1rv0E2HRw/sO9NWgULf44uuKk+w+bc8=; b=XVtHsnPCFfszwCUIGFN6c2dvN6xFOdI6tqab+mdfmLz839LJYb4VSYwqK2vC5NYLw6 buqRKFBHTpl/bvXWIeGBVE3eMWP4i4fg+yS6hL1HZ+JHUOyVzsCzlfmayTmYuyJFBJVg 2WaZnDfxY7nx4uNFvKpVGA9fp6obXo6PYq4cJnlaYRF2o8bQo4dMkvy1vuywFyfYa5V+ au6jI42wiWwPFzL7CMSEw9AcUAxKO2SVDtS6ezuhCN6Zs0hRkYrSXpum3kpvIGpyStlJ qkSZjlDfFAYWRIsxew7U8jdbzyf7FxGpOyyfU1Q7dHSyihNdqaydC3MkVCQ242aMftM+ tPBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 19si2564249pga.249.2019.05.15.13.05.09; Wed, 15 May 2019 13:05:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726891AbfEOUEC (ORCPT + 99 others); Wed, 15 May 2019 16:04:02 -0400 Received: from gloria.sntech.de ([185.11.138.130]:44892 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726124AbfEOUEC (ORCPT ); Wed, 15 May 2019 16:04:02 -0400 Received: from ip5f5a6320.dynamic.kabel-deutschland.de ([95.90.99.32] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hR07s-0000bC-Ci; Wed, 15 May 2019 22:03:44 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Sean Paul Cc: Doug Anderson , Sandy Huang , Andrzej Hajda , Laurent Pinchart , "open list:ARM/Rockchip SoC..." , Neil Armstrong , Matthias Kaehlcke , Sean Paul , Zheng Yang , Sam Ravnborg , dri-devel , LKML , Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= , David Airlie , Jernej Skrabec , Daniel Vetter Subject: Re: [PATCH 1/2] drm: bridge: dw-hdmi: Add hooks for suspend/resume Date: Wed, 15 May 2019 22:03:43 +0200 Message-ID: <1842218.E6FT6db3r4@diego> In-Reply-To: <20190515180503.GU17077@art_vandelay> References: <20190502223808.185180-1-dianders@chromium.org> <20190515180503.GU17077@art_vandelay> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mittwoch, 15. Mai 2019, 20:05:03 CEST schrieb Sean Paul: > On Wed, May 15, 2019 at 11:01:26AM -0700, Doug Anderson wrote: > > Hi, > > > > On Wed, May 15, 2019 at 10:58 AM Sean Paul wrote: > > > > > On Thu, May 02, 2019 at 03:38:07PM -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 add a hook to the core dw-hdmi driver so that we can call it in > > > > dw_hdmi-rockchip in the next commit. > > > > > > > > NOTE: the exact set of steps I've done here in resume come from > > > > looking at the normal dw_hdmi init sequence in upstream Linux plus the > > > > sequence that we did in downstream Chrome OS 3.14. Testing show that > > > > it seems to work, but if an extra step is needed or something here is > > > > not needed we could improve it. > > > > > > > > Signed-off-by: Douglas Anderson > > > > --- > > > > > > > > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 21 +++++++++++++++++++++ > > > > include/drm/bridge/dw_hdmi.h | 3 +++ > > > > 2 files changed, 24 insertions(+) > > > > > > > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > > > > index db761329a1e3..4b38bfd43e59 100644 > > > > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > > > > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > > > > @@ -2780,6 +2780,27 @@ void dw_hdmi_unbind(struct dw_hdmi *hdmi) > > > > } > > > > EXPORT_SYMBOL_GPL(dw_hdmi_unbind); > > > > > > > > +int dw_hdmi_suspend(struct dw_hdmi *hdmi) > > > > +{ > > > > + return 0; > > > > +} > > > > +EXPORT_SYMBOL_GPL(dw_hdmi_suspend); > > > > + > > > > +int dw_hdmi_resume(struct dw_hdmi *hdmi) > > > > +{ > > > > + initialize_hdmi_ih_mutes(hdmi); > > > > + > > > > + dw_hdmi_setup_i2c(hdmi); > > > > + if (hdmi->i2c) > > > > + dw_hdmi_i2c_init(hdmi); > > > > + > > > > + if (hdmi->phy.ops->setup_hpd) > > > > + hdmi->phy.ops->setup_hpd(hdmi, hdmi->phy.data); > > > > + > > > > + return 0; > > > > +} > > > > +EXPORT_SYMBOL_GPL(dw_hdmi_resume); > > > > > > Both patches look good to me, I'd probably prefer to just smash them together, > > > but meh. > > > > > > If no one more authoritative chimes in, I'll apply them to -misc in a few days. > > > > Sure. I can smash them and re-post or you can smash them for me or we > > can keep them as-is. I originally separated because I wasn't sure if > > they'd eventually go through different trees. Just let me know! :-) > > Definitely no need to repost. It's entirely possible Andrzej or Heiko prefer to > have the dw-hdmi stuff broken out anyways. My opinion is of little value here :) I guess my own preference is to keep them as they are now - so separate. It makes it easier to see what gets done and also keeps the boundary on where to split pretty clear. Heiko