mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* BUG, i.MX: broken LVDS display
@ 2015-09-21  6:46 Holger Schurig
  2015-09-21 18:13 ` Sascha Hauer
  0 siblings, 1 reply; 4+ messages in thread
From: Holger Schurig @ 2015-09-21  6:46 UTC (permalink / raw)
  To: barebox

Hi,

on my i.MX6Q device barebox 2015-08.0 worked and I had an output on the splash screen, both in Barebox and later in Linux (there with CONFIG_STAGING, CONFIG_DRM_IMX, 
DRM_IMX_FB_HELPER, DRM_IMX_LDB, DRM_IMX_IPUV3).

This stopped with 2015-09.0. I even get a null-pointer exception:


Barebox: version 2015.09.0, DLoG 2015-09.1-9-g498cf3a
unable to handle NULL pointer dereference at address 0x00000008
pc : [<4fe1072a>]    lr : [<4fe10719>]
sp : 4ffffa18  ip : 4ffffa68  fp : 4ffffd80
r10: 3032678c  r9 : 00000000  r8 : 00000000
r7 : 30343904  r6 : 303438b8  r5 : 00000000  r4 : 303438b8
r3 : 00000000  r2 : 4fe31c78  r1 : 00000000  r0 : 00000006
Flags: nzcv  IRQs off  FIQs off  Mode SVC_32
[<4fe1072a>] (ipu_crtc_mode_set+0x2a/0x1cc) from [<4fe108f5>] (ipufb_enable_controller+0x29/0x44)
[<4fe108f5>] (ipufb_enable_controller+0x29/0x44) from [<4fe0e8e5>] (fb_enable_set+0x15/0x18)
[<4fe0e8e5>] (fb_enable_set+0x15/0x18) from [<4fe1bd6d>] (param_int_set+0x33/0x44)
[<4fe1bd6d>] (param_int_set+0x33/0x44) from [<4fe1bfab>] (dev_set_param+0x43/0x50)
[<4fe1bfab>] (dev_set_param+0x43/0x50) from [<4fe03257>] (setenv+0x37/0xac)
[<4fe03257>] (setenv+0x37/0xac) from [<4fe056cb>] (set_local_var.isra.3+0x37/0x4c)
[<4fe056cb>] (set_local_var.isra.3+0x37/0x4c) from [<4fe0622d>] (run_list_real+0x2ed/0x628)
[<4fe0622d>] (run_list_real+0x2ed/0x628) from [<4fe061c5>] (run_list_real+0x285/0x628)

[<4fe2d7cd>] (unwind_backtrace+0x1/0x74) from [<4fe00d65>] (panic+0x1d/0x2c)
[<4fe00d65>] (panic+0x1d/0x2c) from [<4fe2dca1>] (do_exception+0xd/0x10)
[<4fe2dca1>] (do_exception+0xd/0x10) from [<4fe2dd09>] (do_data_abort+0x21/0x2c)
[<4fe2dd09>] (do_data_abort+0x21/0x2c) from [<4fe2d9d4>] (do_abort_6+0x48/0x54)





I think (!) this is because of commit "video: ipuv3: Replace ipu_output with VPL".


My current device tree looks like this:

&ldb {
	status = "okay";

	lvds-channel@0 {
		status = "okay";
		crtc = "ipu1-di0";
		fsl,data-mapping = "spwg";
		fsl,data-width = <18>;
		primary;

		display-timings {
			native-mode = <&timing0>;
			timing0: AM-800600K1TMQW-01H-B {
				// dot clock: 40 - 50 MHz
                                clock-frequency = <39701664>; // 72 Hz
				hactive = <800>;
				vactive = <600>;
				hsync-len = <3>;      // 1 - 40
				hback-porch = <46>;   // 46
				hfront-porch = <18>;  // 16 - 354
				vsync-len = <10>;     // 1 - 29
				vback-porch = <23>;   // 23
				vfront-porch = <3>;   // 1 - 77
				hsync-active = <1>;
			};
		};
	};
}


I experimented with barebox 2015.09.0 with several things, but so far haven't been successfull.



Any hint on how the device tree is now supposed to look like?

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BUG, i.MX: broken LVDS display
  2015-09-21  6:46 BUG, i.MX: broken LVDS display Holger Schurig
@ 2015-09-21 18:13 ` Sascha Hauer
  2015-09-22 14:09   ` Holger Schurig
       [not found]   ` <CAOpc7mFYWzR0W1rRVFeJ3B0aO=Rs9B61NdntKG4QNUDHgB4GMA@mail.gmail.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Sascha Hauer @ 2015-09-21 18:13 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Mon, Sep 21, 2015 at 08:46:27AM +0200, Holger Schurig wrote:
> Hi,
> 
> on my i.MX6Q device barebox 2015-08.0 worked and I had an output on the splash screen, both in Barebox and later in Linux (there with CONFIG_STAGING, CONFIG_DRM_IMX, 
> DRM_IMX_FB_HELPER, DRM_IMX_LDB, DRM_IMX_IPUV3).
> 
> This stopped with 2015-09.0. I even get a null-pointer exception:
> 
> 
> Barebox: version 2015.09.0, DLoG 2015-09.1-9-g498cf3a
> unable to handle NULL pointer dereference at address 0x00000008
> pc : [<4fe1072a>]    lr : [<4fe10719>]
> sp : 4ffffa18  ip : 4ffffa68  fp : 4ffffd80
> r10: 3032678c  r9 : 00000000  r8 : 00000000
> r7 : 30343904  r6 : 303438b8  r5 : 00000000  r4 : 303438b8
> r3 : 00000000  r2 : 4fe31c78  r1 : 00000000  r0 : 00000006
> Flags: nzcv  IRQs off  FIQs off  Mode SVC_32
> [<4fe1072a>] (ipu_crtc_mode_set+0x2a/0x1cc) from [<4fe108f5>] (ipufb_enable_controller+0x29/0x44)
> [<4fe108f5>] (ipufb_enable_controller+0x29/0x44) from [<4fe0e8e5>] (fb_enable_set+0x15/0x18)
> [<4fe0e8e5>] (fb_enable_set+0x15/0x18) from [<4fe1bd6d>] (param_int_set+0x33/0x44)
> [<4fe1bd6d>] (param_int_set+0x33/0x44) from [<4fe1bfab>] (dev_set_param+0x43/0x50)
> [<4fe1bfab>] (dev_set_param+0x43/0x50) from [<4fe03257>] (setenv+0x37/0xac)
> [<4fe03257>] (setenv+0x37/0xac) from [<4fe056cb>] (set_local_var.isra.3+0x37/0x4c)
> [<4fe056cb>] (set_local_var.isra.3+0x37/0x4c) from [<4fe0622d>] (run_list_real+0x2ed/0x628)
> [<4fe0622d>] (run_list_real+0x2ed/0x628) from [<4fe061c5>] (run_list_real+0x285/0x628)
> 
> [<4fe2d7cd>] (unwind_backtrace+0x1/0x74) from [<4fe00d65>] (panic+0x1d/0x2c)
> [<4fe00d65>] (panic+0x1d/0x2c) from [<4fe2dca1>] (do_exception+0xd/0x10)
> [<4fe2dca1>] (do_exception+0xd/0x10) from [<4fe2dd09>] (do_data_abort+0x21/0x2c)
> [<4fe2dd09>] (do_data_abort+0x21/0x2c) from [<4fe2d9d4>] (do_abort_6+0x48/0x54)
> 
> 
> 
> 
> 
> I think (!) this is because of commit "video: ipuv3: Replace ipu_output with VPL".

Without trying it I think that aswell ;)

> 
> 
> My current device tree looks like this:
> 
> &ldb {
> 	status = "okay";
> 
> 	lvds-channel@0 {
> 		status = "okay";
> 		crtc = "ipu1-di0";
> 		fsl,data-mapping = "spwg";
> 		fsl,data-width = <18>;
> 		primary;
> 
> 		display-timings {
> 			native-mode = <&timing0>;
> 			timing0: AM-800600K1TMQW-01H-B {
> 				// dot clock: 40 - 50 MHz
>                                 clock-frequency = <39701664>; // 72 Hz
> 				hactive = <800>;
> 				vactive = <600>;
> 				hsync-len = <3>;      // 1 - 40
> 				hback-porch = <46>;   // 46
> 				hfront-porch = <18>;  // 16 - 354
> 				vsync-len = <10>;     // 1 - 29
> 				vback-porch = <23>;   // 23
> 				vfront-porch = <3>;   // 1 - 77
> 				hsync-active = <1>;
> 			};
> 		};
> 	};
> }
> 
> 
> I experimented with barebox 2015.09.0 with several things, but so far haven't been successfull.
> 
> 
> 
> Any hint on how the device tree is now supposed to look like?

Should be like:

panel: panel {
	compatible = "ampire,am800480r3tmqwa1h", "simple-panel";
	enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
	backlight = <&backlight>;

	port {
		panel_in: endpoint {
			remote-endpoint = <&lvds0_out>;
		};
	};
};

&ldb {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_lvds0>;
	status = "okay";

	lvds-channel@0 {
		status = "okay";
		fsl,data-mapping = "jeida";
		fsl,data-width = <24>;

		port@1 {
			reg = <1>;

			lvds0_out: endpoint {
				remote-endpoint = <&panel_in>;
			};
		};
	};
};

Copied from arch/arm/dts/imx53-guf-vincell.dts.

Anyway, I don't think it's necessary to break the old binding and for
sure we should not segfault. I'll have a look into this.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BUG, i.MX: broken LVDS display
  2015-09-21 18:13 ` Sascha Hauer
@ 2015-09-22 14:09   ` Holger Schurig
       [not found]   ` <CAOpc7mFYWzR0W1rRVFeJ3B0aO=Rs9B61NdntKG4QNUDHgB4GMA@mail.gmail.com>
  1 sibling, 0 replies; 4+ messages in thread
From: Holger Schurig @ 2015-09-22 14:09 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha,

I first applied your 3 patches to 2015.09.0 with my old device tree. I
applied your suggest device tree change, now my device tree looks like this:

/ {
    ...
    panel: panel {
        compatible = "ampire,am800480r3tmqwa1h", "simple-panel";
        /* enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>; */
        /* backlight = <&backlight>; */

        port {
                panel_in: endpoint {
                        remote-endpoint = <&lvds0_out>;
                };
        };
    };
};

&ldb {
    status = "okay";

    lvds-channel@0 {
        status = "okay";
        /* crtc = "ipu1-di0"; */
        fsl,data-mapping = "spwg";
        fsl,data-width = <18>;
        /* primary; */

        /* display-timings { */
        /*  native-mode = <&timing0>; */
        /*  timing0: AM-800600K1TMQW-01H-B { */
        /*      // dot clock: 40 - 50 MHz */
        /*         clock-frequency = <39701664>; // 72 Hz */
        /*      hactive = <800>; */
        /*      vactive = <600>; */
        /*      hsync-len = <3>;      // 1 - 40 */
        /*      hback-porch = <46>;   // 46 */
        /*      hfront-porch = <18>;  // 16 - 354 */
        /*      vsync-len = <10>;     // 1 - 29 */
        /*      vback-porch = <23>;   // 23 */
        /*      vfront-porch = <3>;   // 1 - 77 */
        /*      hsync-active = <1>; */
        /*  }; */
        /* }; */

        port@1 {
            reg = <1>;

            lvds0_out: endpoint {
                remote-endpoint = <&panel_in>;
            };
        };
    };
};

I disable the GPIO and Backlight stuff because on my device neither of this
is needed (backlight is handled by some microcontroller, yuck).

I also added CONFIG_SIMPLE_PANEL=y, CONFIG_DRIVER_VIDEO_EDID=y,
CONFIG_DRIVER_VIDEO_BACKLIGHT=y. I hadn't enabled before, without the last
two I get a compilation error.

My /env/bin/init contains this

splash -x 550 -y 500 -b 0xffffff /env/logo.png
fb0.enable=1

With that, I didn't get any video output. When I run "dmesg", I see
(relevant parts):

imx-ipuv3 2400000.ipu: IPUv3H probed
imx-ipuv3 2800000.ipu: IPUv3H probed
Console activated
...
imx-ipuv3-crtc imx-ipuv3-crtc0: register vpl for /soc/ipu@02400000
imx-ipuv3-crtc imx-ipuv3-crtc1: register vpl for /soc/ipu@02400000
imx-ipuv3-crtc imx-ipuv3-crtc2: register vpl for /soc/ipu@02800000
imx-ipuv3-crtc imx-ipuv3-crtc3: register vpl for /soc/ipu@02800000
running /env/bin/init...
VPL: vpl_ioctl: no port 4 on /soc/aips-bus@02000000/ldb@020e0008
/lvds-channel@0
imx-ipuv3-crtc imx-ipuv3-crtc0: ipu_crtc_mode_set: mode->xres: 800
imx-ipuv3-crtc imx-ipuv3-crtc0: ipu_crtc_mode_set: mode->yres: 600
VPL: vpl_ioctl: no port 4 on /soc/aips-bus@02000000/ldb@020e0008
/lvds-channel@0


And finally I also tried to to change "port@1"/"reg = <1>" to "port@4" /
"reg = <4>", but again to no avail:

imx-ipuv3 2400000.ipu: IPUv3H probed
imx-ipuv3 2800000.ipu: IPUv3H probed
Console activated
...
imx-ipuv3-crtc imx-ipuv3-crtc0: register vpl for /soc/ipu@02400000
imx-ipuv3-crtc imx-ipuv3-crtc0: probe failed: No such file or directory
imx-ipuv3-crtc imx-ipuv3-crtc1: register vpl for /soc/ipu@02400000
imx-ipuv3-crtc imx-ipuv3-crtc1: probe failed: No such file or directory
imx-ipuv3-crtc imx-ipuv3-crtc2: register vpl for /soc/ipu@02800000
imx-ipuv3-crtc imx-ipuv3-crtc2: probe failed: No such file or directory
imx-ipuv3-crtc imx-ipuv3-crtc3: register vpl for /soc/ipu@02800000
imx-ipuv3-crtc imx-ipuv3-crtc3: probe failed: No such file or directory
running /env/bin/init...


So I wonder where exactly barebox get's the timings on the GuF Vincell for
the Ampire display?   Probably the GuF board only sets up the display for
Linux, but doesn't in itself activate the framebuffer?  I grepped for
"Ampire" in Barebox git, and none of the files
(dts/Bindings/panel/ampire,am800480r3tmqwa1h.txt,
dts/Bindings/vendor-prefixes.txt, arch/arm/dts/imx53-guf-vincell.dts) seems
to contain any timings, so Barebox possibly cannot know how to setup the
timings ?!?!   To the best of my knowledge, the display doesn't have i2c
and therefore no EDID, and in my hardware there isn't any i2c going to the
display anyway.


But even when I re-enable the uncommented timings section, I won't get any
output. And also even with the totally unmodified DTS (which works for
barebox 2015.08.0 and also for Linux 4.18.21) which included the timings
barebox doesn't show me the splash.


If you wish, I could do the test with barebox.git as well.


Holger

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BUG, i.MX: broken LVDS display
       [not found]   ` <CAOpc7mFYWzR0W1rRVFeJ3B0aO=Rs9B61NdntKG4QNUDHgB4GMA@mail.gmail.com>
@ 2015-09-23 11:49     ` Sascha Hauer
  0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2015-09-23 11:49 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Tue, Sep 22, 2015 at 04:02:15PM +0200, Holger Schurig wrote:
>    Hi Sascha,
> 
>    imx-ipuv3 2400000.ipu: IPUv3H probed
>    imx-ipuv3 2800000.ipu: IPUv3H probed
>    Console activated
>    ...
>    imx-ipuv3-crtc imx-ipuv3-crtc0: register vpl for /soc/ipu@02400000
>    imx-ipuv3-crtc imx-ipuv3-crtc0: probe failed: No such file or directory
>    imx-ipuv3-crtc imx-ipuv3-crtc1: register vpl for /soc/ipu@02400000
>    imx-ipuv3-crtc imx-ipuv3-crtc1: probe failed: No such file or directory
>    imx-ipuv3-crtc imx-ipuv3-crtc2: register vpl for /soc/ipu@02800000
>    imx-ipuv3-crtc imx-ipuv3-crtc2: probe failed: No such file or directory
>    imx-ipuv3-crtc imx-ipuv3-crtc3: register vpl for /soc/ipu@02800000
>    imx-ipuv3-crtc imx-ipuv3-crtc3: probe failed: No such file or directory
>    running /env/bin/init...
> 
>    So I wonder where exactly barebox get's the timings on the GUF Vincell for
>    the Ampire display?   Probably the GuF board only sets up the display for
>    Linux, but doesn't in itself activate the framebuffer?  I grepped for
>    "Ampire" in Barebox git, and none of the files
>    (dts/Bindings/panel/ampire,am800480r3tmqwa1h.txt,

It seems the Vincell never worked in barebox. I just assumed it worked
because the barebox specific dts enables the ldb.
Please test the new version I just sent out. I tested this on the GuF
Santaro board, so this is a better place to compare the device tree
with.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-23 11:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-21  6:46 BUG, i.MX: broken LVDS display Holger Schurig
2015-09-21 18:13 ` Sascha Hauer
2015-09-22 14:09   ` Holger Schurig
     [not found]   ` <CAOpc7mFYWzR0W1rRVFeJ3B0aO=Rs9B61NdntKG4QNUDHgB4GMA@mail.gmail.com>
2015-09-23 11:49     ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox