From patchwork Mon Sep 11 09:02:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Watts X-Patchwork-Id: 13380934 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 EE62ECA0ECE for ; Tue, 12 Sep 2023 07:19:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2554B10E396; Tue, 12 Sep 2023 07:19:27 +0000 (UTC) Received: from out-211.mta0.migadu.com (out-211.mta0.migadu.com [91.218.175.211]) by gabe.freedesktop.org (Postfix) with ESMTPS id E607410E1A4 for ; Mon, 11 Sep 2023 09:09:31 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jookia.org; s=key1; t=1694422968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QEybRG/z/QiYL8x5ls+wYPU1myIjvupP8IAsRIKh5xg=; b=L4zZ4w9E6I3vJ/yHBEDZ7bNzpDYIxT6oC471yPAYUPUVy8khFrdLFoGbR4WnLs5hsEKiSB yHusLh1PHnuyZPA4BNjhQBBidEshgfx5A1dEMNboZAcGagMxOFU01LEPA1AhaKM0pNg4+T 5nup4MOhOpwkbTG3+NfIxAg1IaJukZKvnmP/o9Sd2LGDG4Wp9T5zYTAh9vWlDXqO40veRm UTNMhxi2NR7MUecIEaC/BmngFO7QdNK3jP2iIgbRBiGGA8JVXo7DrkU9dgyTsqn6Tdo7Zs dxjoikuMXmYExpEv8H61JgiNqhxL+cRz+YzU810n4zRb9NmmP0v+LKEwvw86Gg== From: John Watts To: dri-devel@lists.freedesktop.org Subject: [RFC PATCH 3/8] drm/panel: nv3052c: Sleep for 150ms after reset Date: Mon, 11 Sep 2023 19:02:01 +1000 Message-ID: <20230911090206.3121440-4-contact@jookia.org> In-Reply-To: <20230911090206.3121440-1-contact@jookia.org> References: <20230911090206.3121440-1-contact@jookia.org> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Mailman-Approved-At: Tue, 12 Sep 2023 07:19:11 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Conor Dooley , devicetree@vger.kernel.org, Sam Ravnborg , Chris Morgan , linux-kernel@vger.kernel.org, Jagan Teki , John Watts , Rob Herring , Krzysztof Kozlowski , Shawn Guo Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The current code waits after resets for 5 to 20 milliseconds. This is appropriate when resetting a sleeping panel, but an awake panel requires at least 120ms of waiting. Sleep for 150ms so the panel always completes it reset properly. Signed-off-by: John Watts --- drivers/gpu/drm/panel/panel-newvision-nv3052c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c index 90dea21f9856..2526b123b1f5 100644 --- a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c +++ b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c @@ -258,7 +258,7 @@ static int nv3052c_prepare(struct drm_panel *panel) gpiod_set_value_cansleep(priv->reset_gpio, 1); usleep_range(10, 1000); gpiod_set_value_cansleep(priv->reset_gpio, 0); - usleep_range(5000, 20000); + msleep(150); for (i = 0; i < ARRAY_SIZE(nv3052c_panel_regs); i++) { err = mipi_dbi_command(dbi, nv3052c_panel_regs[i].cmd,