stauffenberg xiao

Can't set fb2's resolution same as fb0(if fb0 is XGA or WXGA+ ) on IMX53 QSB

Discussion created by stauffenberg xiao on Aug 22, 2012
Latest reply on Oct 5, 2012 by Daiane Angolini

Hi! All,

I want to set fb2 resolution same as fb0, here is my code(overrall):

------------------------

... ...

struct fb_var_screeninfo fbVar;
struct fb_var_screeninfo fb2_var;

 

int fb = open("/dev/fb0", O_RDWR, 0);
ioctl(fb, FBIOGET_VSCREENINFO, &fbVar);

 

int fb2 = open("/dev/fb2", O_RDWR, 0);
ioctl(fb2, FBIOGET_VSCREENINFO, &fb2_var);

memset(&fb2_var, 0x00, sizeof(fb_var_screeninfo));
memcpy(&fb2_var, &fbVar, sizeof(fb_var_screeninfo));


ioctl(fb2, FBIOPUT_VSCREENINFO, &fb2_var);
... ...

-----------------------

I konw fb0 resolution 1024x768,as following(command fbset):

mode "1024x768-60"
# D: 65.003 MHz, H: 48.365 kHz, V: 60.006 Hz
geometry 1024 768 1024 2304 16
timings 15384 160 24 29 3 136 6
rgba 5/11,6/5,5/0,0/0
endmode

 

But i get fb2 info as following:

fb2_var.xres = 1023

fb2_var.yres = 632   OR

fb2_var.xres = 856

fb2_var.yres = 610   etc.

I need your help

Thanks and best regards.

Outcomes