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: 21899 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp617304wrr; Thu, 17 Nov 2022 12:56:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf57qBV+bAn4wJ68QLpVMgUk0nNQqAVB4K7gjl7RYMxYnxgLcz2enKDRF+PVTw7yZ64clUa0 X-Received: by 2002:aa7:cc08:0:b0:461:8a43:e93 with SMTP id q8-20020aa7cc08000000b004618a430e93mr3492014edt.275.1668718575041; Thu, 17 Nov 2022 12:56:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668718575; cv=none; d=google.com; s=arc-20160816; b=Ky+K8EMt0YepRYQP04UpOLcELkleqixLBjY/m7G8RuIc/RS3iqder/6q4Y9CuPQT6o ZSeR8tvmfVhCQqmPuoM3RmI0JebAIOQ3AMwJ+WmRXe7Y2zgcZAr9WglK1O/fe0fRljRo aVansdbRAHcN20D9XfOvJ4rRYdrOTSpg4o6fGas/YN/PxcQ8eBgZ7niLK9H3SmdOnKeq K8/olIHLouQ3g20w27QlkRperg9HA5479eZiW90+VXYUjzcEEzbLS7YdOo/Loj+hg2VS fqk44naGbnbd/wbAOEdwuhUf6mk4hJ2o0C86NYH9jc8A4/fvg0plRU3MFzAotEFrBSww bbWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=cZEHbyUygY8mL/VudOEJPrn+JnbHs5KjIjH28m2m7pA=; b=xnpZ/SAjLo1bvmWJjyCL18h3tomTK1E5fbRpuwJFhShVf81JiC1Oy863djdFAWVEBl 4ALvBjeGCKyB/lVz7ubvv9kaj9PshriK+x1m11jQSj10JSs0b12hXThFqSHmA6ZxyPJp G53nXb0ZH4ZlYIIM3fWxEttNp1arLFoTTLsd1gxBMmA7Aq6DlDy2hlRWZfM8/t3XIGQE T2xtn1VLysMvATx8V65xxpd17jNQZ8VxFDQ+nBoDqjWAdy2W98lob72eEw0ftw6dRx/r C8wfYdffbePRiZzspWu2yFLeFC+rMJofFv9B95q3T7PHmVPELTIJkIOAShVkiJ1WlMc8 srug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="UER82uY/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r13-20020a05640251cd00b00462e5d768b3si1877761edd.612.2022.11.17.12.55.22; Thu, 17 Nov 2022 12:56:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="UER82uY/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235006AbiKQUjI (ORCPT + 99 others); Thu, 17 Nov 2022 15:39:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231146AbiKQUjG (ORCPT ); Thu, 17 Nov 2022 15:39:06 -0500 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 140302737 for ; Thu, 17 Nov 2022 12:39:06 -0800 (PST) Received: by mail-io1-xd32.google.com with SMTP id p184so2312336iof.11 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=x/r5L4HPPqHQKN8dQbeCrwEBDMrn8DGLc5oKC+Ya5Fnn6ni+ttxI4QvYO/FTl944hX Ab2Xcn5P/BhKUz7hpypDkfzmWgEU1oo9EoFmFqS3pATY33qCekifpB9cK1VNSxdm8aA+ pNl1ChY3i+TzJIyShmSNN4orajAardOunHaM167LT5kSlxXPQqsMkA/ziujGIeTRVGvE hkVQrGD+Lj5pi0zvPvkPqE8VQ7k/VRW8zZWkhnDFCd4UvuJl4TIgP9uow1p83m0JCRy6 ThXMYH7Ms8a/0+Z1mnysmN7X3vZOLJGWSeuHKmZogFWo9p8e9v70kZpDasg3d23TofxW 6haw== X-Gm-Message-State: ANoB5pl6F4cCFR1jy6fMogsClFa5UDoPutHR9DaMztmhd3Uwdl2IxhOX f8uAA1YNT2wY1Fcv2Z36eDiC9Q== 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 Cc: dianders@chromium.org, Drew Davenport , Daniel Vetter , David Airlie , Sam Ravnborg , Thierry Reding , linux-kernel@vger.kernel.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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,TVD_PH_BODY_ACCOUNTS_PRE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749778248535372453?= X-GMAIL-MSGID: =?utf-8?q?1749778248535372453?= 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: 21897 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp617294wrr; Thu, 17 Nov 2022 12:56:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf5QBryCJyOP0Y0Y/jJyzdMzkwG3MJp/Eubgl2AQDjPO/jjH8Y4+EA9tTxd8c5qSFsOsPM2q X-Received: by 2002:a05:6a00:2908:b0:56b:d738:9b with SMTP id cg8-20020a056a00290800b0056bd738009bmr4609406pfb.61.1668718573578; Thu, 17 Nov 2022 12:56:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668718573; cv=none; d=google.com; s=arc-20160816; b=gKgkJbu3xYZCnS3Z1B0yXjCqwX+sDjLbrH2R8jK0ZYl2H8b0GVxpG5oSYM4Q4Lc/8V fVhsczlhO9ZVzMqAGB1lqWIBLXZ3z3RiNzEE9Ews7S7iZfD3vFY/+qNmNiTpO6uP22OS g4IzfXI69Bt/qnH+cyYg8U3RcI2MNxnKyY9P6O+xW3WpbnV1uAIMJNiciy7/c77Io5gv sj2K8qrEk7DqGRPkCRn0X9P6M6DYFCywEBa0/kbysN+ucicICkGP1Rss/zyGoLp5b8ko 0wFiv6SPLct4sMJSquTrgWbNgypOIGvWZxsbfU0KVGCp2i04r7E0G1yNwEQk3Mct2lPm k19w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6gf8nhbkFhV5ptHrI9veNeEBBvPRhZbZD4Iy3OsOWDI=; b=BjYut5dIQzSxJDKZXzFvgCjaJUsYtb91KXhOjHeyPDY+pMqaZDxW15+U6766yqaYul mUM8PewNTcwDe4EfZ+ZtkWaxVe8r3eg7XBcFVlQw5vLKrd6nDqeI8nQBHA3491zEsWaL WfMDUca2HnKuTcW/ZN2Ekw0HRDUfTX4WxIYKivkjbfgtHDk7d1DyygQvmbdvfCZCufcU 9y7SZSWx+EJzseyW6yRnmZ98tsyxwATF4Jw/Hr8cmLhMwyndhaYkPwoLgdikp/oFyQbe Ggsfpt9ZIcUM8jSXy86Pck1aXLWXEm8IxzizLk4qx30dR8BNDZxk625Sf/efWrIKrsy9 TMEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=k0wtomc0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1-20020a639241000000b0044c7a49bef7si1987167pgn.259.2022.11.17.12.55.35; Thu, 17 Nov 2022 12:56:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=k0wtomc0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240074AbiKQUjP (ORCPT + 99 others); Thu, 17 Nov 2022 15:39:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235063AbiKQUjJ (ORCPT ); Thu, 17 Nov 2022 15:39:09 -0500 Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54C157FF2D for ; Thu, 17 Nov 2022 12:39:09 -0800 (PST) Received: by mail-il1-x12a.google.com with SMTP id q5so1516987ilt.13 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=CW4H0X35ung9kU0awQoflZozcVxCZamxLRrsa0foyErDvxTH86H0nUpqt/wFaaqTuV +jCjQvKMHow+rpXAJ8F7i1HmswowzAqNuyolwQf9deEyJO3d4/PQieRcF/l6WyqfN+by NnVup74XoAhfhDGZseoOmhMxziPBHQgPrTvs8z0IzqP0cQt1enBUPGOUfAHKizuprXZ1 ImlyJy+N/LCKbyZGeewIA27a+FEbjEYKU//yIFKhWhl7ertaKHAM8dKgyxKTfprob50x VeTPYxAh3935ID7etTCHbgjNj6xt+QTq+B0CmAQBN18/DN1dN4NNWB7Tn2XX4SnDBE4j XuyQ== X-Gm-Message-State: ANoB5pmr6kcL+TOxCSauybOddgWSoVIPAYmxsHs+oov2CUMWd5U+rRdn sFnT5ZOv0R8UJ/DoOyWatCytwQ== 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 Cc: dianders@chromium.org, Drew Davenport , Daniel Vetter , David Airlie , Sam Ravnborg , Thierry Reding , linux-kernel@vger.kernel.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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749778247047884262?= X-GMAIL-MSGID: =?utf-8?q?1749778247047884262?= 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: 21898 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp617301wrr; Thu, 17 Nov 2022 12:56:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf5NgRs21XvVEyrw1Aytkgr92pkrVlrWxCmuFRSR9aQg4O8OKa4YMugZv4ZzqvjRFeATqsk4 X-Received: by 2002:a62:54c2:0:b0:56b:fb4f:3d7c with SMTP id i185-20020a6254c2000000b0056bfb4f3d7cmr4618480pfb.54.1668718574508; Thu, 17 Nov 2022 12:56:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668718574; cv=none; d=google.com; s=arc-20160816; b=JhtoZ8T6G050oJx+iyeSaoGJvpN7MmxUbvAx4PJcYrsA1UpBC1idXFVOgWJDDGGifL yumsxiryebl1UIeoipwSVGgheZaRu+RKgDnPR7vOfTNtXfoHPYYKIEfYLcYlYXYg6g8O K08AOi4utRdR0dj7I75xNMP0Ypt9+wItjRMmmaBiJsdLH6ZbheG67zfHtqKLYF1N2kxP 3mx+D0KcUSK+6zVgMk+v1DdhEb9cTH4izMwPZgyUoTFcxV0C22Hl2ejhW30PTM9pZbUC iUfv5o/L8dPPCDHkjVUNcGjlE5mAOcmQoewk2gCEabcxUcxfcRBT70N7fyCKCH5XpT7p BH1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7Qtp1sQRQzBXlT3WBoRlm6hPTuZynYBPeMuxiH1WVCs=; b=YO0Kvtk75diXMzk5K3tBqCPpSf2sHNYTh9AC0bnuObql1dX8XZLAI0p+lwkcde2xCB ZzWAj0u2JaxJgDuMWqOe7eL54qY3hazmEL5fu7aNIl6/tI07D+fOX8V7slPQq6+HQKq2 ucVcpGUBWuBcALWvCVIuH3OOhCBHaAhJso5gywVeuPCMANjPEIrtk3hHCTSuf+erC3QB 5KepuylrypRngmrAzsB65cuhdcDvZW9OYfePga7fXl1+6IlJ/fC1FsP/xWVxjLZUiNna wW+iErb0lldgYZnAsfYiok0p8jU/43Ds9Z9PeZlOPP1GVYbsujvUu1BR/71IryND7U6m 3stg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mxu1ZgEQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k24-20020a63d858000000b0046ec058379bsi1891441pgj.99.2022.11.17.12.55.46; Thu, 17 Nov 2022 12:56:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mxu1ZgEQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240545AbiKQUjW (ORCPT + 99 others); Thu, 17 Nov 2022 15:39:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235089AbiKQUjL (ORCPT ); Thu, 17 Nov 2022 15:39:11 -0500 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EB747FF29 for ; Thu, 17 Nov 2022 12:39:10 -0800 (PST) Received: by mail-il1-x136.google.com with SMTP id o13so1531020ilc.7 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=2bp1Q5qTD4fTgFHxNDkt2F/CCoyvSk6LfJaHaji/EnRbA4P5TRAFtftjUJYPVUpiZL aET6rJAqk/PQxIvbGKleUrpex59c00AgElSM/0/kWAGQPQzL9j4tih11D+HWNZEn9/fG qIjLFd6y/Pt7GsLQG+OONBkNIrRn05UqE1Hem13ehkuhIdPODHK5EmlnMH3A3STwWxVA Zpqoeu6SBIE7xqd2/eFPSliYFkD7VfSzEkVxW63htv1Mi1gt6qdvv7R6r8JuVJzeIeht jf/oOx6tl0RR8rJ4wRhK61+vimq8kZHo6kgNonIueB8TWHXXWWg6Eqv0zJIQFp87kURP p+YA== X-Gm-Message-State: ANoB5pkd21k3vjQmZ48pYvZWcNdlJVf15Yu+JrXdf3sL5V/X38V2GDQf 5do7gNFtuLdIqv4Qaqgc+VaQAg== 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 Cc: dianders@chromium.org, Drew Davenport , Daniel Vetter , David Airlie , Sam Ravnborg , Thierry Reding , linux-kernel@vger.kernel.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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749778247663718706?= X-GMAIL-MSGID: =?utf-8?q?1749778247663718706?= 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: 21900 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp617644wrr; Thu, 17 Nov 2022 12:57:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf4oLNpcMe6nFd2F+ODbPNwk7Ah9F8CP6N7U2KqhfClaJ7t1tnaDCTEyoibpMYncyL8GpTnf X-Received: by 2002:a17:90a:ce8d:b0:213:9c67:1b09 with SMTP id g13-20020a17090ace8d00b002139c671b09mr4317535pju.221.1668718641079; Thu, 17 Nov 2022 12:57:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668718641; cv=none; d=google.com; s=arc-20160816; b=aQ1ABeL1zX3KMiMbydXv+pON62RimZ6wB0aZp4tlkdSck7bYpucljsdzZswAn38opg /TV9/EKTWq3km+EKAFpNhaSfL5k2KJ4mFarZxu45bIycKLXK9KGQIM8fBQi/q3TLcNZm ZpOomNHGk2zt/ZtEwieknWG+HFYKxkYRqEwNy/rZ9VSiSM7rhcbUi4rOiDhh7JhD7Lws 3B6KJPwW34vkc3KB1zIcg698gri2yl/YlSKke3+eEnIPY7I2IdeeeZlc0jYSh1DpxRfR zUtZ/yNVoXvehxbJOensh/2UwhPSpyNv97rwyPBv4oypkif0o3HoYiot8f+h2o7DE7rZ +WIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HFWkWqQjI46OeczyUCkFpr7MHjvDvFUokPuH4qzo/bw=; b=oz1kSxK4WjsyVs/JlHSFEwCsXW4GzL8q5u45uG2TRtUd3J1NCluyQTQtZ0tzpTacv7 C5TnSNGA3/qT8u6M+maw9CzaETM90bRs4pId6aV1ovTQQCR+rGxePwsdlfIzfpzQ2ehr 6BXzRcJM5j77AlSP2zrVWGlmpqL7Tm4Jevdd6bn0If004Y8Ma0NF2dfLpj3m1eBogHws 1tAt3SK0KJWx9hqthEk20dLExJ8pNSZ1XtC9OTYZm1rZazgYPQS7TRddKnQjxrOfxmDQ JMv0PZzN9vmPI2VhfE4hmoeBTwx6a/ItaQEgcvllpCg+/fLMrBUlXN2d4B7uOruYt836 eBxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BNcRyYo1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a170902684c00b00188f9534a59si838407pln.306.2022.11.17.12.57.07; Thu, 17 Nov 2022 12:57:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BNcRyYo1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231274AbiKQUk7 (ORCPT + 99 others); Thu, 17 Nov 2022 15:40:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239771AbiKQUjM (ORCPT ); Thu, 17 Nov 2022 15:39:12 -0500 Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C71C78CB94 for ; Thu, 17 Nov 2022 12:39:11 -0800 (PST) Received: by mail-io1-xd31.google.com with SMTP id z3so2335744iof.3 for ; Thu, 17 Nov 2022 12:39:11 -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=PUEMoMd/jObeN0LOu08Eas6dMT+Gagba+2n/KDWmpQzzVAkG8bMHKar1JL3pm/Wz4h QqHNkWT5MG91KCbM5D8ePKy1PGgSBcz/AmIf6cUGYUwAd97Q3Nv++Amt3mixAc5Gy9HQ asLMlcrIxOgWkiKgr9tNUuJOya63C1IhDeDbkG19blzGSYlpCFyAhjrFZRFsjim2Df6/ dlDxp9QnEbZMMR9/w8hy+tLgSGrJGg5i7/TLYkjpT9OsgpHYwclTzMipvyPvWfYsD7Oe KreKMRy1d3psPsnP1bWemXLz+OQYBdAB+tJ2TJYe8cL+FTxxxar4POxVbDFGaRMCr9B/ I1qQ== X-Gm-Message-State: ANoB5pn8aHrxD1UeCcLy21Jn8pja4Y5E7E5GvNuI4a1xaE4gGZzWgues +Hf/ZkKloZk8AsdkuUBFj719Dw== 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 Cc: dianders@chromium.org, Drew Davenport , Andrzej Hajda , Daniel Vetter , David Airlie , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Neil Armstrong , Robert Foss , linux-kernel@vger.kernel.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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749778317555635863?= X-GMAIL-MSGID: =?utf-8?q?1749778317555635863?= 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: 21901 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp618147wrr; Thu, 17 Nov 2022 12:58:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf64bMEL0AXlHJN08k8gBjtknRnLdhZWgE5jTNhLKtTWK5d5Kz7Tt0TEUSVKI1THPMnFeSqH X-Received: by 2002:a17:90a:c596:b0:212:d2be:c821 with SMTP id l22-20020a17090ac59600b00212d2bec821mr4535734pjt.37.1668718736445; Thu, 17 Nov 2022 12:58:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668718736; cv=none; d=google.com; s=arc-20160816; b=lBTfs8yNYt+Z89CcxJ7sZ0ygxxLvfSSIIqu0g19Z3hxrU4yhGtxFqKCMeyUl0CCl0m GidCdvCfCKoHMGcEb2LuT0Q+vlMGBHs4Ot/F0N3YXtVLfTTCj0xiQ4nYMF8tfSYUNID7 6Uy8UfG2JcdUQwSPzpBeNUvCyAV7GBcFSy8f2h0xWla7rJAp3ajf4lYCvuZg/sBgOsyj St9/8xiq9yRXCucz9xXn+q3JiMSGGGJAcFvllHzVx8+Gz5QjE2YXpGCU2UMaPikahaaB UUWqlNgIwF/Vk3CTdeDYdDFcbTJZKrCiL2paUiYVOFYZ0mRLi20r636nhufv2B+UaIzD McEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CBMrn5FpFpyo6XLLEvcLrJTYaTIQkMIKgkloGnkuSUA=; b=fArpc1XErQiDLKKP30m8vkW5nYRY4QMHjuQaRcLfuz2AAZCrV1m/3D8bFCRV9EPSta t4fVcCtgjlGTN9JcNgK3PsGNO5yaJucsbdJo+qmstBUPZKfMJB5Ii5PLlJcz8qKGWf7u V+137MST5lJ2euSs1MM+qsAq2xVr5oXU3pr0DmOoNuRQnah8S9/QBy6/yDyZc0pQkL+U 4iGGyEWm1EgxdoPUuRwEIid7lvzgkoHX9Lxk7BB+h4lBtcJoWEy6U6edK+u5FR/BrsbV i+eQUvEfUzgEZTEGPsQ5W+k5bLj46AV8MahWR8so5Vpje/A3D1nx2Kb0Q0VQ1Kg144EE muSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Hme4cLCt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q15-20020a056a00084f00b005614fb190e4si2068019pfk.193.2022.11.17.12.58.41; Thu, 17 Nov 2022 12:58:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Hme4cLCt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240478AbiKQUjZ (ORCPT + 99 others); Thu, 17 Nov 2022 15:39:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234967AbiKQUjR (ORCPT ); Thu, 17 Nov 2022 15:39:17 -0500 Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFE258CB85 for ; Thu, 17 Nov 2022 12:39:12 -0800 (PST) Received: by mail-il1-x12a.google.com with SMTP id bp12so1522804ilb.9 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=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=zEzE60p7tG8fwUd1uNOkiRmUA2ntjJfHnjIzPAq+GYq7vGzWsJUqGoEdks9RwQ/Lwb xFjGU7irwsyA9Xm5qJjX28r7ArJoCKxalTx3fL2ysgjeKBVGQWSisDD16axDZww7ZxrC Ugp2YIefMm3f0axcvTPlyGOMXjCa/J1NyaDQ8FSHAcNlzv96tgq/vWPLMlwbDElhvkc3 NCEOhWA1H8LBvA76aZFkdI8ntfPPWxaqYrAZjhL6mPrqmpEPTIg44lEQlfk0ESBIpbFh 6ni7ee/PkVCNbTlqsLjHQdcZvwv71zN2ICmMIIKRbhGyW8Uc9/Y22cMD9J54xqJMChKb CPsw== X-Gm-Message-State: ANoB5pne+LrcbttrZSZzMnLL/P8dY2gdkIa/Ngbqj7zwYXn7WH7DnS84 gnKQcuvnusOmewzGp12yHmar5g== 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 Cc: dianders@chromium.org, Drew Davenport , Daniel Vetter , David Airlie , Sam Ravnborg , Thierry Reding , linux-kernel@vger.kernel.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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749778417869420472?= X-GMAIL-MSGID: =?utf-8?q?1749778417869420472?= 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)