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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C257AC3064D for ; Tue, 2 Jul 2024 13:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iUrAiqHxYbFUoK7t9M/uBKxKmVEvBagjRfxGcUo2QnQ=; b=qzEZMRKSrS9R3eFOtq2mWprWxW JQWZsfzjC+Pz6KLIl2gCmRti9W6K5AHjT5Rj3uLMlvn4hqRuU4zN9/cKO0FFBusRz2IpgkXDXk4rh EkjZsV2EaCeQVRo+4cLkV83P4A00aSRyTSTRbqdOTxKjeYimwH3ccVMOhP+eJRiyCLn5VIX+xRhMg awJ1FpsuSQbut1dqv7vbxLKhiUyCZSJjCpGTHDlK0sMJh2B7pXqbM2RE1yZGVSaa0rVpk0mRqB2cS 3kZO6DQrdFyzen2tWRIyzFx912qt0Q055VKF5K5gtnl0olbBi6zIyL/Ib5+IDRaJRVCMo1sjgfpLq 9LaweiMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOdrv-00000006uqL-2Qgv; Tue, 02 Jul 2024 13:48:27 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOdra-00000006ukl-0Hjk for linux-arm-kernel@lists.infradead.org; Tue, 02 Jul 2024 13:48:10 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 2414A61B9D; Tue, 2 Jul 2024 13:48:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49193C116B1; Tue, 2 Jul 2024 13:48:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719928084; bh=POJpBLzMZtl3kVsUtAA1PJiP5FlqLS4DRvmTGZpjDXs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QhDDUx2jnwbewWOnEtvAimQ1AOfa7YUwwYz98BP8HDl52MK7IiArBtlr3Kc0+dnyP 7NQwv75ILJ47KxmHHD1tQ471mljWxTOY8ceiFgwIBiOpA+IXkIOw+3uii/zaAHHARY 5ouBtksYlL9UzZIe5g49wS6LvUTDbi/DRnOBS92RkdkgjXgIKtILWJ+78RyctwG4LY ETMgr8TNaUFmrClTAP0393pkw4T3dUd2eBmUAkeb2BkuABmBgvHPv/0wB8MTAWMMuI ulyeOWaSQGINEeA3Wd8BpbEJwJqhlWBIPWMU44XjsankiWPOCjh7IrSq/fOga8wHVD +w/WjJedQ6RQQ== Date: Tue, 2 Jul 2024 15:48:02 +0200 From: Maxime Ripard To: Stefan Wahren Cc: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Thomas Gleixner , Jassi Brar , Ulf Hansson , Jiri Slaby , Minas Harutyunyan , Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com Subject: Re: [PATCH 07/11] drm/vc4: hdmi: Disable connector status polling during suspend Message-ID: <20240702-qualified-archetypal-worm-416a2f@houat> References: <20240630153652.318882-1-wahrenst@gmx.net> <20240630153652.318882-8-wahrenst@gmx.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6llmvbphtnayplvp" Content-Disposition: inline In-Reply-To: <20240630153652.318882-8-wahrenst@gmx.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240702_064806_263275_AE99F861 X-CRM114-Status: GOOD ( 24.59 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --6llmvbphtnayplvp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Sun, Jun 30, 2024 at 05:36:48PM GMT, Stefan Wahren wrote: > Suspend of VC4 HDMI will likely triggers a warning from > vc4_hdmi_connector_detect_ctx() during poll of connector status. > The power management will prevent the resume and keep the relevant > power domain disabled. >=20 > Since there is no reason to poll the connector status during > suspend, the polling should be disabled during this. >=20 > It not possible to use drm_mode_config_helper_suspend() here, > because the callbacks might be called during bind phase and not all > components are fully initialized. >=20 > Link: https://lore.kernel.org/dri-devel/7003512d-7303-4f41-b0d6-a8af5bf8e= 497@gmx.net/ > Signed-off-by: Stefan Wahren > --- > drivers/gpu/drm/vc4/vc4_hdmi.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdm= i.c > index b3a42b709718..e80495cea6ac 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c > @@ -3106,6 +3106,13 @@ static int vc5_hdmi_init_resources(struct drm_devi= ce *drm, > static int vc4_hdmi_runtime_suspend(struct device *dev) > { > struct vc4_hdmi *vc4_hdmi =3D dev_get_drvdata(dev); > + struct drm_device *drm =3D vc4_hdmi->connector.dev; > + > + /* > + * Don't disable polling if it was never initialized > + */ > + if (drm && drm->mode_config.poll_enabled) > + drm_kms_helper_poll_disable(drm); Does it make sense to add it to runtime_suspend? What if the board boots without a display connected, and only after a while one is connected? Wouldn't that prevent the driver from detecting it? Maxime --6llmvbphtnayplvp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZoQFEQAKCRDj7w1vZxhR xUcYAP0YlWR0ZuDtA9KJMgk7F8lTvGRgIEvJmoavoyU/a9BZCgD/aDVTPguo0KhG fL9qskoopigvTc4187S0uVSHehb/tgU= =y7a7 -----END PGP SIGNATURE----- --6llmvbphtnayplvp--