Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1940504ybg; Thu, 30 Jul 2020 06:42:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdvrm1LdoTQCbeWwiO65PIzw56ARQ4wzHmHj3ARaw9A8ST8tIfPVXg6g1ZkPR1Z5Jyqd59 X-Received: by 2002:aa7:c697:: with SMTP id n23mr2652332edq.50.1596116525088; Thu, 30 Jul 2020 06:42:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596116525; cv=none; d=google.com; s=arc-20160816; b=Q0BMRYeCsJqO/RCy7wkx5u+b1kefU66PknNAiQ/n10/ky0Np1KSG3sAcLPg72dNxzU Vdz84qQYxbtcVwbImQPSYEI9ljcvI6UU9IrlLMryZMVSiW7Ug3WmxgZA3756mW7Kk9gg QhbUDPSn3BjcSHPGmxGOZgYNP+2yovly/NWkDSVwwwQTHhLeEJpAkPa+onTrGR1lQ6rg O6LnpDk9zmwvaacCSqjCqQHeAxiky2jXFWo9Q7IaOgKW+WDqOCYAxPy8Tk+HXASZt6YU OpXVRc2jezgCNX6twM4Kaz4iXCJvYOyXcQNPzQk2UbNNbEZEr45U6zj+89lwIATThX1N HRTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=qDj/R4V7/0X3VD1sxPnrj4W/0rUbkcNAQG4vi8TabHg=; b=BgaVxVdK6f/jrOkKCL3OLic40/YKCW2VFSeCfr+vDAAxS9O3OGxuXN2KK8clVZuWb7 Tst9QawKwnQg4zjuRbg3BUjJ6H2M5fsHB8fxBEs7XgqELmUvMyyBh4eC9sDTlV/cv/Z1 O/aorc85ge9m+4pml7lSSY8qx63oPGThBIw9BwB8nKfao58bj9KB26JjZcdNCPMpJqlO i844BC6quoO1ojVLoxLSyIMAk1FrPfc+qWd1zyNPuBaP9zDpxZzkd8hIIvxKk17Eka/g kPeh9o72PrIZmTRI+vyuLo07jXgPh1YQ8oHhN3/xBqZ2DJQgS30JaEYjzra42gHdH5e+ s4Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=iZkcEonx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y11si3322417edt.52.2020.07.30.06.41.41; Thu, 30 Jul 2020 06:42:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=iZkcEonx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727769AbgG3NlR (ORCPT + 99 others); Thu, 30 Jul 2020 09:41:17 -0400 Received: from vps.xff.cz ([195.181.215.36]:55364 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726772AbgG3NlO (ORCPT ); Thu, 30 Jul 2020 09:41:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1596116471; bh=GofhiWtZo83ZcSwGRix98z4zveLZhyL8LDQJeSZFE5I=; h=Date:From:To:Cc:Subject:References:X-My-GPG-KeyId:From; b=iZkcEonxCQQzyGK1LZyT3oh0DfrUWc6bPMjsFRVLCIiNAsKJ8tKncEPFNJv9Nl/pc 1c3mp/qj79uELGYcZXENPLcN1S5z4QVZmrPBhOmpT8/3WF0mB9ozYWBCyKyv89+6pE dAaRRkoiFvtzkBHs0FQXQ8QZIfut82ivnSo3/7cY= Date: Thu, 30 Jul 2020 15:41:11 +0200 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: Guido =?utf-8?Q?G=C3=BCnther?= Cc: David Airlie , Daniel Vetter , Thierry Reding , Sam Ravnborg , Fabio Estevam , Robert Chiras , Samuel Holland , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] Fix st7703 panel initialization failures Message-ID: <20200730134111.nayvgw4kcxeg6kft@core.my.home> Mail-Followup-To: =?utf-8?Q?Ond=C5=99ej?= Jirman , Guido =?utf-8?Q?G=C3=BCnther?= , David Airlie , Daniel Vetter , Thierry Reding , Sam Ravnborg , Fabio Estevam , Robert Chiras , Samuel Holland , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20200716123753.3552425-1-megous@megous.com> <20200716140843.GA359122@bogon.m.sigxcpu.org> <20200716143209.ud6ote4q545bo2c7@core.my.home> <20200718173124.GA88021@bogon.m.sigxcpu.org> <20200718174215.mgjl3klytfa3nf3t@core.my.home> <20200729154809.GA435075@bogon.m.sigxcpu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200729154809.GA435075@bogon.m.sigxcpu.org> X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Wed, Jul 29, 2020 at 05:48:09PM +0200, Guido Günther wrote: > Hi, > On Sat, Jul 18, 2020 at 07:42:15PM +0200, Ondřej Jirman wrote: > > Hello, > > > > On Sat, Jul 18, 2020 at 07:31:24PM +0200, Guido Günther wrote: > > > Hi, > > > On Thu, Jul 16, 2020 at 04:32:09PM +0200, Ondřej Jirman wrote: > > > > Hi Guido, > > > > > > > > On Thu, Jul 16, 2020 at 04:08:43PM +0200, Guido Günther wrote: > > > > > Hi Ondrej, > > > > > On Thu, Jul 16, 2020 at 02:37:51PM +0200, Ondrej Jirman wrote: > > > > > > When extending the driver for xbd599 panel support I tried to do minimal > > > > > > changes and keep the existing initialization timing. > > > > > > > > > > > > It turned out that it's not good enough and the existing init sequence > > > > > > is too aggressive and doesn't follow the specification. On PinePhone > > > > > > panel is being powered down/up during suspend/resume and with current > > > > > > timings this frequently leads to corrupted display. > > > > > > > > > > Given the amount of ST7703 look alikes i don't think you can go by the > > > > > datasheet and hope not to break other panels. The current sleeps cater > > > > > for the rocktech panel (which suffered from similar issues you describe > > > > > when we took other parameters) so you need to make those panel specific. > > > > > > > > It should work on rocktech too. The patch mostly increases/reorders the delays > > > > slightly, to match the controller documentation. I don't see a reason to > > > > complicate the driver with per panel special delays, unless these patches don't > > > > work on your panel. > > > > > > That's why i brought it up. It breaks the rocktech panel on > > > blank/unblank loops where it just stays blank and then starts hitting > > > DSI command timeouts. > > > > Good to know. Does keeping the msleep(20); after init sequence and before sleep > > exit make it work? > > We need both sleeps to make this work reliably so basically > reverting your 'drm/panel: st7703: Make the sleep exit timing match the > spec' makes things stable again. > > We don't need to sleep 120ms after sleep out though since our panel only > requires 15ms as per data sheet there so it really makes sense to make > these configurable. Thank you for checking it. I'd be happy with just the other patch being applied. That would be enough to fix issues with xingbangda panel too. In my tests xbd panel doesn't need 120ms either, despite the datasheet. What breaks xbd panel is the lack of post-powerup delay before deasserting reset line. regards, o. > Cheers, > -- Guido > > > > > thank you and regards, > > o. > > > > > Cheers, > > > -- Guido > > > > > > > > > > > The init sequence is still suboptimal, and doesn't follow the kernel docs > > > > completely, even after these patches. Controller spec also talks about adding > > > > some delay before enabling the backlight to avoid visual glitches. > > > > > > > > Which is what enable callback is documented to be for. Currently part of the > > > > initialization that belongs to prepare callback is also done in enable callback. > > > > > > > > I see the glitch (small vertical shift of the image on powerup), but personally > > > > don't care much to introduce even more delays to the driver, just for the > > > > cosmetic issue. > > > > > > > > regards, > > > > o. > > > > > > > > > Cheers, > > > > > -- Guido > > > > > > > > > > > > > > > > > This patch series fixes the problems. > > > > > > > > > > > > The issue was reported by Samuel Holland. > > > > > > > > > > > > Relevant screenshots from the datasheet: > > > > > > > > > > > > Power on timing: https://megous.com/dl/tmp/35b72e674ce0ca27.png > > > > > > Power off timing: https://megous.com/dl/tmp/dea195517106ff17.png > > > > > > More optimal reset on poweron: https://megous.com/dl/tmp/a9e5caf14e1b0dc6.png > > > > > > Less optimal reset on poweron: https://megous.com/dl/tmp/246761039283c4cf.png > > > > > > Datasheet: https://megous.com/dl/tmp/ST7703_DS_v01_20160128.pdf > > > > > > > > > > > > Please take a look. > > > > > > > > > > > > thank you and regards, > > > > > > Ondrej Jirman > > > > > > > > > > > > Ondrej Jirman (2): > > > > > > drm/panel: st7703: Make the sleep exit timing match the spec > > > > > > drm/panel: st7703: Fix the power up sequence of the panel > > > > > > > > > > > > drivers/gpu/drm/panel/panel-sitronix-st7703.c | 29 ++++++++++--------- > > > > > > 1 file changed, 15 insertions(+), 14 deletions(-) > > > > > > > > > > > > -- > > > > > > 2.27.0 > > > > > > > > > > > >