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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AA80C433EF for ; Fri, 24 Sep 2021 20:44:04 +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 D5FC4610CB for ; Fri, 24 Sep 2021 20:44:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D5FC4610CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BhdrnaYEDfE5Wt83mIjo1HGyip46oejroxWtoM9FQjU=; b=ZoAMy/piV3dmMjYtzgr4ifvBUK b9Xd9GDTSJhZgKMVMVCtEgAYIhe+ZtNyygel2Xv+mVr3IDSzdKv6IbBsJ3T0Ux05w8YFwoXvJ2Vd1 vO8GjFCtWmp/D0DVlWFy7a16gZfx7whtjo4GoGfxTdcHomb9sDC5nbozSOrA5iBLvkV0fctgGAPKH l5EHheoj1490AlGOkQZ6qir0sdJ6cfRW8qsn25tLjUBOplhEqV29pIOopaYPM/1x4/nMMVAP73ZEb g8oxZgF6YhfZ3CGWYoZltDzHaQgEbG+KZDErZu6tVIdpmJJhnBAt4qKxeF2FTe/vkrdW7d4ytYVqO N0Vtcfnw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTs1B-00FTpf-Av; Fri, 24 Sep 2021 20:42:01 +0000 Received: from [2601:1c0:6280:3f0::aa0b] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTs17-00FTpE-4R; Fri, 24 Sep 2021 20:41:57 +0000 Subject: Re: [PATCH v2] drm/vc4: Unselect PM To: Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , Daniel Vetter , David Airlie Cc: Linus Torvalds , linux-rpi-kernel@lists.infradead.org, Florian Fainelli , Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org, Nathan Chancellor , Stephen Rothwell References: <20210924152334.1342630-1-maxime@cerno.tech> From: Randy Dunlap Message-ID: <2779d5a5-8b02-ef32-0388-2f50c121e72d@infradead.org> Date: Fri, 24 Sep 2021 13:41:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210924152334.1342630-1-maxime@cerno.tech> Content-Language: en-US X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 9/24/21 8:23 AM, Maxime Ripard wrote: > It turns out we can't select PM when allowing the compilation for > COMPILE_TEST. Indeed, PM might not be defined at all, or come with extra > requirements we can't meet. > > This select was initially introduced since we need to call the > vc4_hdmi_runtime_resume() at probe time to make sure our device is > properly powered at bind time, no matter whether PM is there or not, and > we needed to make sure we didn't have a defined but not used warning for > vc4_hdmi_runtime_suspend(). > > This will still happen on platforms that don't define PM though, since > SET_RUNTIME_PM_OPS will then be a nop. In order to fix both issues, > let's remove the select, and add a __maybe_unused attribute to > vc4_hdmi_runtime_resume(). > > Reported-by: Randy Dunlap > Signed-off-by: Maxime Ripard > LGTM. Thanks. Acked-by: Randy Dunlap # build-tested > --- > > I'm not sure how to merge this one, since this commit has been reverted > in Linus tree, and un-reverted in linux-next. Should we wait a bit until > the reworked version of the original commit has been merged again? > > Maxime > > Changes from v1: > - remove select > - add __maybe_unused to vc4_hdmi_runtime_resume > - reword the commit log > --- > 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 52a1c309cb4a..345a5570a3da 100644 > --- a/drivers/gpu/drm/vc4/Kconfig > +++ b/drivers/gpu/drm/vc4/Kconfig > @@ -9,7 +9,6 @@ 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 500cdd56b335..1f2690ed8542 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c > @@ -2122,7 +2122,7 @@ static int vc5_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi) > return 0; > } > > -static int vc4_hdmi_runtime_suspend(struct device *dev) > +static int __maybe_unused vc4_hdmi_runtime_suspend(struct device *dev) > { > struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); > > -- ~Randy _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel