On Fri, 1 Nov 2013 18:22:40 +0200 ville.syrjala@xxxxxxxxxxxxxxx wrote: > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > 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@xxxxxxxxxxxxx> > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > --- > 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; Is there no way to split out these magic bits individually into something readable? If not, I guess we'll have to trust you, but it seems fragile. Reviewed-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx> -- Jesse Barnes, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx