Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1971389rdg; Sun, 15 Oct 2023 05:50:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHUdetsyIB9sYS3PoW20oW4xRPMD4YWzaItZ7JpnbipE+ouAuYzG11BuY4l/bqKwMsmu/pk X-Received: by 2002:a05:6a20:e10c:b0:179:f81b:12d9 with SMTP id kr12-20020a056a20e10c00b00179f81b12d9mr1719267pzb.11.1697374226134; Sun, 15 Oct 2023 05:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697374226; cv=none; d=google.com; s=arc-20160816; b=vbTT8I4cDL/6PZrIReqJxr4NFcd+PRvEdRtcDIeX+xwi+BATDOuJCvcsGrn+Yo+RKp aK96g3W8zPdo77xRyb2J58Q0jM7zhuhfvvfUCXe7zyTrVHTOyu+/VMNrJ/yuCqQb0HYy VOVGsQ400OkFTqxw/8KhNp8ic8IoqPU1WwdLtHtA0zKunVxkhCLoH8Z0Y1EJ/SHxNDhx NF3i3JOHDzHvqv0C88ZnMTVdbKdWXoWFB44EmzmfTQhPee3+X94q3eSvjDSJiBTu/KBM mkeSCeIPYKnodPTYJkfCQL70h1FgySntniEy/UYYl3E6ADS8uHYVXYYBRyCZQE4xju6y 4wTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=3xfojcv++gXgiQJiaTvfm4qOh7+Dy01StYBaKmwnxoo=; fh=P0QU/5JUJ5hsuwA5Bl9dUSZ+gdyc4iiic+ylWjgOkKM=; b=ZUhlStecAL8fH8o3oBAlqNKZHCKBoeJ0wA3nZwRvGDZ9heyZbSv/TbYHg7OAmswBFe DmhU3lmBxyuSpgChtORwLn+67tO5OktqJvB5bGdnPEVXUPtBlT0+AJN/XfcpFU0ArFxa Y+syslBFh6DWakml2gU1GErax11aP+AoYgqj9xUB42NW2m+k45nrO4JunmbT4hVzge5n 0A9XL8HszyJPUTib54S2VUXn2nfi0a0gI7rfZw4MwBdNmiQQ0P/wEVugA0Ig4okSVqT0 Oby6blJR2dz+0K5SfKkY0QYPzPUMto7XVBkawoWaQUnD6TXQQgjm48WzXtdOqTluB4KV 2QxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id k4-20020a170902d58400b001c74f2d8980si8546621plh.160.2023.10.15.05.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 05:50:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 42D7E804DD9F; Sun, 15 Oct 2023 05:50:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229905AbjJOMuN (ORCPT + 99 others); Sun, 15 Oct 2023 08:50:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229867AbjJOMuM (ORCPT ); Sun, 15 Oct 2023 08:50:12 -0400 Received: from honk.sigxcpu.org (honk.sigxcpu.org [24.134.29.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFA5BA9 for ; Sun, 15 Oct 2023 05:50:10 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 7D3AFFB04; Sun, 15 Oct 2023 14:50:09 +0200 (CEST) Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sQ3EZ0YgUYnD; Sun, 15 Oct 2023 14:50:06 +0200 (CEST) Date: Sun, 15 Oct 2023 14:50:03 +0200 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Frank Oltmanns Cc: Ondrej Jirman , Purism Kernel Team , Ondrej Jirman , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , "open list:DRM PANEL DRIVERS" , open list , phone-devel@vger.kernel.org, Samuel Holland Subject: Re: [PATCH v2 1/1] drm/panel: st7703: Fix timings when entering/exiting sleep Message-ID: References: <20230213123238.76889-1-frank@oltmanns.dev> <20230213123238.76889-2-frank@oltmanns.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230213123238.76889-2-frank@oltmanns.dev> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_FAIL, SPF_HELO_NONE autolearn=no 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 15 Oct 2023 05:50:25 -0700 (PDT) Hi, On Mon, Feb 13, 2023 at 01:32:38PM +0100, Frank Oltmanns wrote: > Fix flickering of the pinephone's XDB599 panel that happens after > resume. > > Extend the delay after issuing the command to exit sleep mode from 60 to > 120 msec as per the controller's specification. > > Introduce a 120 msec delay after issuing the command to enter sleep > mode. This is needed in order for the controller to reliably finalize > the sleep in sequence before switching of power supply. > > In contrast to the JH057N panel, the XBD599 panel does not require a 20 > msec delay after initialization and exiting sleep mode. Therefore, move > the delay into the already existing device specific initialization > function. > > The XDB599 does not require a 20 msec delay between the SETBGP and > SETVCOM commands. Therefore, remove the delay from the device specific > initialization function. Thanks. Applied to drm-misc-next. Cheers, -- Guido > Signed-off-by: Frank Oltmanns > Cc: Ondrej Jirman > Reported-by: Samuel Holland > --- > drivers/gpu/drm/panel/panel-sitronix-st7703.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > index 6747ca237ced..c49f4ef883fc 100644 > --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > @@ -126,6 +126,7 @@ static int jh057n_init_sequence(struct st7703 *ctx) > 0x18, 0x00, 0x09, 0x0E, 0x29, 0x2D, 0x3C, 0x41, > 0x37, 0x07, 0x0B, 0x0D, 0x10, 0x11, 0x0F, 0x10, > 0x11, 0x18); > + msleep(20); > > return 0; > } > @@ -273,7 +274,6 @@ static int xbd599_init_sequence(struct st7703 *ctx) > mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, > 0x07, /* VREF_SEL = 4.2V */ > 0x07 /* NVREF_SEL = 4.2V */); > - msleep(20); > > mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, > 0x2C, /* VCOMDC_F = -0.67V */ > @@ -350,16 +350,14 @@ static int st7703_enable(struct drm_panel *panel) > return ret; > } > > - msleep(20); > - > ret = mipi_dsi_dcs_exit_sleep_mode(dsi); > if (ret < 0) { > dev_err(ctx->dev, "Failed to exit sleep mode: %d\n", ret); > return ret; > } > > - /* Panel is operational 120 msec after reset */ > - msleep(60); > + /* It takes the controller 120 msec to wake up after sleep. */ > + msleep(120); > > ret = mipi_dsi_dcs_set_display_on(dsi); > if (ret) > @@ -384,6 +382,9 @@ static int st7703_disable(struct drm_panel *panel) > if (ret < 0) > dev_err(ctx->dev, "Failed to enter sleep mode: %d\n", ret); > > + /* It takes the controller 120 msec to enter sleep mode. */ > + msleep(120); > + > return 0; > } > > -- > 2.39.1 >