From patchwork Thu Nov 17 20:38:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Davenport X-Patchwork-Id: 13047275 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 E5F02C43217 for ; Thu, 17 Nov 2022 20:39:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2B99C10E5F1; Thu, 17 Nov 2022 20:39:09 +0000 (UTC) Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 92B9A10E5F1 for ; Thu, 17 Nov 2022 20:39:06 +0000 (UTC) Received: by mail-io1-xd2d.google.com with SMTP id h206so2310726iof.10 for ; Thu, 17 Nov 2022 12:39:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=cZEHbyUygY8mL/VudOEJPrn+JnbHs5KjIjH28m2m7pA=; b=UER82uY/1H5jglIAPvq1HsO4gdv4BFQBRhaokleoscz7Q4tld2LY9bERy0ACZV8fhB IxIqhMTIkOn6F4rz+ndD8NGvcSuANM7pvoitxcDZcPvzhzsADp3S64VuG+X0BO9X0ker Ux1ahNLGD7fRkaIH2Ib+C1+uCkYKYrs9mWlXs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cZEHbyUygY8mL/VudOEJPrn+JnbHs5KjIjH28m2m7pA=; b=AwhPzO6syblEi3ckp5t6qmIWqAJOfbicqI3fERenKDCHxM+qQTlz1bUON7iFut8r68 hF+SMGlGrjeiv/klbdkv57N0eHwehbC8LBYKYVUC14XJVByYgWEc026DZsSIBj8FwM/Y wDcQptghmzIkTQHRoaXVwgMGMdQFDHDHYzxfjLBA84AU8iefxkDerO8LazAOFAK03OtL yr3rDoHRZckCBg4R95cJ/59ltx7lyZYYKpgLR0rNRRHxrVS2rq9vM3Tq3t7CY3NgM1MM aQ6JcQZDr0bvrnNMX6g8Gvlj3bivtOs3DpX7pCh4AIyPuR6tzqRW3xN1/nwz6thEs2J1 eL9Q== X-Gm-Message-State: ANoB5plevcdXNqH8EBpiMGFje78k7IFF6yHSn1jJMq98yGhiFZWoWPaN 5NeZm8jFhPNffHwKwExoHNQomp/6VTIR7Q== X-Google-Smtp-Source: AA0mqf6DFioq87cI1ZJtq/Ye8wvmc8ZleSSIc+du2UJgDEkL5FsB9OHxasI3b5ipXufFJbhum4CRyA== X-Received: by 2002:a05:6638:440b:b0:374:fbbe:2da6 with SMTP id bp11-20020a056638440b00b00374fbbe2da6mr1806005jab.163.1668717545484; Thu, 17 Nov 2022 12:39:05 -0800 (PST) Received: from midworld.bld.corp.google.com ([2620:15c:183:200:b285:6808:3f3e:f538]) by smtp.gmail.com with ESMTPSA id d191-20020a0262c8000000b00363da904602sm570192jac.13.2022.11.17.12.39.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 12:39:04 -0800 (PST) From: Drew Davenport To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/5] drm/panel-edp: Use ktime_get_boottime for delays Date: Thu, 17 Nov 2022 13:38:44 -0700 Message-Id: <20221117133655.1.I51639dc112bbbe27259df6bdad56dbabd655d91a@changeid> X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog 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: dianders@chromium.org, linux-kernel@vger.kernel.org, Thierry Reding , Drew Davenport , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" ktime_get is based on CLOCK_MONOTONIC which stops on suspend. On suspend, the time that the panel was powerd off is recorded with ktime_get, and on resume this time is compared to the current ktime_get time to determine if the driver should wait for the panel to power down completely before re-enabling it. Because we're using ktime_get, this delay doesn't account for the time that the device is suspended, during which the power down delay may have already elapsed. Change to use ktime_get_boottime throughout, which uses CLOCK_BOOTTIME which does not stop when suspended. This ensures that the resume path will not be delayed if the power off delay has already been met while the device is suspended. Signed-off-by: Drew Davenport Reviewed-by: Douglas Anderson --- drivers/gpu/drm/panel/panel-edp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c index 5cb8dc2ebe184..a0a7ab35e08c9 100644 --- a/drivers/gpu/drm/panel/panel-edp.c +++ b/drivers/gpu/drm/panel/panel-edp.c @@ -351,7 +351,7 @@ static void panel_edp_wait(ktime_t start_ktime, unsigned int min_ms) return; min_ktime = ktime_add(start_ktime, ms_to_ktime(min_ms)); - now_ktime = ktime_get(); + now_ktime = ktime_get_boottime(); if (ktime_before(now_ktime, min_ktime)) msleep(ktime_to_ms(ktime_sub(min_ktime, now_ktime)) + 1); @@ -378,7 +378,7 @@ static int panel_edp_suspend(struct device *dev) gpiod_set_value_cansleep(p->enable_gpio, 0); regulator_disable(p->supply); - p->unprepared_time = ktime_get(); + p->unprepared_time = ktime_get_boottime(); return 0; } @@ -464,14 +464,14 @@ static int panel_edp_prepare_once(struct panel_edp *p) } } - p->prepared_time = ktime_get(); + p->prepared_time = ktime_get_boottime(); return 0; error: gpiod_set_value_cansleep(p->enable_gpio, 0); regulator_disable(p->supply); - p->unprepared_time = ktime_get(); + p->unprepared_time = ktime_get_boottime(); return err; } From patchwork Thu Nov 17 20:38:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Davenport X-Patchwork-Id: 13047279 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 83068C4332F for ; Thu, 17 Nov 2022 20:39:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0F2EA10E680; Thu, 17 Nov 2022 20:39:45 +0000 (UTC) Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 08ECC10E657 for ; Thu, 17 Nov 2022 20:39:10 +0000 (UTC) Received: by mail-il1-x130.google.com with SMTP id d3so1544004ils.1 for ; Thu, 17 Nov 2022 12:39:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6gf8nhbkFhV5ptHrI9veNeEBBvPRhZbZD4Iy3OsOWDI=; b=k0wtomc04CLFQ/oimpQEAfFsC/wFKEOaxydy/xnMuiwqXbbATpyDxEBzbOsUZYGMQl qinO5vMHF8KVson4eE9qULhgf8njZDv7dGRuYQHaYrKdDRJ/ahSFYuTM2zUI5MsQ74s1 cPkpZpgPjpWjQtTvwoC11osToRj8xlIdMq1zM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6gf8nhbkFhV5ptHrI9veNeEBBvPRhZbZD4Iy3OsOWDI=; b=RfQbtofx9aPfeQ7jdf1/brzCB4XjnifUat4arGRX31yVZwLk+bREXM9gc6OWtgli/a 2IVVtx0ac203RQJX0uinW5RvPSH07utWpt92C7w6SrVN6wuC1eLHtwkkmBnxUqpY1zca lgVy+TFMHnlENHUC3qDlvGlR6A5G1k2VMz3HBmZdgcT0hyEYjvBiLLqZV3QT0/KSx25S zvZ9nhL3e5g6kUIlkMTir5E6jI5CHVIbBhMt9+6Soag9tG2BawoxPlSnzdUe85fLJRnz fHHp5AGLUs/4otpacmSWb+UgOuTZd45PkgkHcY02wUzujkg5OeI7aT3mKm08I/8tNgFI I7dg== X-Gm-Message-State: ANoB5plJ3FulsHfWwJM+0WFOh2jn5NHDpveh1aFmBftN5Hyd0FucWgMy apywpAhfE3tVshjVCMQljA6yrZ3+r/F01A== X-Google-Smtp-Source: AA0mqf4tJHcO2Ouv5AD2ke3z2Di7gzp4vSmuxtlE/UGTeC6ckHk83kP8c4sK0i+mhkakqYR2crIuuQ== X-Received: by 2002:a92:c506:0:b0:302:4981:64b with SMTP id r6-20020a92c506000000b003024981064bmr1998342ilg.200.1668717548714; Thu, 17 Nov 2022 12:39:08 -0800 (PST) Received: from midworld.bld.corp.google.com ([2620:15c:183:200:b285:6808:3f3e:f538]) by smtp.gmail.com with ESMTPSA id d191-20020a0262c8000000b00363da904602sm570192jac.13.2022.11.17.12.39.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 12:39:08 -0800 (PST) From: Drew Davenport To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/5] drm/panel-samsung-atna33xc20: Use ktime_get_boottime for delays Date: Thu, 17 Nov 2022 13:38:45 -0700 Message-Id: <20221117133655.2.Iebd9f79aba0a62015fd2383fe6986c2d6fe12cfd@changeid> X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog In-Reply-To: <20221117133655.1.I51639dc112bbbe27259df6bdad56dbabd655d91a@changeid> References: <20221117133655.1.I51639dc112bbbe27259df6bdad56dbabd655d91a@changeid> 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: dianders@chromium.org, linux-kernel@vger.kernel.org, Thierry Reding , Drew Davenport , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" ktime_get_boottime continues while the device is suspended. This change ensures that the resume path will not be delayed if the power off delay has already been met while the device is suspended Signed-off-by: Drew Davenport Reviewed-by: Douglas Anderson --- drivers/gpu/drm/panel/panel-samsung-atna33xc20.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c index 5a8b978c64158..f4616f0367846 100644 --- a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c +++ b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c @@ -53,7 +53,7 @@ static void atana33xc20_wait(ktime_t start_ktime, unsigned int min_ms) ktime_t now_ktime, min_ktime; min_ktime = ktime_add(start_ktime, ms_to_ktime(min_ms)); - now_ktime = ktime_get(); + now_ktime = ktime_get_boottime(); if (ktime_before(now_ktime, min_ktime)) msleep(ktime_to_ms(ktime_sub(min_ktime, now_ktime)) + 1); @@ -75,7 +75,7 @@ static int atana33xc20_suspend(struct device *dev) ret = regulator_disable(p->supply); if (ret) return ret; - p->powered_off_time = ktime_get(); + p->powered_off_time = ktime_get_boottime(); p->el3_was_on = false; return 0; @@ -93,7 +93,7 @@ static int atana33xc20_resume(struct device *dev) ret = regulator_enable(p->supply); if (ret) return ret; - p->powered_on_time = ktime_get(); + p->powered_on_time = ktime_get_boottime(); if (p->no_hpd) { msleep(HPD_MAX_MS); @@ -142,7 +142,7 @@ static int atana33xc20_disable(struct drm_panel *panel) return 0; gpiod_set_value_cansleep(p->el_on3_gpio, 0); - p->el_on3_off_time = ktime_get(); + p->el_on3_off_time = ktime_get_boottime(); p->enabled = false; /* From patchwork Thu Nov 17 20:38:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Davenport X-Patchwork-Id: 13047276 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 BD6A7C4332F for ; Thu, 17 Nov 2022 20:39:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A377110E657; Thu, 17 Nov 2022 20:39:18 +0000 (UTC) Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) by gabe.freedesktop.org (Postfix) with ESMTPS id C252D10E657 for ; Thu, 17 Nov 2022 20:39:10 +0000 (UTC) Received: by mail-il1-x12b.google.com with SMTP id m15so1542061ilq.2 for ; Thu, 17 Nov 2022 12:39:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7Qtp1sQRQzBXlT3WBoRlm6hPTuZynYBPeMuxiH1WVCs=; b=mxu1ZgEQKaJCi68utQFU0bC1fkMRs13p4Xs2GkoaBU2QH4wFfg/WxjPA5j0rkPnioW Sa5tyQFiUFI53GUAjfZmJOPp62c17/GzgAM9E4RPx2/t9PW165trmk7Y3EQGLXX0exeX byktKViokoVJeV3MqqKA1XbBPxlvSrLz2Zfxw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7Qtp1sQRQzBXlT3WBoRlm6hPTuZynYBPeMuxiH1WVCs=; b=f/wKbiRmqUWRnt9o9XWEL217zNlSWSJwXUovU0EGUBd+jXkTyYaPO5JcC3WVcEk7kl oY2MQvyTxJPxGfzG7d5Xa0AqQ9WeNHi2UBhhu6wiP47REpkK9ZJG1jk41fKFbYgeUUs2 j1NJOprr0v7QW+m8WykTy+p7pyL8LgtYk9vLOuhhe855kf+HezIEw2MN20E6jR5RU5+J DvCUXJU3IsILaOgXdphswk96eC4gpmA2tteREAfcuEg85MKgfXn/+iONfhf6d8aCWPkW BtNRF6GZpnH2524FCcZyfigJYGjLlgbz7uoF7Z4EXEz8GIHuwGiKgtf4oPAaNmiWEADS 5Pdw== X-Gm-Message-State: ANoB5pnFf19eLMKg8u0sgXmJEagxqQfGVMYLZDp9kz3mm+qVRiDtD3F4 rG1kZY3G4sLGomoo8iJIgz9rg/+f86qoJA== X-Google-Smtp-Source: AA0mqf7jiV+CUhBJR5sMY+0ATWmq+aNHemsPzFFpBRvofMaokqK+YPcfrO4aRwlaJTF1Dm4QFUvHQA== X-Received: by 2002:a92:dd0e:0:b0:300:b9c4:8c1 with SMTP id n14-20020a92dd0e000000b00300b9c408c1mr1945545ilm.124.1668717549772; Thu, 17 Nov 2022 12:39:09 -0800 (PST) Received: from midworld.bld.corp.google.com ([2620:15c:183:200:b285:6808:3f3e:f538]) by smtp.gmail.com with ESMTPSA id d191-20020a0262c8000000b00363da904602sm570192jac.13.2022.11.17.12.39.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 12:39:09 -0800 (PST) From: Drew Davenport To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/5] drm/panel-simple: Use ktime_get_boottime for delays Date: Thu, 17 Nov 2022 13:38:46 -0700 Message-Id: <20221117133655.3.Iebd9f79aba0a62015fd2383fe6986c2d6fe12cfd@changeid> X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog In-Reply-To: <20221117133655.1.I51639dc112bbbe27259df6bdad56dbabd655d91a@changeid> References: <20221117133655.1.I51639dc112bbbe27259df6bdad56dbabd655d91a@changeid> 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: dianders@chromium.org, linux-kernel@vger.kernel.org, Thierry Reding , Drew Davenport , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" ktime_get_boottime continues while the device is suspended. This change ensures that the resume path will not be delayed if the power off delay has already been met while the device is suspended Signed-off-by: Drew Davenport Reviewed-by: Douglas Anderson --- drivers/gpu/drm/panel/panel-simple.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 8a3b685c2fcc0..065f378bba9d2 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -280,7 +280,7 @@ static void panel_simple_wait(ktime_t start_ktime, unsigned int min_ms) return; min_ktime = ktime_add(start_ktime, ms_to_ktime(min_ms)); - now_ktime = ktime_get(); + now_ktime = ktime_get_boottime(); if (ktime_before(now_ktime, min_ktime)) msleep(ktime_to_ms(ktime_sub(min_ktime, now_ktime)) + 1); @@ -307,7 +307,7 @@ static int panel_simple_suspend(struct device *dev) gpiod_set_value_cansleep(p->enable_gpio, 0); regulator_disable(p->supply); - p->unprepared_time = ktime_get(); + p->unprepared_time = ktime_get_boottime(); kfree(p->edid); p->edid = NULL; @@ -351,7 +351,7 @@ static int panel_simple_resume(struct device *dev) if (p->desc->delay.prepare) msleep(p->desc->delay.prepare); - p->prepared_time = ktime_get(); + p->prepared_time = ktime_get_boottime(); return 0; } From patchwork Thu Nov 17 20:38:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Davenport X-Patchwork-Id: 13047277 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 54DCEC433FE for ; Thu, 17 Nov 2022 20:39:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 334A810E67B; Thu, 17 Nov 2022 20:39:22 +0000 (UTC) Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8878210E657 for ; Thu, 17 Nov 2022 20:39:12 +0000 (UTC) Received: by mail-io1-xd30.google.com with SMTP id p184so2312555iof.11 for ; Thu, 17 Nov 2022 12:39:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HFWkWqQjI46OeczyUCkFpr7MHjvDvFUokPuH4qzo/bw=; b=BNcRyYo1cs5H5wz/ooc/TaJyoeJQ8emL3WoCGbpKPrfUS1nlvORE78y9bqw3y0Z5w+ w8ZqaO/V7hCEAv6ZwwP6eNc/npYjSfskSs1qpgMswcD5xRMpRkF/suTtrTX1DfSKkQzP IrFZpAM0rWr/KbthvifIe0mxC9QFGD97ng/4Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HFWkWqQjI46OeczyUCkFpr7MHjvDvFUokPuH4qzo/bw=; b=OKAxOgUpfl3/OIxUOrvYsUW31T41Wcs9XGj/NyinKh7Vq5NJA+xOwvigJgHYBPXIyR 5frqjqWMrd/5Rn3gRgAqWEZXG1zDjKI5gkYZimTfQsiDoJT4eKQY3VZy0U7qKcqRh021 4PC/GB16IeeNSMGcljl5y9M2l0A6Iox5yQEUwHxs8tVnZqq/ahBx1vbhWTKalpHUs7Wh Lob230uNEfKy045RYhgHOTlJFGRApKQ7Rhcvyu1OWwolEp8xaM++ylOJjuGKyHfRJ/uU CFIO/0sCY4zKQUgAoqUym5kN6vuQKic3R+BN6Z1g3QXBmAidGD4l6zaFEBOXuTFe8Rqz rCHw== X-Gm-Message-State: ANoB5pn7Ho358l6R0t8WxI+n4idRZO3ELW/8nIM2VZoGeLdu06Dm8Gnb BtiN0bNbFuvEOhuR6MrRaI52k8VdsGEKbQ== X-Google-Smtp-Source: AA0mqf5+BPEGrp46T/YWlC2wc+z8vnTOZvFcMl/0RZ2ToQg3vrCmVrcjDa9tb5KKgV2l07n5Xp5jIA== X-Received: by 2002:a05:6638:4907:b0:375:ca55:284e with SMTP id cx7-20020a056638490700b00375ca55284emr1888278jab.248.1668717551175; Thu, 17 Nov 2022 12:39:11 -0800 (PST) Received: from midworld.bld.corp.google.com ([2620:15c:183:200:b285:6808:3f3e:f538]) by smtp.gmail.com with ESMTPSA id d191-20020a0262c8000000b00363da904602sm570192jac.13.2022.11.17.12.39.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 12:39:10 -0800 (PST) From: Drew Davenport To: dri-devel@lists.freedesktop.org Subject: [PATCH 4/5] drm/bridge/parade-ps8640: Extend autosuspend Date: Thu, 17 Nov 2022 13:38:47 -0700 Message-Id: <20221117133655.4.If6153da69ec4bc9e83d5f095ef6e6b07283940a5@changeid> X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog In-Reply-To: <20221117133655.1.I51639dc112bbbe27259df6bdad56dbabd655d91a@changeid> References: <20221117133655.1.I51639dc112bbbe27259df6bdad56dbabd655d91a@changeid> 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: Neil Armstrong , Andrzej Hajda , Jonas Karlman , Robert Foss , dianders@chromium.org, Jernej Skrabec , linux-kernel@vger.kernel.org, Laurent Pinchart , Drew Davenport Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Same change as done for panel-samsung-atna33xc20. Extend the autosuspend delay to avoid oscillating between power status during boot. Signed-off-by: Drew Davenport Reviewed-by: Douglas Anderson --- 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 6a614e54b383c..f74090a9cc9e8 100644 --- a/drivers/gpu/drm/bridge/parade-ps8640.c +++ b/drivers/gpu/drm/bridge/parade-ps8640.c @@ -734,13 +734,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 1000ms to ensure + * cycling ps8640 too often, set autosuspend_delay to 2000ms 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, 1000); + pm_runtime_set_autosuspend_delay(dev, 2000); pm_runtime_use_autosuspend(dev); pm_suspend_ignore_children(dev, true); ret = devm_add_action_or_reset(dev, ps8640_runtime_disable, dev); From patchwork Thu Nov 17 20:38:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Davenport X-Patchwork-Id: 13047278 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 B55AEC433FE for ; Thu, 17 Nov 2022 20:39:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5647910E67F; Thu, 17 Nov 2022 20:39:37 +0000 (UTC) Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8378710E657 for ; Thu, 17 Nov 2022 20:39:13 +0000 (UTC) Received: by mail-il1-x12d.google.com with SMTP id o13so1531077ilc.7 for ; Thu, 17 Nov 2022 12:39:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CBMrn5FpFpyo6XLLEvcLrJTYaTIQkMIKgkloGnkuSUA=; b=Hme4cLCtXAaX9LqVE8bdNByEHHkvn6cBFTD9Z299bI4A2Aybw7Uz0dM8tg3n3SkkHg x+61Jdtz1YbB0GHTgtPtM66W1lrayEX9ndqwqIDGS4+ZN5QjdDuXuhUUfaB1M/lIUutn awlO9fLKxauHwnc51wZYSBzuaBEwGNr5XJJcQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CBMrn5FpFpyo6XLLEvcLrJTYaTIQkMIKgkloGnkuSUA=; b=TBiVmDhzfyz+M9TnJrUaziOq5dKxyzEq3TmVnl7NatVuKgd11bANntXuZtXCMlWg+Z 2kxTmygPft6Z6fxUEb9BOHtebtZ9t8pfPETkrN5l8MKwoUer4uLpXdMyylMeVfHYvk/v 8bHnhrFN/KOWGFzqsF6Eq0twIrelbQXcIHWFXo6t7z7EmmPMj+GKFnXykM5EH2sjXciU sucLEgkCzpbR92W75Khp/9zwzGRzXqSOWY52Lba3LlMudCHbvUPbwslnB2N5FNxqVt+M UFm9eq8AR/+Rlu3pFzK6DFtSB8D3YwfFvZjPKl5TS9Qmq1mYlaCHcOU2KHfe+bJiEqTe Ji1Q== X-Gm-Message-State: ANoB5pndlZQ+QwAVVUla6NsQfrqCsooFuH4/1ecIGWk1L1UTCBJHdF4Y yQKKoyy6TXMRy9ijkGJ04F2pxqeOyF1uKQ== X-Google-Smtp-Source: AA0mqf5DOe5AO4XAr4/ZX3dTaQsRYrztItnwsdC1NGdTpSOzTtm8WSNGyQlclYNxGvJoWToS2a1irQ== X-Received: by 2002:a92:d9cb:0:b0:2fa:12a7:b8c8 with SMTP id n11-20020a92d9cb000000b002fa12a7b8c8mr1990295ilq.286.1668717552319; Thu, 17 Nov 2022 12:39:12 -0800 (PST) Received: from midworld.bld.corp.google.com ([2620:15c:183:200:b285:6808:3f3e:f538]) by smtp.gmail.com with ESMTPSA id d191-20020a0262c8000000b00363da904602sm570192jac.13.2022.11.17.12.39.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 12:39:11 -0800 (PST) From: Drew Davenport To: dri-devel@lists.freedesktop.org Subject: [PATCH 5/5] drm/panel-samsung-atna33xc20: Extend autosuspend delay Date: Thu, 17 Nov 2022 13:38:48 -0700 Message-Id: <20221117133655.5.I96ce2a565ff893eddcbee70174c991179311a3ae@changeid> X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog In-Reply-To: <20221117133655.1.I51639dc112bbbe27259df6bdad56dbabd655d91a@changeid> References: <20221117133655.1.I51639dc112bbbe27259df6bdad56dbabd655d91a@changeid> 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: dianders@chromium.org, linux-kernel@vger.kernel.org, Thierry Reding , Drew Davenport , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Avoid the panel oscillating on and off during boot. In some cases it will be more than 1000ms between powering the panel to read the EDID early during boot, and enabling the panel for display. Extending the autosuspend delay avoids autosuspending during this interval. Signed-off-by: Drew Davenport Reviewed-by: Douglas Anderson --- drivers/gpu/drm/panel/panel-samsung-atna33xc20.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c index f4616f0367846..5703f4712d96e 100644 --- a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c +++ b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c @@ -310,7 +310,7 @@ static int atana33xc20_probe(struct dp_aux_ep_device *aux_ep) ret = devm_add_action_or_reset(dev, atana33xc20_runtime_disable, dev); if (ret) return ret; - pm_runtime_set_autosuspend_delay(dev, 1000); + pm_runtime_set_autosuspend_delay(dev, 2000); pm_runtime_use_autosuspend(dev); ret = devm_add_action_or_reset(dev, atana33xc20_dont_use_autosuspend, dev); if (ret)