intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Manasi Navare <manasi.d.navare@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 5/7] drm/i915; Add a function to return index of link rate
Date: Fri, 28 Oct 2016 15:14:16 +0300	[thread overview]
Message-ID: <87a8dollgn.fsf@intel.com> (raw)
In-Reply-To: <1477524358-16563-5-git-send-email-manasi.d.navare@intel.com>

On Thu, 27 Oct 2016, Manasi Navare <manasi.d.navare@intel.com> wrote:
> This is required to return the index of link rate into
> common_rates array. This gets used to retry the link
> training at lower link rate.
>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>

Please squash this with the following patch that uses it. No need to
have it separately.

BR,
Jani.

> ---
>  drivers/gpu/drm/i915/intel_dp.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index aecfd22..39116c8 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -288,6 +288,21 @@ static int intel_dp_common_rates(struct intel_dp *intel_dp,
>  			       common_rates);
>  }
>  
> +static int intel_dp_link_rate_index(struct intel_dp *intel_dp,
> +				    int *common_rates, int link_rate)
> +{
> +	int common_len;
> +	int index;
> +
> +	common_len = intel_dp_common_rates(intel_dp, common_rates);
> +	for (index = 0; index < common_len; index++) {
> +		if (link_rate == common_rates[common_len - index - 1])
> +			return common_len - index - 1;
> +	}
> +
> +	return -1;
> +}
> +
>  static enum drm_mode_status
>  intel_dp_mode_valid(struct drm_connector *connector,
>  		    struct drm_display_mode *mode)

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-10-28 12:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 23:25 [PATCH 1/7] drm: Define a work struct for scheduling a uevent for modeset retry Manasi Navare
2016-10-26 23:25 ` [PATCH 2/7] drm: Add a new connector property for link status Manasi Navare
2016-10-26 23:25 ` [PATCH 3/7] drm/i915: Set link status property for DP connector Manasi Navare
2016-10-28 12:03   ` Jani Nikula
2016-10-26 23:25 ` [PATCH 4/7] drm/i915: Change the placement of some static functions in intel_dp.c Manasi Navare
2016-10-28 12:11   ` Jani Nikula
2016-10-26 23:25 ` [PATCH 5/7] drm/i915; Add a function to return index of link rate Manasi Navare
2016-10-28 12:14   ` Jani Nikula [this message]
2016-10-26 23:25 ` [PATCH 6/7] drm/i915: Find fallback link rate/lane count Manasi Navare
2016-10-26 23:25 ` [PATCH 7/7] drm/i915: Link Rate fallback on Link training failure Manasi Navare
2016-10-26 23:55 ` ✗ Fi.CI.BAT: failure for series starting with [1/7] drm: Define a work struct for scheduling a uevent for modeset retry Patchwork
2016-10-28 12:01 ` [PATCH 1/7] " Jani Nikula
2016-10-28 12:16   ` Jani Nikula

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=87a8dollgn.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=daniel.vetter@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=manasi.d.navare@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;
as well as URLs for NNTP newsgroup(s).