Peppy/Haswell: move more support functions from mainboard to the intel i915 driver

Move (and rename to make it clearer) the function that computes display
parameters from the dpcd and edid.

Change-Id: Idfbb56fd312b23c742c52abca1a34ae117a8fece
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://chromium-review.googlesource.com/171366
Reviewed-by: Furquan Shaikh <furquan.m.shaikh@gmail.com>
Reviewed-by: Ronald Minnich <rminnich@chromium.org>
Tested-by: Ronald Minnich <rminnich@chromium.org>
Commit-Queue: Ronald Minnich <rminnich@chromium.org>
(cherry picked from commit 8f2b3bafee7cb05db8fae1c52fc9e1ee64e5e35d)
Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com>
Reviewed-on: http://review.coreboot.org/6768
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
Ronald G. Minnich
2013-10-01 10:46:35 -07:00
committed by Isaac Christensen
parent d7c25b357f
commit 74fade43ee
6 changed files with 140 additions and 119 deletions

View File

@ -1787,6 +1787,22 @@ void intel_dp_set_m_n_regs(struct intel_dp *dp)
gtt_write(PIPE_LINK_N1(dp->transcoder),dp->m_n.link_n);
}
int intel_dp_bw_code_to_link_rate(u8 link_bw)
{
switch (link_bw) {
default:
printk(BIOS_ERR,
"ERROR: link_bw(%d) is bogus; must be one of 6, 0xa, or 0x14\n",
link_bw);
case DP_LINK_BW_1_62:
return 162000;
case DP_LINK_BW_2_7:
return 270000;
case DP_LINK_BW_5_4:
return 540000;
}
}
void intel_dp_set_resolution(struct intel_dp *intel_dp)
{
gtt_write(HTOTAL(intel_dp->transcoder),intel_dp->htotal);