drm: panel-simple: Problems to use Seiko 43WVF1G panel and DRM_MXS driver on the i.MX6SX SabreSD.

Thierry Reding thierry.reding at gmail.com
Wed Feb 1 16:54:59 UTC 2017


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
> <brenomatheus at gmail.com> 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 driver
> > 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 point
> > 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.
> 
> With the change below the regulator can be properly turned on:
> 
> --- 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 = drm_pipe_to_mxsfb_drm_private(pipe);
> 
>         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();

>  }
> 
>  static void mxsfb_pipe_disable(struct drm_simple_display_pipe *pipe)
>  {
>         struct mxsfb_drm_private *mxsfb = drm_pipe_to_mxsfb_drm_private(pipe);
> 
> +       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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170201/012b55da/attachment.sig>


More information about the dri-devel mailing list