Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1971362rdg; Sun, 15 Oct 2023 05:50:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2bbyTAoz3vRtmhW/MV4T8xsBEt7JBzaguYNtf0wILvRErtdY30dqlkuI4ABC3qPmvMKhJ X-Received: by 2002:a05:6a00:1790:b0:68f:c057:b567 with SMTP id s16-20020a056a00179000b0068fc057b567mr32256969pfg.26.1697374223163; Sun, 15 Oct 2023 05:50:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697374223; cv=none; d=google.com; s=arc-20160816; b=jxiUaEVHxyTLNngI/bd7X0+7M7C6+ssQz+kxlccaJPLvifqWCm96u/QCjx06KGOGgI D14+0p2MoOyB8YvS6oZnerd1XLci5O51NnRIZHrI/yF6nrVG/8lRiR2mNGrEYo64bcwO WJ8eiOJV7ZcBq1wMGWfvgvfeokDJfeZjN6vZ8N5Q/BXIAjcxGzMvxREyXz/iZCBCcCsJ tL+hMuM6suGZpegxHMiaLsV7x9WwOltBkQDMQxkHE1kZjTAd1zPdmDrt7uNK+p3T0Ikx 627Nogdihqyfd4hbfd95w5xmBUUQyOBF12mP25QJVqWwo5zg/GfT7W6qoambJZCj7Csk qpwA== 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=UfV2CpMyVarW7Y9aBAWfPzGEFP2t6HV6+PINud/jc+k=; fh=lN0s7qn9Bv8TtdrWC4BQN1b6AAcVW7YwibdXk01L85s=; b=vjjyw6NX0T2O6On+OieeXLJ1hTaAMgqpOHWtCsRNI7UTG3M1zmfdZq6LwY/YXRhC36 1ZkO408yaKvnxN1YJncATx8wDqQ02+H2vhOuO9iREoqX5iZLXrzHa8wz+cq0ot/NqzJI UeE5V5CC8oNmg3FRRq+dnybJlFXSGZzQgKmtTomkBXis8A+Qh2CJ0jpvx1W59xJ4IWq2 fVsE9L7c+O6JB+A7YzmqtrwCMLrT59cboNK8OMilR4taNWFdsvJYPsDjZidmFX+D7LSe sQXkNt5tbZHBnkYo7Mor/1GiGqsRa3CpELxQmaz+cAr2cpdyRoVJOTxWLQUqxKXM3IXB fZAw== 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:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id b3-20020a056a000a8300b0068e380c3654si4029493pfl.395.2023.10.15.05.50.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 05:50:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 70AC3807665D; Sun, 15 Oct 2023 05:50:20 -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 S229733AbjJOMta (ORCPT + 99 others); Sun, 15 Oct 2023 08:49:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229555AbjJOMt3 (ORCPT ); Sun, 15 Oct 2023 08:49:29 -0400 Received: from honk.sigxcpu.org (honk.sigxcpu.org [24.134.29.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C60CBAB for ; Sun, 15 Oct 2023 05:49:27 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 5C9B7FB03; Sun, 15 Oct 2023 14:49:24 +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 QmGYZ04xXnHb; Sun, 15 Oct 2023 14:49:23 +0200 (CEST) Date: Sun, 15 Oct 2023 14:49:20 +0200 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Frank Oltmanns Cc: 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, Ondrej Jirman , Samuel Holland Subject: Re: [PATCH 1/1] drm/panel: st7703: Pick different reset sequence Message-ID: References: <20230211171748.36692-1-frank@oltmanns.dev> <20230211171748.36692-2-frank@oltmanns.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230211171748.36692-2-frank@oltmanns.dev> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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]); Sun, 15 Oct 2023 05:50:20 -0700 (PDT) Hi, On Sat, Feb 11, 2023 at 06:17:48PM +0100, Frank Oltmanns wrote: > From: Ondrej Jirman > > Switching to a different reset sequence, enabling IOVCC before enabling > VCC. > > There also needs to be a delay after enabling the supplies and before > deasserting the reset. The datasheet specifies 1ms after the supplies > reach the required voltage. Use 10-20ms to also give the power supplies > some time to reach the required voltage, too. > > This fixes intermittent panel initialization failures and screen > corruption during resume from sleep on panel xingbangda,xbd599 (e.g. > used in PinePhone). Thanks, applied to drm-misc-next. Cheers, -- Guido > > Signed-off-by: Ondrej Jirman > Signed-off-by: Frank Oltmanns > Reported-by: Samuel Holland > --- > drivers/gpu/drm/panel/panel-sitronix-st7703.c | 25 ++++++++++--------- > 1 file changed, 13 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > index 6747ca237ced..45695aa51f62 100644 > --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > @@ -411,29 +411,30 @@ static int st7703_prepare(struct drm_panel *panel) > return 0; > > dev_dbg(ctx->dev, "Resetting the panel\n"); > - ret = regulator_enable(ctx->vcc); > + gpiod_set_value_cansleep(ctx->reset_gpio, 1); > + > + ret = regulator_enable(ctx->iovcc); > if (ret < 0) { > - dev_err(ctx->dev, "Failed to enable vcc supply: %d\n", ret); > + dev_err(ctx->dev, "Failed to enable iovcc supply: %d\n", ret); > return ret; > } > - ret = regulator_enable(ctx->iovcc); > + > + ret = regulator_enable(ctx->vcc); > if (ret < 0) { > - dev_err(ctx->dev, "Failed to enable iovcc supply: %d\n", ret); > - goto disable_vcc; > + dev_err(ctx->dev, "Failed to enable vcc supply: %d\n", ret); > + regulator_disable(ctx->iovcc); > + return ret; > } > > - gpiod_set_value_cansleep(ctx->reset_gpio, 1); > - usleep_range(20, 40); > + /* Give power supplies time to stabilize before deasserting reset. */ > + usleep_range(10000, 20000); > + > gpiod_set_value_cansleep(ctx->reset_gpio, 0); > - msleep(20); > + usleep_range(15000, 20000); > > ctx->prepared = true; > > return 0; > - > -disable_vcc: > - regulator_disable(ctx->vcc); > - return ret; > } > > static const u32 mantix_bus_formats[] = { > -- > 2.39.1 >