JackyAtFreescale

Linux Framebuffer driver: Calculate Pixel Clock for struct fb_videomode -blog archive

Discussion created by JackyAtFreescale Employee on Mar 11, 2012
Latest reply on Oct 21, 2014 by MIKE PETERSEN

#define REFRESH 60
#define XRES 240
#define YRES 320
#define LEFT_M 2
#define RIGHT_M 2
#define UPPER_M 0
#define LOWER_M 0
#define HSYNC_LEN 4
#define VSYNC_LEN 4
#define PIXCLOCK (1e12/((XRES+LEFT_M+RIGHT_M+HSYNC_LEN)*\(YRES+UPPER_M+LOWER_M+VSYNC_LEN)*REFRESH))

static struct fb_videomode video_modes[] = {
    {
     "MyVideoMode", REFRESH, XRES, YRES, PIXCLOCK, LEFT_M, RIGHT_M, UPPER_M, LOWER_M, HSYNC_LEN, VSYNC_LEN,
     0, FB_VMODE_NONINTERLACED, 0,
    },
};

Outcomes