AnsweredAssumed Answered

Custom default framebuffer (fb0) size

Question asked by Pak Woon on Oct 19, 2014

Hello Community,

 

We are trying to get a default custom screen size (800x480) working on the iMX6DL (Using a Congatec qmx6 PN16111 and code from their git repository).

 

We pass into the kernel:

video=mxcfb0:dev=hdmi,800x480M@60,if=RGB24

 

We have added an entry into /etc/X11/xorg.conf and this resolution appears in the configuration:

# xrandr --current

Screen 0: minimum 240 x 240, current 800 x 480, maximum 8192 x 8192

DISP3 BG - DI1 connected (normal left inverted right x axis y axis)

   800x480_60.00   59.5 +

   U:720x480p-60   59.9 +

   U:1920x1080p-50   50.0 

   U:1920x1080p-60   60.0 

   U:1920x1080p-30   30.0 

   U:1920x1080p-25   25.0 

   U:1920x1080p-24   24.0 

   U:1280x720p-120  120.0 

   U:1280x720p-100  100.0 

   U:1280x720p-50   50.0 

   U:1280x720p-60   60.0 

   U:1440x576p-50   50.0 

   U:1440x480p-60   60.0 

   U:1440x288p-50   50.1 

   U:720x576p-50   50.0 

   U:1440x240p-60   59.9 

   U:640x480p-59   59.9 

   U:640x480p-60   59.9 

 

But for some reason Vivante prefers not to go to this mode (looking at /var/log/Xorg.0.log):

[    12.103] (II) VIVANTE(0): Device preferred mode 'fb0':U:720x480p-60

[    12.103] (**) VIVANTE(0): Depth 24, (--) framebuffer bpp 32

[    12.103] (==) VIVANTE(0): RGB weight 888

[    12.103] (==) VIVANTE(0): Default visual is TrueColor

[    12.104] (==) VIVANTE(0): Using gamma correction (1.0, 1.0, 1.0)

[    12.104] (**) VIVANTE(0): Option "fbdev" "/dev/fb0"

[    12.104] (II) VIVANTE(0): checking modes against framebuffer device...

[    12.104] (II) VIVANTE(0): mode "800x480_60.00" ok

[    12.104] (II) VIVANTE(0): checking modes against monitor...

[    12.104] (--) VIVANTE(0): Virtual size is 800x480 (pitch 800)

[    12.104] (**) VIVANTE(0):  Mode "800x480_60.00": 29.5 MHz (scaled from 0.0 MHz), 29.7 kHz, 59.5 Hz

[    12.105] (II) VIVANTE(0): Modeline "800x480_60.00"x0.0   29.50  800 824 896 992  480 483 493 500 -hsync +vsync (29.7 kHz)

[    12.105] (==) VIVANTE(0): DPI set to (96, 96)

 

Looking at the available modes on the framebuffer, we don't see it here either:

/sys/class/graphics/fb0# cat modes

S:1920x1080p-60

S:1920x1080p-50

S:1280x720p-60

S:1280x720p-50

S:720x576p-50

S:720x576p-50

S:720x480p-60

S:720x480p-60

V:640x480p-60

D:720x480p-59

D:1280x720p-60

V:640x480p-60

 

And that fb0's default is 720x480:

/sys/class/graphics/fb0# cat mode

D:720x480p-59

 

The result of this is the screen appears "torn". It seems as though the framebuffer is mismatched to the X11 screen resolution.

 

If we add a new mode to /etc/fb_mode then fbset that mode, the screen stop "tearing" and everything looks fine.

 

I am thinking the dts file may force a default resolution of LDB-XGA, but that is not 720x480. I have tried setting the screen resolution with fbset and xrandr in /etc/rc.local, but it does not work(both work when run from the terminal). Vivante pulls the preferred mode from fb0/mode, therefore I am guessing there needs to be a change at a lower layer default... somewhere.

 

Thanks in advance.

Outcomes