Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1898435lqa; Tue, 30 Apr 2024 02:33:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWe6B4b4rtx5aapxF/zBKMYCdhGVO1s6YEz08b9zshyBkdPgyRdXopsoeyWoGdN2UkSRoqWd9poQb6vJWFzHzzn6CiGpudXnylgc1KUyA== X-Google-Smtp-Source: AGHT+IH7Hh374onWXhCaQ2dbVgrP/kq05BHi0RvkKTgDgVNc4MaiEamfth82qAM1IHYG0RQAdwHr X-Received: by 2002:a17:906:cec7:b0:a55:358f:783c with SMTP id si7-20020a170906cec700b00a55358f783cmr1406233ejb.24.1714469585316; Tue, 30 Apr 2024 02:33:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714469585; cv=pass; d=google.com; s=arc-20160816; b=myoVBROJ0jwb8AgWhpXchTHlpX9207O5QcDVDd57gPd21nYyLF3BNO7hlMIb5jglrD mM2+Y6shItIUkdkwdNLF0d1WnBYQMuCF7WYyniGnnO6ew49LP+st/OE4vWfuyxOueEWI ufLFEBYG77tRR/VKorhGjnyTlVADT6SqL5lxzZyZJg8Pr1ie07W4q8K4EXZUKfAf2fQ2 F8L3hpElBuijI+ht60Y2XyOlg7XzNcXb3ViVncKzbXy9ITuzGvoDfjkaxAJqQVIIZaPV 9FUWVGkxrltUAIa9t5Jhjf0PlK74YamsiAmfk41e543YOcnh8VRJ/pQkqHoVZUXpZiAu ANdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=rZ1f3Q6BEnZTJT1SiGVBJeWSactvAosCQCCnwWRZCiM=; fh=iYZ2UTQT9cQwzbsHtl/YqCTcVkmHLezdURJNh3viPwU=; b=RRqaDI0PLFiPpPmAX1187DBb1Ci2UPnl0mfGWOMBFlJ16NZE0jvk9riftks72FghlR hJczuS0yh48gJBPZz5oTKBHgmPW4/+8BrQhibtTgLNvIBnkHY5qdOVby22KUG0R75zp2 bh4k7RrsnoDJFDFhBjzajEWKAq1Lrlw9rDX1gPamlgG+1yS9PDIAVoOMGruClrenL09+ O6Y4VKyXKB5MI+wsTGzCGeAOpFmgvJxa0Ph975kVWcv4UWUCFc7xylrGm1px6sLm3nog Ye+FU0vYr+h6LQGdgGSni4WFCz5fi4eA71IeaZ2VApf3qGoD97f4zQ0zmskEQy2KKB+A IuWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dZ4pdO1X; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-163693-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163693-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i12-20020a17090671cc00b00a51df618f0bsi15736045ejk.117.2024.04.30.02.33.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 02:33:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163693-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dZ4pdO1X; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-163693-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163693-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DE6431F26AD7 for ; Tue, 30 Apr 2024 09:33:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90C6D128370; Tue, 30 Apr 2024 09:32:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="dZ4pdO1X" Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 600767EEF2 for ; Tue, 30 Apr 2024 09:32:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714469577; cv=none; b=MAKdX3KEOydFSsesnFGzdvxXsoDYQFOy1tHaBzaqI2sn/pCbfQ3vVC4u4YwBG5mU2Zw09hAgbFB35qykgFpKraqaUTPL2JBpQNII4DqdFj0ct6N4s/GHUCMKct0Iaat/o3udbAqGlb5tzuXsh8OYZz4ZhQEI4Hf1t/H3+ERoLxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714469577; c=relaxed/simple; bh=6VlkZ94vfBaUMbJ4oTeQI2QukBnMnA4AUGq7pWtBJas=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=qj9mATuFgpED8w8MfRjB5oS2kseV9fUbOPzKdgPGW22kpStjN4CaaWo9pdwPTCKhLXOnb7F0WErdNM7wdXcYdi7ZlMUIISUi1caqWQhQiWHG233fTstSv+YrcuKYEe5/MtNAyv6y47oIm1yaMuK/L4gHcqmewGynfu14u5gXkDM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=dZ4pdO1X; arc=none smtp.client-ip=209.85.210.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-6f2f6142d64so5097164b3a.2 for ; Tue, 30 Apr 2024 02:32:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714469575; x=1715074375; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=rZ1f3Q6BEnZTJT1SiGVBJeWSactvAosCQCCnwWRZCiM=; b=dZ4pdO1X3VrYtmBeozkPKcvwEKLLHpNOO1/jj6Gxv+CY88ZuCneIEcyhceSaRTb74U g1JDmpzT+For/q+DLSpyPALFLr4iZj+c2x69/MgfS5X7Wy0qRkvwdm7yE/QMjvVYcV7S CTfYB0k8gx+fVmMx5f31PIOoe/LQqL+9JT/F4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714469575; x=1715074375; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rZ1f3Q6BEnZTJT1SiGVBJeWSactvAosCQCCnwWRZCiM=; b=fj3MK9B4+NnrLhLIjKSZb35dEkxD/cgQEzZBlPSAIm5d/PWy/wQTqQ3/faErwC4UjO EbaO+saeNgmauIu+Lq/ah3Qmre4c+etNEWgGCKbh410MeWBP/ZdttmMsdiXViLd4AsBS F5pCPVTteNpozG8gQKy8GRV7JqOOSSGdax3wfUQXF291e52ZNklTBRx1p4/36g2f7UVY mIFmgiE0rVl5f11ZOs8i++ag7Tc/hEDFzGA/ujs0saZgcUeUt1TJ5EpDVgGcEDMu+kk5 m1ZHWannSM/sDqz3UDVNv146Bm/t63VgoceF0O0nkvODCFyI0DHI1ZiB2XHYbyBHl3SV aDRQ== X-Forwarded-Encrypted: i=1; AJvYcCU6iYc7SbFaKwQW1HwSyPUTe6lFVv3O43+0m35gyaoQUTQ9NlNaetJcrAOlOmjvAugdBrhSWhgPphbctS8Iqm0GYPajpFLuaUPxVZMq X-Gm-Message-State: AOJu0Yw6awxci/6JQcMungCTzIO6sf6Shnt4njsWFSxSqh90+oa+ObfI 6ACX4VITZ4x0lP/K3P5rYHcerIbf5JMQLecS/DEvOiUcjx4rO848DrlGe1XKrBhAQ7NQsqH5T1H uh2s3X6Z6ak5ldnAIlHy6B1wH1wdIUOi/DNMn X-Received: by 2002:a05:6a20:9c8f:b0:1ae:84b3:bb5c with SMTP id mj15-20020a056a209c8f00b001ae84b3bb5cmr12622020pzb.1.1714469574691; Tue, 30 Apr 2024 02:32:54 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240429095333.3585438-1-treapking@chromium.org> In-Reply-To: From: Pin-yen Lin Date: Tue, 30 Apr 2024 17:32:43 +0800 Message-ID: Subject: Re: [PATCH] arm64: dts: mediatek: mt8192-asurada: Add off-on-delay-us for pp3300_mipibrdg To: AngeloGioacchino Del Regno Cc: Matthias Brugger , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" , =?UTF-8?B?TsOtY29sYXMgRiAuIFIgLiBBIC4gUHJhZG8=?= , "open list:ARM/Mediatek SoC support" , Hsin-Te Yuan Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Angelo, On Tue, Apr 30, 2024 at 4:17=E2=80=AFPM AngeloGioacchino Del Regno wrote: > > Il 29/04/24 11:53, Pin-yen Lin ha scritto: > > Set off-on-delay-us to 500000 us for pp3300_mipibrdg to make sure it > > complies with the panel sequence. Explicit configuration on the > > regulator node is required because mt8192-asurada uses the same power > > supply for the panel and the anx7625 DP bridge. So powering on/off the > > DP bridge could break the power sequence requirement for the panel. > > > > Fixes: f9f00b1f6b9b ("arm64: dts: mediatek: asurada: Add display regula= tors") > > Signed-off-by: Pin-yen Lin > > > > Uhm, there might be more to it - I don't think that this should ever happ= en. > > The regulator is refcounted, so... > * Bridge on: panel goes off, but regulator doesn't turn off (refcount= =3D1) > * Panel resume -> sequence respected (refcount=3D2 -> wait -> more vr= egs, etc) > * Bridge off: panel is already off (refcount=3D0) > * Bridge resume -> refcount=3D1, no panel commands yet The off-on-delay could be violated because the bridge driver does not check the delay. > * Panel resume -> refcount=3D2, wait -> more vregs, etc > > Can you please describe the issue that you're getting? The symptom we observed is that the device has a small chance to reboot to a black panel, and we think the panel's unprepare delay (the time to power down completely) might not be satisfied because the bridge doesn't check that when it enables the regulator. Even if the regulator is enabled by the panel driver, the delay can also be violated in the following sequence: * t=3D0ms, bridge on: panel goes off, but regulator doesn't turn off (refcount=3D1). The .unprepared_time in panel_edp is updated * t=3D300ms, bridge off, regulator goes off (refcount=3D0) * t=3D600ms, panel on, the panel driver thinks the unprepare delay (500ms) is satisfied, but the regulator was disabled 300ms ago. Did I miss anything here? Or should I add more detail to the commit message= ? > > Cheers, > Angelo > Regards, Pin-yen > > --- > > > > arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/ar= m64/boot/dts/mediatek/mt8192-asurada.dtsi > > index 7a704246678f..08d71ddf3668 100644 > > --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi > > +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi > > @@ -147,6 +147,7 @@ pp3300_mipibrdg: regulator-3v3-mipibrdg { > > regulator-boot-on; > > gpio =3D <&pio 127 GPIO_ACTIVE_HIGH>; > > vin-supply =3D <&pp3300_g>; > > + off-on-delay-us =3D <500000>; > > }; > > > > /* separately switched 3.3V power rail */ >