Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp260926ybi; Fri, 26 Jul 2019 09:16:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLtnM1SJQfW2+eKWoRkWKFTKCEaWQld6oUNI2vZRuAUG2ZNad7gX+9IXqiU1ZStWv3r/za X-Received: by 2002:a63:b10f:: with SMTP id r15mr22472210pgf.230.1564157792859; Fri, 26 Jul 2019 09:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564157792; cv=none; d=google.com; s=arc-20160816; b=RzfLcEVS9fND/ocIYttKN+TW6R+ORZrHQ6x92ubkt+Ij03rbxFUKs+vOUwKRBBG9B2 8zRwuuggmkYthk1kfjDlydSu9AK+fY59COZCIXWCgXZFL/dxIP+SfMx4XdgR/3Bxc8dQ zBcLI9DJ4DQxveeQA+KWAElBcn4w526CR7yLu757W7lgxhlCo/fWLuO7zmVEC0voPx4L X8FYEoUFZu0+VZg6mS5hHRNKo1/8HL5IQAB202sGt/EQox8D78Joqsgfgo81p+kpaXhQ ofxEJ/9xi0SkK3CwXRa5ayFbV1kjZNf22TYsiqmg7w5+pUeDrBIRF0S7rJ/CB+F/SfOW V4nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=OcpHqqkbMCN98/Ptj2LF3FcVbLSRr9bPXhV8NAlYGTk=; b=OZra/sxKtFiHJrAz4c0R18U7jf2IFRsu2H2KNbJyc9ii3DRrKo9hAHoGdS5Az1zbQE 56uggGACohxi94W72Hgh/11nxNMVZgTMiQQzusp6SzBguaGHWLKToUj/ezNyvVxGsxiX ebPrUtutRtvXZmkhm54JVNzphv0D/oiBb4T0lKV8InLxS50HLKqbksldmHkW+4nzLEGS NcPFEAlGyeT3DXTwjaLPb+0p5I1ZsF3D/As28s9nrssTfzrtNfXJZkLLK9XSjZ4ZPRM4 nulVwjgMflHV0IBzNfXwQvi480YYRxQPBjcOnjRUBDnDiqJhIAzR5mCJvhL6QErgrU/J 5dWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t6si20850050pfe.231.2019.07.26.09.16.15; Fri, 26 Jul 2019 09:16:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727268AbfGZNQO (ORCPT + 99 others); Fri, 26 Jul 2019 09:16:14 -0400 Received: from honk.sigxcpu.org ([24.134.29.49]:36466 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726364AbfGZNQO (ORCPT ); Fri, 26 Jul 2019 09:16:14 -0400 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 77030FB03; Fri, 26 Jul 2019 15:16:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org 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 u3_bPs4b8AVr; Fri, 26 Jul 2019 15:16:11 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 58A3546AA1; Fri, 26 Jul 2019 15:16:11 +0200 (CEST) Date: Fri, 26 Jul 2019 15:16:11 +0200 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Sam Ravnborg Cc: Purism Kernel Team , Thierry Reding , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/3] drm/panel: jh057n00900: Move dsi init sequence to prepare Message-ID: <20190726131611.GA13619@bogon.m.sigxcpu.org> References: <20190726102529.GB15658@ravnborg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190726102529.GB15658@ravnborg.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sam, On Fri, Jul 26, 2019 at 12:25:29PM +0200, Sam Ravnborg wrote: > Hi Guido. > > On Fri, Jul 26, 2019 at 11:21:40AM +0200, Guido G?nther wrote: > > If the panel is wrapped in a panel_bridge it gets prepar()ed before the > > upstream DSI bridge which can cause hangs (e.g. with imx-nwl since clocks > > are not enabled yet). To avoid this move the panel's first DSI access to > > enable() so the upstream bridge can prepare the DSI host controller in > > it's pre_enable(). > > > > The second patch makes the disable() call symmetric to the above and the third > > one just eases debugging. > > > > Guido G?nther (3): > > drm/panel: jh057n00900: Move panel DSI init to enable() > > drm/panel: jh057n00900: Move mipi_dsi_dcs_set_display_off to disable() > > drm/panel: jh057n00900: Print error code on all DRM_DEV_ERROR()s > > Patch 1 + 3 are both: > Reviewed-by: Sam Ravnborg > > See comment on patch 2. Fixed in v2. > > While you are touching this driver can you make an extra patch? > > Today the driver calls the internal prepare,enable,disable,unprepare > functions. > The right way to do it is to use the > drm_panel_(prepare,enable,disable,unprepare) variants. I hope I got this right in v2 but... > > The benefit is that we can move a little logic to these functions > and the drivers will then benefit from this. > > Two things I have in my local queue: > - Move bool for prepared/enabled > (to protect that we do not prepare/enable twice) > - backlight support ...i hope so since what you have planned here would eliminate lots of code duplication in the panel drivers. Cheers and thanks for having a look! -- Guido > > This driver will benefit form both and this little modification will > make it simpler to introduce. > I can also prepare the patch if you prefer. > > Sam >