Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp650933pxb; Thu, 23 Sep 2021 07:57:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWSEKRoG8wak0laKisFIWMGaO9UEYxro6XdKXmOMQVspwOsAFfsY2fmC3hgwjZRK3txJkH X-Received: by 2002:a05:6e02:20c7:: with SMTP id 7mr4089659ilq.118.1632409073106; Thu, 23 Sep 2021 07:57:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632409073; cv=none; d=google.com; s=arc-20160816; b=ZGe4opIS1EO1PoAgrM6mUOqUzH8vBs1An1HFjQAXwBHnrRkbUczSoPHeGrZeCpBNo1 CUhDMGn0eIPYUUNa+8PDaiuG5swVGGFUokszfBz4aVU/M7BVKyze8RQK2mI1hziU+2bG e6yMzn5TTSqRnzfJ2CP0BS1vkQhrBMdfzxVLiKdUzmUfTOJc/UuHqQ6mfdb8CFJZwWST M3W0RTDiSpIiAlCfyuj+iIC9uGkZ1q0KSAIChAbvZqYhWByreUkfgdP2yYBg4higCG45 EwTkZkrvRlqCD9z327xL0+KadWsArAX5QA3sog5oeNisHYcnheZ6HJhNLvuxLtag49Nf k4lg== 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; bh=PD2Ifyz3D41ecGhC4vxBA7Moe/DWm5tbTzRoWL+N3LY=; b=eDaNHMXDSLM3HG09K1vs0X0IGCmVROa7djgBgWX+ECr43meloxbW3uDR7A9RleBgov o1B0FtZ3AN02tr9i74/P4OA00N09ugi/s0xrPZxRH6qYoxs9tKzOFX2fiA180M8yT6WY yK7Td3a4N+EENOhkD7ZtVgJIANik6H8lN8r7ToOQm1Y0Z3s/fdX4EQkbbHsB3iiwQh/D p2xBoZoJ+yNX+jX5mbYRU9v+0Dy5aHyiWc2EmCl9z1eI8MMt1q50CQ5O2BE/kojICrAB EUYDKq/M4xO5U85un6XVe5IOhM/DwxboAJOIjSTeMPFXjhk5x685iXVw8nsAkFe8sby0 Czmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QHTqu20P; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p8si8047787ilh.169.2021.09.23.07.57.41; Thu, 23 Sep 2021 07:57:53 -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=@kernel.org header.s=k20201202 header.b=QHTqu20P; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241816AbhIWO5M (ORCPT + 99 others); Thu, 23 Sep 2021 10:57:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:52638 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241735AbhIWO5L (ORCPT ); Thu, 23 Sep 2021 10:57:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2B778610C9; Thu, 23 Sep 2021 14:55:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632408940; bh=RKJxYrYCoM2k7aZ2F996O9q/c65kSExCnAmxsZRz7+8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QHTqu20PhZP93CZB+M8svagNjNtHUNaGsP4fiansQScIRqfD9za0GITTCI0ovnvAl rqniKstoCwaFtdPBlmAx9I8ffXnCD5BnvOl9y6LOIkJ9ELHTntBXVDY9HldLuETeZ6 ZxS7VgVGpAvnLK8VVLC0kruvtjqpsFHR19/gQP2wMcxqXeqHwrg95+lLITAc9VLBPK SJKI6ZyT25RS9R/9T7mRmv6ps+PzjI9ULOWNFdusCP3zu/EvZdCbSnhYb2ozRA+wpB XDYaTAuHkwIrz8ZbwvyHeFbHQ2dQNDFKzHunu13JXrfzKwIWQ2ZzUFYHqLPhggHwKS uf6jEk+qckUXg== Date: Thu, 23 Sep 2021 07:55:32 -0700 From: Nathan Chancellor To: Maxime Ripard 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: 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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210923145208.433zaqldird2vnxk@gilmour> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 23, 2021 at 04:52:08PM +0200, Maxime Ripard wrote: > Hi Nathan, > > 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, > > > > > > 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 clocks 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. > > > > > > > > > > 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(-) > > > > > > > > > > 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/vc4/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 = 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 *master, void *data) > > > > > { > > > > > > > > > > > > > Hi, > > > > > > > > FYI. > > > > > > > > This still causes a build error on arch/openrisc/ since it does not support > > > > CONFIG_PM (it does not source "kernel/power/Kconfig" like some other arches do): > > > > > > > > ./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" > > > > > > > > so with > > > > CONFIG_DRM_VC4=y > > > > # CONFIG_DRM_VC4_HDMI_CEC is not set > > > > > > > > I still see > > > > ../drivers/gpu/drm/vc4/vc4_hdmi.c:2139:12: warning: 'vc4_hdmi_runtime_suspend' defined but not used [-Wunused-function] > > > > 2139 | static int vc4_hdmi_runtime_suspend(struct device *dev) > > > > | ^~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > With what version did you get that build error? -rc2 shouldn't have it > > > anymore since the runtime_pm hooks introduction got reverted. > > > > -next still contains these patches as Stephen effectively reverted the > > changes in Linus' tree when merging in the drm-misc-fixes tree: > > > > https://lore.kernel.org/r/20210920090729.19458953@canb.auug.org.au/ > > Ah, indeed, thanks. > > What's the typical fix for these errors? > > I guess adding a depends on ARM || ARM64 || COMPILE_TEST would work? 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. Cheers, Nathan