mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* i.MX6 frame buffer inside barebox?
@ 2014-06-18 14:26 Holger Schurig
  2014-06-18 19:58 ` Sascha Hauer
  0 siblings, 1 reply; 9+ messages in thread
From: Holger Schurig @ 2014-06-18 14:26 UTC (permalink / raw)
  To: barebox

Hi, I'm a bit puzzled. I compiled my barebox with

CONFIG_CMD_SPLASH=y
CONFIG_VIDEO=y
CONFIG_DRIVER_VIDEO_IMX_IPUV3=y
CONFIG_DRIVER_VIDEO_IMX_IPUV3_LVDS=y
CONFIG_DRIVER_VIDEO_SIMPLEFB=y

and some entries in the device tree about it (see below). And when I
boot barebox, I see /dev/fb0.

However, the LVDS signals don't come out of the CPU, e.g. LVDS_CLK0_P
/ LVDS_CLK0_N is silent. Do I need something to enable the drive as
well?  Simply writing to /dev/fb0, e.g. with the "splash" or "mw -d
/dev/fdb0" command, doesn't seem to do the magic.

As soon as I boot Linux, the LVDS signals come to live. That I cannot
yet see if it's correct because of an backlight issue is some entirely
different issue :-)


Also, what I noticed is that some clocks with "ipu" in their name are
on, others are off:

barebox:/ clk_dump
...
                    ipu1_sel (rate 528000000, enabled)
                        ipu1_podf (rate 264000000, enabled)
                            2400000.ipu_di0_pixel (rate 264000000, enabled)
                            2400000.ipu_di1_pixel (rate 264000000, enabled)
                    ipu2_sel (rate 528000000, enabled)
                        ipu2_podf (rate 264000000, enabled)
                            2800000.ipu_di0_pixel (rate 264000000, enabled)
                            2800000.ipu_di1_pixel (rate 264000000, enabled)

...
    pll5_video (rate 288000000, disabled)
        pll5_post_div (rate 72000000, disabled)
            pll5_video_div (rate 72000000, disabled)
                ldb_di0_sel (rate 72000000, disabled)
                    ldb_di0_div_3_5 (rate 20571428, disabled)
                        ldb_di0_podf (rate 10285714, disabled)
                ldb_di1_sel (rate 72000000, disabled)
                    ldb_di1_div_3_5 (rate 20571428, disabled)
                        ldb_di1_podf (rate 10285714, disabled)
                ipu1_di0_pre_sel (rate 72000000, disabled)
                    ipu1_di0_pre (rate 24000000, disabled)
                        ipu1_di0_sel (rate 24000000, disabled)
                ipu1_di1_pre_sel (rate 72000000, disabled)
                    ipu1_di1_pre (rate 24000000, disabled)
                        ipu1_di1_sel (rate 24000000, disabled)
                ipu2_di0_pre_sel (rate 72000000, disabled)
                    ipu2_di0_pre (rate 24000000, disabled)
                        ipu2_di0_sel (rate 24000000, disabled)
                ipu2_di1_pre_sel (rate 72000000, disabled)
                    ipu2_di1_pre (rate 24000000, disabled)
                        ipu2_di1_sel (rate 24000000, disabled)
...

What part of barebox is responsible to enable the needed clocks?



&ldb {
        status = "okay";

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

                display-timings {
                        timing0: 800x600 {
                                clock-frequency = <35338240>;
                                hactive = <800>;
                                vactive = <600>;
                                hfront-porch = <46>;
                                hback-porch = <100>;
                                hsync-len = <20>;
                                hsync-active = <1>;
                                vfront-porch = <12>;
                                vback-porch = <23>;
                                vsync-len = <10>;
                                vsync-active = <1>;
                        };
                };
        };
};

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

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

* Re: i.MX6 frame buffer inside barebox?
  2014-06-18 14:26 i.MX6 frame buffer inside barebox? Holger Schurig
@ 2014-06-18 19:58 ` Sascha Hauer
  2014-06-23  7:25   ` Holger Schurig
  0 siblings, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2014-06-18 19:58 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Wed, Jun 18, 2014 at 04:26:48PM +0200, Holger Schurig wrote:
> Hi, I'm a bit puzzled. I compiled my barebox with
> 
> CONFIG_CMD_SPLASH=y
> CONFIG_VIDEO=y
> CONFIG_DRIVER_VIDEO_IMX_IPUV3=y
> CONFIG_DRIVER_VIDEO_IMX_IPUV3_LVDS=y
> CONFIG_DRIVER_VIDEO_SIMPLEFB=y
> 
> and some entries in the device tree about it (see below). And when I
> boot barebox, I see /dev/fb0.
> 
> However, the LVDS signals don't come out of the CPU, e.g. LVDS_CLK0_P
> / LVDS_CLK0_N is silent. Do I need something to enable the drive as
> well?  Simply writing to /dev/fb0, e.g. with the "splash" or "mw -d
> /dev/fdb0" command, doesn't seem to do the magic.

have you enabled the framebuffer? fb0.enable=1

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] 9+ messages in thread

* Re: i.MX6 frame buffer inside barebox?
  2014-06-18 19:58 ` Sascha Hauer
@ 2014-06-23  7:25   ` Holger Schurig
  2014-06-23  7:43     ` Sascha Hauer
  0 siblings, 1 reply; 9+ messages in thread
From: Holger Schurig @ 2014-06-23  7:25 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Whaaa, it never occured to me that I have to enable the framebuffer as
well...   thanks, now it works.


As for simplefb, I removed that. I thought that this sets up a
framebuffer in the bootloader, which when Linux' framebuffer driver
takes over, without reprogramm or screen flicker. However, it seems
that this only works with specific framebuffer patterns, e.g. some 16
and 32 bit special rgb formats. I don't really get the need for that,
because the bootloader already has programmed the graphics device
correctly, the Linux driver could just re-use that information, so I
don't really see a need why the framebuffer organization has to be
present in the device tree in yet-another-format (tm).

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

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

* Re: i.MX6 frame buffer inside barebox?
  2014-06-23  7:25   ` Holger Schurig
@ 2014-06-23  7:43     ` Sascha Hauer
  2014-06-23  8:42       ` Holger Schurig
  0 siblings, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2014-06-23  7:43 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Mon, Jun 23, 2014 at 09:25:02AM +0200, Holger Schurig wrote:
> Whaaa, it never occured to me that I have to enable the framebuffer as
> well...   thanks, now it works.

barebox has nothing useful to show on the screen until some splash
command has been executed, so it's better to leave the display
diabled to avoid unnecessary flickering.

> 
> As for simplefb, I removed that. I thought that this sets up a
> framebuffer in the bootloader, which when Linux' framebuffer driver
> takes over, without reprogramm or screen flicker. However, it seems
> that this only works with specific framebuffer patterns, e.g. some 16
> and 32 bit special rgb formats. I don't really get the need for that,
> because the bootloader already has programmed the graphics device
> correctly, the Linux driver could just re-use that information, so I
> don't really see a need why the framebuffer organization has to be
> present in the device tree in yet-another-format (tm).

The simplefb driver in the kernel is completely hardware agnostic. It's
just a way for the firmware to give an already initialized framebuffer
to Linux and to run Linux graphics without having a framebuffer driver
under Linux. The IPU driver cannot take over an already initialized
framebuffer, instead it will reset and reconfigure the IPU during
initialization. I'm not sure which direction this
passing-a-framebuffer-from-bootloader-to-linux will take, but the
current situation is less than satisfying. My preferred solution is to
be fast enough in the bootloader and show a splash screen under Linux
only.

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] 9+ messages in thread

* Re: i.MX6 frame buffer inside barebox?
  2014-06-23  7:43     ` Sascha Hauer
@ 2014-06-23  8:42       ` Holger Schurig
  2014-06-23 10:03         ` Sascha Hauer
  2014-06-23 16:57         ` Robert Schwebel
  0 siblings, 2 replies; 9+ messages in thread
From: Holger Schurig @ 2014-06-23  8:42 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

> My preferred solution is to be fast enough in the bootloader
> and show a splash screen under Linux only.

Hmm, I'd like to not do that. Splash screen from Linux usually means
that I need an initrd. And an initrd is seldom needed on an embedded
device (i.e. no complicated RAID or DM setup). And it just slows down
the overall boot ...

But thanks for the info anyway.

Oh, one more question: do you have any idea if a simplefb would be
fast enought for X11 ?

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

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

* Re: i.MX6 frame buffer inside barebox?
  2014-06-23  8:42       ` Holger Schurig
@ 2014-06-23 10:03         ` Sascha Hauer
  2014-06-23 16:57         ` Robert Schwebel
  1 sibling, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2014-06-23 10:03 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Mon, Jun 23, 2014 at 10:42:55AM +0200, Holger Schurig wrote:
> > My preferred solution is to be fast enough in the bootloader
> > and show a splash screen under Linux only.
> 
> Hmm, I'd like to not do that. Splash screen from Linux usually means
> that I need an initrd. And an initrd is seldom needed on an embedded
> device (i.e. no complicated RAID or DM setup). And it just slows down
> the overall boot ...
> 
> But thanks for the info anyway.
> 
> Oh, one more question: do you have any idea if a simplefb would be
> fast enought for X11 ?

Yes, I think so. The (mainline) IPU drivers alone wouldn't help you
anyway. You'll need the FSL EXA drivers to get anything faster I guess.

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] 9+ messages in thread

* Re: i.MX6 frame buffer inside barebox?
  2014-06-23  8:42       ` Holger Schurig
  2014-06-23 10:03         ` Sascha Hauer
@ 2014-06-23 16:57         ` Robert Schwebel
  2014-06-25 13:46           ` Holger Schurig
  1 sibling, 1 reply; 9+ messages in thread
From: Robert Schwebel @ 2014-06-23 16:57 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Mon, Jun 23, 2014 at 10:42:55AM +0200, Holger Schurig wrote:
> > My preferred solution is to be fast enough in the bootloader
> > and show a splash screen under Linux only.
> 
> Hmm, I'd like to not do that. Splash screen from Linux usually means
> that I need an initrd. And an initrd is seldom needed on an embedded
> device (i.e. no complicated RAID or DM setup). And it just slows down
> the overall boot ...
> 
> But thanks for the info anyway.
> 
> Oh, one more question: do you have any idea if a simplefb would be
> fast enought for X11 ?

The idea is to have the splash ready in < 1 s after power-good, fully
from userspace, and all that with systemd + wayland.

We have some plans how to do that ... awaiting more customer projects
that have splash screen needs.

rsc
-- 
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] 9+ messages in thread

* Re: i.MX6 frame buffer inside barebox?
  2014-06-23 16:57         ` Robert Schwebel
@ 2014-06-25 13:46           ` Holger Schurig
  2014-06-26  5:55             ` Sascha Hauer
  0 siblings, 1 reply; 9+ messages in thread
From: Holger Schurig @ 2014-06-25 13:46 UTC (permalink / raw)
  To: Robert Schwebel; +Cc: barebox

I just noticed that simplefb wouldn't work with i.MX6 anyway, even if
I adapt it.

When I setup the framebuffer from barebox and display a splash and
then boot into Linux, then my framebuffer vanishes. Even when I don't
have simplefb or ipu enabled.

I think (!) the reason is the clock framework.The clocks for the IPU
are turned off, and so I don't see anything anymore (this is, however,
a wild assumption, I haven't checked it yet).

However, I checked with an Oscillioscope that if I setup the backlight
PWM (pwm0 in Barebox) and start Linux without CONFIG_PWM /
CONFIG_PWM_IMX, then the PWM is turned off as soon as Linux has been
started. Memory 0x2080000 shows in bit 0 that the PWM is still turned
on. But as nothing comes out, it must be the clock.

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

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

* Re: i.MX6 frame buffer inside barebox?
  2014-06-25 13:46           ` Holger Schurig
@ 2014-06-26  5:55             ` Sascha Hauer
  0 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2014-06-26  5:55 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Wed, Jun 25, 2014 at 03:46:28PM +0200, Holger Schurig wrote:
> I just noticed that simplefb wouldn't work with i.MX6 anyway, even if
> I adapt it.
> 
> When I setup the framebuffer from barebox and display a splash and
> then boot into Linux, then my framebuffer vanishes. Even when I don't
> have simplefb or ipu enabled.
> 
> I think (!) the reason is the clock framework.The clocks for the IPU
> are turned off, and so I don't see anything anymore (this is, however,
> a wild assumption, I haven't checked it yet).

You're probably right. You could check that with passing
'clk_ignore_unused' to the kernel.
Indeed I remember that we tweaked the clocks in a project we used
simplefb in.

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] 9+ messages in thread

end of thread, other threads:[~2014-06-26  5:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-18 14:26 i.MX6 frame buffer inside barebox? Holger Schurig
2014-06-18 19:58 ` Sascha Hauer
2014-06-23  7:25   ` Holger Schurig
2014-06-23  7:43     ` Sascha Hauer
2014-06-23  8:42       ` Holger Schurig
2014-06-23 10:03         ` Sascha Hauer
2014-06-23 16:57         ` Robert Schwebel
2014-06-25 13:46           ` Holger Schurig
2014-06-26  5:55             ` Sascha Hauer

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