From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 3/3] drm/i915: Simplify DP vs. eDP detection Date: Thu, 28 Nov 2013 13:43:17 +0100 Message-ID: <20131128124317.GH27344@phenom.ffwll.local> References: <1383322961-7394-1-git-send-email-ville.syrjala@linux.intel.com> <1383322961-7394-4-git-send-email-ville.syrjala@linux.intel.com> <20131101102542.4605c354@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-ea0-f170.google.com (mail-ea0-f170.google.com [209.85.215.170]) by gabe.freedesktop.org (Postfix) with ESMTP id 313A1FA194 for ; Thu, 28 Nov 2013 04:42:37 -0800 (PST) Received: by mail-ea0-f170.google.com with SMTP id k10so5783117eaj.15 for ; Thu, 28 Nov 2013 04:42:36 -0800 (PST) Content-Disposition: inline In-Reply-To: <20131101102542.4605c354@jbarnes-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Nov 01, 2013 at 10:25:42AM -0700, Jesse Barnes wrote: > On Fri, 1 Nov 2013 18:22:41 +0200 > ville.syrjala@linux.intel.com wrote: > = > > From: Ville Syrj=E4l=E4 > > = > > Reduce the eDP detection to just checking if it's port A, or if > > the VBT tells us that the port is eDP for the other ports. > > = > > Suggested-by: Jesse Barnes > > Signed-off-by: Ville Syrj=E4l=E4 > > --- > > drivers/gpu/drm/i915/intel_dp.c | 26 ++++++-------------------- > > 1 file changed, 6 insertions(+), 20 deletions(-) > > = > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/int= el_dp.c > > index 87cfb12..1e6bf7b 100644 > > --- a/drivers/gpu/drm/i915/intel_dp.c > > +++ b/drivers/gpu/drm/i915/intel_dp.c > > @@ -3274,6 +3274,9 @@ bool intel_dp_is_edp(struct drm_device *dev, enum= port port) > > [PORT_D] =3D PORT_IDPD, > > }; > > = > > + if (port =3D=3D PORT_A) > > + return true; > > + > > if (!dev_priv->vbt.child_dev_num) > > return false; > > = > > @@ -3560,27 +3563,10 @@ intel_dp_init_connector(struct intel_digital_po= rt *intel_dig_port, > > intel_dp->DP =3D I915_READ(intel_dp->output_reg); > > intel_dp->attached_connector =3D intel_connector; > > = > > - type =3D DRM_MODE_CONNECTOR_DisplayPort; > > - /* > > - * FIXME : We need to initialize built-in panels before external pane= ls. > > - * For X0, DP_C is fixed as eDP. Revisit this as part of VLV eDP clea= nup > > - */ > > - switch (port) { > > - case PORT_A: > > + if (intel_dp_is_edp(dev, port)) > > type =3D DRM_MODE_CONNECTOR_eDP; > > - break; > > - case PORT_B: > > - case PORT_C: > > - if (IS_VALLEYVIEW(dev) && intel_dp_is_edp(dev, port)) > > - type =3D DRM_MODE_CONNECTOR_eDP; > > - break; > > - case PORT_D: > > - if (HAS_PCH_SPLIT(dev) && intel_dp_is_edp(dev, port)) > > - type =3D DRM_MODE_CONNECTOR_eDP; > > - break; > > - default: /* silence GCC warning */ > > - break; > > - } > > + else > > + type =3D DRM_MODE_CONNECTOR_DisplayPort; > > = > > /* > > * For eDP we always set the encoder type to INTEL_OUTPUT_EDP, but > = > Ah much better. > = > Reviewed-by: Jesse Barnes Ok, now also merged patches 1&3 of the original series here. Patch 1 didn't really apply that well any more, so please double-check what I've done. -Daniel -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch