35 static const u32 hsw_ddi_translations_dp[] = {
36 0x00FFFFFF, 0x0006000E,
37 0x00D75FFF, 0x0005000A,
38 0x00C30FFF, 0x00040006,
39 0x80AAAFFF, 0x000B0000,
40 0x00FFFFFF, 0x0005000A,
41 0x00D75FFF, 0x000C0004,
42 0x80C30FFF, 0x000B0000,
43 0x00FFFFFF, 0x00040006,
44 0x80D75FFF, 0x000B0000,
45 0x00FFFFFF, 0x00040006
48 static const u32 hsw_ddi_translations_fdi[] = {
49 0x00FFFFFF, 0x0007000E,
50 0x00D75FFF, 0x000F000A,
51 0x00C30FFF, 0x00060006,
52 0x00AAAFFF, 0x001E0000,
53 0x00FFFFFF, 0x000F000A,
54 0x00D75FFF, 0x00160004,
55 0x00C30FFF, 0x001E0000,
56 0x00FFFFFF, 0x00060006,
57 0x00D75FFF, 0x001E0000,
58 0x00FFFFFF, 0x00040006
72 const u32 *ddi_translations = ((use_fdi_mode) ?
73 hsw_ddi_translations_fdi :
74 hsw_ddi_translations_dp);
76 DRM_DEBUG_DRIVER(
"Initializing DDI buffers for port %c in %s mode\n",
78 use_fdi_mode ?
"FDI" :
"DP");
81 "Programming port %c in FDI mode, this probably will not work.\n",
109 static const long hsw_ddi_buf_ctl_values[] = {
154 for (i=0; i <
ARRAY_SIZE(hsw_ddi_buf_ctl_values); i++) {
169 hsw_ddi_buf_ctl_values[i]);
197 DRM_DEBUG_DRIVER(
"BUF_CTL training done on %d step\n", i);
217 DRM_ERROR(
"Error training BUF_CTL %d\n", i);
230 DRM_DEBUG_KMS(
"FDI train done.\n");
247 DRM_DEBUG_DRIVER(
"Found digital output on DDI port A\n");
256 DRM_DEBUG_DRIVER(
"No handlers defined for port %d, skipping DDI initialization\n",
287 {27027, 18, 100, 111},
315 {40541, 22, 147, 89},
325 {44900, 20, 108, 65},
341 {54054, 16, 173, 108},
393 {81081, 6, 100, 111},
438 {108108, 8, 173, 108},
445 {111264, 8, 150, 91},
489 {135250, 6, 167, 111},
512 {148352, 4, 100, 91},
534 {162162, 4, 131, 109},
542 {169000, 4, 104, 83},
589 {202000, 4, 112, 75},
591 {203000, 4, 146, 97},
665 DRM_DEBUG_KMS(
"Preparing HDMI DDI mode for Haswell on port %c, pipe %c\n",
port_name(port),
pipe_name(pipe));
667 for (i = 0; i <
ARRAY_SIZE(wrpll_tmds_clock_table); i++)
668 if (crtc->
mode.clock <= wrpll_tmds_clock_table[i].
clock)
674 p = wrpll_tmds_clock_table[
i].
p;
675 n2 = wrpll_tmds_clock_table[
i].
n2;
676 r2 = wrpll_tmds_clock_table[
i].
r2;
678 if (wrpll_tmds_clock_table[i].
clock != crtc->
mode.clock)
679 DRM_INFO(
"WR PLL: using settings for %dKHz on %dKHz mode\n",
680 wrpll_tmds_clock_table[i].
clock, crtc->
mode.clock);
682 DRM_DEBUG_KMS(
"WR PLL: %dKHz refresh rate with p=%d, n2=%d r2=%d\n",
683 crtc->
mode.clock, p, n2, r2);
689 temp & ~LCPLL_PLL_DISABLE);
716 DRM_DEBUG_DRIVER(
"HDMI audio on pipe %c on DDI\n",
720 DRM_DEBUG_DRIVER(
"HDMI audio: write eld information\n");
727 switch (intel_crtc->
bpp) {
741 WARN(1,
"%d bpp unsupported by pipe DDI function\n",
784 DRM_DEBUG_KMS(
"No pipe for ddi port %i found\n", intel_hdmi->
ddi_port);