Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 5/7] drm/i915: stop using is_pch_edp() in is_cpu_edp()
Date: Fri, 10 May 2013 11:52:29 +0300	[thread overview]
Message-ID: <1368175949.26264.3.camel@intelbox> (raw)
In-Reply-To: <20130510084912.GF12292@phenom.ffwll.local>

On Fri, 2013-05-10 at 10:49 +0200, Daniel Vetter wrote:
> On Wed, May 08, 2013 at 01:14:06PM +0300, Imre Deak wrote:
> > is_pch_edp() will be removed by the next patch, so replace it by a check
> > for the port and device type.
> > 
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_dp.c |   17 +++++++++++------
> >  1 file changed, 11 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 42c11dd..38b9cd2 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -65,6 +65,13 @@ static bool is_pch_edp(struct intel_dp *intel_dp)
> >  	return intel_dp->is_pch_edp;
> >  }
> >  
> > +static struct drm_device *intel_dp_to_dev(struct intel_dp *intel_dp)
> > +{
> > +	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> > +
> > +	return intel_dig_port->base.base.dev;
> > +}
> > +
> >  /**
> >   * is_cpu_edp - is the port on the CPU and attached to an eDP panel?
> >   * @intel_dp: DP struct
> > @@ -73,14 +80,12 @@ static bool is_pch_edp(struct intel_dp *intel_dp)
> >   */
> >  static bool is_cpu_edp(struct intel_dp *intel_dp)
> >  {
> > -	return is_edp(intel_dp) && !is_pch_edp(intel_dp);
> > -}
> > -
> > -static struct drm_device *intel_dp_to_dev(struct intel_dp *intel_dp)
> > -{
> > +	struct drm_device *dev = intel_dp_to_dev(intel_dp);
> >  	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> > +	enum port port = intel_dig_port->port;
> >  
> > -	return intel_dig_port->base.base.dev;
> > +	return is_edp(intel_dp) &&
> > +		(port == PORT_A || (port == PORT_C && IS_VALLEYVIEW(dev)));
> 
> Valleyview is a giant mess here, I guess we should split the vlv case
> from the pch_split cpu edp case. Maybe just check for port A in relevant
> cases and factor out vlv cases completely.
> 
> My bet is that this massive confusion is the reason that vlv dp (i.e.
> non-edp) is totally broken atm.

Could we do that as a follow-up to this? That work would have also the
benefit of removing is_cpu_edp() as you hoped earlier, so it could stand
on its own..

--Imre

  reply	other threads:[~2013-05-10  8:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07 15:24 [PATCH 0/6] drm/i915: remove pch_edp encoder state variable Imre Deak
2013-05-07 15:24 ` [PATCH 1/6] drm/i915: use enc_to_intel_dp() instead of opencoding the same Imre Deak
2013-05-07 15:24 ` [PATCH 2/6] drm/i915: hsw: replace !is_pch_edp() with port==PORT_A Imre Deak
2013-05-07 15:24 ` [PATCH 3/6] drm/i915: ilk-ivb: replace is_pch_edp() with port==PORT_D Imre Deak
2013-05-07 15:35   ` Daniel Vetter
2013-05-07 15:24 ` [PATCH 4/6] drm/i915: stop using is_pch_edp() in intel_dp_init_connector() Imre Deak
2013-05-08  8:07   ` Ville Syrjälä
2013-05-07 15:24 ` [PATCH 5/6] drm/i915: stop using is_pch_edp() in is_cpu_edp() Imre Deak
2013-05-07 15:24 ` [PATCH 6/6] drm/i915: remove is_pch_edp() helpers and state variable Imre Deak
2013-05-08 10:14 ` [PATCH v2 0/7] drm/i915: remove pch_edp encoder " Imre Deak
2013-05-08 10:14   ` [PATCH v2 1/7] drm/i915: use enc_to_intel_dp() instead of opencoding the same Imre Deak
2013-05-08 10:14   ` [PATCH v2 2/7] drm/i915: hsw: replace !is_pch_edp() with port==PORT_A Imre Deak
2013-05-08 10:14   ` [PATCH v2 3/7] drm/i915: ilk-ivb: " Imre Deak
2013-05-08 10:14   ` [PATCH v2 4/7] drm/i915: stop using is_pch_edp() in intel_dp_init_connector() Imre Deak
2013-05-08 10:14   ` [PATCH v2 5/7] drm/i915: stop using is_pch_edp() in is_cpu_edp() Imre Deak
2013-05-10  8:49     ` Daniel Vetter
2013-05-10  8:52       ` Imre Deak [this message]
2013-05-08 10:14   ` [PATCH v2 6/7] drm/i915: remove is_pch_edp() helpers and state variable Imre Deak
2013-05-08 10:14   ` [PATCH v2 7/7] drm/i915: print DP init debug messages from a single place Imre Deak

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=1368175949.26264.3.camel@intelbox \
    --to=imre.deak@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox