Lines Matching +full:mega +full:- +full:pixel
2 * linux/drivers/video/fbcvt.c - VESA(TM) Coordinated Video Timings
75 u32 num = 1000000000/cvt->f_refresh; in fb_cvt_hperiod()
78 if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) { in fb_cvt_hperiod()
79 num -= FB_CVT_RB_MIN_VBLANK * 1000; in fb_cvt_hperiod()
80 den = 2 * (cvt->yres/cvt->interlace + 2 * cvt->v_margin); in fb_cvt_hperiod()
82 num -= FB_CVT_MIN_VSYNC_BP * 1000; in fb_cvt_hperiod()
83 den = 2 * (cvt->yres/cvt->interlace + cvt->v_margin * 2 in fb_cvt_hperiod()
84 + FB_CVT_MIN_VPORCH + cvt->interlace/2); in fb_cvt_hperiod()
93 u32 c_prime = (FB_CVT_GTF_C - FB_CVT_GTF_J) * in fb_cvt_ideal_duty_cycle()
96 u32 h_period_est = cvt->hperiod; in fb_cvt_ideal_duty_cycle()
98 return (1000 * c_prime - ((m_prime * h_period_est)/1000))/256; in fb_cvt_ideal_duty_cycle()
105 if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) in fb_cvt_hblank()
109 u32 active_pixels = cvt->active_pixels; in fb_cvt_hblank()
113 (100000 - 20000); in fb_cvt_hblank()
116 (100000 - ideal_duty_cycle); in fb_cvt_hblank()
120 hblank &= ~((2 * FB_CVT_CELLSIZE) - 1); in fb_cvt_hblank()
129 if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) in fb_cvt_hsync()
132 hsync = (FB_CVT_CELLSIZE * cvt->htotal)/100; in fb_cvt_hsync()
134 hsync &= ~(FB_CVT_CELLSIZE - 1); in fb_cvt_hsync()
142 if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) { in fb_cvt_vbi_lines()
143 vbi_lines = (1000 * FB_CVT_RB_MIN_VBLANK)/cvt->hperiod + 1; in fb_cvt_vbi_lines()
144 min_vbi_lines = FB_CVT_RB_V_FPORCH + cvt->vsync + in fb_cvt_vbi_lines()
148 vbi_lines = (FB_CVT_MIN_VSYNC_BP * 1000)/cvt->hperiod + 1 + in fb_cvt_vbi_lines()
150 min_vbi_lines = cvt->vsync + FB_CVT_MIN_BPORCH + in fb_cvt_vbi_lines()
164 u32 vtotal = cvt->yres/cvt->interlace; in fb_cvt_vtotal()
166 vtotal += 2 * cvt->v_margin + cvt->interlace/2 + fb_cvt_vbi_lines(cvt); in fb_cvt_vtotal()
167 vtotal |= cvt->interlace/2; in fb_cvt_vtotal()
176 if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) in fb_cvt_pixclock()
177 pixclock = (cvt->f_refresh * cvt->vtotal * cvt->htotal)/1000; in fb_cvt_pixclock()
179 pixclock = (cvt->htotal * 1000000)/cvt->hperiod; in fb_cvt_pixclock()
190 u32 xres = cvt->xres; in fb_cvt_aspect_ratio()
191 u32 yres = cvt->yres; in fb_cvt_aspect_ratio()
192 u32 aspect = -1; in fb_cvt_aspect_ratio()
208 cvt->status = 1; in fb_cvt_aspect_ratio()
225 pixcount = (cvt->xres * (cvt->yres/cvt->interlace))/1000000; in fb_cvt_print_name()
226 pixcount_mod = (cvt->xres * (cvt->yres/cvt->interlace)) % 1000000; in fb_cvt_print_name()
229 off += scnprintf(buf + off, size - off, "fbcvt: %dx%d@%d: CVT Name - ", in fb_cvt_print_name()
230 cvt->xres, cvt->yres, cvt->refresh); in fb_cvt_print_name()
232 if (cvt->status) { in fb_cvt_print_name()
233 off += scnprintf(buf + off, size - off, in fb_cvt_print_name()
234 "Not a CVT standard - %d.%03d Mega Pixel Image\n", in fb_cvt_print_name()
238 off += scnprintf(buf + off, size - off, "%d", pixcount); in fb_cvt_print_name()
240 off += scnprintf(buf + off, size - off, ".%03dM", pixcount_mod); in fb_cvt_print_name()
242 if (cvt->aspect_ratio == 0) in fb_cvt_print_name()
243 off += scnprintf(buf + off, size - off, "3"); in fb_cvt_print_name()
244 else if (cvt->aspect_ratio == 3) in fb_cvt_print_name()
245 off += scnprintf(buf + off, size - off, "4"); in fb_cvt_print_name()
246 else if (cvt->aspect_ratio == 1 || cvt->aspect_ratio == 4) in fb_cvt_print_name()
247 off += scnprintf(buf + off, size - off, "9"); in fb_cvt_print_name()
248 else if (cvt->aspect_ratio == 2) in fb_cvt_print_name()
249 off += scnprintf(buf + off, size - off, "A"); in fb_cvt_print_name()
251 if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) in fb_cvt_print_name()
252 off += scnprintf(buf + off, size - off, "-R"); in fb_cvt_print_name()
262 mode->refresh = cvt->f_refresh; in fb_cvt_convert_to_mode()
263 mode->pixclock = KHZ2PICOS(cvt->pixclock/1000); in fb_cvt_convert_to_mode()
264 mode->left_margin = cvt->h_back_porch; in fb_cvt_convert_to_mode()
265 mode->right_margin = cvt->h_front_porch; in fb_cvt_convert_to_mode()
266 mode->hsync_len = cvt->hsync; in fb_cvt_convert_to_mode()
267 mode->upper_margin = cvt->v_back_porch; in fb_cvt_convert_to_mode()
268 mode->lower_margin = cvt->v_front_porch; in fb_cvt_convert_to_mode()
269 mode->vsync_len = cvt->vsync; in fb_cvt_convert_to_mode()
271 mode->sync &= ~(FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT); in fb_cvt_convert_to_mode()
273 if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) in fb_cvt_convert_to_mode()
274 mode->sync |= FB_SYNC_HOR_HIGH_ACT; in fb_cvt_convert_to_mode()
276 mode->sync |= FB_SYNC_VERT_HIGH_ACT; in fb_cvt_convert_to_mode()
280 * fb_find_mode_cvt - calculate mode using VESA(TM) CVT
282 * pre-filled with the desired values
306 if (mode->vmode & FB_VMODE_INTERLACED) in fb_find_mode_cvt()
309 cvt.xres = mode->xres; in fb_find_mode_cvt()
310 cvt.yres = mode->yres; in fb_find_mode_cvt()
311 cvt.refresh = mode->refresh; in fb_find_mode_cvt()
327 cvt.xres &= ~(FB_CVT_CELLSIZE - 1); in fb_find_mode_cvt()
344 cvt.h_margin &= ~(FB_CVT_CELLSIZE - 1); in fb_find_mode_cvt()
359 cvt.h_front_porch = cvt.hblank - cvt.hsync - cvt.h_back_porch + in fb_find_mode_cvt()
362 cvt.v_back_porch = cvt.vtotal - cvt.yres/cvt.interlace - in fb_find_mode_cvt()
363 cvt.v_front_porch - cvt.vsync; in fb_find_mode_cvt()