public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/bxt: fix intel_prepare_ddi for DSI ports
Date: Mon, 22 Jun 2015 16:45:59 +0200	[thread overview]
Message-ID: <20150622144559.GO25769@phenom.ffwll.local> (raw)
In-Reply-To: <20150622133414.GF13593@strange.amr.corp.intel.com>

On Mon, Jun 22, 2015 at 02:34:14PM +0100, Damien Lespiau wrote:
> On Wed, Jun 17, 2015 at 04:12:49PM +0300, Imre Deak wrote:
> > BXT introduces DSI ports, for which we need to skip the DDI port setup.
> > Also there is no real reason for having a BUG for unknown port types so
> > convert it to a WARN.
> > 
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> 
> I think we could do with a better port abstraction as a whole, right now
> that's all a bit messy. But anyway:

I did ask for that for the bxt dsi enabling stuff. Punting on this one
until we have the complete picture there.
-Daniel

> 
> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
> 
> > ---
> >  drivers/gpu/drm/i915/intel_ddi.c | 13 ++++++++-----
> >  1 file changed, 8 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> > index 31b29e8..9ae297a 100644
> > --- a/drivers/gpu/drm/i915/intel_ddi.c
> > +++ b/drivers/gpu/drm/i915/intel_ddi.c
> > @@ -210,7 +210,7 @@ static const struct bxt_ddi_buf_trans bxt_ddi_translations_hdmi[] = {
> >  	{ 154, 0x9A, 1, 128, true },	/* 9:	1200		0   */
> >  };
> >  
> > -static void ddi_get_encoder_port(struct intel_encoder *intel_encoder,
> > +static bool ddi_get_encoder_port(struct intel_encoder *intel_encoder,
> >  				 struct intel_digital_port **dig_port,
> >  				 enum port *port)
> >  {
> > @@ -228,9 +228,10 @@ static void ddi_get_encoder_port(struct intel_encoder *intel_encoder,
> >  		*dig_port = NULL;
> >  		*port = PORT_E;
> >  	} else {
> > -		DRM_ERROR("Invalid DDI encoder type %d\n", type);
> > -		BUG();
> > +		return false;
> >  	}
> > +
> > +	return true;
> >  }
> >  
> >  enum port intel_ddi_get_encoder_port(struct intel_encoder *intel_encoder)
> > @@ -238,7 +239,8 @@ enum port intel_ddi_get_encoder_port(struct intel_encoder *intel_encoder)
> >  	struct intel_digital_port *dig_port;
> >  	enum port port;
> >  
> > -	ddi_get_encoder_port(intel_encoder, &dig_port, &port);
> > +	if (WARN_ON(!ddi_get_encoder_port(intel_encoder, &dig_port, &port)))
> > +		return PORT_A;
> >  
> >  	return port;
> >  }
> > @@ -390,7 +392,8 @@ void intel_prepare_ddi(struct drm_device *dev)
> >  		enum port port;
> >  		bool supports_hdmi;
> >  
> > -		ddi_get_encoder_port(intel_encoder, &intel_dig_port, &port);
> > +		if (!ddi_get_encoder_port(intel_encoder, &intel_dig_port, &port))
> > +			continue;
> >  
> >  		if (visited[port])
> >  			continue;
> > -- 
> > 2.1.4
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-06-22 14:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 13:12 [PATCH] drm/i915/bxt: fix intel_prepare_ddi for DSI ports Imre Deak
2015-06-22 13:34 ` Damien Lespiau
2015-06-22 14:45   ` Daniel Vetter [this message]
2015-06-29  0:39 ` shuang.he

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=20150622144559.GO25769@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=damien.lespiau@intel.com \
    --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