U-Boot - Invert Display Clock Polarity

Hello. I wish you all a happy new year!

In a similar fashion of the Linux Kernel, I am configuring my display. I managed to get it working with your help but there’s an issue. There are some artifacts that appear in the screen, that disappear later in the kernel. Those kind of artifacts used to appear when I didnt configure the clock on the kernel.

Did anyone successfully invert the pixclk polarity? I tried the following in my apalis_imx6.c display definition

  • Include the mxcfb.h in apalis_imx6.c to change .sync to FB_SYNC_CLK_LAT_FALL since videomode.h does NOT have this definition (no change)
  • Change to .sync to every property in videomode.h (some of these actually break my image)

define FB_SYNC_HOR_HIGH_ACT 1

define FB_SYNC_VERT_HIGH_ACT 2

define FB_SYNC_EXT 4

define FB_SYNC_COMP_HIGH_ACT 8

define FB_SYNC_BROADCAST 16

What’s the correct way to invert the polarity in U-Boot?

Best regards,

Joao

Hi

Include the mxcfb.h in apalis_imx6.c to change .sync to FB_SYNC_CLK_LAT_FALL since videomode.h does NOT have this definition (no change)

I expect this to work. I.e. the flag is picked up here and this results in a changed pixel clock polarity here. Are you sure that you added to .sync of the active display timings?

You can check bit 17, di1_polarity_disp_clk, bit in all of the possible IPUx_DIx_GENERAL registers from the U-Boot command line (I expect that you use the first IPU second DI, i.e.the one controlled by 0x2648000):

md.l 0x2640000 1
md.l 0x2648000 1
md.l 0x2a40000 1
md.l 0x2a48000 1

You may also try to change the pixelclock polarity from the command line by toggeling bit 17 of said register.
i.e. read the register, modify the read value to have bit 17 toggled and write it back to see if this really would improve the splash screen drawn.

md.l 0x2648000 1                                                 
02648000: 00200000                               .. .                           
mw.l 0x2648000 00220000

Max

Hi Max,

Thank you again for your help.

That manual bit manipulation helped me figure it out. It does change the polarity. Fixes some of the artifacts but not all. That’s why I was not detecting it.

I am using the wvga-rgb definition in apalis_imx6. In comparison to mxc_lcdif.c (FUSION F07 definition which is the one I am using) in the kernel it has the .left_margin and .right_margin swapped. I also fixed that.

The artifacts that I have left can be an issue of the image itself so I’ll keep digging.

Thanks once more Max. Regards

OK I found my issue!

When I include the splash screen in my image it loses quality. By following the guide to load the images into uboot and display them, they are displayed perfectly. I must know why the images lose quality in the compilation.

I think the splash screen is coming too up too early. Is there a way I could fix this?

EDIT: Now that I’ve dug a little bit better, i think it’s a memory address issue. My splash might be too big.