summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2011-01-26 17:51:03 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-21 12:45:01 -0700
commitdf00c3d5194963ac1bcd7a234d98681a46e1148a (patch)
treec2435a6549112e278b8f9a975a9f031c1263c952 /drivers
parent30877fc89aec3196b6572915144ec6c2882b0608 (diff)
downloadkernel-common-df00c3d5194963ac1bcd7a234d98681a46e1148a.tar.gz
kernel-common-df00c3d5194963ac1bcd7a234d98681a46e1148a.tar.bz2
kernel-common-df00c3d5194963ac1bcd7a234d98681a46e1148a.zip
radeon/kms: fix dp displayport mode validation
commit 6bba2e116808ca12e30c8d88dfedabf8b8d67390 upstream. Check if there is a big enough dp clock & enough dp lane to drive the video mode provided. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-By: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/atombios_dp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c
index 99915a682d59..8aa5d932e946 100644
--- a/drivers/gpu/drm/radeon/atombios_dp.c
+++ b/drivers/gpu/drm/radeon/atombios_dp.c
@@ -187,9 +187,9 @@ static int dp_link_clock_for_mode_clock(u8 dpcd[DP_DPCD_SIZE], int mode_clock)
int dp_mode_valid(u8 dpcd[DP_DPCD_SIZE], int mode_clock)
{
int lanes = dp_lanes_for_mode_clock(dpcd, mode_clock);
- int bw = dp_lanes_for_mode_clock(dpcd, mode_clock);
+ int dp_clock = dp_link_clock_for_mode_clock(dpcd, mode_clock);
- if ((lanes == 0) || (bw == 0))
+ if ((lanes == 0) || (dp_clock == 0))
return MODE_CLOCK_HIGH;
return MODE_OK;