Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp354155rdg; Tue, 10 Oct 2023 12:12:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFF7DLozN1aK9Z75hPKNCvQ1by8ioYeFT0ODyL4fZbaud42YWkvFlLjHaPwYPOtknH1U9ae X-Received: by 2002:a05:6a21:18c:b0:13e:7d3:61d1 with SMTP id le12-20020a056a21018c00b0013e07d361d1mr25359686pzb.12.1696965133362; Tue, 10 Oct 2023 12:12:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696965133; cv=none; d=google.com; s=arc-20160816; b=YaJciYpWjpP9DD/3rK248R1F/PfzS/ggg0Lennjaftnq98yPNDXUKHSuCCubFOAkkw ellrquqfpPvVu8rvDYl+GP2J+/431WgfH1MTSJPpk1rtu5moR7U7YCJZ8BqXXcbBpT6e uTZf/vkL+J/9zhDkgQdjMf1T6U4gkBIrne0zY0/ygk9UlwX75osvYNuAVV/pf9cAoDxM 2tR5E3XBM+nVMGvWBH144oU5ifn0blAwn1jTaYiMsS45jUDtURmdI0UXdLFX7P4iZ1yD nvdmQtujOtmO/cHo2n2lkFHGuuZsqGwacjL1quBL6HwePBVOD2VRMJUKUBNHyWDBywq+ /Kpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=BmjErNj6cLHcO0s7PJGZsoXQtRcGQqMYUEfJq8NBOjo=; fh=25QXSH3NssU2osehlyR75VCcKg56LEIsbSNFMqYq3tg=; b=zFe1nI0IWmsav8spLLIvRvhLCY3orXwnmuN9bWXvfqV5qrgO8YdCd7YCSKbk+rEip5 PycHBHWMDBFzb/57mO61avu1FWq2UyrNc3tXFHySDCG+8TSKCxAeB614SIkAKGgSukUV sQaiMKdhIVUmcOqeGjXw3WAGtOZqV+nsvNYNkH2/Ttn0t7UmqVQdscAXdsTLqkh9fYZh IQuoEU/VkVe8azpX9J80LiqgvTteiayec7SB6F8FDqOaBccR7fMZC+pdpLigvT+T+a+K v+Gob75bPaBX9rnnmIR7B6V0+1WiwrlPejOyM8LIChrl3DCUxJFA+bENCpByD7ou7gmS XGWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=maZySBjG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id q11-20020a170902a3cb00b001c60ecf8f7asi1154104plb.258.2023.10.10.12.12.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 12:12:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=maZySBjG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 3854B80A9B1A; Tue, 10 Oct 2023 12:12:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343775AbjJJTLy (ORCPT + 99 others); Tue, 10 Oct 2023 15:11:54 -0400 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 S1343827AbjJJTLx (ORCPT ); Tue, 10 Oct 2023 15:11:53 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17158E0 for ; Tue, 10 Oct 2023 12:11:45 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-534694a9f26so2691a12.1 for ; Tue, 10 Oct 2023 12:11:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696965103; x=1697569903; 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=BmjErNj6cLHcO0s7PJGZsoXQtRcGQqMYUEfJq8NBOjo=; b=maZySBjGgF20+xAxLcuzu6WFVPXxIrLhGzPtXRx7psguyrbiiEDcqA96W5otl5Wsrk H8KmjqJsLs3ZdbJJpELZjIXBpktJhkzaTdjK6OZBCRdFmLtl3b4yJyaaN+NVs+RzFc/y BeWP0zc6JdP+Lwn32/OYnzDZXCO30tnXJbG2jC/sv8x65QobIBk2Uc16ad+ajlRoZjCt fhBp1ugqlt5MX+7oaBVwaTwOThHPZKF1D7SGtza96XbIrRqzAiff5ZeZ5GVpF5yMVdTS EIPOrjXDE+4xj4ZGBByLxxMt2l1iDGqeCyYayua4W4CtkUpmuVSSGvknADS00dZtm6Pa VVZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696965103; x=1697569903; 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=BmjErNj6cLHcO0s7PJGZsoXQtRcGQqMYUEfJq8NBOjo=; b=fv4UbDQ7ZT8KixxDaGLxLIWX9qfSfmVxHMFK9AEDn6m0oVk3otmrk/BLni5xwmw9PZ pdFH8vZWAShcYkN7n2mjDM/VjMr9PBoYka2UFd28cSg/qdooGXnmXEB8HEOmP3RgbuJ8 Fgf3n8CfOloRv8ynHACShTjAxw58IaTXbWXxduN6qUwcINrjf3KjQrf3wwZ4ynvqm8JT 2YafsrMgOCw/BVk8FGttKBmiFEYB/PqVTwH2ZJWaYCpTcRtJp6nXIzIvolHu99gZB00C PVruItqrZKaRdY7ICPcC7QwyqAv1sD5TuHdSJpC5LqdcbEHjLyyc0KemTOWAmeJjYROL BGkQ== X-Gm-Message-State: AOJu0YxjX/Efvrk2JpfoOYapJMSNaIP0fPXi9Eu6PmnF2AQl7zm0OKtD W/duGjv+B9Cvo9VEZbr0lGZ+Fz2F4SggitMu5oT/Gw== X-Received: by 2002:a50:cc9a:0:b0:53d:a40e:bed1 with SMTP id q26-20020a50cc9a000000b0053da40ebed1mr26458edi.3.1696965102691; Tue, 10 Oct 2023 12:11:42 -0700 (PDT) MIME-Version: 1.0 References: <20231007060639.725350-1-yangcong5@huaqin.corp-partner.google.com> <20231007060639.725350-3-yangcong5@huaqin.corp-partner.google.com> In-Reply-To: From: Doug Anderson Date: Tue, 10 Oct 2023 12:11:30 -0700 Message-ID: Subject: Re: [v1 2/2] drm/panel: ili9882t: Avoid blurred screen from fast sleep To: cong yang Cc: sam@ravnborg.org, neil.armstrong@linaro.org, daniel@ffwll.ch, hsinyi@google.com, linus.walleij@linaro.org, swboyd@chromium.org, airlied@gmail.com, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 10 Oct 2023 12:12:11 -0700 (PDT) Hi, On Tue, Oct 10, 2023 at 4:36=E2=80=AFAM cong yang wrote: > > Hi, > > On Tue, Oct 10, 2023 at 4:44=E2=80=AFAM Doug Anderson wrote: > > > > Hi, > > > > On Fri, Oct 6, 2023 at 11:07=E2=80=AFPM Cong Yang > > wrote: > > > > > > At present, we have found that there may be a problem of blurred > > > screen during fast sleep/resume. The direct cause of the blurred > > > screen is that the IC does not receive 0x28/0x10. Because of the > > > particularity of the IC, before the panel enters sleep hid must > > > stop scanning, i2c_hid_core_suspend before ili9882t_disable. > > > This doesn't look very spec-compliant. > > > > Presumably you could be more spec compliant if we used > > "panel_follower" in this case? Would that be a better solution? > > In the "panel_follower" solution, the phenomenon is the same. > The current order is > ili9882t_disable=3D>i2c_hid_core_suspend=3D>elan_i2c_hid_power_down=3D>il= i9882t_unprepare, > ili9882t need touchpanel stop scanning,i2c_hid_core_suspend before > ili9882t_disable. Ugh, that's unfortunate. Though is there a reason why you couldn't just move the `ili9882t_enter_sleep_mode()` to `ili9882t_unprepare()`? That seems like it should be OK and even perhaps makes it more symmetric with thue enable? > > > @@ -507,7 +526,7 @@ static int ili9882t_prepare(struct drm_panel *pan= el) > > > gpiod_set_value(ili->enable_gpio, 1); > > > usleep_range(1000, 2000); > > > gpiod_set_value(ili->enable_gpio, 0); > > > - usleep_range(1000, 2000); > > > + usleep_range(40000, 50000); > > > > nit: use 40000, 41000 instead of 40000, 50000. Linux almost always > > uses the longer delay, so that'll save ~9 ms. The only reason for the > > range is to optimize kernel wakeups which is really not a concern > > here. > > We need 50ms delay to meet the requirement. I'll respond to your v2, but if you need 50 ms then your current delay is w= rong. -Doug