Lines Matching refs:dtd

670 				  struct psb_intel_sdvo_dtd *dtd)  in psb_intel_sdvo_set_timing()  argument
672 return psb_intel_sdvo_set_value(psb_intel_sdvo, cmd, &dtd->part1, sizeof(dtd->part1)) && in psb_intel_sdvo_set_timing()
673 psb_intel_sdvo_set_value(psb_intel_sdvo, cmd + 1, &dtd->part2, sizeof(dtd->part2)); in psb_intel_sdvo_set_timing()
677 struct psb_intel_sdvo_dtd *dtd) in psb_intel_sdvo_set_input_timing() argument
680 SDVO_CMD_SET_INPUT_TIMINGS_PART1, dtd); in psb_intel_sdvo_set_input_timing()
684 struct psb_intel_sdvo_dtd *dtd) in psb_intel_sdvo_set_output_timing() argument
687 SDVO_CMD_SET_OUTPUT_TIMINGS_PART1, dtd); in psb_intel_sdvo_set_output_timing()
715 struct psb_intel_sdvo_dtd *dtd) in psb_intel_sdvo_get_preferred_input_timing() argument
717 BUILD_BUG_ON(sizeof(dtd->part1) != 8); in psb_intel_sdvo_get_preferred_input_timing()
718 BUILD_BUG_ON(sizeof(dtd->part2) != 8); in psb_intel_sdvo_get_preferred_input_timing()
720 &dtd->part1, sizeof(dtd->part1)) && in psb_intel_sdvo_get_preferred_input_timing()
722 &dtd->part2, sizeof(dtd->part2)); in psb_intel_sdvo_get_preferred_input_timing()
730 static void psb_intel_sdvo_get_dtd_from_mode(struct psb_intel_sdvo_dtd *dtd, in psb_intel_sdvo_get_dtd_from_mode() argument
750 dtd->part1.clock = mode->clock / 10; in psb_intel_sdvo_get_dtd_from_mode()
751 dtd->part1.h_active = width & 0xff; in psb_intel_sdvo_get_dtd_from_mode()
752 dtd->part1.h_blank = h_blank_len & 0xff; in psb_intel_sdvo_get_dtd_from_mode()
753 dtd->part1.h_high = (((width >> 8) & 0xf) << 4) | in psb_intel_sdvo_get_dtd_from_mode()
755 dtd->part1.v_active = height & 0xff; in psb_intel_sdvo_get_dtd_from_mode()
756 dtd->part1.v_blank = v_blank_len & 0xff; in psb_intel_sdvo_get_dtd_from_mode()
757 dtd->part1.v_high = (((height >> 8) & 0xf) << 4) | in psb_intel_sdvo_get_dtd_from_mode()
760 dtd->part2.h_sync_off = h_sync_offset & 0xff; in psb_intel_sdvo_get_dtd_from_mode()
761 dtd->part2.h_sync_width = h_sync_len & 0xff; in psb_intel_sdvo_get_dtd_from_mode()
762 dtd->part2.v_sync_off_width = (v_sync_offset & 0xf) << 4 | in psb_intel_sdvo_get_dtd_from_mode()
764 dtd->part2.sync_off_width_high = ((h_sync_offset & 0x300) >> 2) | in psb_intel_sdvo_get_dtd_from_mode()
768 dtd->part2.dtd_flags = 0x18; in psb_intel_sdvo_get_dtd_from_mode()
770 dtd->part2.dtd_flags |= 0x2; in psb_intel_sdvo_get_dtd_from_mode()
772 dtd->part2.dtd_flags |= 0x4; in psb_intel_sdvo_get_dtd_from_mode()
774 dtd->part2.sdvo_flags = 0; in psb_intel_sdvo_get_dtd_from_mode()
775 dtd->part2.v_sync_off_high = v_sync_offset & 0xc0; in psb_intel_sdvo_get_dtd_from_mode()
776 dtd->part2.reserved = 0; in psb_intel_sdvo_get_dtd_from_mode()
780 const struct psb_intel_sdvo_dtd *dtd) in psb_intel_sdvo_get_mode_from_dtd() argument
782 mode->hdisplay = dtd->part1.h_active; in psb_intel_sdvo_get_mode_from_dtd()
783 mode->hdisplay += ((dtd->part1.h_high >> 4) & 0x0f) << 8; in psb_intel_sdvo_get_mode_from_dtd()
784 mode->hsync_start = mode->hdisplay + dtd->part2.h_sync_off; in psb_intel_sdvo_get_mode_from_dtd()
785 mode->hsync_start += (dtd->part2.sync_off_width_high & 0xc0) << 2; in psb_intel_sdvo_get_mode_from_dtd()
786 mode->hsync_end = mode->hsync_start + dtd->part2.h_sync_width; in psb_intel_sdvo_get_mode_from_dtd()
787 mode->hsync_end += (dtd->part2.sync_off_width_high & 0x30) << 4; in psb_intel_sdvo_get_mode_from_dtd()
788 mode->htotal = mode->hdisplay + dtd->part1.h_blank; in psb_intel_sdvo_get_mode_from_dtd()
789 mode->htotal += (dtd->part1.h_high & 0xf) << 8; in psb_intel_sdvo_get_mode_from_dtd()
791 mode->vdisplay = dtd->part1.v_active; in psb_intel_sdvo_get_mode_from_dtd()
792 mode->vdisplay += ((dtd->part1.v_high >> 4) & 0x0f) << 8; in psb_intel_sdvo_get_mode_from_dtd()
794 mode->vsync_start += (dtd->part2.v_sync_off_width >> 4) & 0xf; in psb_intel_sdvo_get_mode_from_dtd()
795 mode->vsync_start += (dtd->part2.sync_off_width_high & 0x0c) << 2; in psb_intel_sdvo_get_mode_from_dtd()
796 mode->vsync_start += dtd->part2.v_sync_off_high & 0xc0; in psb_intel_sdvo_get_mode_from_dtd()
798 (dtd->part2.v_sync_off_width & 0xf); in psb_intel_sdvo_get_mode_from_dtd()
799 mode->vsync_end += (dtd->part2.sync_off_width_high & 0x3) << 4; in psb_intel_sdvo_get_mode_from_dtd()
800 mode->vtotal = mode->vdisplay + dtd->part1.v_blank; in psb_intel_sdvo_get_mode_from_dtd()
801 mode->vtotal += (dtd->part1.v_high & 0xf) << 8; in psb_intel_sdvo_get_mode_from_dtd()
803 mode->clock = dtd->part1.clock * 10; in psb_intel_sdvo_get_mode_from_dtd()
806 if (dtd->part2.dtd_flags & 0x2) in psb_intel_sdvo_get_mode_from_dtd()
808 if (dtd->part2.dtd_flags & 0x4) in psb_intel_sdvo_get_mode_from_dtd()