drm/i915: fix the incorrect condition judgement in dp_is_present_in_vbt
authorZhao Yakui <yakui.zhao@intel.com>
Wed, 2 Dec 2009 02:03:32 +0000 (10:03 +0800)
committerEric Anholt <eric@anholt.net>
Wed, 2 Dec 2009 07:25:17 +0000 (23:25 -0800)
We were always looking for the PORT_IDPB entry.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/intel_dp.c

index a86af0d24fd32b8c8920feaacc0cbecd457e0a8b..e0e835e6a75c7f1e57940b7a8ea32b310c9c250e 100644 (file)
@@ -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;