Fwd: Barebox 2017.02 works great but no Linux Framebuffer... :-/

gianluca gianlucarenzi at eurekelettronica.it
Mon Jun 26 01:40:33 PDT 2017


On 06/23/2017 11:45 AM, gianluca wrote:
> On 06/21/2017 05:30 PM, Lucas Stach wrote:
>>> As you can see imx-drm.legacy_depth=32 is passed to the kernel from
>>> bootloader.
>>
>> The module is called "imxdrm" without a dash, so the correct way to
>> specify the parameter on the command line is "imxdrm.legacyfb_depth=32".

>
> It works now, the culprit was the name of the driver: imxdrm is the
> right one.
>

In Barebox everything looks like good. Both boards are running quite 
well and all stuff are working as expected.
In Linux I have some strange beahviours.

If I replace the bootloader and the device-tree on the microSD card (the 
Linux kernel and the rootfilesystem remains the same) the iMX6QuadPlus 
refuses to use the framebuffer.

Frankly, I do not understand how those drivers react differently if they 
are running on the DualLite or the QuadPlus.

The main differences in the device-tree are (for Barebox point of view):
>
> diff -Nru imx6dl-eurek-ek360.dts imx6qp-eurek-ek360.dts
> --- imx6dl-eurek-ek360.dts	2017-06-21 12:22:32.000000000 +0200
> +++ imx6qp-eurek-ek360.dts	2017-06-21 13:46:35.000000000 +0200
> @@ -1,5 +1,5 @@
>  /*
> - * $Id: imx6dl-eurek-ek360.dts,v 1.4 2017/06/21 10:22:32 gianluca Exp $
> + * $Id: imx6qp-eurek-ek360.dts,v 1.5 2017/06/21 11:46:35 gianluca Exp $
>   *
>   * Copyright 2016/2017 Gianluca Renzi, Eurek Elettronica S.R.L.
>   * Copyright 2014 Raphaël Poggi
> @@ -18,13 +18,13 @@
>
>  #include <dt-bindings/gpio/gpio.h>
>  #include <dt-bindings/input/input.h>
> -#include <arm/imx6qdl.dtsi>
> -#include <arm/imx6dl.dtsi>
> -#include "imx6dl.dtsi"
> +#include <arm/imx6qp.dtsi>
> +#include "imx6qdl.dtsi"
> +#include "imx6q.dtsi"
>
>  / {
> -	model = "Eurek EK360 i.MX6DL";
> -	compatible = "eurek,ek360", "fsl,imx6dl";
> +	model = "Eurek EK360 i.MX6QP";
> +	compatible = "eurek,ek360", "fsl,imx6qp";
>
>  	chosen {
>  		linux,stdout-path = &uart3;

Just a matter of include and a compatible property line...

Of course the flash header and memory initializers are still different 
for both processors (NoC and other stuff).

In Linux the only thing wich differs is the device-tree file (more or 
less like in Barebox):

> --- linux-4.9.7-EK360-EK360DL-dts.patch	2017-06-21 12:42:00.944833220 +0200
> +++ linux-4.9.7-EK360-EK360QP-dts.patch	2017-06-22 17:29:24.634534659 +0200
> @@ -1,8 +1,8 @@
> ---- a/arch/arm/boot/dts/imx6dl-eurek-ek360.dts	1970-01-01 01:00:00.000000000 +0100
> -+++ b/arch/arm/boot/dts/imx6dl-eurek-ek360.dts	2017-06-21 12:42:00.412833238 +0200
> +--- a/arch/arm/boot/dts/imx6qp-eurek-ek360.dts	1970-01-01 01:00:00.000000000 +0100
> ++++ b/arch/arm/boot/dts/imx6qp-eurek-ek360.dts	2017-06-22 17:29:24.634534659 +0200
>  @@ -0,0 +1,626 @@
>  +/*
> -+ * $Id: imx6dl-eurek-ek360.dts,v 1.4 2017/06/21 10:22:32 gianluca Exp $
> ++ * $Id: imx6qp-eurek-ek360.dts,v 1.5 2017/06/21 11:46:35 gianluca Exp $
>  + *
>  + * Copyright 2016/2017 Gianluca Renzi, Eurek Elettronica S.R.L.
>  + * Copyright 2014 Raphaël Poggi
> @@ -21,13 +21,13 @@
>  +
>  +#include <dt-bindings/gpio/gpio.h>
>  +#include <dt-bindings/input/input.h>
> -+/* #include <arm/imx6qdl.dtsi> */
> -+#include "imx6qdl.dtsi"
> -+#include "imx6dl.dtsi"
> ++/* #include <arm/imx6qp.dtsi> */
> ++/* #include "imx6qdl.dtsi" */
> ++#include "imx6qp.dtsi"
>  +
>  +/ {
> -+	model = "Eurek EK360 i.MX6DL";
> -+	compatible = "eurek,ek360", "fsl,imx6dl";
> ++	model = "Eurek EK360 i.MX6QP";
> ++	compatible = "eurek,ek360", "fsl,imx6qp";
>  +
>  +	chosen {
>  +		linux,stdout-path = &uart3;

The DuaLite has those includes:

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/* #include <arm/imx6qdl.dtsi> */
#include "imx6qdl.dtsi"
#include "imx6dl.dtsi"

and the compatible string is: compatible = "eurek,ek360", "fsl,imx6dl"

The QuadPlus has those includes:

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/* #include <arm/imx6qp.dtsi> */
/* #include "imx6qdl.dtsi" */
#include "imx6qp.dtsi"

and the compatible string is: compatible = "eurek,ek360", "fsl,imx6qp"

During boot I can see no output on the framebuffer on the QuadPlus and 
the kernel log have those messages:

> [    4.914737] ------------[ cut here ]------------
> [    4.914769] WARNING: CPU: 1 PID: 17 at drivers/gpu/drm/drm_atomic_helper.c:1140 drm_atomic_helper_wait_for_vblanks+0x258/0x25c
> [    4.914772] [CRTC:24] vblank wait timed out
> [    4.914846] Modules linked in: evdev joydev rfkill at24 nvmem_imx_ocotp ci_hdrc_imx nvmem_core sx8656_ek(O) ci_hdrc udc_core ehci_hcd usbcore usbmisc_imx coda phy_mxs_usb v4l2_mem2mem panel_simple videobuf2_v4l2 imx_thermal videobuf2_dma_contig imx2_wdt videobuf2_core snd_soc_fsl_asrc flexcan can_dev videobuf2_vmalloc snd_soc_fsl_asoc_card videobuf2_memops pwm_bl pwm_imx snd_ac97_codec backlight leds_gpio
> [    4.914856] CPU: 1 PID: 17 Comm: kworker/1:0 Tainted: G           O    4.9.7-EK20170623 #1
> [    4.914859] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
> [    4.914875] Workqueue: events deferred_probe_work_func
> [    4.914900] [<c0115354>] (unwind_backtrace) from [<c010e414>] (show_stack+0x20/0x24)
> [    4.914915] [<c010e414>] (show_stack) from [<c04716f8>] (dump_stack+0x94/0xb0)
> [    4.914927] [<c04716f8>] (dump_stack) from [<c014cd8c>] (__warn+0xf8/0x110)
> [    4.914937] [<c014cd8c>] (__warn) from [<c014ce74>] (warn_slowpath_fmt+0x48/0x50)
> [    4.914951] [<c014ce74>] (warn_slowpath_fmt) from [<c05ca298>] (drm_atomic_helper_wait_for_vblanks+0x258/0x25c)
> [    4.914970] [<c05ca298>] (drm_atomic_helper_wait_for_vblanks) from [<c05f6ef4>] (imx_drm_atomic_commit_tail+0x58/0x68)
> [    4.914982] [<c05f6ef4>] (imx_drm_atomic_commit_tail) from [<c05cac64>] (commit_tail+0x50/0x6c)
> [    4.914992] [<c05cac64>] (commit_tail) from [<c05cb890>] (drm_atomic_helper_commit+0xa4/0xe4)
> [    4.915003] [<c05cb890>] (drm_atomic_helper_commit) from [<c05f7008>] (imx_drm_atomic_commit+0x104/0x130)
> [    4.915021] [<c05f7008>] (imx_drm_atomic_commit) from [<c05ec25c>] (drm_atomic_commit+0x5c/0x68)
> [    4.915038] [<c05ec25c>] (drm_atomic_commit) from [<c05cf358>] (restore_fbdev_mode+0x158/0x298)
> [    4.915051] [<c05cf358>] (restore_fbdev_mode) from [<c05cf6bc>] (drm_fb_helper_restore_fbdev_mode_unlocked+0x40/0x84)
> [    4.915063] [<c05cf6bc>] (drm_fb_helper_restore_fbdev_mode_unlocked) from [<c05cf578>] (drm_fb_helper_set_par+0x40/0x6c)
> [    4.915076] [<c05cf578>] (drm_fb_helper_set_par) from [<c04fe008>] (fbcon_init+0x4b4/0x4f8)
> [    4.915088] [<c04fe008>] (fbcon_init) from [<c05876e0>] (visual_init+0xd4/0x11c)
> [    4.915102] [<c05876e0>] (visual_init) from [<c05898b4>] (do_bind_con_driver+0x14c/0x334)
> [    4.915112] [<c05898b4>] (do_bind_con_driver) from [<c0589bec>] (do_take_over_console+0x150/0x1b4)
> [    4.915121] [<c0589bec>] (do_take_over_console) from [<c04fe0d4>] (do_fbcon_takeover+0x88/0xe8)
> [    4.915130] [<c04fe0d4>] (do_fbcon_takeover) from [<c04feda8>] (fbcon_event_notify+0x7c0/0x7f8)
> [    4.915142] [<c04feda8>] (fbcon_event_notify) from [<c016f57c>] (notifier_call_chain+0x54/0x94)
> [    4.915153] [<c016f57c>] (notifier_call_chain) from [<c016f88c>] (__blocking_notifier_call_chain+0x58/0x70)
> [    4.915164] [<c016f88c>] (__blocking_notifier_call_chain) from [<c016f8cc>] (blocking_notifier_call_chain+0x28/0x30)
> [    4.915175] [<c016f8cc>] (blocking_notifier_call_chain) from [<c0504d5c>] (fb_notifier_call_chain+0x2c/0x30)
> [    4.915187] [<c0504d5c>] (fb_notifier_call_chain) from [<c0506b10>] (register_framebuffer+0x1f8/0x2b0)
> [    4.915200] [<c0506b10>] (register_framebuffer) from [<c05cf960>] (drm_fb_helper_initial_config+0x260/0x408)
> [    4.915212] [<c05cf960>] (drm_fb_helper_initial_config) from [<c05d00a0>] (drm_fbdev_cma_init_with_funcs+0x90/0x110)
> [    4.915223] [<c05d00a0>] (drm_fbdev_cma_init_with_funcs) from [<c05d0148>] (drm_fbdev_cma_init+0x28/0x30)
> [    4.915236] [<c05d0148>] (drm_fbdev_cma_init) from [<c05f7180>] (imx_drm_bind+0x104/0x194)
> [    4.915254] [<c05f7180>] (imx_drm_bind) from [<c061b780>] (try_to_bring_up_master+0x234/0x294)
> [    4.915266] [<c061b780>] (try_to_bring_up_master) from [<c061b8a0>] (component_add+0xc0/0x158)
> [    4.915277] [<c061b8a0>] (component_add) from [<c05fa178>] (ipu_drm_probe+0x68/0x74)
> [    4.915291] [<c05fa178>] (ipu_drm_probe) from [<c0622e90>] (platform_drv_probe+0x60/0xc0)
> [    4.915304] [<c0622e90>] (platform_drv_probe) from [<c0620ce4>] (driver_probe_device+0x238/0x428)
> [    4.915314] [<c0620ce4>] (driver_probe_device) from [<c0621230>] (__device_attach_driver+0xac/0x10c)
> [    4.915324] [<c0621230>] (__device_attach_driver) from [<c061ec18>] (bus_for_each_drv+0x54/0x9c)
> [    4.915335] [<c061ec18>] (bus_for_each_drv) from [<c06209a8>] (__device_attach+0xb0/0x134)
> [    4.915344] [<c06209a8>] (__device_attach) from [<c06212ac>] (device_initial_probe+0x1c/0x20)
> [    4.915354] [<c06212ac>] (device_initial_probe) from [<c061fdb8>] (bus_probe_device+0x94/0x9c)
> [    4.915364] [<c061fdb8>] (bus_probe_device) from [<c0620290>] (deferred_probe_work_func+0x7c/0xc8)
> [    4.915377] [<c0620290>] (deferred_probe_work_func) from [<c01679dc>] (process_one_work+0x14c/0x440)
> [    4.915386] [<c01679dc>] (process_one_work) from [<c0167d6c>] (worker_thread+0x54/0x504)
> [    4.915398] [<c0167d6c>] (worker_thread) from [<c016de48>] (kthread+0xf0/0x108)
> [    4.915415] [<c016de48>] (kthread) from [<c0109cf8>] (ret_from_fork+0x14/0x3c)
> [    4.915419] ---[ end trace 64ae59d2b69cc4d3 ]---
>

and after a while:

> [   15.102758] [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:24:crtc-0] flip_done timed out
> [   25.342746] [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:24:crtc-0] flip_done timed out
> [   25.358582] Console: switching to colour frame buffer device 160x50
> [   35.582744] [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:24:crtc-0] flip_done timed out
> [   36.214243] imx-drm display-subsystem: fb0:  frame buffer device
> [   46.334758] [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:24:crtc-0] flip_done timed out
> [   56.574757] [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:24:crtc-0] flip_done timed out
> [   66.814751] [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:24:crtc-0] flip_done timed out
> [   77.054740] [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:24:crtc-0] flip_done timed out
> [   87.294748] [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:24:crtc-0] flip_done timed out
> [   97.534744] [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:24:crtc-0] flip_done timed out
> [  107.774751] [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:24:crtc-0] flip_done timed out
> [  118.014750] [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:24:crtc-0] flip_done timed out

On both board the kernel cmd line is:
> ~# cat /proc/cmdline
> console=ttymxc2,115200 rootwait noswap ip=none noinitrd rootfstype=nilfs2 root=/dev/mmcblk1p3 fec.macaddr=0x7a,0x3f,0x03,0xe3,0xa2,0xff system_rev=0xe3600000 system_serialnr=0x00000000 lcd_type=am1280800n3tz fastboot imxdrm.legacyfb_depth=32

Any help?

Unfortunately this is the only QuadPlus *FULLY WORKING* from the Barebox 
Point-Of-View... But I wish to not include some hardware error 
(nevertheless in BareBox the display/framebuffer is working good...)


Regards,
-- 
Eurek s.r.l.                          |
Electronic Engineering                | http://www.eurek.it
via Celletta 8/B, 40026 Imola, Italy  | Phone: +39-(0)542-609120
p.iva 00690621206 - c.f. 04020030377  | Fax:   +39-(0)542-609212



More information about the barebox mailing list