IMX6ULL Frame Buffer and Video setting

Referring to the documentation to set the LCD parameters and frame buffer it mentions using setenv videomode video

I have done this in UBoot and during the UBoot the screen has changed to what i expected.

using printenv i can see the following

vidargs=video=mxsfb:800x480M-16@60
videomode=video=ctfb:x:800,y:480,depth:18,pclk:39722,le:0,ri:10,up:0,lo:10,hs:10,vs:10,sync:0,vmode:0

So all looks good

When the kernel starts to boot, the screen changes back to a different setting

From what i have read the settings are taken from the device tree in ‘imx6ull-colibri-eval-v3.dtsi’
I have tried changing this here (also tried adding my own dts,dtsi file) BUT this has had no effect

I have a C program that is part of my main app that does

struct fb_var_screeninfo fvsi;
  struct fb_fix_screeninfo ffsi;

  if ((lcd_device = open("/dev/fb0", O_RDWR)) < 0) {
    perror("open");
    result = 1;
    exit(1);
  }

  if (ioctl(lcd_device, FBIOGET_VSCREENINFO, &fvsi) < 0) {
    perror("ioctl(FBIOGET_VSCREENINFO)");
    close(lcd_device);
    result = 1;
    exit(1);
  }

and looking at the output of fvsi i see the values

pixclock = 33898, left_margin = 96, right_margin = 24, upper_margin = 10, lower margin = 3, hsync_len = 72

I do not have any of these settings in my device tree and this is not what was set via setenv

It seems to me that it is ignoring my dtb file
When i am in UBoot and run ‘run update’ i expect this is updatin ght euBoot, Kernel and dtb ?

Is there anyway from the console to see what screen settings the kernel believes it is using ?

Could you please specify which Linux image you are using?

Hello,

I am currently using BSP 2.8 : LinuxImageV2.8

If it would be better to change to a newer BSP i.e. BSP 3.0 : LinuxImageV3.0 then i could do that

Hi @adrian

Yes, could you please give a try with Bsp 3.0.4?

Could you share the serial bootlog in a text file?
What is the output of fbset?

Best regards,
Jaski

Hi,
I tried the BSP 3.0.4 but it made no difference

This is the output of fbset

root@colibri-imx6ull:~# fbset

mode “800x480-59”
# D: 29.500 MHz, H: 29.738 kHz, V: 59.476 Hz
geometry 800 480 800 480 16
timings 33898 96 24 10 3 72 7
accel false
rgba 5/11,6/5,5/0,0/0
endmode

THESE ARE THE VALUES I SEE FROM MY C PROGRAM

Q. Should my device tree have changed these values ?
Q. Can i change these values from the command prompt ?

Hi,

I used

fbset -t 25000 10 0 10 0 10 10

and this sorted out the display BUT on reboot it reverted back to being wrong.

Can i save the settings after using fbset ?

Hi

Should my device tree have changed these values ?

No, you have set vidargs as kernel parameter. In this case, the device tree values are not taken in account.

Can i change these values from the command prompt ?

Sure, you can use xrandr.

Hi,

Can i save the settings after using fbset ?

Yes, you can write to fbset >>/etc/local.fb.modes.

Best regards,
Jaski

As soon as i reboot it reverts back

I wonder if i need too (is there a way) to set the frame buffer settings in the device tree

I cleared the vidargs flag

fw_setenv vidargs video

and hey presto it then used the settings from my device tree

Perfect that it works. Thanks for the feedback.