[Intel-gfx] [PATCH 2/3] drm/i915: Make intel_dp_is_edp() less specific

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Fri Nov 1 17:22:40 CET 2013


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

All the bits in the VBT child device type have some speciifc meaning,
so looking for an exact match isn't always the right thing. On some
VLVs for example the device type for eDP panels is 0x1806.

If we mask out the bits that could concievably change between different
eDP panels, we are left with the set of bits that should still
tell us if the port is eDP or not.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71051
Tested-by: Robert Hooker <robert.hooker at canonical.com>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index ede023c..87cfb12 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3281,7 +3281,7 @@ bool intel_dp_is_edp(struct drm_device *dev, enum port port)
 		p_child = dev_priv->vbt.child_dev + i;
 
 		if (p_child->common.dvo_port == port_mapping[port] &&
-		    p_child->common.device_type == DEVICE_TYPE_eDP)
+		    (p_child->common.device_type & 0x1f3f) == (DEVICE_TYPE_eDP & 0x1f3f))
 			return true;
 	}
 	return false;
-- 
1.8.1.5




More information about the Intel-gfx mailing list