All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manasi Navare <manasi.d.navare@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dhinakaran.pandiyan@intel.com
Subject: Re: [PATCH v3 09/14] drm/i915/dp: don't call the link parameters sink parameters
Date: Tue, 28 Mar 2017 14:11:00 -0700	[thread overview]
Message-ID: <20170328211100.GE31477@intel.com> (raw)
In-Reply-To: <c1470546f7fa58194fd65e2329ab8604d16890e1.1490712890.git.jani.nikula@intel.com>

I agree this definitely minimizes the confusion! Thanks for this patch.

Regards
Manasi

On Tue, Mar 28, 2017 at 05:59:09PM +0300, Jani Nikula wrote:
> If we modify these on the fly depending on the link conditions, don't
> pretend they are sink properties.
> 
> Some link vs. sink confusion still remains, but we'll take care of them
> in follow-up patches.
> 
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
 Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>


> ---
>  drivers/gpu/drm/i915/intel_dp.c  | 25 ++++++++++++-------------
>  drivers/gpu/drm/i915/intel_drv.h |  8 ++++----
>  2 files changed, 16 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 8c061c54d481..a0082a3784e8 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -172,7 +172,7 @@ static u8 intel_dp_max_lane_count(struct intel_dp *intel_dp)
>  	u8 source_max, sink_max;
>  
>  	source_max = intel_dig_port->max_lanes;
> -	sink_max = intel_dp->max_sink_lane_count;
> +	sink_max = intel_dp->max_link_lane_count;
>  
>  	return min(source_max, sink_max);
>  }
> @@ -326,11 +326,11 @@ int intel_dp_get_link_train_fallback_values(struct intel_dp *intel_dp,
>  				    intel_dp->num_common_rates,
>  				    link_rate);
>  	if (index > 0) {
> -		intel_dp->max_sink_link_rate = intel_dp->common_rates[index - 1];
> -		intel_dp->max_sink_lane_count = lane_count;
> +		intel_dp->max_link_rate = intel_dp->common_rates[index - 1];
> +		intel_dp->max_link_lane_count = lane_count;
>  	} else if (lane_count > 1) {
> -		intel_dp->max_sink_link_rate = intel_dp_max_sink_rate(intel_dp);
> -		intel_dp->max_sink_lane_count = lane_count >> 1;
> +		intel_dp->max_link_rate = intel_dp_max_sink_rate(intel_dp);
> +		intel_dp->max_link_lane_count = lane_count >> 1;
>  	} else {
>  		DRM_ERROR("Link Training Unsuccessful\n");
>  		return -1;
> @@ -1561,8 +1561,7 @@ intel_dp_max_link_rate(struct intel_dp *intel_dp)
>  {
>  	int len;
>  
> -	len = intel_dp_common_len_rate_limit(intel_dp,
> -					     intel_dp->max_sink_link_rate);
> +	len = intel_dp_common_len_rate_limit(intel_dp, intel_dp->max_link_rate);
>  	if (WARN_ON(len <= 0))
>  		return 162000;
>  
> @@ -1639,7 +1638,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
>  	uint8_t link_bw, rate_select;
>  
>  	common_len = intel_dp_common_len_rate_limit(intel_dp,
> -						    intel_dp->max_sink_link_rate);
> +						    intel_dp->max_link_rate);
>  
>  	/* No common link rates between source and sink */
>  	WARN_ON(common_len <= 0);
> @@ -3969,7 +3968,7 @@ static uint8_t intel_dp_autotest_link_training(struct intel_dp *intel_dp)
>  	test_lane_count &= DP_MAX_LANE_COUNT_MASK;
>  	/* Validate the requested lane count */
>  	if (test_lane_count < min_lane_count ||
> -	    test_lane_count > intel_dp->max_sink_lane_count)
> +	    test_lane_count > intel_dp->max_link_lane_count)
>  		return DP_TEST_NAK;
>  
>  	status = drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_LINK_RATE,
> @@ -4637,11 +4636,11 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
>  		      yesno(drm_dp_tps3_supported(intel_dp->dpcd)));
>  
>  	if (intel_dp->reset_link_params) {
> -		/* Set the max lane count for sink */
> -		intel_dp->max_sink_lane_count = drm_dp_max_lane_count(intel_dp->dpcd);
> +		/* Set the max lane count for link */
> +		intel_dp->max_link_lane_count = drm_dp_max_lane_count(intel_dp->dpcd);
>  
> -		/* Set the max link rate for sink */
> -		intel_dp->max_sink_link_rate = intel_dp_max_sink_rate(intel_dp);
> +		/* Set the max link rate for link */
> +		intel_dp->max_link_rate = intel_dp_max_sink_rate(intel_dp);
>  
>  		intel_dp->reset_link_params = false;
>  	}
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index ec8985b20616..9141515e4204 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -959,10 +959,10 @@ struct intel_dp {
>  	/* intersection of source and sink rates */
>  	int num_common_rates;
>  	int common_rates[DP_MAX_SUPPORTED_RATES];
> -	/* Max lane count for the sink as per DPCD registers */
> -	uint8_t max_sink_lane_count;
> -	/* Max link BW for the sink as per DPCD registers */
> -	int max_sink_link_rate;
> +	/* Max lane count for the current link */
> +	int max_link_lane_count;
> +	/* Max rate for the current link */
> +	int max_link_rate;
>  	/* sink or branch descriptor */
>  	struct intel_dp_desc desc;
>  	struct drm_dp_aux aux;
> -- 
> 2.1.4
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-03-28 21:06 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 14:59 [PATCH v3 00/14] drm/i915/dp: link rate and lane count refactoring Jani Nikula
2017-03-28 14:59 ` [PATCH v3 01/14] drm/i915/dp: use known correct array size in rate_to_index Jani Nikula
2017-04-04 19:16   ` Manasi Navare
2017-03-28 14:59 ` [PATCH v3 02/14] drm/i915/dp: return errors from rate_to_index() Jani Nikula
2017-03-28 19:16   ` Manasi Navare
2017-03-29  7:17     ` Jani Nikula
2017-04-04 19:17       ` Manasi Navare
2017-03-28 14:59 ` [PATCH v3 03/14] drm/i915/dp: rename rate_to_index() to intel_dp_rate_index() and reuse Jani Nikula
2017-04-04 19:19   ` Manasi Navare
2017-03-28 14:59 ` [PATCH v3 04/14] drm/i915/dp: cache source rates at init Jani Nikula
2017-04-05  1:17   ` Manasi Navare
2017-03-28 14:59 ` [PATCH v3 05/14] drm/i915/dp: generate and cache sink rate array for all DP, not just eDP 1.4 Jani Nikula
2017-04-05  1:20   ` Manasi Navare
2017-04-06 11:41     ` Jani Nikula
2017-03-28 14:59 ` [PATCH v3 06/14] drm/i915/dp: use the sink rates array for max sink rates Jani Nikula
2017-03-28 14:59 ` [PATCH v3 07/14] drm/i915/dp: cache common rates with " Jani Nikula
2017-04-05  1:21   ` Manasi Navare
2017-03-28 14:59 ` [PATCH v3 08/14] drm/i915/dp: do not limit rate seek when not needed Jani Nikula
2017-03-28 21:02   ` Manasi Navare
2017-03-29  9:23   ` [PATCH] " Jani Nikula
2017-04-05  1:24     ` Manasi Navare
2017-03-28 14:59 ` [PATCH v3 09/14] drm/i915/dp: don't call the link parameters sink parameters Jani Nikula
2017-03-28 21:11   ` Manasi Navare [this message]
2017-03-28 14:59 ` [PATCH v3 10/14] drm/i915/dp: add functions for max common link rate and lane count Jani Nikula
2017-03-28 21:47   ` Manasi Navare
2017-03-28 14:59 ` [PATCH v3 11/14] drm/i915/mst: use max link not sink " Jani Nikula
2017-03-28 21:51   ` Manasi Navare
2017-03-28 14:59 ` [PATCH v3 12/14] drm/i915/dp: localize link rate index variable more Jani Nikula
2017-03-28 22:00   ` Manasi Navare
2017-03-29  7:22     ` Jani Nikula
2017-04-05  1:26       ` Manasi Navare
2017-03-28 14:59 ` [PATCH v3 13/14] drm/i915/dp: use readb and writeb calls for single byte DPCD access Jani Nikula
2017-04-05  1:28   ` Manasi Navare
2017-03-28 14:59 ` [PATCH v3 14/14] drm/i915/dp: read sink count to a temporary variable first Jani Nikula
2017-03-28 16:50 ` ✓ Fi.CI.BAT: success for drm/i915/dp: link rate and lane count refactoring (rev3) Patchwork
2017-03-29  9:48 ` ✓ Fi.CI.BAT: success for drm/i915/dp: link rate and lane count refactoring (rev4) Patchwork

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=20170328211100.GE31477@intel.com \
    --to=manasi.d.navare@intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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.