From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759621AbcIWNQb (ORCPT ); Fri, 23 Sep 2016 09:16:31 -0400 Received: from down.free-electrons.com ([37.187.137.238]:57335 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758238AbcIWNQ3 (ORCPT ); Fri, 23 Sep 2016 09:16:29 -0400 Date: Fri, 23 Sep 2016 16:16:26 +0300 From: Maxime Ripard To: Jonathan Liu Cc: David Airlie , Chen-Yu Tsai , "dri-devel@lists.freedesktop.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] drm/sun4i: rgb: Enable panel after controller Message-ID: <20160923131626.GX8719@lukather> References: <20160921130304.3486-1-net147@gmail.com> <20160921210340.GI8719@lukather> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EAECBqR2X0HbR9Ag" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --EAECBqR2X0HbR9Ag Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 22, 2016 at 08:03:31AM +1000, Jonathan Liu wrote: > Hi Maxime, >=20 > On Thursday, 22 September 2016, Maxime Ripard com> wrote: >=20 > > On Wed, Sep 21, 2016 at 11:03:04PM +1000, Jonathan Liu wrote: > > > The panel should be enabled after the controller so that the panel > > > prepare/enable delays are properly taken into account. Similarly, the > > > panel should be disabled before the controller so that the panel > > > unprepare/disable delays are properly taken into account. > > > > > > This is useful for avoiding visual glitches. > > > > This is not really taking any delays into account, especially since > > drm_panel_enable and prepare are suppose to block until their > > operation is complete. >=20 >=20 > drm_panel_prepare turns on power to the LCD using enable-gpios property of > the panel and then blocks for prepare delay. The prepare delay for panel > can be set to how long it takes between the time the panel is powered to > when it is ready to receive images. If backlight property is specified the > backlight will be off while the panel is powered on. >=20 > drm_panel_enable blocks for enable delay and then turns on the backlight. > The enable delay can be set to how long it takes for panel to start making > the image visible after receiving the first valid frame. For example if t= he > panel starts off as white and the TFT takes some time to initialize to > black before it shows the image being received. >=20 > Refer to drivers/gpu/drm/panel-panel.simple.c for details. =46rom drm_panel.h: """ * drm_panel_enable - enable a panel * @panel: DRM panel * * Calling this function will cause the panel display drivers to be turned on * and the backlight to be enabled. Content will be visible on screen after * this call completes. """ """ * drm_panel_prepare - power on a panel * @panel: DRM panel * * Calling this function will enable power and deassert any reset signals to * the panel. After this has completed it is possible to communicate with any * integrated circuitry via a command bus. """ Those comments clearly says that the caller should not have to deal with the delays, even more so by just moving calls around and hoping that the code running in between is adding enough delay for the panel to behave properly. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --EAECBqR2X0HbR9Ag Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJX5SsqAAoJEBx+YmzsjxAggawQAMI2y+p0Yp+QrrJcUUzZ1Hpy 8lT85Cwd7DpPptLHDoONd6hPoLAxT0y/gGdk+XJ2IaNsEkKWFktjaepGvbP6wUDc rXwVpM6Izxdwgv4Jqx8MJ+YhpLQc7GYPmjbJXfofqAUKe1KcrMchuKHOp/y2AzJa BLPwdMRWZ1itOP/FfhA0z6R5Qea79GN5q0U3VVXkX+9sRP+tC6k0MfQ2XatpLuZS ll/zAOTfJnPM6zJdjAZsckEoEgv23ni5ZLtiyfp2dPRlSlgVCjaosMv1JIAoG1v/ K2PexEOwS3nZFyWqx7c5sS02mA1WYHrxDk5x21Yta5uExhtuY+Bmx2JyjYNemeoO xpUsA34+urOyU/+lHPDofBJHR32G5ruh3gGKdRTudHOXMxeWn1X+YeZFOJIHCr8c NyDamkZT+mFYk1+Q8ahzP8HKTiRjI6BZkUaf/UCihRRTuFXd2pZ4p1TeWu9M9hyX zoeeUNPKrlt1gFL2uqprTEhdxbXV/OBHSIzte/ZWYNzS6wb8QpgUg5CV2DW/8DDd LlPsrBkjlpOPIGi99PxpHw8alWXWGixedlX7lJla94+VMzBr+IdK2WN46ynU93aL IfHOGsTSLRYWO9sYePMSG3UkCb7WzORqxP3+6kTjgR9MQR/RnVxwQumKBB7nuhDb ZpkZ0skM1i7x3rNRkNw+ =skcs -----END PGP SIGNATURE----- --EAECBqR2X0HbR9Ag--