From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 8/9] drm/dp: Export AUX_RETRY_INTERVAL
Date: Wed, 31 Jan 2018 23:04:16 -0800 [thread overview]
Message-ID: <20180201070416.mlnoteujvuum7l22@intel.com> (raw)
In-Reply-To: <20180127024923.3093-8-dhinakaran.pandiyan@intel.com>
On Sat, Jan 27, 2018 at 02:49:22AM +0000, Dhinakaran Pandiyan wrote:
> Drivers can use this in their retry loops too.
with all this layers of retries it is good that we find some consistency somewhere
is this written down on any part of eDP spec?
Last time I saw there was different retries values on different cases.
So I'm afraid this here would confuse instead of helping.
>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
> drivers/gpu/drm/drm_dp_helper.c | 12 +++++-------
> include/drm/drm_dp_helper.h | 2 ++
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
> index ffe14ec3e7f2..0a7c8d6e7d8c 100644
> --- a/drivers/gpu/drm/drm_dp_helper.c
> +++ b/drivers/gpu/drm/drm_dp_helper.c
> @@ -169,8 +169,6 @@ int drm_dp_bw_code_to_link_rate(u8 link_bw)
> }
> EXPORT_SYMBOL(drm_dp_bw_code_to_link_rate);
>
> -#define AUX_RETRY_INTERVAL 500 /* us */
> -
> /**
> * DOC: dp helpers
> *
> @@ -206,8 +204,8 @@ static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request,
> */
> for (retry = 0; retry < 32; retry++) {
> if (ret != 0 && ret != -ETIMEDOUT) {
> - usleep_range(AUX_RETRY_INTERVAL,
> - AUX_RETRY_INTERVAL + 100);
> + usleep_range(DP_AUX_RETRY_INTERVAL,
> + DP_AUX_RETRY_INTERVAL + 100);
> }
>
> ret = aux->transfer(aux, &msg);
> @@ -718,7 +716,7 @@ static int drm_dp_i2c_retry_count(const struct drm_dp_aux_msg *msg,
> drm_dp_aux_reply_duration(msg);
> int i2c_time_us = drm_dp_i2c_msg_duration(msg, i2c_speed_khz);
>
> - return DIV_ROUND_UP(i2c_time_us, aux_time_us + AUX_RETRY_INTERVAL);
> + return DIV_ROUND_UP(i2c_time_us, aux_time_us + DP_AUX_RETRY_INTERVAL);
> }
>
> /*
> @@ -795,7 +793,7 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
> * For now just defer for long enough to hopefully be
> * safe for all use-cases.
> */
> - usleep_range(AUX_RETRY_INTERVAL, AUX_RETRY_INTERVAL + 100);
> + usleep_range(DP_AUX_RETRY_INTERVAL, DP_AUX_RETRY_INTERVAL + 100);
> continue;
>
> default:
> @@ -827,7 +825,7 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
> aux->i2c_defer_count++;
> if (defer_i2c < 7)
> defer_i2c++;
> - usleep_range(AUX_RETRY_INTERVAL, AUX_RETRY_INTERVAL + 100);
> + usleep_range(DP_AUX_RETRY_INTERVAL, DP_AUX_RETRY_INTERVAL + 100);
> drm_dp_i2c_msg_write_status_update(msg);
>
> continue;
> diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
> index c239e6e24a10..2eae1aed2d26 100644
> --- a/include/drm/drm_dp_helper.h
> +++ b/include/drm/drm_dp_helper.h
> @@ -61,6 +61,8 @@
> #define DP_AUX_I2C_REPLY_DEFER (0x2 << 2)
> #define DP_AUX_I2C_REPLY_MASK (0x3 << 2)
>
> +#define DP_AUX_RETRY_INTERVAL 500 /* us */
> +
> /* AUX CH addresses */
> /* DPCD */
> #define DP_DPCD_REV 0x000
> --
> 2.14.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-02-01 7:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-27 2:49 [PATCH 1/9] drm/i915/psr: Do not activate PSR on frontbuffer flush from fbdev Dhinakaran Pandiyan
2018-01-27 2:49 ` [PATCH 2/9] drm/i915/frontbuffer: Mark frontbuffer flush and invalidate with might_sleep() Dhinakaran Pandiyan
2018-02-01 6:42 ` Rodrigo Vivi
2018-01-27 2:49 ` [PATCH 3/9] drm/i915/psr: Extract PSR DPCD initialization and move it to intel_psr.c Dhinakaran Pandiyan
2018-01-31 10:38 ` David Weinehall
2018-02-01 6:57 ` Rodrigo Vivi
2018-01-27 2:49 ` [PATCH 4/9] drm/i915/psr: Check for the specific AUX_FRAME_SYNC cap bit Dhinakaran Pandiyan
2018-02-01 6:48 ` Rodrigo Vivi
2018-02-05 19:47 ` Pandiyan, Dhinakaran
2018-01-27 2:49 ` [PATCH 5/9] drm/i915/psr: Inline psr2 caps checks Dhinakaran Pandiyan
2018-01-27 10:29 ` Jani Nikula
2018-01-27 2:49 ` [PATCH 6/9] drm/i915/dp: Remove redundant sleep after AUX transaction length check Dhinakaran Pandiyan
2018-01-31 10:40 ` David Weinehall
2018-01-27 2:49 ` [PATCH 7/9] drm/i915/dp: Move comment about hw timeout to the right place Dhinakaran Pandiyan
2018-01-31 10:38 ` David Weinehall
2018-01-27 2:49 ` [PATCH 8/9] drm/dp: Export AUX_RETRY_INTERVAL Dhinakaran Pandiyan
2018-02-01 7:04 ` Rodrigo Vivi [this message]
2018-01-27 2:49 ` [PATCH 9/9] drm/i915/dp: Use the same aux retry interval as the core Dhinakaran Pandiyan
2018-02-01 7:04 ` Rodrigo Vivi
2018-01-27 3:09 ` ✗ Fi.CI.BAT: failure for series starting with [1/9] drm/i915/psr: Do not activate PSR on frontbuffer flush from fbdev Patchwork
2018-02-01 6:56 ` [PATCH 1/9] " Rodrigo Vivi
2018-02-07 2:27 ` Pandiyan, Dhinakaran
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=20180201070416.mlnoteujvuum7l22@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=dhinakaran.pandiyan@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--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