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 0CB10C433F5 for ; Fri, 24 Sep 2021 15:48:48 +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 C73BD60E05 for ; Fri, 24 Sep 2021 15:48:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C73BD60E05 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=g5qgOUeVtg1UwX1ez4CoC5YGcDosp5JlbXXBBHnmMP8=; b=xQkAS2RGLnTHTT BKmDoIfSwTEy8TsBA7pifPQ+FkG/9+bhlnI6RtTZkZW/2AObnhGHW+ATanpIUm+arqOny5XJIelkH CZ5UTNp2ZYD4H9hcKrE8Ym4kooTvbmCv5k/nKVw2YovPbtX3by2LofDUTE+eo4Cu4R03VUFJ5KV8X nn6YyT42HjrH2pwmT2ozVidvKzGOnw9qVg8loi91E0AiXgmaW2rbvrrmaoNSencVxA5SMAaepPNtC c661MfJi3p1QkQpw1yPEpNTpXogP1jqn/D16xPXSfS5gW10Lu8q39yWEWHGeonK/axbTJ8hO6lmGw g/jrDXUuYWRzozhkQKQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTnPO-00EzCU-B9; Fri, 24 Sep 2021 15:46:42 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTnPK-00EzBg-PF; Fri, 24 Sep 2021 15:46:40 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9841260E05; Fri, 24 Sep 2021 15:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632498397; bh=r6iqblDGPRf5XYa+LzYmSsvntuX36fFw9anZ9uqT978=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ABn/L8AJjpWB+elP9kFUI7+3yuZzgEbEzEDPXRCZCCzRyVOjZMOp9zjwcTQQdqFPF C9O6TzHyyJzqvzaKxao7LlflgjIwE0wTe/j0zAh/T/EuJF9HxDx79yPyT2pCuzTml1 aJoKKYXkzWpK1E1TSPu2/17zFJbV4SX8fvvElkvAk1JSvHHGrorIDfHKurLRXPqd56 sQPlu1sQ2IRxjJxSemk7aKNWMhosOQ4YsdZ2U7rHY4jX4tnPynfEF1DSoyCioKYZvk AHLW++/HGXrIgO5VVebKz+KXpDEBqOI81hwXPKUdUU4xI9DlfQmAPtu7VE3fA5H/n4 aRACIH+QH518Q== Date: Fri, 24 Sep 2021 08:46:32 -0700 From: Nathan Chancellor To: Maxime Ripard Cc: Maarten Lankhorst , Thomas Zimmermann , Daniel Vetter , David Airlie , Linus Torvalds , linux-rpi-kernel@lists.infradead.org, Florian Fainelli , Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org, Randy Dunlap , Stephen Rothwell Subject: Re: [PATCH v2] drm/vc4: Unselect PM Message-ID: References: <20210924152334.1342630-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210924152334.1342630-1-maxime@cerno.tech> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210924_084638_865651_A7258BE0 X-CRM114-Status: GOOD ( 28.51 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 24, 2021 at 05:23:34PM +0200, 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 Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor # build > --- > > 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); > > -- > 2.31.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel