Commit 6bba2e11 authored by Jerome Glisse's avatar Jerome Glisse Committed by Dave Airlie

radeon/kms: fix dp displayport mode validation

Check if there is a big enough dp clock & enough dp lane to
drive the video mode provided.
Signed-off-by: default avatarJerome Glisse <jglisse@redhat.com>
Reviewed-By: default avatarAlex Deucher <alexdeucher@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarDave Airlie <airlied@gmail.com>
parent 52bb4a73
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment