Lines Matching refs:tv_mode

139 struct tv_mode {  struct
212 static const struct tv_mode tv_modes[] = {
291 static const struct tv_mode *sun4i_tv_find_tv_by_mode(const struct drm_display_mode *mode) in sun4i_tv_find_tv_by_mode()
297 const struct tv_mode *tv_mode = &tv_modes[i]; in sun4i_tv_find_tv_by_mode() local
300 mode->name, tv_mode->name); in sun4i_tv_find_tv_by_mode()
302 if (!strcmp(mode->name, tv_mode->name)) in sun4i_tv_find_tv_by_mode()
303 return tv_mode; in sun4i_tv_find_tv_by_mode()
308 const struct tv_mode *tv_mode = &tv_modes[i]; in sun4i_tv_find_tv_by_mode() local
311 mode->name, tv_mode->name, in sun4i_tv_find_tv_by_mode()
312 mode->vdisplay, tv_mode->vdisplay); in sun4i_tv_find_tv_by_mode()
314 if (mode->vdisplay == tv_mode->vdisplay) in sun4i_tv_find_tv_by_mode()
315 return tv_mode; in sun4i_tv_find_tv_by_mode()
321 static void sun4i_tv_mode_to_drm_mode(const struct tv_mode *tv_mode, in sun4i_tv_mode_to_drm_mode() argument
330 mode->hdisplay = tv_mode->hdisplay; in sun4i_tv_mode_to_drm_mode()
331 mode->hsync_start = mode->hdisplay + tv_mode->hfront_porch; in sun4i_tv_mode_to_drm_mode()
332 mode->hsync_end = mode->hsync_start + tv_mode->hsync_len; in sun4i_tv_mode_to_drm_mode()
333 mode->htotal = mode->hsync_end + tv_mode->hback_porch; in sun4i_tv_mode_to_drm_mode()
335 mode->vdisplay = tv_mode->vdisplay; in sun4i_tv_mode_to_drm_mode()
336 mode->vsync_start = mode->vdisplay + tv_mode->vfront_porch; in sun4i_tv_mode_to_drm_mode()
337 mode->vsync_end = mode->vsync_start + tv_mode->vsync_len; in sun4i_tv_mode_to_drm_mode()
338 mode->vtotal = mode->vsync_end + tv_mode->vback_porch; in sun4i_tv_mode_to_drm_mode()
374 const struct tv_mode *tv_mode = sun4i_tv_find_tv_by_mode(mode); in sun4i_tv_mode_set() local
386 tv_mode->mode | in sun4i_tv_mode_set()
387 (tv_mode->yc_en ? SUN4I_TVE_CFG0_YC_EN : 0) | in sun4i_tv_mode_set()
396 (tv_mode->dac3_en ? SUN4I_TVE_DAC0_DAC_EN(3) : 0) | in sun4i_tv_mode_set()
401 (tv_mode->dac_bit25_en ? BIT(25) : 0) | in sun4i_tv_mode_set()
410 tv_mode->chroma_freq); in sun4i_tv_mode_set()
414 SUN4I_TVE_PORCH_BACK(tv_mode->back_porch) | in sun4i_tv_mode_set()
415 SUN4I_TVE_PORCH_FRONT(tv_mode->front_porch)); in sun4i_tv_mode_set()
420 SUN4I_TVE_LINE_NUMBER(tv_mode->line_number)); in sun4i_tv_mode_set()
423 SUN4I_TVE_LEVEL_BLANK(tv_mode->video_levels->blank) | in sun4i_tv_mode_set()
424 SUN4I_TVE_LEVEL_BLACK(tv_mode->video_levels->black)); in sun4i_tv_mode_set()
433 SUN4I_TVE_CB_CR_LVL_CB_BURST(tv_mode->burst_levels->cb) | in sun4i_tv_mode_set()
434 SUN4I_TVE_CB_CR_LVL_CR_BURST(tv_mode->burst_levels->cr)); in sun4i_tv_mode_set()
443 SUN4I_TVE_CB_CR_GAIN_CB(tv_mode->color_gains->cb) | in sun4i_tv_mode_set()
444 SUN4I_TVE_CB_CR_GAIN_CR(tv_mode->color_gains->cr)); in sun4i_tv_mode_set()
448 SUN4I_TVE_SYNC_VBI_VBLANK(tv_mode->vblank_level)); in sun4i_tv_mode_set()
462 SUN4I_TVE_RESYNC_PIXEL(tv_mode->resync_params->pixel) | in sun4i_tv_mode_set()
463 SUN4I_TVE_RESYNC_LINE(tv_mode->resync_params->line) | in sun4i_tv_mode_set()
464 (tv_mode->resync_params->field ? in sun4i_tv_mode_set()
491 const struct tv_mode *tv_mode = &tv_modes[i]; in sun4i_tv_comp_get_modes() local
499 strcpy(mode->name, tv_mode->name); in sun4i_tv_comp_get_modes()
501 sun4i_tv_mode_to_drm_mode(tv_mode, mode); in sun4i_tv_comp_get_modes()