From patchwork Fri Nov 12 08:43:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: cong yang X-Patchwork-Id: 12616383 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 D8C0CC433EF for ; Fri, 12 Nov 2021 08:43:22 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 70CCB60FE7 for ; Fri, 12 Nov 2021 08:43:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 70CCB60FE7 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=huaqin.corp-partner.google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A1FD6EB6D; Fri, 12 Nov 2021 08:43:21 +0000 (UTC) Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7C9846EB6D for ; Fri, 12 Nov 2021 08:43:20 +0000 (UTC) Received: by mail-pf1-x429.google.com with SMTP id x131so7914187pfc.12 for ; Fri, 12 Nov 2021 00:43:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jknAOBYahlvH5F30CImxBqWmnzl1YA1ZTXVlzmviue4=; b=39TCUtZEzPl+BH+NQDIoyRNu/eH/yCIaDS2deHLE323oeOsDHpA+d0MFfMz3UCHgeQ usalpodx90YSnI/8X5HySMegKyTxjVbpZBKVDsjpGkN2OnMb3oWlfQLwKqqjAF96609/ fUUmBJ5BHYw9YT+0paxdwWghIjLqbtIDwSxxYXcn0P4MHDR09D4SysI6HvkX8aVc05vj z98XNlaMhYAZL5Wg/JcyKbHWuaY/47aEXHO6ui2DtZgEqqDUdaYyB7JnMOKJiCkwVwWL oQ/ymmqsROXekuUEbBzbemNL3IYHB3ayl7fRlHIp+SxSv9xawemP2ZT7V13w/APaQ3uu Wolg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jknAOBYahlvH5F30CImxBqWmnzl1YA1ZTXVlzmviue4=; b=UO+hFhwc0QLcpmg60mIoZnYzzkdV/4vjDtFngTV+LoF25PI+g1SVMwzRVOGJKuVDcO 9uue0XkifwMtgoqvkXNDCYfchjN+lc3k4jHM4jGWrLjlhezR9MKBdvK7iLhtuZLQIgIW 9rDU4OOsVVIVgO8VKw9WTZaBttKO2uJKavivYYxhgLyDJ4e3uDwOUlqPajiAzoZ+C1k8 uIi6F9Sum3xKeXz+OdYJc2PToWxa2cmwh/31JNYtBLW+dd1pL0A/uqiw0RXcBx5AD7w9 ACBN3o1j3emyuYqrWjQwEsvDstHsjXrSegyRaLgMM86bpCjzxW+gfZ32KuepzkVvbHtc RMdg== X-Gm-Message-State: AOAM533b/F0Y9fEnxE6QyxRDUFUWvr9sZnvlKHWUYi3X02WFxItWGAvi UAVlIgJZIRGMlEo/76IDnvl2DQ== X-Google-Smtp-Source: ABdhPJx29oAZeJhbHSKdo6hnBAzqjZS+mxjQyulJdf1uTPHjp92uMqvnvUI4folmGqf0i8p+ApbmYw== X-Received: by 2002:a63:5416:: with SMTP id i22mr8978791pgb.382.1636706600097; Fri, 12 Nov 2021 00:43:20 -0800 (PST) Received: from yc.huaqin.com ([101.78.151.213]) by smtp.gmail.com with ESMTPSA id h13sm5890959pfv.130.2021.11.12.00.43.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 00:43:19 -0800 (PST) From: yangcong To: swboyd@chromium.org, robert.foss@linaro.org, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, a.hajda@samsung.com, philipchen@chromium.org, dianders@google.com Subject: [PATCH] drm/bridge: parade-ps8640: Fix additional suspend/resume at bootup Date: Fri, 12 Nov 2021 16:43:02 +0800 Message-Id: <20211112084302.2447931-1-yangcong5@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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: devicetree@vger.kernel.org, yangcong , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Through log and waveform, we can see that there will be additional suspend/resume when booting. This timing does not meet the ps8640 spec. It seems that the delay of 500ms does not satisfied drm_panel_get_modes. I increased it to 900ms and it seems that this problem can be solved. To be safe, I'd just round up to a full 1000. Signed-off-by: yangcong Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd --- drivers/gpu/drm/bridge/parade-ps8640.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c index 0c7aab42b04f..0749fa628bfb 100644 --- a/drivers/gpu/drm/bridge/parade-ps8640.c +++ b/drivers/gpu/drm/bridge/parade-ps8640.c @@ -635,13 +635,13 @@ static int ps8640_probe(struct i2c_client *client) pm_runtime_enable(dev); /* * Powering on ps8640 takes ~300ms. To avoid wasting time on power - * cycling ps8640 too often, set autosuspend_delay to 500ms to ensure + * cycling ps8640 too often, set autosuspend_delay to 1000ms to ensure * the bridge wouldn't suspend in between each _aux_transfer_msg() call * during EDID read (~20ms in my experiment) and in between the last * _aux_transfer_msg() call during EDID read and the _pre_enable() call * (~100ms in my experiment). */ - pm_runtime_set_autosuspend_delay(dev, 500); + pm_runtime_set_autosuspend_delay(dev, 1000); pm_runtime_use_autosuspend(dev); pm_suspend_ignore_children(dev, true); ret = devm_add_action_or_reset(dev, ps8640_runtime_disable, dev);