Lines Matching refs:dtd

692 				  struct psb_intel_sdvo_dtd *dtd)  in psb_intel_sdvo_set_timing()  argument
694 return psb_intel_sdvo_set_value(psb_intel_sdvo, cmd, &dtd->part1, sizeof(dtd->part1)) && in psb_intel_sdvo_set_timing()
695 psb_intel_sdvo_set_value(psb_intel_sdvo, cmd + 1, &dtd->part2, sizeof(dtd->part2)); in psb_intel_sdvo_set_timing()
699 struct psb_intel_sdvo_dtd *dtd) in psb_intel_sdvo_set_input_timing() argument
702 SDVO_CMD_SET_INPUT_TIMINGS_PART1, dtd); in psb_intel_sdvo_set_input_timing()
706 struct psb_intel_sdvo_dtd *dtd) in psb_intel_sdvo_set_output_timing() argument
709 SDVO_CMD_SET_OUTPUT_TIMINGS_PART1, dtd); in psb_intel_sdvo_set_output_timing()
737 struct psb_intel_sdvo_dtd *dtd) in psb_intel_sdvo_get_preferred_input_timing() argument
739 BUILD_BUG_ON(sizeof(dtd->part1) != 8); in psb_intel_sdvo_get_preferred_input_timing()
740 BUILD_BUG_ON(sizeof(dtd->part2) != 8); in psb_intel_sdvo_get_preferred_input_timing()
742 &dtd->part1, sizeof(dtd->part1)) && in psb_intel_sdvo_get_preferred_input_timing()
744 &dtd->part2, sizeof(dtd->part2)); in psb_intel_sdvo_get_preferred_input_timing()
752 static void psb_intel_sdvo_get_dtd_from_mode(struct psb_intel_sdvo_dtd *dtd, in psb_intel_sdvo_get_dtd_from_mode() argument
772 dtd->part1.clock = mode->clock / 10; in psb_intel_sdvo_get_dtd_from_mode()
773 dtd->part1.h_active = width & 0xff; in psb_intel_sdvo_get_dtd_from_mode()
774 dtd->part1.h_blank = h_blank_len & 0xff; in psb_intel_sdvo_get_dtd_from_mode()
775 dtd->part1.h_high = (((width >> 8) & 0xf) << 4) | in psb_intel_sdvo_get_dtd_from_mode()
777 dtd->part1.v_active = height & 0xff; in psb_intel_sdvo_get_dtd_from_mode()
778 dtd->part1.v_blank = v_blank_len & 0xff; in psb_intel_sdvo_get_dtd_from_mode()
779 dtd->part1.v_high = (((height >> 8) & 0xf) << 4) | in psb_intel_sdvo_get_dtd_from_mode()
782 dtd->part2.h_sync_off = h_sync_offset & 0xff; in psb_intel_sdvo_get_dtd_from_mode()
783 dtd->part2.h_sync_width = h_sync_len & 0xff; in psb_intel_sdvo_get_dtd_from_mode()
784 dtd->part2.v_sync_off_width = (v_sync_offset & 0xf) << 4 | in psb_intel_sdvo_get_dtd_from_mode()
786 dtd->part2.sync_off_width_high = ((h_sync_offset & 0x300) >> 2) | in psb_intel_sdvo_get_dtd_from_mode()
790 dtd->part2.dtd_flags = 0x18; in psb_intel_sdvo_get_dtd_from_mode()
792 dtd->part2.dtd_flags |= 0x2; in psb_intel_sdvo_get_dtd_from_mode()
794 dtd->part2.dtd_flags |= 0x4; in psb_intel_sdvo_get_dtd_from_mode()
796 dtd->part2.sdvo_flags = 0; in psb_intel_sdvo_get_dtd_from_mode()
797 dtd->part2.v_sync_off_high = v_sync_offset & 0xc0; in psb_intel_sdvo_get_dtd_from_mode()
798 dtd->part2.reserved = 0; in psb_intel_sdvo_get_dtd_from_mode()
802 const struct psb_intel_sdvo_dtd *dtd) in psb_intel_sdvo_get_mode_from_dtd() argument
804 mode->hdisplay = dtd->part1.h_active; in psb_intel_sdvo_get_mode_from_dtd()
805 mode->hdisplay += ((dtd->part1.h_high >> 4) & 0x0f) << 8; in psb_intel_sdvo_get_mode_from_dtd()
806 mode->hsync_start = mode->hdisplay + dtd->part2.h_sync_off; in psb_intel_sdvo_get_mode_from_dtd()
807 mode->hsync_start += (dtd->part2.sync_off_width_high & 0xc0) << 2; in psb_intel_sdvo_get_mode_from_dtd()
808 mode->hsync_end = mode->hsync_start + dtd->part2.h_sync_width; in psb_intel_sdvo_get_mode_from_dtd()
809 mode->hsync_end += (dtd->part2.sync_off_width_high & 0x30) << 4; in psb_intel_sdvo_get_mode_from_dtd()
810 mode->htotal = mode->hdisplay + dtd->part1.h_blank; in psb_intel_sdvo_get_mode_from_dtd()
811 mode->htotal += (dtd->part1.h_high & 0xf) << 8; in psb_intel_sdvo_get_mode_from_dtd()
813 mode->vdisplay = dtd->part1.v_active; in psb_intel_sdvo_get_mode_from_dtd()
814 mode->vdisplay += ((dtd->part1.v_high >> 4) & 0x0f) << 8; in psb_intel_sdvo_get_mode_from_dtd()
816 mode->vsync_start += (dtd->part2.v_sync_off_width >> 4) & 0xf; in psb_intel_sdvo_get_mode_from_dtd()
817 mode->vsync_start += (dtd->part2.sync_off_width_high & 0x0c) << 2; in psb_intel_sdvo_get_mode_from_dtd()
818 mode->vsync_start += dtd->part2.v_sync_off_high & 0xc0; in psb_intel_sdvo_get_mode_from_dtd()
820 (dtd->part2.v_sync_off_width & 0xf); in psb_intel_sdvo_get_mode_from_dtd()
821 mode->vsync_end += (dtd->part2.sync_off_width_high & 0x3) << 4; in psb_intel_sdvo_get_mode_from_dtd()
822 mode->vtotal = mode->vdisplay + dtd->part1.v_blank; in psb_intel_sdvo_get_mode_from_dtd()
823 mode->vtotal += (dtd->part1.v_high & 0xf) << 8; in psb_intel_sdvo_get_mode_from_dtd()
825 mode->clock = dtd->part1.clock * 10; in psb_intel_sdvo_get_mode_from_dtd()
828 if (dtd->part2.dtd_flags & 0x2) in psb_intel_sdvo_get_mode_from_dtd()
830 if (dtd->part2.dtd_flags & 0x4) in psb_intel_sdvo_get_mode_from_dtd()