From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm/i915: Update bits to check in device class from VBT to detect eDP Date: Thu, 5 Jun 2014 16:09:29 +0300 Message-ID: <20140605130929.GB27580@intel.com> References: <1401972913-1771-1-git-send-email-shobhit.kumar@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 08F786E956 for ; Thu, 5 Jun 2014 06:09:33 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1401972913-1771-1-git-send-email-shobhit.kumar@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Shobhit Kumar Cc: Daniel Vetter , intel-gfx , Jesse Barnes List-Id: intel-gfx@lists.freedesktop.org On Thu, Jun 05, 2014 at 06:25:13PM +0530, Shobhit Kumar wrote: > The DEVICE_TYPE_eDP has been changed to 0x1806 in case of BYT which > can causes wrong detection failures for eDP. Reduce the number of bits > of interest in DEVICE_TYPE_eDP_BITS to just check most relevant and > conclusive ones and ensure they are set in device_class from VBT. This > will ensure that eDP detection works across platforms The current bits will match correctly for 0x1806. I don't have a problem with the patch per-say but would be nice to know what the troublesome device type really was, if indeed there was one. I'm just slightly worried that we might start to get false positives on some platforms if we make it too relaxed. > = > Signed-off-by: Shobhit Kumar > --- > drivers/gpu/drm/i915/intel_bios.h | 10 +--------- > drivers/gpu/drm/i915/intel_dp.c | 4 ++-- > 2 files changed, 3 insertions(+), 11 deletions(-) > = > diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/int= el_bios.h > index b986677..30d02b7 100644 > --- a/drivers/gpu/drm/i915/intel_bios.h > +++ b/drivers/gpu/drm/i915/intel_bios.h > @@ -710,16 +710,8 @@ int intel_parse_bios(struct drm_device *dev); > */ > #define DEVICE_TYPE_eDP_BITS \ > (DEVICE_TYPE_INTERNAL_CONNECTOR | \ > - DEVICE_TYPE_NOT_HDMI_OUTPUT | \ > - DEVICE_TYPE_MIPI_OUTPUT | \ > - DEVICE_TYPE_COMPOSITE_OUTPUT | \ > - DEVICE_TYPE_DUAL_CHANNEL | \ > - DEVICE_TYPE_LVDS_SINGALING | \ > - DEVICE_TYPE_TMDS_DVI_SIGNALING | \ > - DEVICE_TYPE_VIDEO_SIGNALING | \ > DEVICE_TYPE_DISPLAYPORT_OUTPUT | \ > - DEVICE_TYPE_DIGITAL_OUTPUT | \ > - DEVICE_TYPE_ANALOG_OUTPUT) > + DEVICE_TYPE_DIGITAL_OUTPUT) > = > /* define the DVO port for HDMI output type */ > #define DVO_B 1 > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel= _dp.c > index dad3780..68f7380 100644 > --- a/drivers/gpu/drm/i915/intel_dp.c > +++ b/drivers/gpu/drm/i915/intel_dp.c > @@ -3842,8 +3842,8 @@ bool intel_dp_is_edp(struct drm_device *dev, enum p= ort port) > p_child =3D dev_priv->vbt.child_dev + i; > = > if (p_child->common.dvo_port =3D=3D port_mapping[port] && > - (p_child->common.device_type & DEVICE_TYPE_eDP_BITS) =3D=3D > - (DEVICE_TYPE_eDP & DEVICE_TYPE_eDP_BITS)) > + ((p_child->common.device_type & DEVICE_TYPE_eDP_BITS) =3D=3D > + DEVICE_TYPE_eDP_BITS)) > return true; > } > return false; > -- = > 1.9.1 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Ville Syrj=E4l=E4 Intel OTC