Searched refs:cvt (Results 1 - 13 of 13) sorted by relevance

/linux-4.4.14/drivers/video/fbdev/core/
H A Dfbcvt.c73 static u32 fb_cvt_hperiod(struct fb_cvt_data *cvt) fb_cvt_hperiod() argument
75 u32 num = 1000000000/cvt->f_refresh; fb_cvt_hperiod()
78 if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) { fb_cvt_hperiod()
80 den = 2 * (cvt->yres/cvt->interlace + 2 * cvt->v_margin); fb_cvt_hperiod()
83 den = 2 * (cvt->yres/cvt->interlace + cvt->v_margin * 2 fb_cvt_hperiod()
84 + FB_CVT_MIN_VPORCH + cvt->interlace/2); fb_cvt_hperiod()
91 static u32 fb_cvt_ideal_duty_cycle(struct fb_cvt_data *cvt) fb_cvt_ideal_duty_cycle() argument
96 u32 h_period_est = cvt->hperiod; fb_cvt_ideal_duty_cycle()
101 static u32 fb_cvt_hblank(struct fb_cvt_data *cvt) fb_cvt_hblank() argument
105 if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) fb_cvt_hblank()
108 u32 ideal_duty_cycle = fb_cvt_ideal_duty_cycle(cvt); fb_cvt_hblank()
109 u32 active_pixels = cvt->active_pixels; fb_cvt_hblank()
125 static u32 fb_cvt_hsync(struct fb_cvt_data *cvt) fb_cvt_hsync() argument
129 if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) fb_cvt_hsync()
132 hsync = (FB_CVT_CELLSIZE * cvt->htotal)/100; fb_cvt_hsync()
138 static u32 fb_cvt_vbi_lines(struct fb_cvt_data *cvt) fb_cvt_vbi_lines() argument
142 if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) { fb_cvt_vbi_lines()
143 vbi_lines = (1000 * FB_CVT_RB_MIN_VBLANK)/cvt->hperiod + 1; fb_cvt_vbi_lines()
144 min_vbi_lines = FB_CVT_RB_V_FPORCH + cvt->vsync + fb_cvt_vbi_lines()
148 vbi_lines = (FB_CVT_MIN_VSYNC_BP * 1000)/cvt->hperiod + 1 + fb_cvt_vbi_lines()
150 min_vbi_lines = cvt->vsync + FB_CVT_MIN_BPORCH + fb_cvt_vbi_lines()
162 static u32 fb_cvt_vtotal(struct fb_cvt_data *cvt) fb_cvt_vtotal() argument
164 u32 vtotal = cvt->yres/cvt->interlace; fb_cvt_vtotal()
166 vtotal += 2 * cvt->v_margin + cvt->interlace/2 + fb_cvt_vbi_lines(cvt); fb_cvt_vtotal()
167 vtotal |= cvt->interlace/2; fb_cvt_vtotal()
172 static u32 fb_cvt_pixclock(struct fb_cvt_data *cvt) fb_cvt_pixclock() argument
176 if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) fb_cvt_pixclock()
177 pixclock = (cvt->f_refresh * cvt->vtotal * cvt->htotal)/1000; fb_cvt_pixclock()
179 pixclock = (cvt->htotal * 1000000)/cvt->hperiod; fb_cvt_pixclock()
188 static u32 fb_cvt_aspect_ratio(struct fb_cvt_data *cvt) fb_cvt_aspect_ratio() argument
190 u32 xres = cvt->xres; fb_cvt_aspect_ratio()
191 u32 yres = cvt->yres; fb_cvt_aspect_ratio()
208 cvt->status = 1; fb_cvt_aspect_ratio()
214 static void fb_cvt_print_name(struct fb_cvt_data *cvt) fb_cvt_print_name() argument
223 pixcount = (cvt->xres * (cvt->yres/cvt->interlace))/1000000; fb_cvt_print_name()
224 pixcount_mod = (cvt->xres * (cvt->yres/cvt->interlace)) % 1000000; fb_cvt_print_name()
228 cvt->xres, cvt->yres, cvt->refresh); fb_cvt_print_name()
232 if (cvt->status) fb_cvt_print_name()
246 if (cvt->aspect_ratio == 0) fb_cvt_print_name()
248 else if (cvt->aspect_ratio == 3) fb_cvt_print_name()
250 else if (cvt->aspect_ratio == 1 || cvt->aspect_ratio == 4) fb_cvt_print_name()
252 else if (cvt->aspect_ratio == 2) fb_cvt_print_name()
259 if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) { fb_cvt_print_name()
270 static void fb_cvt_convert_to_mode(struct fb_cvt_data *cvt, fb_cvt_convert_to_mode() argument
273 mode->refresh = cvt->f_refresh; fb_cvt_convert_to_mode()
274 mode->pixclock = KHZ2PICOS(cvt->pixclock/1000); fb_cvt_convert_to_mode()
275 mode->left_margin = cvt->h_back_porch; fb_cvt_convert_to_mode()
276 mode->right_margin = cvt->h_front_porch; fb_cvt_convert_to_mode()
277 mode->hsync_len = cvt->hsync; fb_cvt_convert_to_mode()
278 mode->upper_margin = cvt->v_back_porch; fb_cvt_convert_to_mode()
279 mode->lower_margin = cvt->v_front_porch; fb_cvt_convert_to_mode()
280 mode->vsync_len = cvt->vsync; fb_cvt_convert_to_mode()
284 if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) fb_cvt_convert_to_mode()
307 struct fb_cvt_data cvt; fb_find_mode_cvt() local
309 memset(&cvt, 0, sizeof(cvt)); fb_find_mode_cvt()
312 cvt.flags |= FB_CVT_FLAG_MARGINS; fb_find_mode_cvt()
315 cvt.flags |= FB_CVT_FLAG_REDUCED_BLANK; fb_find_mode_cvt()
318 cvt.flags |= FB_CVT_FLAG_INTERLACED; fb_find_mode_cvt()
320 cvt.xres = mode->xres; fb_find_mode_cvt()
321 cvt.yres = mode->yres; fb_find_mode_cvt()
322 cvt.refresh = mode->refresh; fb_find_mode_cvt()
323 cvt.f_refresh = cvt.refresh; fb_find_mode_cvt()
324 cvt.interlace = 1; fb_find_mode_cvt()
326 if (!cvt.xres || !cvt.yres || !cvt.refresh) { fb_find_mode_cvt()
331 if (!(cvt.refresh == 50 || cvt.refresh == 60 || cvt.refresh == 70 || fb_find_mode_cvt()
332 cvt.refresh == 85)) { fb_find_mode_cvt()
335 cvt.status = 1; fb_find_mode_cvt()
338 cvt.xres &= ~(FB_CVT_CELLSIZE - 1); fb_find_mode_cvt()
340 if (cvt.flags & FB_CVT_FLAG_INTERLACED) { fb_find_mode_cvt()
341 cvt.interlace = 2; fb_find_mode_cvt()
342 cvt.f_refresh *= 2; fb_find_mode_cvt()
345 if (cvt.flags & FB_CVT_FLAG_REDUCED_BLANK) { fb_find_mode_cvt()
346 if (cvt.refresh != 60) { fb_find_mode_cvt()
349 cvt.status = 1; fb_find_mode_cvt()
353 if (cvt.flags & FB_CVT_FLAG_MARGINS) { fb_find_mode_cvt()
354 cvt.h_margin = (cvt.xres * 18)/1000; fb_find_mode_cvt()
355 cvt.h_margin &= ~(FB_CVT_CELLSIZE - 1); fb_find_mode_cvt()
356 cvt.v_margin = ((cvt.yres/cvt.interlace)* 18)/1000; fb_find_mode_cvt()
359 cvt.aspect_ratio = fb_cvt_aspect_ratio(&cvt); fb_find_mode_cvt()
360 cvt.active_pixels = cvt.xres + 2 * cvt.h_margin; fb_find_mode_cvt()
361 cvt.hperiod = fb_cvt_hperiod(&cvt); fb_find_mode_cvt()
362 cvt.vsync = fb_cvt_vbi_tab[cvt.aspect_ratio]; fb_find_mode_cvt()
363 cvt.vtotal = fb_cvt_vtotal(&cvt); fb_find_mode_cvt()
364 cvt.hblank = fb_cvt_hblank(&cvt); fb_find_mode_cvt()
365 cvt.htotal = cvt.active_pixels + cvt.hblank; fb_find_mode_cvt()
366 cvt.hsync = fb_cvt_hsync(&cvt); fb_find_mode_cvt()
367 cvt.pixclock = fb_cvt_pixclock(&cvt); fb_find_mode_cvt()
368 cvt.hfreq = cvt.pixclock/cvt.htotal; fb_find_mode_cvt()
369 cvt.h_back_porch = cvt.hblank/2 + cvt.h_margin; fb_find_mode_cvt()
370 cvt.h_front_porch = cvt.hblank - cvt.hsync - cvt.h_back_porch + fb_find_mode_cvt()
371 2 * cvt.h_margin; fb_find_mode_cvt()
372 cvt.v_front_porch = 3 + cvt.v_margin; fb_find_mode_cvt()
373 cvt.v_back_porch = cvt.vtotal - cvt.yres/cvt.interlace - fb_find_mode_cvt()
374 cvt.v_front_porch - cvt.vsync; fb_find_mode_cvt()
375 fb_cvt_print_name(&cvt); fb_find_mode_cvt()
376 fb_cvt_convert_to_mode(&cvt, mode); fb_find_mode_cvt()
H A Dmodedb.c700 int yres_specified = 0, cvt = 0, rb = 0, interlace = 0; fb_find_mode() local
713 if (cvt || rb) fb_find_mode()
714 cvt = 0; fb_find_mode()
724 if (cvt || rb) fb_find_mode()
725 cvt = 0; fb_find_mode()
741 cvt = 1; fb_find_mode()
744 if (!cvt) fb_find_mode()
748 if (!cvt) fb_find_mode()
752 if (!cvt) fb_find_mode()
764 if (cvt) { fb_find_mode()
/linux-4.4.14/drivers/gpu/drm/
H A Ddrm_modes.c1231 bool yres_specified = false, cvt = false, rb = false; drm_mode_parse_command_line_for_connector() local
1252 !yres_specified && !cvt && !rb && was_digit) { drm_mode_parse_command_line_for_connector()
1260 if (!bpp_specified && !yres_specified && !cvt && drm_mode_parse_command_line_for_connector()
1280 if (yres_specified || cvt || was_digit) drm_mode_parse_command_line_for_connector()
1282 cvt = true; drm_mode_parse_command_line_for_connector()
1285 if (yres_specified || cvt || rb || was_digit) drm_mode_parse_command_line_for_connector()
1290 if (cvt || yres_specified || was_digit) drm_mode_parse_command_line_for_connector()
1295 if (cvt || yres_specified || was_digit) drm_mode_parse_command_line_for_connector()
1365 mode->cvt = cvt; drm_mode_parse_command_line_for_connector()
1388 if (cmd->cvt) drm_mode_create_from_cmdline_mode()
H A Ddrm_edid.c2178 case 0x04: /* cvt, only in 1.4+ */ do_inferred_modes()
2352 struct cvt_timing *cvt; drm_cvt_modes() local
2358 cvt = &(timing->data.other_data.data.cvt[i]); drm_cvt_modes()
2360 if (!memcmp(cvt->code, empty, 3)) drm_cvt_modes()
2363 height = (cvt->code[0] + ((cvt->code[1] & 0xf0) << 4) + 1) * 2; drm_cvt_modes()
2364 switch (cvt->code[1] & 0x0c) { drm_cvt_modes()
2380 if (cvt->code[2] & (1 << j)) { drm_cvt_modes()
/linux-4.4.14/include/drm/
H A Ddrm_edid.h113 } __attribute__((packed)) cvt; member in union:detailed_data_monitor_range::__anon12072
146 struct cvt_timing cvt[4]; member in union:detailed_non_pixel::__anon12075
H A Ddrm_modes.h162 bool cvt; member in struct:drm_cmdline_mode
/linux-4.4.14/drivers/net/wireless/cw1200/
H A Dwsm.c45 #define __WSM_GET(buf, type, type2, cvt) \
50 val = cvt(*(type2 *)(buf)->data); \
68 #define __WSM_PUT(buf, val, type, type2, cvt) \
73 *(type2 *)(buf)->data = cvt(val); \
H A Dbh.c34 * "*2" to cvt to bytes
/linux-4.4.14/sound/pci/hda/
H A Dpatch_hdmi.c401 codec_warn(codec, "HDMI: cvt nid %d not registered\n", cvt_nid); cvt_nid_to_cvt_index()
1428 "choose cvt %d for pin nid %d\n", for_each_hda_codec_node()
1812 /* Verify pin:cvt selections to avoid silent audio after S3. generic_hdmi_playback_pcm_prepare()
1813 * After S3, the audio driver restores pin:cvt selections generic_hdmi_playback_pcm_prepare()
3191 /* AMD specific HDA cvt verbs */
H A Dhda_codec.c623 unsigned char active; /* cvt is currently used */
/linux-4.4.14/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_connectors.c422 * but an approximation based on the cvt formula. For these amdgpu_connector_lcd_native_mode()
429 DRM_DEBUG_KMS("Adding cvt approximation of native panel mode %s\n", mode->name); amdgpu_connector_lcd_native_mode()
/linux-4.4.14/drivers/gpu/drm/radeon/
H A Dradeon_connectors.c501 * but an approximation based on the cvt formula. For these radeon_fp_native_mode()
508 DRM_DEBUG_KMS("Adding cvt approximation of native panel mode %s\n", mode->name); radeon_fp_native_mode()
/linux-4.4.14/include/sound/
H A Demu10k1.h796 #define GPSRCS 0x61 /* General Purpose SPDIF sample rate cvt status */

Completed in 603 milliseconds