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
> <brenomath...@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

Attachment: signature.asc
Description: PGP signature

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to