public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/8] drm/i915: Consult aux_ch instead of port in ->get_aux_clock_divider()
Date: Wed, 28 Feb 2018 18:19:55 +0200	[thread overview]
Message-ID: <20180228161955.GN5453@intel.com> (raw)
In-Reply-To: <20180222181036.15251-5-ville.syrjala@linux.intel.com>

On Thu, Feb 22, 2018 at 08:10:33PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> While it seems totally unlikely that any system would mix a cpu/north
> aux channel with a pch/south port (or vice versa) we should still
> consult intel_dp->aux_ch rather than encoder->port when figuring out
> which clock is actually used by the aux ch.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Pushed to dinq with Chris's irc r-b:
15:07 < vsyrjala> a few trivial patches looking for r-bs: https://patchwork.freedesktop.org/patch/206279/
                  https://patchwork.freedesktop.org/patch/206280/
15:41 < ickle> s/_ch/_xfer/ r-b
15:42 < ickle> aux_ch makes sense, but requires some reading for me
16:26 < ickle> vsyrjala: read enough to be happy with AUX_CH_foo, so r-b

> ---
>  drivers/gpu/drm/i915/intel_dp.c | 13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 2c3eb90b9499..8d503be73dbd 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -956,8 +956,7 @@ intel_dp_aux_wait_done(struct intel_dp *intel_dp, bool has_aux_irq)
>  
>  static uint32_t g4x_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
>  {
> -	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> -	struct drm_i915_private *dev_priv = to_i915(intel_dig_port->base.base.dev);
> +	struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp));
>  
>  	if (index)
>  		return 0;
> @@ -971,8 +970,7 @@ static uint32_t g4x_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
>  
>  static uint32_t ilk_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
>  {
> -	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> -	struct drm_i915_private *dev_priv = to_i915(intel_dig_port->base.base.dev);
> +	struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp));
>  
>  	if (index)
>  		return 0;
> @@ -982,7 +980,7 @@ static uint32_t ilk_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
>  	 * like to run at 2MHz.  So, take the cdclk or PCH rawclk value and
>  	 * divide by 2000 and use that
>  	 */
> -	if (intel_dig_port->base.port == PORT_A)
> +	if (intel_dp->aux_ch == AUX_CH_A)
>  		return DIV_ROUND_CLOSEST(dev_priv->cdclk.hw.cdclk, 2000);
>  	else
>  		return DIV_ROUND_CLOSEST(dev_priv->rawclk_freq, 2000);
> @@ -990,10 +988,9 @@ static uint32_t ilk_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
>  
>  static uint32_t hsw_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
>  {
> -	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> -	struct drm_i915_private *dev_priv = to_i915(intel_dig_port->base.base.dev);
> +	struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp));
>  
> -	if (intel_dig_port->base.port != PORT_A && HAS_PCH_LPT_H(dev_priv)) {
> +	if (intel_dp->aux_ch != AUX_CH_A && HAS_PCH_LPT_H(dev_priv)) {
>  		/* Workaround for non-ULT HSW */
>  		switch (index) {
>  		case 0: return 63;
> -- 
> 2.13.6

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-02-28 16:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 18:10 [PATCH 1/8] drm/i915: Use the correct power domain for aux ch Ville Syrjala
2018-02-22 18:10 ` [PATCH 2/8] drm/i915: Add enum aux_ch and clean up the aux init to use it Ville Syrjala
2018-02-22 18:10 ` [PATCH 3/8] drm/i915: Nuke aux regs from intel_dp Ville Syrjala
2018-02-22 18:10 ` [PATCH 4/8] drm/i915: Collect aux ch vfunc setup into intel_dp_aux_init() Ville Syrjala
2018-02-23 15:31   ` Ville Syrjälä
2018-02-22 18:10 ` [PATCH 5/8] drm/i915: Consult aux_ch instead of port in ->get_aux_clock_divider() Ville Syrjala
2018-02-28 16:19   ` Ville Syrjälä [this message]
2018-02-22 18:10 ` [PATCH 6/8] drm/i915: s/intel_dp_aux_ch/intel_dp_aux_xfer/ Ville Syrjala
2018-02-22 18:10 ` [PATCH 7/8] drm/i915: Keep the AKSV details in intel_dp_hdcp_write_an_aksv() Ville Syrjala
2018-02-22 21:20   ` Ville Syrjälä
2018-02-22 21:27   ` [PATCH v2 " Ville Syrjala
2018-02-23 11:10     ` Ramalingam C
2018-02-23 13:46       ` Ville Syrjälä
2018-02-23 14:44         ` Ramalingam C
2018-03-02 16:30           ` Ville Syrjälä
2018-02-22 18:10 ` [PATCH 8/8] drm/i915: Deduplicate the code to fill the aux message header Ville Syrjala
2018-02-22 21:28   ` [PATCH v2 " Ville Syrjala
2018-02-23 11:19     ` Ramalingam C
2018-02-22 18:38 ` ✗ Fi.CI.BAT: failure for series starting with [1/8] drm/i915: Use the correct power domain for aux ch Patchwork
2018-02-22 19:42 ` ✓ Fi.CI.BAT: success " Patchwork
2018-02-22 21:59 ` ✓ Fi.CI.BAT: success for series starting with [1/8] drm/i915: Use the correct power domain for aux ch (rev3) Patchwork
2018-02-23  2:29 ` ✗ Fi.CI.IGT: warning for series starting with [1/8] drm/i915: Use the correct power domain for aux ch Patchwork
2018-02-23  5:19 ` ✗ Fi.CI.IGT: warning for series starting with [1/8] drm/i915: Use the correct power domain for aux ch (rev3) Patchwork
2018-02-23 13:58   ` Ville Syrjälä

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=20180228161955.GN5453@intel.com \
    --to=ville.syrjala@linux.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