Lines Matching +full:ddc +full:- +full:tx

1 /*-
81 msec -= 10; in dwc_hdmi_phy_wait_i2c_done()
120 inv_val = ((sc->sc_mode.flags & VID_PVSYNC) ? in dwc_hdmi_av_composer()
124 inv_val |= ((sc->sc_mode.flags & VID_PHSYNC) ? in dwc_hdmi_av_composer()
130 inv_val |= ((sc->sc_mode.flags & VID_INTERLACE) ? in dwc_hdmi_av_composer()
134 inv_val |= ((sc->sc_mode.flags & VID_INTERLACE) ? in dwc_hdmi_av_composer()
139 is_dvi = sc->sc_has_audio == 0; in dwc_hdmi_av_composer()
147 WR1(sc, HDMI_FC_INHACTV1, sc->sc_mode.hdisplay >> 8); in dwc_hdmi_av_composer()
148 WR1(sc, HDMI_FC_INHACTV0, sc->sc_mode.hdisplay); in dwc_hdmi_av_composer()
151 WR1(sc, HDMI_FC_INVACTV1, sc->sc_mode.vdisplay >> 8); in dwc_hdmi_av_composer()
152 WR1(sc, HDMI_FC_INVACTV0, sc->sc_mode.vdisplay); in dwc_hdmi_av_composer()
155 hblank = sc->sc_mode.htotal - sc->sc_mode.hdisplay; in dwc_hdmi_av_composer()
160 vblank = sc->sc_mode.vtotal - sc->sc_mode.vdisplay; in dwc_hdmi_av_composer()
164 hfp = sc->sc_mode.hsync_start - sc->sc_mode.hdisplay; in dwc_hdmi_av_composer()
169 vfp = sc->sc_mode.vsync_start - sc->sc_mode.vdisplay; in dwc_hdmi_av_composer()
172 hsync_len = (sc->sc_mode.hsync_end - sc->sc_mode.hsync_start); in dwc_hdmi_av_composer()
178 WR1(sc, HDMI_FC_VSYNCINWIDTH, (sc->sc_mode.vsync_end - sc->sc_mode.vsync_start)); in dwc_hdmi_av_composer()
282 /* gen2 tx power off */ in dwc_hdmi_phy_configure()
306 if (sc->sc_mode.dot_clock*1000 <= 45250000) { in dwc_hdmi_phy_configure()
309 } else if (sc->sc_mode.dot_clock*1000 <= 92500000) { in dwc_hdmi_phy_configure()
312 } else if (sc->sc_mode.dot_clock*1000 <= 185000000) { in dwc_hdmi_phy_configure()
322 * Configuration Settings. Table 34-23. in dwc_hdmi_phy_configure()
324 if (sc->sc_mode.dot_clock*1000 <= 54000000) { in dwc_hdmi_phy_configure()
326 } else if (sc->sc_mode.dot_clock*1000 <= 58400000) { in dwc_hdmi_phy_configure()
328 } else if (sc->sc_mode.dot_clock*1000 <= 72000000) { in dwc_hdmi_phy_configure()
330 } else if (sc->sc_mode.dot_clock*1000 <= 74250000) { in dwc_hdmi_phy_configure()
332 } else if (sc->sc_mode.dot_clock*1000 <= 118800000) { in dwc_hdmi_phy_configure()
334 } else if (sc->sc_mode.dot_clock*1000 <= 216000000) { in dwc_hdmi_phy_configure()
348 if (sc->sc_mode.dot_clock*1000 > 148500000) { in dwc_hdmi_phy_configure()
366 /* gen2 tx power on */ in dwc_hdmi_phy_configure()
375 if (msec-- == 0) { in dwc_hdmi_phy_configure()
376 device_printf(sc->sc_dev, "PHY PLL not locked\n"); in dwc_hdmi_phy_configure()
377 return (-1); in dwc_hdmi_phy_configure()
441 if (sc->sc_has_audio == 0) in dwc_hdmi_configure_audio()
445 switch (sc->sc_mode.dot_clock) { in dwc_hdmi_configure_audio()
590 /* Enable TX stuffing: When DE is inactive, fix the output data to 0 */ in dwc_hdmi_video_sample()
634 sc->sc_has_audio = 1; in dwc_hdmi_set_mode()
660 * Some devices do not support E-DDC so attempt in hdmi_edid_read()
667 { I2C_DDC_ADDR, IIC_M_RD, EDID_LENGTH, sc->sc_edid } in hdmi_edid_read()
674 if (sc->sc_get_i2c_dev != NULL) in hdmi_edid_read()
675 i2c_dev = sc->sc_get_i2c_dev(sc->sc_dev); in hdmi_edid_read()
677 device_printf(sc->sc_dev, "no DDC device found\n"); in hdmi_edid_read()
682 device_printf(sc->sc_dev, in hdmi_edid_read()
686 result = iicbus_request_bus(i2c_dev, sc->sc_dev, IIC_INTRWAIT); in hdmi_edid_read()
689 device_printf(sc->sc_dev, "failed to request i2c bus: %d\n", result); in hdmi_edid_read()
693 result = iicbus_transfer(i2c_dev, &msg[3 - xfers], xfers); in hdmi_edid_read()
694 iicbus_release_bus(i2c_dev, sc->sc_dev); in hdmi_edid_read()
697 device_printf(sc->sc_dev, "i2c transfer failed: %d\n", result); in hdmi_edid_read()
700 *edid_len = sc->sc_edid_len; in hdmi_edid_read()
701 *edid = sc->sc_edid; in hdmi_edid_read()
717 EVENTHANDLER_INVOKE(hdmi_event, sc->sc_dev, in dwc_hdmi_detect_cable()
722 config_intrhook_disestablish(&sc->sc_mode_hook); in dwc_hdmi_detect_cable()
734 sc->sc_edid = malloc(EDID_LENGTH, M_DEVBUF, M_WAITOK | M_ZERO); in dwc_hdmi_init()
735 sc->sc_edid_len = EDID_LENGTH; in dwc_hdmi_init()
737 device_printf(sc->sc_dev, "HDMI controller %02x:%02x:%02x:%02x\n", in dwc_hdmi_init()
744 sc->sc_mode_hook.ich_func = dwc_hdmi_detect_cable; in dwc_hdmi_init()
745 sc->sc_mode_hook.ich_arg = sc; in dwc_hdmi_init()
746 if (config_intrhook_establish(&sc->sc_mode_hook) != 0) { in dwc_hdmi_init()
754 free(sc->sc_edid, M_DEVBUF); in dwc_hdmi_init()
755 sc->sc_edid = NULL; in dwc_hdmi_init()
784 /* Look for a VSDB with the HDMI 24-bit IEEE registration ID */ in dwc_hdmi_detect_hdmi_vsdb()
804 sc->sc_has_audio = 0; in dwc_hdmi_detect_hdmi()
806 /* Scan through extension blocks, looking for a CEA-861 block */ in dwc_hdmi_detect_hdmi()
807 for (block = 1; block <= sc->sc_edid_info.edid_ext_block_count; in dwc_hdmi_detect_hdmi()
813 device_printf(sc->sc_dev, in dwc_hdmi_detect_hdmi()
815 sc->sc_has_audio = in dwc_hdmi_detect_hdmi()
830 memset(&sc->sc_edid_info, 0, sizeof(sc->sc_edid_info)); in dwc_hdmi_get_edid()
836 edid_parse(*edid, &sc->sc_edid_info); in dwc_hdmi_get_edid()
847 memcpy(&sc->sc_mode, mode, sizeof(*mode)); in dwc_hdmi_set_videomode()