Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp705468pxb; Thu, 23 Sep 2021 09:00:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXmBi5MkcqBObBXXvhcIo00wbVn19EsTb702ax74ox2dWAz0jXq0xmJpvYFqYK8sJF8o/d X-Received: by 2002:a50:d844:: with SMTP id v4mr6492288edj.378.1632412850714; Thu, 23 Sep 2021 09:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632412850; cv=none; d=google.com; s=arc-20160816; b=yooqEws1BYhAtdHAe0/paXbHtQhKEa05fG4xrTquBG6eIIFaU4xrb0S7eguLl/kGHW 299zlCXedb6JZgrwErp5LkRRpZ+PVKTOt7pr7s7wpuYH9LkOACrvrdfvVT+dOtR26spH JG/58dshiM2gmdYMR0ZoQuqK4L731QwNfVyX5l6rkruVa8xZ/Dznd8TUSBie/XGBrG4r ugVsEMsisU6rlIBFjc+MIuiiJ4bN72Iq4UwKs+aLhBMLZvy6D37p5b9BBRbW8V0SOMZ/ R7FsFI2DCCxALr3ynF65MkdwMxAEBbe/Otn1irKGX18rPXu+VxZV42vhR8CnuPLtR9Lj 8aLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=GQm+lTPGhYJNn4ipzUG6VTqMd9NXez8sQDJ2zFiixKI=; b=oHJYKmFDCzoqyWYptEd9LpbZkKk+60OfDKq5vKf5Sl4lcHPq6MZmKs6JIuKJ+MzE5Q 6AlUYVr273YCe2jJ/Nms718ehfMhGLwasZI20R8AOQICN4WpajfQTAlx2EAscpbO7Wfq V2z4257PFHFHmobD0rhvyX41kbTn5nYjGTIVCuTBiIWhoiytM8I5Feen7AH7fY2tnCCa ZrcymqN7LFQpS7Jkf7myrw7Cflt2puGzHDcsubcsjDaFMehx284yKx2mT9f9Svcqn9ax 0wkpYxSyfiKH+xg3le3fc4Q4nmNSnytZOQuzZ3MJrNLApSDQGTLC2JL4/bqQODkzm9bW aPOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=tgnoC48I; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ombkJ8DH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oz20si5906668ejc.688.2021.09.23.09.00.21; Thu, 23 Sep 2021 09:00:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=tgnoC48I; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ombkJ8DH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242275AbhIWQA3 (ORCPT + 99 others); Thu, 23 Sep 2021 12:00:29 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:39101 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242216AbhIWQA1 (ORCPT ); Thu, 23 Sep 2021 12:00:27 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 4F87B580B62; Thu, 23 Sep 2021 11:58:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 23 Sep 2021 11:58:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=GQm+lTPGhYJNn4ipzUG6VTqMd9N Xez8sQDJ2zFiixKI=; b=tgnoC48Id1WDYUDv9RxeXPUAIYove4djVcPR97Szt1Y DK0HVKKSc7NTw2qWo4kJpXiKasCx3JpmWAfWqLwfwBq4+qlqLiu25ZhMd/neYxIA wAHW8lpC3Wa7Cen5PIdCIpmhTfUApC2BzR8KoGLTgKsY5PUzmv7owKdW8nFPf6v7 5Fr/SZDrOM3cKFMbanaM2zUTafLb1qB6rau8PuY+lRCIuB/qcde6Jc90kKb54wh2 rvn/FTJbevwWQx1YS8SxGNtDmcANx/pwmWFQUoc+i5P8rugawWainJfD1NNCHFX6 zK3j8b7sj6OAgKaBOoPwepis9C2+BKd/VXA0/Y1XNhg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=GQm+lT PGhYJNn4ipzUG6VTqMd9NXez8sQDJ2zFiixKI=; b=ombkJ8DHd9cFMT9psLE0Ae 0XJMAQw1YGeHdYFXALKuAgtKVM1VRDefvvNPe6Rlc/ioecO+6zF6dlpuFaTUXgJH lmD3oA8bljZpUn0rScMXXKGWNgrzkG4otg4+9R0Th/7G9TELDIcv/f7C5ky7ltvB ClU1SxD9GPDW+sWVRJxIPh7P3TzvsGYi3poSCJZCsjrgtLn8548uAOn1RKvvgylG GdVMB11H2qRg/i/rlObIAl/4oWoqGYwjBEmN5d5gD+CTLkgPQdshde/CzWIlsf3G FKriodbeRu7JuE9CtUIUMHjiSi5QeAmOkepektCDbGgFz3GV6xK83AbffUJPlLsA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeiledgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepveevfeffudeviedtgeethffhteeuffetfeffvdehvedvheetteehvdelfffg jedvnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Sep 2021 11:58:52 -0400 (EDT) Date: Thu, 23 Sep 2021 17:58:51 +0200 From: Maxime Ripard To: Nathan Chancellor Cc: Randy Dunlap , dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , linux-kernel@vger.kernel.org, Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , Boris Brezillon , linux-rpi-kernel@lists.infradead.org, Hans Verkuil , bcm-kernel-feedback-list@broadcom.com, Emma Anholt , Nicolas Saenz Julienne , Jonas Bonn , Stefan Kristiansson , Stafford Horne , Openrisc Subject: Re: [PATCH v3 1/6] drm/vc4: select PM (openrisc) Message-ID: <20210923155851.dyttkomkza5pxqg3@gilmour> References: <20210819135931.895976-1-maxime@cerno.tech> <20210819135931.895976-2-maxime@cerno.tech> <8a5cdcf5-33ed-398f-243a-b8889fd754e3@infradead.org> <20210922084156.xqru5fdjkarbkyew@gilmour> <20210923145208.433zaqldird2vnxk@gilmour> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tntwzof3quwqbntb" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --tntwzof3quwqbntb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 23, 2021 at 07:55:32AM -0700, Nathan Chancellor wrote: > On Thu, Sep 23, 2021 at 04:52:08PM +0200, Maxime Ripard wrote: > > Hi Nathan, > >=20 > > On Wed, Sep 22, 2021 at 08:49:50AM -0700, Nathan Chancellor wrote: > > > On Wed, Sep 22, 2021 at 10:41:56AM +0200, Maxime Ripard wrote: > > > > Hi Randy, > > > >=20 > > > > On Sun, Sep 19, 2021 at 09:40:44AM -0700, Randy Dunlap wrote: > > > > > On 8/19/21 6:59 AM, Maxime Ripard wrote: > > > > > > We already depend on runtime PM to get the power domains and cl= ocks for > > > > > > most of the devices supported by the vc4 driver, so let's just = select it > > > > > > to make sure it's there, and remove the ifdef. > > > > > >=20 > > > > > > Signed-off-by: Maxime Ripard > > > > > > --- > > > > > > drivers/gpu/drm/vc4/Kconfig | 1 + > > > > > > drivers/gpu/drm/vc4/vc4_hdmi.c | 2 -- > > > > > > 2 files changed, 1 insertion(+), 2 deletions(-) > > > > > >=20 > > > > > > diff --git a/drivers/gpu/drm/vc4/Kconfig b/drivers/gpu/drm/vc4/= Kconfig > > > > > > index 118e8a426b1a..f774ab340863 100644 > > > > > > --- a/drivers/gpu/drm/vc4/Kconfig > > > > > > +++ b/drivers/gpu/drm/vc4/Kconfig > > > > > > @@ -9,6 +9,7 @@ config DRM_VC4 > > > > > > select DRM_KMS_CMA_HELPER > > > > > > select DRM_GEM_CMA_HELPER > > > > > > select DRM_PANEL_BRIDGE > > > > > > + select PM > > > > > > select SND_PCM > > > > > > select SND_PCM_ELD > > > > > > select SND_SOC_GENERIC_DMAENGINE_PCM > > > > > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/v= c4/vc4_hdmi.c > > > > > > index c2876731ee2d..602203b2d8e1 100644 > > > > > > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c > > > > > > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c > > > > > > @@ -2107,7 +2107,6 @@ static int vc5_hdmi_init_resources(struct= vc4_hdmi *vc4_hdmi) > > > > > > return 0; > > > > > > } > > > > > > -#ifdef CONFIG_PM > > > > > > static int vc4_hdmi_runtime_suspend(struct device *dev) > > > > > > { > > > > > > struct vc4_hdmi *vc4_hdmi =3D dev_get_drvdata(dev); > > > > > > @@ -2128,7 +2127,6 @@ static int vc4_hdmi_runtime_resume(struct= device *dev) > > > > > > return 0; > > > > > > } > > > > > > -#endif > > > > > > static int vc4_hdmi_bind(struct device *dev, struct device *m= aster, void *data) > > > > > > { > > > > > >=20 > > > > >=20 > > > > > Hi, > > > > >=20 > > > > > FYI. > > > > >=20 > > > > > This still causes a build error on arch/openrisc/ since it does n= ot support > > > > > CONFIG_PM (it does not source "kernel/power/Kconfig" like some ot= her arches do): > > > > >=20 > > > > > ./arch/riscv/Kconfig:source "kernel/power/Kconfig" > > > > > ./arch/x86/Kconfig:source "kernel/power/Kconfig" > > > > > ./arch/nds32/Kconfig:source "kernel/power/Kconfig" > > > > > ./arch/sh/Kconfig:source "kernel/power/Kconfig" > > > > > ./arch/arc/Kconfig:source "kernel/power/Kconfig" > > > > > ./arch/arm64/Kconfig:source "kernel/power/Kconfig" > > > > > ./arch/xtensa/Kconfig:source "kernel/power/Kconfig" > > > > > ./arch/sparc/Kconfig:source "kernel/power/Kconfig" > > > > > ./arch/arm/Kconfig:source "kernel/power/Kconfig" > > > > > ./arch/mips/Kconfig:source "kernel/power/Kconfig" > > > > > ./arch/powerpc/Kconfig:source "kernel/power/Kconfig" > > > > > ./arch/um/Kconfig:source "kernel/power/Kconfig" > > > > > ./arch/ia64/Kconfig:source "kernel/power/Kconfig" > > > > >=20 > > > > > so with > > > > > CONFIG_DRM_VC4=3Dy > > > > > # CONFIG_DRM_VC4_HDMI_CEC is not set > > > > >=20 > > > > > I still see > > > > > ../drivers/gpu/drm/vc4/vc4_hdmi.c:2139:12: warning: 'vc4_hdmi_run= time_suspend' defined but not used [-Wunused-function] > > > > > 2139 | static int vc4_hdmi_runtime_suspend(struct device *dev) > > > > > | ^~~~~~~~~~~~~~~~~~~~~~~~ > > > >=20 > > > > With what version did you get that build error? -rc2 shouldn't have= it > > > > anymore since the runtime_pm hooks introduction got reverted. > > >=20 > > > -next still contains these patches as Stephen effectively reverted the > > > changes in Linus' tree when merging in the drm-misc-fixes tree: > > >=20 > > > https://lore.kernel.org/r/20210920090729.19458953@canb.auug.org.au/ > >=20 > > Ah, indeed, thanks. > >=20 > > What's the typical fix for these errors? > >=20 > > I guess adding a depends on ARM || ARM64 || COMPILE_TEST would work? >=20 > I think the typical fix from most people is marking these functions as > __maybe_unused so that they are always defined but the compiler does not > warn. An alternative would be changing the "select PM" to be > "depends on PM" I believe but that is less frequent. Thanks for the suggestion. Since those functions are always going to be used anyway (but on COMPILE_TEST), I've chosen the opposite approach of dropping SET_RUNTIME_PM_OPS instead. You're in CC of that patch so feel free to comment there if you think this is wrong. Maxime --tntwzof3quwqbntb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYUykOwAKCRDj7w1vZxhR xXGgAQD3EAxhXlcx5HvILvemGEJLCfFbdWysU0UD8yhxeV+FUAD+P80ZrQ0TxB7l QIeyGdWHroAgFhg8vd9TlLujD8BiSgI= =ZsrP -----END PGP SIGNATURE----- --tntwzof3quwqbntb--