Skip to contentSkip to conversation

radeon/kms: fix dp displayport mode validation

PATCH In review [email protected] 2 participants 2 messages Jan 26, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 radeon/kms: fix dp displayport mode validation

From: Jerome Glisse <[email protected]>

Check if there is a big enough dp clock & enough dp lane to drive the video mode provided.

---
 drivers/gpu/drm/radeon/atombios_dp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/atombios_dp.c +2 -2
index 4e7778d..695de9a 100644
@@ -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;
Signature · 1 line
1.7.3.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · On Wed, Jan 26, 2011 at 5:51 PM, <[email protected]> wrote:

From: Jerome Glisse <[email protected]>

Check if there is a big enough dp clock & enough dp lane to drive the video mode provided.

Looks like a copy paste error, probably from me :)

Quoted 28 lines

---
 drivers/gpu/drm/radeon/atombios_dp.c |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/atombios_dp.c +2 -3
index 4e7778d..695de9a 100644
@@ -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;
--

1.7.3.2

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel