public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Deepak M <m.deepak@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [BXT MIPI PATCH 2/2] drm/i915: dual link pipe selection for bxt
Date: Wed, 9 Dec 2015 09:19:48 +0100	[thread overview]
Message-ID: <20151209081948.GN20822@phenom.ffwll.local> (raw)
In-Reply-To: <1449662398-663-2-git-send-email-m.deepak@intel.com>

On Wed, Dec 09, 2015 at 05:29:58PM +0530, Deepak M wrote:
> Pipe is assigned based on the port, but it should be
> based on current crtc. Correcting the same in this patch.
> 
> Signed-off-by: Deepak M <m.deepak@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dsi.c | 23 ++++++++++++++---------
>  1 file changed, 14 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
> index f5df49b..0654b33 100644
> --- a/drivers/gpu/drm/i915/intel_dsi.c
> +++ b/drivers/gpu/drm/i915/intel_dsi.c
> @@ -898,20 +898,25 @@ static void intel_dsi_prepare(struct intel_encoder *intel_encoder)
>  			I915_WRITE(MIPI_CTRL(port), tmp |
>  					READ_REQUEST_PRIORITY_HIGH);
>  		} else if (IS_BROXTON(dev)) {
> -			/*
> -			 * FIXME:
> -			 * BXT can connect any PIPE to any MIPI port.
> -			 * Select the pipe based on the MIPI port read from
> -			 * VBT for now. Pick PIPE A for MIPI port A and C
> -			 * for port C.
> -			 */
> +			enum pipe pipe = intel_crtc->pipe;
> +
>  			tmp = I915_READ(MIPI_CTRL(port));
>  			tmp &= ~BXT_PIPE_SELECT_MASK;
>  
> -			if (port == PORT_A)
> +			switch (pipe) {
> +			case PIPE_A:
>  				tmp |= BXT_PIPE_SELECT_A;
> -			else if (port == PORT_C)
> +				break;
> +			case PIPE_B:
> +				tmp |= BXT_PIPE_SELECT_B;
> +				break;
> +			case PIPE_C:
>  				tmp |= BXT_PIPE_SELECT_C;

Please create a BXT_PIPE_SELECT(pipe) macro like we have for all the other
outputs that support more than 1 pipe selection bit. See e.g.
DP_PIPE_SELECT_CHV.
-Daniel

> +				break;
> +			default:
> +				DRM_ERROR("Unknown pipe used\n");
> +				return;
> +			}
>  
>  			I915_WRITE(MIPI_CTRL(port), tmp);
>  		}
> -- 
> 1.9.1
> 
> _______________________________________________
> 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-12-09  8:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-09 11:59 [BXT MIPI PATCH 1/2] drm/i915: Set the Z inversion overlap field for BXT Deepak M
2015-12-09 11:59 ` [BXT MIPI PATCH 2/2] drm/i915: dual link pipe selection for bxt Deepak M
2015-12-09  8:19   ` Daniel Vetter [this message]
2015-12-09  9:49     ` Deepak, M
2015-12-09 14:44     ` [PATCH] " Deepak M
2015-12-09 13:54       ` Ville Syrjälä
2015-12-10 14:38         ` Daniel Vetter
2015-12-09 13:53 ` [BXT MIPI PATCH 1/2] drm/i915: Set the Z inversion overlap field for BXT Ville Syrjälä
2016-01-20 10:09 ` Mika Kahola

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=20151209081948.GN20822@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=m.deepak@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox