Lines Matching refs:mode
288 struct fb_videomode mode; member
405 struct fb_videomode *mode = &hdmi->mode; in sh_hdmi_external_video_param() local
409 htotal = mode->xres + mode->right_margin + mode->left_margin in sh_hdmi_external_video_param()
410 + mode->hsync_len; in sh_hdmi_external_video_param()
411 hdelay = mode->hsync_len + mode->left_margin; in sh_hdmi_external_video_param()
412 hblank = mode->right_margin + hdelay; in sh_hdmi_external_video_param()
418 vtotal = mode->yres + mode->upper_margin + mode->lower_margin in sh_hdmi_external_video_param()
419 + mode->vsync_len; in sh_hdmi_external_video_param()
420 vdelay = mode->vsync_len + mode->upper_margin; in sh_hdmi_external_video_param()
421 vblank = mode->lower_margin + vdelay; in sh_hdmi_external_video_param()
422 voffset = min(mode->upper_margin / 2, 6U); in sh_hdmi_external_video_param()
430 if (mode->sync & FB_SYNC_HOR_HIGH_ACT) in sh_hdmi_external_video_param()
432 if (mode->sync & FB_SYNC_VERT_HIGH_ACT) in sh_hdmi_external_video_param()
436 htotal, hblank, hdelay, mode->hsync_len, in sh_hdmi_external_video_param()
437 vtotal, vblank, vdelay, mode->vsync_len, sync); in sh_hdmi_external_video_param()
450 hdmi_write(hdmi, mode->hsync_len, HDMI_EXTERNAL_H_DURATION_7_0); in sh_hdmi_external_video_param()
451 hdmi_write(hdmi, mode->hsync_len >> 8, HDMI_EXTERNAL_H_DURATION_9_8); in sh_hdmi_external_video_param()
460 hdmi_write(hdmi, mode->vsync_len, HDMI_EXTERNAL_V_DURATION); in sh_hdmi_external_video_param()
587 if (hdmi->mode.pixclock < 10000) { in sh_hdmi_phy_config()
598 } else if (hdmi->mode.pixclock < 30000) { in sh_hdmi_phy_config()
815 const struct fb_videomode *mode, in sh_hdmi_rate_error() argument
818 unsigned long target = PICOS2KHZ(mode->pixclock) * 1000, rate_error; in sh_hdmi_rate_error()
832 mode->left_margin, mode->xres, in sh_hdmi_rate_error()
833 mode->right_margin, mode->hsync_len, in sh_hdmi_rate_error()
834 mode->upper_margin, mode->yres, in sh_hdmi_rate_error()
835 mode->lower_margin, mode->vsync_len); in sh_hdmi_rate_error()
839 mode->refresh, *parent_rate); in sh_hdmi_rate_error()
848 const struct fb_videomode *mode, *found = NULL; in sh_hdmi_read_edid() local
926 for (i = 0, mode = hdmi->monspec.modedb; in sh_hdmi_read_edid()
928 i++, mode++) { in sh_hdmi_read_edid()
938 if ((mode->flag & FB_MODE_IS_FIRST) || preferred_bad) in sh_hdmi_read_edid()
942 } else if (f_width != mode->xres || f_height != mode->yres) { in sh_hdmi_read_edid()
947 rate_error = sh_hdmi_rate_error(hdmi, mode, hdmi_rate, parent_rate); in sh_hdmi_read_edid()
950 if (f_refresh == mode->refresh || (!f_refresh && !rate_error)) in sh_hdmi_read_edid()
970 ch->notify(ch, SH_MOBILE_LCDC_EVENT_DISPLAY_MODE, mode, in sh_hdmi_read_edid()
977 found = mode; in sh_hdmi_read_edid()
1021 hdmi->mode = *found; in sh_hdmi_read_edid()
1206 &hdmi->mode, &hdmi->monspec); in sh_hdmi_edid_work_fn()