Tool/software: Linux
Hi:
I'm using u-boot 2011 + kernel 4.4.32 (extracted from am3354 processor sdk 03.02.00.05).
right now i wanted to implement the splash screen feature for u-boot.
i referred to
as previous post in the forum.
Firstly the u-boot lcd driver worked fine after i followed the steps in the post.
My kernel dts setting for LCD was:
panel {
compatible = "ti,tilcdc,panel";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&lcd_pins_s0>;
panel-info {
ac-bias = <255>;
ac-bias-intrpt = <0>;
dma-burst-sz = <16>;
bpp = <32>;
fdd = <0x80>;
sync-edge = <0>;
sync-ctrl = <1>;
raster-order = <0>;
fifo-th = <0>;
};
display-timings {
320x240p62 {
clock-frequency = <21000000>;
hactive = <320>;
vactive = <240>;
hfront-porch = <18>;
hback-porch = <56>;
hsync-len = <10>;
vback-porch = <17>;
vfront-porch = <10>;
vsync-len = <1>;
hsync-active = <0>;
vsync-active = <0>;
pixelclk-active = <1>;
};
};
};
it worked well when the lcd driver is not implemented in the u-boot.
then i changed the code in lcd driver for u-boot for it to be exactly like what's in the kernel.Like this:
/* Configure the pclk */
RasterClkConfig(SOC_LCDC_0_REGS, 21000000, 192000000);//(SOC_LCDC_0_REGS, 21000000, 192000000) //changed pclk to 21MHz.
....
/* Configuring horizontal timing parameter */
RasterHparamConfig(SOC_LCDC_0_REGS, 320, 10, 18, 56); //changed the horizonal pixel number. hfp,hbp and hsw.
/* Configuring vertical timing parameters */
RasterVparamConfig(SOC_LCDC_0_REGS, 240, 1, 10, 17); //changed the vertical pixel number. vfp,vbp and vsw.
As you can see.till now it's exact the same parameter for LCD as in the kernel dts.
So.I built the u-boot.reboot.
it looks fine in the splash screen.Here it is.
Also i'm aware that for 4.4 kernel.It's necessary to use display PLL instead of pheripheral PLL.
So that part of code is also implemented in the u-boot lcd driver.(thanks to one of the post in the forum)
I'm attaching the driver code here.
Now.Here is the strange part.
After the u-boot is done.And when kernel starts up.I can see that the kernel displays image slightly moved to the left. ( kernel worked well when the lcd driver is not implemented in the u-boot.)
i started a SGX demo application to show you what it would look like.Here:
So.To my experience i started to change hsw or hbp or hfp to see if i can get it right.But turned out that none of the parameter really solved the problem.
Here's what i did.
1.hsync-len = <10>; -> hsync-len = <1>;
As you can see in the photo below.There is this strange area of pixel (a vertical column in the red square i marked).The pixels seems to be repeating themselves.
2.hsync-len = <10>; -> hsync-len = <30>;
As you can see.I managed to align correct the right column.But the strange pixel area persists.
3.hback-porch = <56>; -> hback-porch = <75>
basically the same as the last experiment.I managed to align correct the right column.But the strange pixel area persists.Only this time it's the hbp i chanegd.
4.hfp don't affect the display however i changed it.
So till now.
I can be sure:
a.no matter how i modified hfp/hbp/hsw. Not to mention vfp/vbp/vsw. the phenomenon exists.
b.in the lcd driver of u-boot. the source of clock for the lcd driver doesn't matter. Be it display PLL.Or pheripheral pll. Or even core pll.
c.i even tried to cut out the lcd driver of uboot piece by piece. To remove pieces of code to find out exactly which setting caused the kernel to behave strangely.But there's no success.As soon as the code reaches RasterEnable(SOC_LCDC_0_REGS); Things went wrong.
Please advise what is should do?
to change the lcd driver in uboot?
Or to see if there's a way to reset the lcd registers when kernel starts to initialize lcd controller?
thank you guys
yandong