From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: drm: panel-simple: Problems to use Seiko 43WVF1G panel and DRM_MXS driver on the i.MX6SX SabreSD. Date: Wed, 1 Feb 2017 17:54:59 +0100 Message-ID: <20170201165459.GE18725@ulmo.ba.sec> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1161435805==" Return-path: Received: from mail-wj0-x243.google.com (mail-wj0-x243.google.com [IPv6:2a00:1450:400c:c01::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1394F89715 for ; Wed, 1 Feb 2017 16:55:03 +0000 (UTC) Received: by mail-wj0-x243.google.com with SMTP id ip10so13728521wjb.1 for ; Wed, 01 Feb 2017 08:55:03 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Fabio Estevam Cc: Marek Vasut , Fabio Estevam , Breno Matheus Lima , DRI mailing list , Breno Matheus Lima List-Id: dri-devel@lists.freedesktop.org --===============1161435805== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Rgf3q3z9SdmXC6oT" Content-Disposition: inline --Rgf3q3z9SdmXC6oT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 01, 2017 at 02:48:55PM -0200, Fabio Estevam wrote: > On Wed, Feb 1, 2017 at 2:04 PM, Breno Matheus Lima > wrote: > > Hi, > > > > I'm trying to use the Seiko 43WVF1G panel (Datasheet link: > > http://www.glyn.de/data/glyn/media/doc/43wvf1g-0.pdf) and the DRM_MXS d= river > > on > > the i.MX6SX SabreSD. Applying the patch below removes the old > > timing configuration on the dtsi and adds it to the panel-simple.c > > I can get the display working, but the image is out of place. Another p= oint > > to > > note is that it's necessary to set the reg_lcd_3v3 to regulator-always-= on > > otherwise the gpio3 27 does not get enabled. > > > > The main two problems that I'm having at the moment are: > > > > - Gpio3 27 is not being set by the driver, function > > panel_simple_prepare(struct drm_panel *panel) is not being called. >=20 > With the change below the regulator can be properly turned on: >=20 > --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c > +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c > @@ -103,12 +103,16 @@ static void mxsfb_pipe_enable(struct > drm_simple_display_pipe *pipe, > struct mxsfb_drm_private *mxsfb =3D drm_pipe_to_mxsfb_drm_private= (pipe); >=20 > mxsfb_crtc_enable(mxsfb); > + drm_panel_prepare(mxsfb->panel); > + drm_panel_enable(mxsfb->panel); Typically the sequence would be: drm_panel_prepare(); mxsfb_crtc_enable(); drm_panel_enable(); > } >=20 > static void mxsfb_pipe_disable(struct drm_simple_display_pipe *pipe) > { > struct mxsfb_drm_private *mxsfb =3D drm_pipe_to_mxsfb_drm_private= (pipe); >=20 > + drm_panel_disable(mxsfb->panel); > + drm_panel_unprepare(mxsfb->panel); > mxsfb_crtc_disable(mxsfb); > } And this would probably have to be: drm_panel_disable(); mxsfb_crtc_disable(); drm_panel_unprepare(); See the kerneldoc for struct drm_panel_funcs (include/drm/drm_panel.h) for more details. Thierry --Rgf3q3z9SdmXC6oT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAliSEuMACgkQ3SOs138+ s6GuKg//R7ludmo+wGRayoqlKhv1e1eZSUENcW4D/eYzdXxWeLvQUrY5i/s4VH8v hGcUhy0VH4FpD3QSFkbpikYoUzrA8pC3zeeNQ6W7ME41lQYAKqtT9/9JruOLCcZD JR4iRejyayiSH38rQ2N4o5HHxUeiY8psbXcQWkW7qYx1jGR2YUTqC19ZQv/LbE+N KogK0Q1Kg83iXwqegPsBymNxPRMVI3KjCJz7BTeNR+YRHTWTx4Km/YFHIifixpLO pV2iFzVRy8mNEzHsWLP8Jal8lM6k254i5E+wKENq7lGTQ7Xqn7dqS6z6BR1CRhN6 zcl79eWRU6xTZw9ZUZHBRh8nlyAccFh3E5GGe5Z294UyaG6fsZtieY3cH7V6FxWh 5442d9TdvkOXHtBnI2lCN5F9sVN4t2xBxPw2cv99wgGmrp+sIukDnSJI/rETeqyk WgAwmcnCC0/TJZMWG9eyqpiw1ucdDUxAI3zFJUpP7m2mMoNdYTXw2ygOMcW3L9Qh RnFxbkX7ApE6mLbZZRg+yqzIhUVbb0RnsersEFYpF09PAajCvsPU+xRYOzG6BpUF +9SI0kqQNhWE89rpMd1+6sg6JytwNUWBdvvzcVQ7MZOZQEXRzj0Gjc88xUNbON4u WVwJwPSCoPjXu+Vw1lqMl+/LJ5T2ts12AVX6njfw/wApTVxMh84= =asl8 -----END PGP SIGNATURE----- --Rgf3q3z9SdmXC6oT-- --===============1161435805== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1161435805==--