From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A703AC433E4 for ; Thu, 16 Jul 2020 14:32:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 556B5206F4 for ; Thu, 16 Jul 2020 14:32:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=megous.com header.i=@megous.com header.b="EXRaTdQm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728776AbgGPOcN (ORCPT ); Thu, 16 Jul 2020 10:32:13 -0400 Received: from vps.xff.cz ([195.181.215.36]:44908 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726963AbgGPOcM (ORCPT ); Thu, 16 Jul 2020 10:32:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1594909930; bh=V69aiwDzkzUM4CoHOHIEvrPpK78moRqkyd0I/xBuBCE=; h=Date:From:To:Cc:Subject:References:X-My-GPG-KeyId:From; b=EXRaTdQm+G4iiJOFAeywJsc51E3Y9wDj53QyGao+stlDebBm2u55L64mwCKGaY2UO aHJLztq75TuWnIrQLV31nFORZeREq7/eHt5+H2pU/XixNBGBFa6jv/A+FPQWEWJV9y K0QRCLzREBA9OLCBeC2y7Mnp3eevJvpp+FpSyylo= Date: Thu, 16 Jul 2020 16:32:09 +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: <20200716143209.ud6ote4q545bo2c7@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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200716140843.GA359122@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 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. 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 > >