Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp506457ybh; Sat, 18 Jul 2020 10:43:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFX+HEQU5j+UaoB1YTQ+WoKN4V1dB/N/OJkBj2trJgx5e4chOSlnd6wrQTZAICRohqC3wl X-Received: by 2002:a17:906:e210:: with SMTP id gf16mr13385508ejb.386.1595094212276; Sat, 18 Jul 2020 10:43:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595094212; cv=none; d=google.com; s=arc-20160816; b=tlNY0/y8qqqNC+diHTOz6lUHMS9PK5dVh1m6bIKt6GF790sArRCFShivRQyshVkUfv 8kwyzr8huhKNdQmZg+pxlh36vetoHPyBXD0lZJGKPrzwrmq91OiP90ZsKi+WftiVF/WU 7dn9L5GKozNaf5BD7u1nXKI0j8ElRMghQxujg107i0bORC0FIXqiDM13FKVy5l0TWOj4 wxB3ba6WjGJ89wCnNIbZNLkjOJ8HxKsNNuLFTx84S8czBldnIXaXA+9wCBCy2m1hQd7x bvV/zID33JCVXFAxR9/ZXmxYowkoCUbdj1IhxVvpRo95BJ45hbU+xoSF5H/smSfzcBSN /qFw== 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=N7Xc/bKmBuwrgyQKtDyBFyWx5rGrshtB9s9x4tQffHw=; b=MaXKg/ApVgfs92PGOSpMOdDwz5NE0dNt4DAsGZTDHNgqya8sQ5HFrp/ubGquvpgkfQ 4asx5xwKn+4GRHRkJZ+KS9H1IEi808xzZxVmSC+ibNBOCT0YOEsRrcy+cVQNyECkPku2 CnuVFTQUDo+iJ7Uu5QUJZ8vFSNMNOJR4kOUoVvcY8Kcf3vguPY1ujUTaRLEROcBvOX7/ 7VI7PHF9jsK/biqSMVNgn85Wnr9ja/mcKlLJz0IdiNdRx9FoD8WlopT9HmSpme+QWyqJ BchCX+bAGfdoLz+yMqGqDtJSLvNqFcCZIFAbbE8vF0fueh/yDQIC8D8gnoAgZ7B/XObA 9uAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=hs7atBAx; 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 a3si7505899eju.177.2020.07.18.10.43.09; Sat, 18 Jul 2020 10:43:32 -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=hs7atBAx; 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 S1726798AbgGRRmT (ORCPT + 99 others); Sat, 18 Jul 2020 13:42:19 -0400 Received: from vps.xff.cz ([195.181.215.36]:42368 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726604AbgGRRmT (ORCPT ); Sat, 18 Jul 2020 13:42:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1595094136; bh=f00AuFPGY+rLOuWwPL06wPWVJed68+DRaP3u0RP0c2c=; h=Date:From:To:Cc:Subject:References:X-My-GPG-KeyId:From; b=hs7atBAxH/fITeB5hr2J/7wADtYv0weGQOMSo1ZnF3NVUAKmOmunM8QK5MR9jMoGO JcEMp/KQ5yrlMBhwIHLESCsASDcQV5Tb/MBgItbA7OJsuaITf/A7tRHP5oIc2e53rm aMDpaHxwrn2KQqcLMIZfGAij8zXP/E/8l3nX7u8Q= Date: Sat, 18 Jul 2020 19:42:15 +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: <20200718174215.mgjl3klytfa3nf3t@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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200718173124.GA88021@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 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? 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 > > > > > >