Lines Matching refs:dtd
751 struct intel_sdvo_dtd *dtd) in intel_sdvo_set_timing() argument
753 return intel_sdvo_set_value(intel_sdvo, cmd, &dtd->part1, sizeof(dtd->part1)) && in intel_sdvo_set_timing()
754 intel_sdvo_set_value(intel_sdvo, cmd + 1, &dtd->part2, sizeof(dtd->part2)); in intel_sdvo_set_timing()
758 struct intel_sdvo_dtd *dtd) in intel_sdvo_get_timing() argument
760 return intel_sdvo_get_value(intel_sdvo, cmd, &dtd->part1, sizeof(dtd->part1)) && in intel_sdvo_get_timing()
761 intel_sdvo_get_value(intel_sdvo, cmd + 1, &dtd->part2, sizeof(dtd->part2)); in intel_sdvo_get_timing()
765 struct intel_sdvo_dtd *dtd) in intel_sdvo_set_input_timing() argument
768 SDVO_CMD_SET_INPUT_TIMINGS_PART1, dtd); in intel_sdvo_set_input_timing()
772 struct intel_sdvo_dtd *dtd) in intel_sdvo_set_output_timing() argument
775 SDVO_CMD_SET_OUTPUT_TIMINGS_PART1, dtd); in intel_sdvo_set_output_timing()
779 struct intel_sdvo_dtd *dtd) in intel_sdvo_get_input_timing() argument
782 SDVO_CMD_GET_INPUT_TIMINGS_PART1, dtd); in intel_sdvo_get_input_timing()
813 struct intel_sdvo_dtd *dtd) in intel_sdvo_get_preferred_input_timing() argument
815 BUILD_BUG_ON(sizeof(dtd->part1) != 8); in intel_sdvo_get_preferred_input_timing()
816 BUILD_BUG_ON(sizeof(dtd->part2) != 8); in intel_sdvo_get_preferred_input_timing()
818 &dtd->part1, sizeof(dtd->part1)) && in intel_sdvo_get_preferred_input_timing()
820 &dtd->part2, sizeof(dtd->part2)); in intel_sdvo_get_preferred_input_timing()
828 static void intel_sdvo_get_dtd_from_mode(struct intel_sdvo_dtd *dtd, in intel_sdvo_get_dtd_from_mode() argument
836 memset(dtd, 0, sizeof(*dtd)); in intel_sdvo_get_dtd_from_mode()
853 dtd->part1.clock = mode_clock; in intel_sdvo_get_dtd_from_mode()
855 dtd->part1.h_active = width & 0xff; in intel_sdvo_get_dtd_from_mode()
856 dtd->part1.h_blank = h_blank_len & 0xff; in intel_sdvo_get_dtd_from_mode()
857 dtd->part1.h_high = (((width >> 8) & 0xf) << 4) | in intel_sdvo_get_dtd_from_mode()
859 dtd->part1.v_active = height & 0xff; in intel_sdvo_get_dtd_from_mode()
860 dtd->part1.v_blank = v_blank_len & 0xff; in intel_sdvo_get_dtd_from_mode()
861 dtd->part1.v_high = (((height >> 8) & 0xf) << 4) | in intel_sdvo_get_dtd_from_mode()
864 dtd->part2.h_sync_off = h_sync_offset & 0xff; in intel_sdvo_get_dtd_from_mode()
865 dtd->part2.h_sync_width = h_sync_len & 0xff; in intel_sdvo_get_dtd_from_mode()
866 dtd->part2.v_sync_off_width = (v_sync_offset & 0xf) << 4 | in intel_sdvo_get_dtd_from_mode()
868 dtd->part2.sync_off_width_high = ((h_sync_offset & 0x300) >> 2) | in intel_sdvo_get_dtd_from_mode()
872 dtd->part2.dtd_flags = 0x18; in intel_sdvo_get_dtd_from_mode()
874 dtd->part2.dtd_flags |= DTD_FLAG_INTERLACE; in intel_sdvo_get_dtd_from_mode()
876 dtd->part2.dtd_flags |= DTD_FLAG_HSYNC_POSITIVE; in intel_sdvo_get_dtd_from_mode()
878 dtd->part2.dtd_flags |= DTD_FLAG_VSYNC_POSITIVE; in intel_sdvo_get_dtd_from_mode()
880 dtd->part2.v_sync_off_high = v_sync_offset & 0xc0; in intel_sdvo_get_dtd_from_mode()
884 const struct intel_sdvo_dtd *dtd) in intel_sdvo_get_mode_from_dtd() argument
888 mode.hdisplay = dtd->part1.h_active; in intel_sdvo_get_mode_from_dtd()
889 mode.hdisplay += ((dtd->part1.h_high >> 4) & 0x0f) << 8; in intel_sdvo_get_mode_from_dtd()
890 mode.hsync_start = mode.hdisplay + dtd->part2.h_sync_off; in intel_sdvo_get_mode_from_dtd()
891 mode.hsync_start += (dtd->part2.sync_off_width_high & 0xc0) << 2; in intel_sdvo_get_mode_from_dtd()
892 mode.hsync_end = mode.hsync_start + dtd->part2.h_sync_width; in intel_sdvo_get_mode_from_dtd()
893 mode.hsync_end += (dtd->part2.sync_off_width_high & 0x30) << 4; in intel_sdvo_get_mode_from_dtd()
894 mode.htotal = mode.hdisplay + dtd->part1.h_blank; in intel_sdvo_get_mode_from_dtd()
895 mode.htotal += (dtd->part1.h_high & 0xf) << 8; in intel_sdvo_get_mode_from_dtd()
897 mode.vdisplay = dtd->part1.v_active; in intel_sdvo_get_mode_from_dtd()
898 mode.vdisplay += ((dtd->part1.v_high >> 4) & 0x0f) << 8; in intel_sdvo_get_mode_from_dtd()
900 mode.vsync_start += (dtd->part2.v_sync_off_width >> 4) & 0xf; in intel_sdvo_get_mode_from_dtd()
901 mode.vsync_start += (dtd->part2.sync_off_width_high & 0x0c) << 2; in intel_sdvo_get_mode_from_dtd()
902 mode.vsync_start += dtd->part2.v_sync_off_high & 0xc0; in intel_sdvo_get_mode_from_dtd()
904 (dtd->part2.v_sync_off_width & 0xf); in intel_sdvo_get_mode_from_dtd()
905 mode.vsync_end += (dtd->part2.sync_off_width_high & 0x3) << 4; in intel_sdvo_get_mode_from_dtd()
906 mode.vtotal = mode.vdisplay + dtd->part1.v_blank; in intel_sdvo_get_mode_from_dtd()
907 mode.vtotal += (dtd->part1.v_high & 0xf) << 8; in intel_sdvo_get_mode_from_dtd()
909 mode.clock = dtd->part1.clock * 10; in intel_sdvo_get_mode_from_dtd()
911 if (dtd->part2.dtd_flags & DTD_FLAG_INTERLACE) in intel_sdvo_get_mode_from_dtd()
913 if (dtd->part2.dtd_flags & DTD_FLAG_HSYNC_POSITIVE) in intel_sdvo_get_mode_from_dtd()
917 if (dtd->part2.dtd_flags & DTD_FLAG_VSYNC_POSITIVE) in intel_sdvo_get_mode_from_dtd()
1706 struct intel_sdvo_dtd dtd; in intel_sdvo_get_config() local
1717 ret = intel_sdvo_get_input_timing(intel_sdvo, &dtd); in intel_sdvo_get_config()
1726 if (dtd.part2.dtd_flags & DTD_FLAG_HSYNC_POSITIVE) in intel_sdvo_get_config()
1731 if (dtd.part2.dtd_flags & DTD_FLAG_VSYNC_POSITIVE) in intel_sdvo_get_config()