All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Xiong Y" <xiong.y.zhang@intel.com>
To: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 7/6] drm/i915/skl: DDI-E and DDI-A shares 4 lanes.
Date: Wed, 12 Aug 2015 02:20:34 +0000	[thread overview]
Message-ID: <8082FF9BCB2B054996454E47167FF4EC029AC428@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1439318369.3344.94.camel@intel.com>

> On Tue, 2015-08-11 at 07:05 +0000, Zhang, Xiong Y wrote:
> > > -----Original Message-----
> > > From: Vivi, Rodrigo
> > > Sent: Saturday, August 8, 2015 8:34 AM
> > > To: intel-gfx@lists.freedesktop.org
> > > Cc: Vivi, Rodrigo; Zhang, Xiong Y
> > > Subject: [PATCH 7/6] drm/i915/skl: DDI-E and DDI-A shares 4 lanes.
> > >
> > > DDI-A and DDI-E shares the 4 lanes. So when DDI-E is present we need
> > > to configure lane count propperly for both.
> > >
> > > This was based on Sonika's
> > > [PATCH] drm/i915/skl: Select DDIA lane capability based upon vbt
> > >
> > > Credits-to: Sonika Jindal <sonika.jindal@intel.com>
> > > Cc: Xiong Zhang <xiong.y.zhang@intel.com>
> > > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++++--
> > > drivers/gpu/drm/i915/intel_dp.c  |  8 +++++---
> > >  2 files changed, 15 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/intel_ddi.c
> > > b/drivers/gpu/drm/i915/intel_ddi.c
> > > index 110d546..557cecf 100644
> > > --- a/drivers/gpu/drm/i915/intel_ddi.c
> > > +++ b/drivers/gpu/drm/i915/intel_ddi.c
> > > @@ -3178,7 +3178,15 @@ void intel_ddi_init(struct drm_device *dev,
> > > enum port port)
> > >  	struct intel_digital_port *intel_dig_port;
> > >  	struct intel_encoder *intel_encoder;
> > >  	struct drm_encoder *encoder;
> > > -	bool init_hdmi, init_dp;
> > > +	bool init_hdmi, init_dp, ddi_e_present;
> > > +
> > > +	/*
> > > +	 * On SKL we don't have a way to detect DDI-E so we rely
> > > on VBT.
> > > +	 */
> > > +	ddie_present = IS_SKYLAKE(dev) &&
> > > +		(dev_priv->vbt.ddi_port_info[PORT_E].supports_dp
> > > ||
> > > +		 dev_priv->vbt.ddi_port_info[PORT_E].supports_dvi
> > > ||
> > > +		 dev_priv
> > > ->vbt.ddi_port_info[PORT_E].supports_hdmi);
> > [Zhang, Xiong Y]  ddie_present should be ddi_e_present
> > >
> > >  	init_hdmi = (dev_priv
> > > ->vbt.ddi_port_info[port].supports_dvi ||
> > >  		     dev_priv
> > > ->vbt.ddi_port_info[port].supports_hdmi);
> > > @@ -3210,7 +3218,7 @@ void intel_ddi_init(struct drm_device *dev,
> > > enum port port)
> > >  	intel_dig_port->port = port;
> > >  	intel_dig_port->saved_port_bits =
> > > I915_READ(DDI_BUF_CTL(port)) &
> > >  					  (DDI_BUF_PORT_REVERSAL |
> > > -					   DDI_A_4_LANES);
> > > +					   ddi_e_present ? 0 :
> > > DDI_A_4_LANES);
> > [Zhang, Xiong Y] Sonika's patch will set DDI-A to 4 lanes when DDI-E
> > doesn't exist, I think your patch will do nothing.
> 
> Actually DDI_A_4_LANES is being already set unconditionally, so Sonika's
> patch has no effect.
[Zhang, Xiong Y] No. Sonika's patch set DDI_A_4_LANES under many conditions.
+	if (IS_SKYLAKE(dev) && port == PORT_A
+		&& !(val & DDI_BUF_CTL_ENABLE)
+		&& !dev_priv->vbt.ddi_e_used)
+		I915_WRITE(DDI_BUF_CTL(port), val | DDI_A_4_LANES)
> 
> saved_port_bits goes to intel_dp->DP that goes to DDI_BUF_CTL and also it is
> used to calculate the number of lanes.
> 
> With this patch we stop setting DDI_A_4_LANES when ddi_e is present so
> DDI-A keeps with 2 lanes and let other 2 lanes for DDI-E
[Zhang, Xiong Y] Yes, this patch will clear DDI_A_4_LANES when ddi_e is present.
But this patch won't set DDI_A_4_LANES under following conditions which is purpose for Sonika patch
1. Bios fail to driver eDP and doesn't enable DDI_A buffer
2. Bios clear DDI_A_4_LANES
3. DDI_E isn't present

thanks
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-08-12  2:20 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-06  7:51 [PATCH 1/6] drm/i915/skl: Enable DDI-E Xiong Zhang
2015-08-06  7:51 ` [PATCH 2/6] drm/i915: Set power domain for DDI-E Xiong Zhang
2015-08-11  6:12   ` Zhang, Xiong Y
2015-08-06  7:51 ` [PATCH 3/6] drm/i915: Set alternate aux " Xiong Zhang
2015-08-08  0:01   ` [PATCH] " Rodrigo Vivi
2015-08-11  6:18     ` Zhang, Xiong Y
2015-08-13  8:40     ` shuang.he
2015-08-06  7:51 ` [PATCH 4/6] drm/i915: eDP can be present on DDI-E Xiong Zhang
2015-08-11  6:27   ` Zhang, Xiong Y
2015-08-11  9:47   ` Daniel Vetter
2015-08-11 10:09     ` Zhang, Xiong Y
2015-08-11 18:42     ` Vivi, Rodrigo
2015-08-12 10:27       ` Zhang, Xiong Y
2015-08-12 12:32         ` Daniel Vetter
2015-08-12 16:38           ` Vivi, Rodrigo
2015-08-31 15:47   ` Jani Nikula
2015-08-06  7:51 ` [PATCH 5/6] drm/i915/skl: enable DDIE hotplug Xiong Zhang
2015-08-08  0:06   ` Rodrigo Vivi
2015-08-10  6:53     ` [PATCH 5/6 v2] drm/i915/skl: enable DDI-E hotplug Xiong Zhang
2015-08-17  7:55       ` [PATCH 5/6 v3] " Xiong Zhang
2015-08-26  7:25         ` Jani Nikula
2015-08-06  7:51 ` [PATCH 6/6] drm/i915: Enable HDMI on DDI-E Xiong Zhang
2015-08-08  0:09   ` Rodrigo Vivi
2015-08-11  9:58   ` Daniel Vetter
2015-08-12 10:39     ` [PATCH 6/6 v3] " Xiong Zhang
2015-08-12 12:33       ` Daniel Vetter
2015-08-13  2:57         ` Zhang, Xiong Y
2015-08-14  8:42           ` Daniel Vetter
2015-08-14 10:38             ` Zhang, Xiong Y
2015-08-17  8:04             ` Xiong Zhang
2015-08-31 15:47               ` Jani Nikula
2015-08-12 14:19   ` [PATCH 6/6] " shuang.he
2015-08-06 13:30 ` [PATCH 1/6] drm/i915/skl: Enable DDI-E Daniel Vetter
2015-08-06 15:37   ` Vivi, Rodrigo
2015-08-08  0:35   ` [PATCH 8/6] " Rodrigo Vivi
2015-08-11  7:12     ` Zhang, Xiong Y
2015-08-31 15:48     ` Jani Nikula
2015-08-06 15:14 ` [PATCH 1/6] " Daniel Vetter
2015-08-06 15:50   ` Vivi, Rodrigo
2015-08-08  0:33   ` [PATCH 7/6] drm/i915/skl: DDI-E and DDI-A shares 4 lanes Rodrigo Vivi
2015-08-11  7:05     ` Zhang, Xiong Y
2015-08-11 18:38       ` Vivi, Rodrigo
2015-08-12  2:20         ` Zhang, Xiong Y [this message]
2015-08-12 16:51           ` Vivi, Rodrigo
2015-08-13  3:27             ` Zhang, Xiong Y
2015-08-13  5:48               ` Jindal, Sonika
2015-08-26  8:15                 ` Jani Nikula
2015-08-26 16:38                   ` Vivi, Rodrigo
2015-08-27  2:52                     ` Zhang, Xiong Y
2015-08-27 14:31                       ` Timo Aaltonen
2015-08-27 17:59                         ` Vivi, Rodrigo
2015-08-12 21:29       ` Timo Aaltonen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8082FF9BCB2B054996454E47167FF4EC029AC428@SHSMSX104.ccr.corp.intel.com \
    --to=xiong.y.zhang@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.