From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 04/14] drm/i915/dpio: Fix VLV DPIO PLL register dword numbering
Date: Mon, 22 Apr 2024 12:41:32 +0300 [thread overview]
Message-ID: <87cyqhvinn.fsf@intel.com> (raw)
In-Reply-To: <20240422083457.23815-5-ville.syrjala@linux.intel.com>
On Mon, 22 Apr 2024, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The spreadsheet defines the PLL register block as having
> the dwords in the following order:
>
> block dwords offsets
> PLL1 0x0-0x7 0x00-0x1f
> PLL2 0x0-0x7 0x20-0x2f
> PLL1ext 0x10-0x1f 0x40-0x5f
> PLL2ext 0x10-0x1f 0x60-0x7f
>
> So dword indexes 0x8-0xf don't even exist. Renumber
> our register defines to match.
>
> Note that the spreadsheet used hex numbering whereas our
> defiens are in decimal. Perhaps we should change that?
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
I am, again, taking your word for it, instead of going on a wild goose
chase trying to find all the specs. The patch matches the commit
message,
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dpll.c | 18 ++++++++---------
> drivers/gpu/drm/i915/i915_reg.h | 24 +++++++++++------------
> 2 files changed, 21 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dpll.c b/drivers/gpu/drm/i915/display/intel_dpll.c
> index 7e8aca3c87ec..b95032651da0 100644
> --- a/drivers/gpu/drm/i915/display/intel_dpll.c
> +++ b/drivers/gpu/drm/i915/display/intel_dpll.c
> @@ -1875,19 +1875,19 @@ static void vlv_pllb_recal_opamp(struct drm_i915_private *dev_priv,
> * PLLB opamp always calibrates to max value of 0x3f, force enable it
> * and set it to a reasonable value instead.
> */
> - reg_val = vlv_dpio_read(dev_priv, phy, VLV_PLL_DW9(1));
> + reg_val = vlv_dpio_read(dev_priv, phy, VLV_PLL_DW17(1));
> reg_val &= 0xffffff00;
> reg_val |= 0x00000030;
> - vlv_dpio_write(dev_priv, phy, VLV_PLL_DW9(1), reg_val);
> + vlv_dpio_write(dev_priv, phy, VLV_PLL_DW17(1), reg_val);
>
> reg_val = vlv_dpio_read(dev_priv, phy, VLV_REF_DW11);
> reg_val &= 0x00ffffff;
> reg_val |= 0x8c000000;
> vlv_dpio_write(dev_priv, phy, VLV_REF_DW11, reg_val);
>
> - reg_val = vlv_dpio_read(dev_priv, phy, VLV_PLL_DW9(1));
> + reg_val = vlv_dpio_read(dev_priv, phy, VLV_PLL_DW17(1));
> reg_val &= 0xffffff00;
> - vlv_dpio_write(dev_priv, phy, VLV_PLL_DW9(1), reg_val);
> + vlv_dpio_write(dev_priv, phy, VLV_PLL_DW17(1), reg_val);
>
> reg_val = vlv_dpio_read(dev_priv, phy, VLV_REF_DW11);
> reg_val &= 0x00ffffff;
> @@ -1923,9 +1923,9 @@ static void vlv_prepare_pll(const struct intel_crtc_state *crtc_state)
> vlv_dpio_write(dev_priv, phy, VLV_PCS_DW17_BCAST, 0x0100000f);
>
> /* Disable target IRef on PLL */
> - reg_val = vlv_dpio_read(dev_priv, phy, VLV_PLL_DW8(pipe));
> + reg_val = vlv_dpio_read(dev_priv, phy, VLV_PLL_DW16(pipe));
> reg_val &= 0x00ffffff;
> - vlv_dpio_write(dev_priv, phy, VLV_PLL_DW8(pipe), reg_val);
> + vlv_dpio_write(dev_priv, phy, VLV_PLL_DW16(pipe), reg_val);
>
> /* Disable fast lock */
> vlv_dpio_write(dev_priv, phy, VLV_CMN_DW0, 0x610);
> @@ -1951,10 +1951,10 @@ static void vlv_prepare_pll(const struct intel_crtc_state *crtc_state)
> if (crtc_state->port_clock == 162000 ||
> intel_crtc_has_type(crtc_state, INTEL_OUTPUT_ANALOG) ||
> intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
> - vlv_dpio_write(dev_priv, phy, VLV_PLL_DW10(pipe),
> + vlv_dpio_write(dev_priv, phy, VLV_PLL_DW18(pipe),
> 0x009f0003);
> else
> - vlv_dpio_write(dev_priv, phy, VLV_PLL_DW10(pipe),
> + vlv_dpio_write(dev_priv, phy, VLV_PLL_DW18(pipe),
> 0x00d0000f);
>
> if (intel_crtc_has_dp_encoder(crtc_state)) {
> @@ -1981,7 +1981,7 @@ static void vlv_prepare_pll(const struct intel_crtc_state *crtc_state)
> coreclk |= 0x01000000;
> vlv_dpio_write(dev_priv, phy, VLV_PLL_DW7(pipe), coreclk);
>
> - vlv_dpio_write(dev_priv, phy, VLV_PLL_DW11(pipe), 0x87871000);
> + vlv_dpio_write(dev_priv, phy, VLV_PLL_DW19(pipe), 0x87871000);
>
> vlv_dpio_put(dev_priv);
> }
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 8f3c83d2ab8d..747221f8ac72 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -229,21 +229,21 @@
> #define _VLV_PLL_DW7_CH1 0x803c
> #define VLV_PLL_DW7(ch) _PIPE(ch, _VLV_PLL_DW7_CH0, _VLV_PLL_DW7_CH1)
>
> -#define _VLV_PLL_DW8_CH0 0x8040
> -#define _VLV_PLL_DW8_CH1 0x8060
> -#define VLV_PLL_DW8(ch) _PIPE(ch, _VLV_PLL_DW8_CH0, _VLV_PLL_DW8_CH1)
> +#define _VLV_PLL_DW16_CH0 0x8040
> +#define _VLV_PLL_DW16_CH1 0x8060
> +#define VLV_PLL_DW16(ch) _PIPE(ch, _VLV_PLL_DW16_CH0, _VLV_PLL_DW16_CH1)
>
> -#define _VLV_PLL_DW9_CH0 0x8044
> -#define _VLV_PLL_DW9_CH1 0x8064
> -#define VLV_PLL_DW9(ch) _PIPE(ch, _VLV_PLL_DW9_CH0, _VLV_PLL_DW9_CH1)
> +#define _VLV_PLL_DW17_CH0 0x8044
> +#define _VLV_PLL_DW17_CH1 0x8064
> +#define VLV_PLL_DW17(ch) _PIPE(ch, _VLV_PLL_DW17_CH0, _VLV_PLL_DW17_CH1)
>
> -#define _VLV_PLL_DW10_CH0 0x8048
> -#define _VLV_PLL_DW10_CH1 0x8068
> -#define VLV_PLL_DW10(ch) _PIPE(ch, _VLV_PLL_DW10_CH0, _VLV_PLL_DW10_CH1)
> +#define _VLV_PLL_DW18_CH0 0x8048
> +#define _VLV_PLL_DW18_CH1 0x8068
> +#define VLV_PLL_DW18(ch) _PIPE(ch, _VLV_PLL_DW18_CH0, _VLV_PLL_DW18_CH1)
>
> -#define _VLV_PLL_DW11_CH0 0x804c
> -#define _VLV_PLL_DW11_CH1 0x806c
> -#define VLV_PLL_DW11(ch) _PIPE(ch, _VLV_PLL_DW11_CH0, _VLV_PLL_DW11_CH1)
> +#define _VLV_PLL_DW19_CH0 0x804c
> +#define _VLV_PLL_DW19_CH1 0x806c
> +#define VLV_PLL_DW19(ch) _PIPE(ch, _VLV_PLL_DW19_CH0, _VLV_PLL_DW19_CH1)
>
> /* Spec for ref block start counts at DW8 */
> #define VLV_REF_DW11 0x80ac
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-04-22 9:41 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-22 8:34 [PATCH 00/14] drm/i915: VLV/CHV DPIO register cleanup Ville Syrjala
2024-04-22 8:34 ` [PATCH 01/14] drm/i915/dpio: Remove pointless VLV_PCS01_DW8 read Ville Syrjala
2024-04-22 8:58 ` Jani Nikula
2024-04-22 8:34 ` [PATCH 02/14] drm/i915/dpio: s/VLV_REF_DW13/VLV_REF_DW11/ Ville Syrjala
2024-04-22 9:01 ` Jani Nikula
2024-04-22 8:34 ` [PATCH 03/14] drm/i915/dpio: s/VLV_PLL_DW9_BCAST/VLV_PCS_DW17_BCAST/ Ville Syrjala
2024-04-22 9:02 ` Jani Nikula
2024-04-22 8:34 ` [PATCH 04/14] drm/i915/dpio: Fix VLV DPIO PLL register dword numbering Ville Syrjala
2024-04-22 9:41 ` Jani Nikula [this message]
2024-04-22 8:34 ` [PATCH 05/14] drm/i915/dpio: Remove pointless variables from vlv/chv DPLL code Ville Syrjala
2024-04-22 9:54 ` Jani Nikula
2024-04-22 8:34 ` [PATCH 06/14] drm/i915/dpio: Rename some variables Ville Syrjala
2024-04-22 9:56 ` Jani Nikula
2024-04-22 8:34 ` [PATCH 07/14] drm/i915/dpio: s/port/ch/ Ville Syrjala
2024-04-22 9:59 ` Jani Nikula
2024-04-22 8:34 ` [PATCH 08/14] drm/i915/dpio: s/pipe/ch/ Ville Syrjala
2024-04-22 10:02 ` Jani Nikula
2024-04-22 8:34 ` [PATCH 09/14] drm/i915/dpio: Derive the phy from the port rather than pipe in encoder hooks Ville Syrjala
2024-04-22 10:10 ` Jani Nikula
2024-04-23 8:46 ` Ville Syrjälä
2024-04-23 9:20 ` Jani Nikula
2024-04-22 8:34 ` [PATCH 10/14] drm/i915/dpio: Give VLV DPIO group register a clearer name Ville Syrjala
2024-04-22 10:12 ` Jani Nikula
2024-04-22 8:34 ` [PATCH 11/14] drm/i915/dpio: Rename a few CHV DPIO PHY registers Ville Syrjala
2024-04-22 10:16 ` Jani Nikula
2024-04-22 8:34 ` [PATCH 12/14] drm/i915/dpio: Clean up VLV/CHV DPIO PHY register defines Ville Syrjala
2024-04-23 9:18 ` Jani Nikula
2024-04-22 8:34 ` [PATCH 13/14] drm/i915/dpio: Clean up the vlv/chv PHY register bits Ville Syrjala
2024-04-22 12:46 ` Jani Nikula
2024-04-23 7:58 ` Ville Syrjälä
2024-04-22 8:34 ` [PATCH 14/14] drm/i915/dpio: Extract vlv_dpio_phy_regs.h Ville Syrjala
2024-04-22 12:50 ` Jani Nikula
2024-04-22 10:01 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: VLV/CHV DPIO register cleanup Patchwork
2024-04-22 10:08 ` ✓ Fi.CI.BAT: success " Patchwork
2024-04-26 10:19 ` Jani Nikula
2024-04-30 11:43 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: VLV/CHV DPIO register cleanup (rev2) Patchwork
2024-04-30 11:43 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-04-30 11:49 ` ✓ Fi.CI.BAT: success " Patchwork
2024-04-30 15:31 ` ✗ Fi.CI.IGT: failure " 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=87cyqhvinn.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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.