Lines Matching refs:dtd
148 * the sdvo flag gets lost in round trip: dtd->adjusted_mode->dtd
709 struct intel_sdvo_dtd *dtd)
711 return intel_sdvo_set_value(intel_sdvo, cmd, &dtd->part1, sizeof(dtd->part1)) &&
712 intel_sdvo_set_value(intel_sdvo, cmd + 1, &dtd->part2, sizeof(dtd->part2));
716 struct intel_sdvo_dtd *dtd)
718 return intel_sdvo_get_value(intel_sdvo, cmd, &dtd->part1, sizeof(dtd->part1)) &&
719 intel_sdvo_get_value(intel_sdvo, cmd + 1, &dtd->part2, sizeof(dtd->part2));
723 struct intel_sdvo_dtd *dtd)
726 SDVO_CMD_SET_INPUT_TIMINGS_PART1, dtd);
730 struct intel_sdvo_dtd *dtd)
733 SDVO_CMD_SET_OUTPUT_TIMINGS_PART1, dtd);
737 struct intel_sdvo_dtd *dtd)
740 SDVO_CMD_GET_INPUT_TIMINGS_PART1, dtd);
768 struct intel_sdvo_dtd *dtd)
771 &dtd->part1, sizeof(dtd->part1)) &&
773 &dtd->part2, sizeof(dtd->part2));
781 static void intel_sdvo_get_dtd_from_mode(struct intel_sdvo_dtd *dtd,
804 dtd->part1.clock = (u16) mode_clock;
806 dtd->part1.h_active = width & 0xff;
807 dtd->part1.h_blank = h_blank_len & 0xff;
808 dtd->part1.h_high = (((width >> 8) & 0xf) << 4) |
810 dtd->part1.v_active = height & 0xff;
811 dtd->part1.v_blank = v_blank_len & 0xff;
812 dtd->part1.v_high = (((height >> 8) & 0xf) << 4) |
815 dtd->part2.h_sync_off = h_sync_offset & 0xff;
816 dtd->part2.h_sync_width = h_sync_len & 0xff;
817 dtd->part2.v_sync_off_width = (v_sync_offset & 0xf) << 4 |
819 dtd->part2.sync_off_width_high = ((h_sync_offset & 0x300) >> 2) |
823 dtd->part2.dtd_flags = 0x18;
825 dtd->part2.dtd_flags |= DTD_FLAG_INTERLACE;
827 dtd->part2.dtd_flags |= DTD_FLAG_HSYNC_POSITIVE;
829 dtd->part2.dtd_flags |= DTD_FLAG_VSYNC_POSITIVE;
831 dtd->part2.sdvo_flags = 0;
832 dtd->part2.v_sync_off_high = v_sync_offset & 0xc0;
833 dtd->part2.reserved = 0;
837 const struct intel_sdvo_dtd *dtd)
839 mode->hdisplay = dtd->part1.h_active;
840 mode->hdisplay += ((dtd->part1.h_high >> 4) & 0x0f) << 8;
841 mode->hsync_start = mode->hdisplay + dtd->part2.h_sync_off;
842 mode->hsync_start += (dtd->part2.sync_off_width_high & 0xc0) << 2;
843 mode->hsync_end = mode->hsync_start + dtd->part2.h_sync_width;
844 mode->hsync_end += (dtd->part2.sync_off_width_high & 0x30) << 4;
845 mode->htotal = mode->hdisplay + dtd->part1.h_blank;
846 mode->htotal += (dtd->part1.h_high & 0xf) << 8;
848 mode->vdisplay = dtd->part1.v_active;
849 mode->vdisplay += ((dtd->part1.v_high >> 4) & 0x0f) << 8;
851 mode->vsync_start += (dtd->part2.v_sync_off_width >> 4) & 0xf;
852 mode->vsync_start += (dtd->part2.sync_off_width_high & 0x0c) << 2;
853 mode->vsync_start += dtd->part2.v_sync_off_high & 0xc0;
855 (dtd->part2.v_sync_off_width & 0xf);
856 mode->vsync_end += (dtd->part2.sync_off_width_high & 0x3) << 4;
857 mode->vtotal = mode->vdisplay + dtd->part1.v_blank;
858 mode->vtotal += (dtd->part1.v_high & 0xf) << 8;
860 mode->clock = dtd->part1.clock * 10;
863 if (dtd->part2.dtd_flags & DTD_FLAG_INTERLACE)
865 if (dtd->part2.dtd_flags & DTD_FLAG_HSYNC_POSITIVE)
867 if (dtd->part2.dtd_flags & DTD_FLAG_VSYNC_POSITIVE)
1317 struct intel_sdvo_dtd dtd;
1323 ret = intel_sdvo_get_input_timing(intel_sdvo, &dtd);
1330 if (dtd.part2.dtd_flags & DTD_FLAG_HSYNC_POSITIVE)
1335 if (dtd.part2.dtd_flags & DTD_FLAG_VSYNC_POSITIVE)