summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-08-10 15:05:45 +1000
committerDave Airlie <airlied@redhat.com>2010-08-10 15:05:45 +1000
commit8351bb9f085fde5dc47b115375efcc61adc23859 (patch)
treefd77a4852ab4c9615dbd3a5580e73c949e7ac099 /src
parentb91e0efcb24eea32e6978c146c5409eeeeac0a62 (diff)
radeon: take 8/10 encoding into a/c on displayport link
Diffstat (limited to 'src')
-rw-r--r--src/atombios_output.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/atombios_output.c b/src/atombios_output.c
index 8d640be4..da766833 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -2547,6 +2547,11 @@ static int radeon_dp_link_required(int pixel_clock)
return pixel_clock * 3;
}
+static int link_bw_avail(int max_link_clock, int max_lanes)
+{
+ return (max_link_clock * max_lanes * 8) / 10;
+}
+
Bool radeon_dp_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, DisplayModePtr adjusted_mode)
{
RADEONOutputPrivatePtr radeon_output = output->driver_private;
@@ -2557,7 +2562,7 @@ Bool radeon_dp_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, DisplayMode
for (lane_count = 1; lane_count <= max_lane_count; lane_count <<= 1) {
for (clock = 0; clock <= max_clock; clock++) {
- int link_avail = radeon_dp_link_clock(bws[clock]) * lane_count;
+ int link_avail = link_bw_avail(radeon_dp_link_clock(bws[clock]), lane_count);
if (radeon_dp_link_required(mode->Clock) <= link_avail) {
radeon_output->dp_lane_count = lane_count;