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 D2068C2BD09 for ; Wed, 3 Jul 2024 15:33:38 +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:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yl1nTP1CLzZB+KqfQ4zqkTGplb9iUlDVeXwjVUfcLNU=; b=NSSejyi84rDUhEd47Wvgpi3cad BYFcU4I3dUnmELmEfB0o9bv5UOtSaUJ91PzOU72OVtIe11VxV1jVEX2+VqZwGTzpIlL2AD+Tls/t5 ap4De59XjPnObk05akQdaFwcAPsu3/WNp7EvD6V2/UG6J2eE2f3N7wlm4kUS9jMt4m34x+LexlMO3 GC50a1KNAJtfoqdeixDZShoHJ70TI1Apua+CuhodNPq2a0kIeLvE3ezgpWiJckl3KFhz5+67pXZr8 d5Li9AMaN4K+hH3r/XglCIMa57tBXXOsz66ikCHjVKikWnViOrX2InkXe4Dd3jJGLENqWRAA8zulW R5xX0I7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sP1z5-0000000Agud-3H2L; Wed, 03 Jul 2024 15:33:27 +0000 Received: from mout.gmx.net ([212.227.15.19]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sP1ys-0000000Agso-3RCg for linux-arm-kernel@lists.infradead.org; Wed, 03 Jul 2024 15:33:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1720020776; x=1720625576; i=wahrenst@gmx.net; bh=yl1nTP1CLzZB+KqfQ4zqkTGplb9iUlDVeXwjVUfcLNU=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:From:To: Cc:References:In-Reply-To:Content-Type:Content-Transfer-Encoding: cc:content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=b+swRCGHMb7T+IF+fLsxlqXDlj1oFqgPtFBkTNegQXukR8sdNLLn2xCk/Br/xQ9I NFPNM8V1FBGFxvUo5QLezthP0RsxQ2phPTarefOyMUZqDoW+CHE8+j1u4HBcssa2A W6fBg3iuEXqdTzDS2LO/SqqEOZGxNuCoS0eOinsQCHd+IZF2iYL+BGXhxdrXvbLFM uXywgNlGCxuCQ4Ic1f7WGU0hgtSIYbAFVeMsbAgSPxboSnyJknuCVDk+PS5dwK638 nH+NGLauAV+tgP68qmZzazk6tE2MjEL4JvUshko8gj6soP/OjB9T7V2JhuyqLzsIS QtoLgixMhOhFBtt1fg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.1.127] ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MkYXs-1s0N3m1OM2-00kHIT; Wed, 03 Jul 2024 17:32:56 +0200 Message-ID: <7e3d4769-bd9c-47e8-bac2-9245b08866c3@gmx.net> Date: Wed, 3 Jul 2024 17:32:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 07/11] drm/vc4: hdmi: Disable connector status polling during suspend From: Stefan Wahren To: Maxime Ripard 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 References: <20240630153652.318882-1-wahrenst@gmx.net> <20240630153652.318882-8-wahrenst@gmx.net> <20240702-qualified-archetypal-worm-416a2f@houat> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:ePjWIzkXckMeXLCLN/9eWki0p9PbzMMzwiOfq3KAK6zQa7sDIBF zH8h+siK/1Z3d4McRciBNMemTboDtgGnkEtqsmZ7h95n/EwESNV73n6tV7WEHvrhu3K0Qh0 potxhOzBRp5gWXn1F+pPXcE9TzfCaXny5WdTC+fsWiiYs9R1H5C6OjsKcRDToQbAlO2TRNi oy3MbvVrQbkJqmuUhOzDw== UI-OutboundReport: notjunk:1;M01:P0:BQzv5ocnjQY=;x9/HKnkcpT8XNMHe0LAN+c4jHE2 QAlqSIu10Lv8ioocBQxf6Q07NbNighg/IJzNce9x9jq3oSQ/pL2TpJaJy6ME1OG9AgW3VbxUK GFJzdu/tllTghQlPOKAQ52RmJJ/JqX2eGWjYd2lf29U1fX26sUT9afSyD8G89RuGOARYK7asl ys19OVQUKejWOYACtcpdQBDI5B6v9UHKvtErQ0Pkaidnp3q3D08zu5nbfIl7t8+TwDPWauQGt u/IxlhYBs2mST1NgHDGzg7guiooeGdx9117SCPcA7Y5dyeChavFTyh7IMQ8JfjjmXsU98fwC1 RPbvwUBIhy3orNk5RNT7jU3URrhfx4ogbq/iFnq9serP7aufYPMiG3Z4zCjFnVD0F45+mYBx6 6Fo9zFu6Xn9LtoXjL1u3xWnwPAdAzZ9l6xVs4VXswcObkPL7kCCtqtxjaUvQk3C7liGzmMuLb +Rr1WJYNHeWrhcEVMFSZlpBN8/4xZ3cpJdKjw4smgTpFpNsNzIBcs7dGp8JRzzdzetOylAksP JXgl3qDdYyCCIV+U5KX1Sk1g35nkMNRoxYMdAXkIO5acBbYQDfrln7PbZyWq3cv+ulnEq3+Yy pXdaITskzC1+l7RRW+28eR1nyRQLm0h2vSI1TMstoZYCsZZmF2pIX5ya+ZjAtBnWW+NBUfB2/ WNpiwXGLxnGRaXaViQfOi+ZBLJ76e+xfqoPnjRZW0Y8yFZOasoCRA6VmEjr3S+eyjqgyxlVfL xZV+ixfsIDZxI5aZ5C8i8EBjK0eAiuHwNw1QPsm5y4N5IEfHzhsDnNKy8M7yUXRvWfi+gWFDf jX8TvgK/ORZkMzrQlMtFYKs6VGiwqIDQllJcvLX5wxAb8= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240703_083315_159004_628F6359 X-CRM114-Status: GOOD ( 18.85 ) 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 Am 03.07.24 um 12:28 schrieb Stefan Wahren: > Hi Maxime, > > Am 02.07.24 um 15:48 schrieb Maxime Ripard: >> 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. >>> >>> Since there is no reason to poll the connector status during >>> suspend, the polling should be disabled during this. >>> >>> 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. >>> >>> Link: >>> https://lore.kernel.org/dri-devel/7003512d-7303-4f41-b0d6-a8af5bf8e497= @gmx.net/ >>> Signed-off-by: Stefan Wahren >>> --- >>> =C2=A0 drivers/gpu/drm/vc4/vc4_hdmi.c | 11 +++++++++++ >>> =C2=A0 1 file changed, 11 insertions(+) >>> >>> diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c >>> b/drivers/gpu/drm/vc4/vc4_hdmi.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_device *drm, >>> =C2=A0 static int vc4_hdmi_runtime_suspend(struct device *dev) >>> =C2=A0 { >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct vc4_hdmi *vc4_hdmi =3D dev_get_d= rvdata(dev); >>> +=C2=A0=C2=A0=C2=A0 struct drm_device *drm =3D vc4_hdmi->connector.dev= ; >>> + >>> +=C2=A0=C2=A0=C2=A0 /* >>> +=C2=A0=C2=A0=C2=A0=C2=A0 * Don't disable polling if it was never init= ialized >>> +=C2=A0=C2=A0=C2=A0=C2=A0 */ >>> +=C2=A0=C2=A0=C2=A0 if (drm && drm->mode_config.poll_enabled) >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 drm_kms_helper_poll_disabl= e(drm); >> Does it make sense to add it to runtime_suspend? > i saw that other drm drivers used drm_mode_config_helper_suspend() in > the RUNTIME_PM_OPS. But i agree, it should be better moved to > SYSTEM_SLEEP_PM_OPS. >> 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? > tbh I noticed that HDMI re-detection didn't worked in my setup > 6.10-rcX before this series. I need to investigate ... Okay, this patch breaks definitely HDMI re-detection. So please ignore this patch. Sorry, about this mess. There is another minor issue which already exists before that cause the following log entry on HDMI reconnect: [=C2=A0=C2=A0 74.078745] vc4-drm soc:gpu: [drm] User-defined mode not supp= orted: "1920x1200": 60 154000 1920 1968 2000 2080 1200 1203 1209 1235 0x68 0x9 But in this case HDMI works. Regards >> >> Maxime >