From: Daniel Vetter <daniel@ffwll.ch>
To: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 01/15] drm/i915: Rename DP link training functions
Date: Tue, 6 Oct 2015 10:54:01 +0200 [thread overview]
Message-ID: <20151006085401.GY3383@phenom.ffwll.local> (raw)
In-Reply-To: <1444028487-6501-2-git-send-email-ander.conselvan.de.oliveira@intel.com>
On Mon, Oct 05, 2015 at 10:01:13AM +0300, Ander Conselvan de Oliveira wrote:
> The link training functions had confusing names. The start function
> actually does the clock recovery phase of the link training, and the
> complete function does the channel equalization. So call them that
> instead. Also, every call to intel_dp_start_link_train() was followed
> by a call to intel_dp_complete_link_train(), so add a new start
> function that calls clock_recory and channel_equalization.
>
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Queued for -next, thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/intel_ddi.c | 1 -
> drivers/gpu/drm/i915/intel_dp.c | 22 +++++++++++++---------
> drivers/gpu/drm/i915/intel_dp_mst.c | 1 -
> drivers/gpu/drm/i915/intel_drv.h | 1 -
> 4 files changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 2d3cc82..220679d 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -2317,7 +2317,6 @@ static void intel_ddi_pre_enable(struct intel_encoder *intel_encoder)
>
> intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
> intel_dp_start_link_train(intel_dp);
> - intel_dp_complete_link_train(intel_dp);
> if (port != PORT_A || INTEL_INFO(dev)->gen >= 9)
> intel_dp_stop_link_train(intel_dp);
> } else if (type == INTEL_OUTPUT_HDMI) {
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 97ed418..c420edf 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2604,7 +2604,6 @@ static void intel_enable_dp(struct intel_encoder *encoder)
>
> intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
> intel_dp_start_link_train(intel_dp);
> - intel_dp_complete_link_train(intel_dp);
> intel_dp_stop_link_train(intel_dp);
>
> if (crtc->config->has_audio) {
> @@ -3696,8 +3695,8 @@ static void intel_dp_set_idle_link_train(struct intel_dp *intel_dp)
> }
>
> /* Enable corresponding port and start training pattern 1 */
> -void
> -intel_dp_start_link_train(struct intel_dp *intel_dp)
> +static void
> +intel_dp_link_training_clock_recovery(struct intel_dp *intel_dp)
> {
> struct drm_encoder *encoder = &dp_to_dig_port(intel_dp)->base.base;
> struct drm_device *dev = encoder->dev;
> @@ -3810,8 +3809,8 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)
> intel_dp->DP = DP;
> }
>
> -void
> -intel_dp_complete_link_train(struct intel_dp *intel_dp)
> +static void
> +intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp)
> {
> struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> struct drm_device *dev = dig_port->base.base.dev;
> @@ -3864,7 +3863,7 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)
> if (!drm_dp_clock_recovery_ok(link_status,
> intel_dp->lane_count)) {
> intel_dp->train_set_valid = false;
> - intel_dp_start_link_train(intel_dp);
> + intel_dp_link_training_clock_recovery(intel_dp);
> intel_dp_set_link_train(intel_dp, &DP,
> training_pattern |
> DP_LINK_SCRAMBLING_DISABLE);
> @@ -3881,7 +3880,7 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)
> /* Try 5 times, then try clock recovery if that fails */
> if (tries > 5) {
> intel_dp->train_set_valid = false;
> - intel_dp_start_link_train(intel_dp);
> + intel_dp_link_training_clock_recovery(intel_dp);
> intel_dp_set_link_train(intel_dp, &DP,
> training_pattern |
> DP_LINK_SCRAMBLING_DISABLE);
> @@ -3914,6 +3913,13 @@ void intel_dp_stop_link_train(struct intel_dp *intel_dp)
> DP_TRAINING_PATTERN_DISABLE);
> }
>
> +void
> +intel_dp_start_link_train(struct intel_dp *intel_dp)
> +{
> + intel_dp_link_training_clock_recovery(intel_dp);
> + intel_dp_link_training_channel_equalization(intel_dp);
> +}
> +
> static void
> intel_dp_link_down(struct intel_dp *intel_dp)
> {
> @@ -4382,7 +4388,6 @@ go_again:
> !drm_dp_channel_eq_ok(&esi[10], intel_dp->lane_count)) {
> DRM_DEBUG_KMS("channel EQ not ok, retraining\n");
> intel_dp_start_link_train(intel_dp);
> - intel_dp_complete_link_train(intel_dp);
> intel_dp_stop_link_train(intel_dp);
> }
>
> @@ -4473,7 +4478,6 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)
> DRM_DEBUG_KMS("%s: channel EQ not ok, retraining\n",
> intel_encoder->base.name);
> intel_dp_start_link_train(intel_dp);
> - intel_dp_complete_link_train(intel_dp);
> intel_dp_stop_link_train(intel_dp);
> }
> }
> diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
> index ca4d022..1537259 100644
> --- a/drivers/gpu/drm/i915/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
> @@ -188,7 +188,6 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder)
>
>
> intel_dp_start_link_train(intel_dp);
> - intel_dp_complete_link_train(intel_dp);
> intel_dp_stop_link_train(intel_dp);
> }
>
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index dfd2d10..5366c9e 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1215,7 +1215,6 @@ bool intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
> void intel_dp_set_link_params(struct intel_dp *intel_dp,
> const struct intel_crtc_state *pipe_config);
> void intel_dp_start_link_train(struct intel_dp *intel_dp);
> -void intel_dp_complete_link_train(struct intel_dp *intel_dp);
> void intel_dp_stop_link_train(struct intel_dp *intel_dp);
> void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode);
> void intel_dp_encoder_destroy(struct drm_encoder *encoder);
> --
> 2.4.3
>
> _______________________________________________
> 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
next prev parent reply other threads:[~2015-10-06 8:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-05 7:01 [PATCH 00/15] Making DP link training code more readable Ander Conselvan de Oliveira
2015-10-05 7:01 ` [PATCH 01/15] drm/i915: Rename DP link training functions Ander Conselvan de Oliveira
2015-10-06 8:54 ` Daniel Vetter [this message]
2015-10-05 7:01 ` [PATCH 02/15] drm/i915: Don't pass *DP around to " Ander Conselvan de Oliveira
2015-10-19 4:45 ` Thulasimani, Sivakumar
2015-10-19 7:36 ` Conselvan De Oliveira, Ander
2015-10-19 8:56 ` Ander Conselvan De Oliveira
2015-10-19 9:01 ` Thulasimani, Sivakumar
2015-10-21 13:52 ` [PATCH v2] " Ander Conselvan de Oliveira
2015-10-21 14:08 ` Thulasimani, Sivakumar
2015-10-05 7:01 ` [PATCH 03/15] drm/i915: Split intel_dp_update_link_train() Ander Conselvan de Oliveira
2015-10-05 7:01 ` [PATCH 04/15] drm/i915: Split write of pattern to DP reg from intel_dp_set_link_train Ander Conselvan de Oliveira
2015-10-05 7:01 ` [PATCH 05/15] drm/i915: Don't call intel_dp_set_signal_levels() on link train reset Ander Conselvan de Oliveira
2015-10-05 7:01 ` [PATCH 06/15] drm/i915: Move generic link training code to a separate file Ander Conselvan de Oliveira
2015-10-05 7:01 ` [PATCH 07/15] drm/i915: Create intel_dp->prepare_link_retrain() hook Ander Conselvan de Oliveira
2015-10-05 7:01 ` [PATCH 08/15] drm/i915: Make intel_dp_source_supports_hbr2() take an intel_dp pointer Ander Conselvan de Oliveira
2015-10-05 7:01 ` [PATCH 09/15] drm/i915: Move link training setup code to separate functions Ander Conselvan de Oliveira
2015-10-05 7:01 ` [PATCH 10/15] drm/i915: Move test for max voltage on all lanes to separate function Ander Conselvan de Oliveira
2015-10-05 7:01 ` [PATCH 11/15] drm/i915: Add function for getting the current link training voltage Ander Conselvan de Oliveira
2015-10-05 7:01 ` [PATCH 12/15] drm/i915: Split full retries loop out of clock recovery code Ander Conselvan de Oliveira
2015-10-05 7:01 ` [PATCH 13/15] drm/i915: Make the link training test for same voltage Ander Conselvan de Oliveira
2015-10-06 10:41 ` [PATCH v2] drm/i915: Make the link training test for same voltage smaller Ander Conselvan de Oliveira
2015-10-05 7:01 ` [PATCH 14/15] drm/i915: Move the voltage changed check into intel_get_adjust_train() Ander Conselvan de Oliveira
2015-10-05 7:01 ` [PATCH 15/15] drm/i915: Add missing newline to link training debug message Ander Conselvan de Oliveira
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=20151006085401.GY3383@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=ander.conselvan.de.oliveira@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