[Intel-gfx] [PATCH 1/3] drm/i915: fix the incorrect condition judgement in dp_is_present_in_vbt

yakui.zhao at intel.com yakui.zhao at intel.com
Wed Dec 2 03:03:32 CET 2009


From: Zhao Yakui <yakui.zhao at intel.com>

The condition judgement is wrong in the function of dp_is_present_in_vbt, which
will cause that we can't setup display port correctly.
Fix the error condition judgement.

Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a86af0d..e0e835e 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1247,11 +1247,11 @@ int dp_is_present_in_vbt(struct drm_device *dev, int dp_reg)
 		return 1;
 
 	dp_port = 0;
-	if (dp_reg == DP_B || PCH_DP_B)
+	if (dp_reg == DP_B || dp_reg == PCH_DP_B)
 		dp_port = PORT_IDPB;
-	else if (dp_reg == DP_C || PCH_DP_C)
+	else if (dp_reg == DP_C || dp_reg == PCH_DP_C)
 		dp_port = PORT_IDPC;
-	else if (dp_reg == DP_D || PCH_DP_D)
+	else if (dp_reg == DP_D || dp_reg == PCH_DP_D)
 		dp_port = PORT_IDPD;
 
 	ret = 0;
-- 
1.5.4.5




More information about the Intel-gfx mailing list