From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "José Roberto de Souza" <jose.souza@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/i915/ehl: Remove unsupported cd clocks
Date: Wed, 19 Jun 2019 14:40:55 +0300 [thread overview]
Message-ID: <20190619114055.GV5942@intel.com> (raw)
In-Reply-To: <20190618225035.31816-2-jose.souza@intel.com>
On Tue, Jun 18, 2019 at 03:50:34PM -0700, José Roberto de Souza wrote:
> EHL do not support 648 and 652.8 MHz.
You should modify the max_cdclk() function instead. I think that along
should be sufficient.
>
> BSpec: 20598
> Cc: Clint Taylor <Clinton.A.Taylor@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_cdclk.c | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
> index d560e25d3fb5..26c17ecf2083 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> @@ -1754,7 +1754,8 @@ static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv)
> dev_priv->cdclk.hw.vco = -1;
> }
>
> -static int icl_calc_cdclk(int min_cdclk, unsigned int ref)
> +static int icl_calc_cdclk(struct drm_i915_private *dev_priv, int min_cdclk,
> + unsigned int ref)
> {
> const int ranges_24[] = { 180000, 192000, 312000, 552000, 648000 };
> const int ranges_19_38[] = { 172800, 192000, 307200, 556800, 652800 };
> @@ -1776,6 +1777,12 @@ static int icl_calc_cdclk(int min_cdclk, unsigned int ref)
> break;
> }
>
> + /*
> + * EHL do not support 648 and 652.8 MHz, so just decrement the len
> + */
> + if (IS_ELKHARTLAKE(dev_priv))
> + len--;
> +
> for (i = 0; i < len; i++) {
> if (min_cdclk <= ranges[i])
> return ranges[i];
> @@ -1954,7 +1961,8 @@ static void icl_init_cdclk(struct drm_i915_private *dev_priv)
> DRM_DEBUG_KMS("Sanitizing cdclk programmed by pre-os\n");
>
> sanitized_state.ref = dev_priv->cdclk.hw.ref;
> - sanitized_state.cdclk = icl_calc_cdclk(0, sanitized_state.ref);
> + sanitized_state.cdclk = icl_calc_cdclk(dev_priv, 0,
> + sanitized_state.ref);
> sanitized_state.vco = icl_calc_cdclk_pll_vco(dev_priv,
> sanitized_state.cdclk);
> sanitized_state.voltage_level =
> @@ -2554,7 +2562,7 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state)
> if (min_cdclk < 0)
> return min_cdclk;
>
> - cdclk = icl_calc_cdclk(min_cdclk, ref);
> + cdclk = icl_calc_cdclk(dev_priv, min_cdclk, ref);
> vco = icl_calc_cdclk_pll_vco(dev_priv, cdclk);
>
> state->cdclk.logical.vco = vco;
> @@ -2564,7 +2572,8 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state)
> cnl_compute_min_voltage_level(state));
>
> if (!state->active_crtcs) {
> - cdclk = icl_calc_cdclk(state->cdclk.force_min_cdclk, ref);
> + cdclk = icl_calc_cdclk(dev_priv, state->cdclk.force_min_cdclk,
> + ref);
> vco = icl_calc_cdclk_pll_vco(dev_priv, cdclk);
>
> state->cdclk.actual.vco = vco;
> --
> 2.22.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-06-19 11:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 22:50 [PATCH 1/3] drm/i915/icl: Add new supported CD clocks José Roberto de Souza
2019-06-18 22:50 ` [PATCH 2/3] drm/i915/ehl: Remove unsupported cd clocks José Roberto de Souza
2019-06-19 11:40 ` Ville Syrjälä [this message]
2019-06-19 15:21 ` Jani Nikula
2019-06-20 0:37 ` Souza, Jose
2019-06-18 22:50 ` [PATCH 3/3] drm/i915/ehl: Add voltage level requirement table José Roberto de Souza
2019-06-19 11:43 ` Ville Syrjälä
2019-06-20 0:36 ` Souza, Jose
2019-06-20 10:01 ` Ville Syrjälä
2019-06-18 23:25 ` ✗ Fi.CI.SPARSE: warning for series starting with [1/3] drm/i915/icl: Add new supported CD clocks Patchwork
2019-06-18 23:44 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-06-19 7:43 ` ✗ Fi.CI.SPARSE: warning for series starting with [1/3] drm/i915/icl: Add new supported CD clocks (rev2) Patchwork
2019-06-19 8:09 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-06-19 11:48 ` [PATCH 1/3] drm/i915/icl: Add new supported CD clocks Ville Syrjälä
2019-06-20 0:36 ` Souza, Jose
2019-06-20 10:03 ` Ville Syrjälä
2019-06-19 17:47 ` Ville Syrjälä
2019-06-20 23:33 ` Souza, Jose
2019-06-24 12:39 ` Ville Syrjälä
2019-06-24 21:05 ` Souza, Jose
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=20190619114055.GV5942@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jose.souza@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox