<div dir="ltr">2017-01-27 18:43 GMT-02:00 Marek Vasut <<a href="mailto:marex@denx.de">marex@denx.de</a>>:<br>><br>> On 01/27/2017 09:40 PM, Marek Vasut wrote:<br>> > On 01/27/2017 05:04 PM, Breno Matheus Lima wrote:<br>> >> Hi,<br>> ><br>> > Hi,<br>> ><br>> >> I'm trying to use kernel 4.10.0-rc5 and DRM_MXS driver on a i.MX6SX SabreSD<br>> >> Rev A, but it crashes during the boot, I'm also disabling the FB_MXS driver<br>> >> to avoid any conflict. By using the driver FB_MXS the board boots normally<br>> >> and the display is working as well.<br>> ><br>> > OK<br>> ><br>> >> I would like to know if is possible to use the DRM_MXS driver with the<br>> >> deprecated bindings as according to the documentation located at<br>> >> Documentation/devicetree/bindings/display/mxsfb.txt, or if is just possible<br>> >> to<br>> >> use the DRM driver with the new bindings.<br>> ><br>> > No, the deprecated bindings are deprecated and DO NOT WORK with this<br>> > driver. Use the new of-graph stuff.<br>> ><br><br>Good to know<br><br>> >> Please find below the log:<br>> >><br>> >> [    1.076530] [drm] Initialized<br>> >> [    1.086305] etnaviv gpu-subsystem: bound 1800000.gpu (ops gpu_ops)<br>> >> [    1.092590] etnaviv-gpu 1800000.gpu: model: GC400, revision: 4645<br>> >> [    1.098703] etnaviv-gpu 1800000.gpu: Need to move linear window on<br>> >> MC1.0, disabling TS<br>> >> [    1.154691] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).<br>> >> [    1.161425] [drm] No driver support for vblank timestamp query.<br>> >> [    1.167799] OF: graph: no port node found in /soc/aips-bus@02200000<br>> >> /spba-bus@02200000/lcdif@02220000<br>> >> [    1.177132] Unable to handle kernel NULL pointer dereference at virtual<br>> >> address 00000004<br>> ><br>> > Try with this patch please:<br>> ><br>> > diff --git a/drivers/gpu/drm/mxsfb/mxsfb_out.c<br>> > b/drivers/gpu/drm/mxsfb/mxsfb_out.c<br>> > index fa8d17399407..b8e81422d4e2 100644<br>> > --- a/drivers/gpu/drm/mxsfb/mxsfb_out.c<br>> > +++ b/drivers/gpu/drm/mxsfb/mxsfb_out.c<br>> > @@ -112,6 +112,7 @@ static int mxsfb_attach_endpoint(struct drm_device *drm,<br>> ><br>> >  int mxsfb_create_output(struct drm_device *drm)<br>> >  {<br>> > +       struct mxsfb_drm_private *mxsfb = drm->dev_private;<br>> >         struct device_node *ep_np = NULL;<br>> >         struct of_endpoint ep;<br>> >         int ret;<br>> > @@ -127,5 +128,8 @@ int mxsfb_create_output(struct drm_device *drm)<br>> >                 }<br>> >         }<br>> ><br>> > +       if (!mxsfb->panel)<br>> > +               return -EPROBE_DEFER;<br>> > +<br>> >         return 0;<br>> >  }<br>> ><br>> Rationale behind the patch:<br>><br>> IFF you use some odd bindings or your of-graph panel bindings are<br>> missing from the DT , THEN the for_each_endpoint_of_node() body<br>> is never executed, thus mxsfb->panel remains NULL and yet the<br>> function returns 0/success . mxsfb_load() therefore doesn't detect<br>> this failure and calls drm_panel_attach() with mxsfb->panel = NULL,<br>> thus the crash.<br>><br><br>Thanks for the explanation, I'm going to try with this patch and figure out<br>how to implement it on imx6sx-sdb.dtsi.<br><br>> --<br>> Best regards,<br>> Marek Vasut<br><br>Best Regards,<br>Breno Matheus Lima<br></div>