All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: add note on VLV/CHV hpll_freq and czclk_freq caching
Date: Wed, 17 Sep 2025 17:04:04 +0300	[thread overview]
Message-ID: <aMq_1JGyQNylvdzm@intel.com> (raw)
In-Reply-To: <20250917135200.1932903-1-jani.nikula@intel.com>

On Wed, Sep 17, 2025 at 04:52:00PM +0300, Jani Nikula wrote:
> The caching at the initial read is a bit fragile in case, say, a further
> refactoring starts reading the frequencies at a time where it's not
> possible. Add a note about it.
> 
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/display/vlv_clock.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/vlv_clock.c b/drivers/gpu/drm/i915/display/vlv_clock.c
> index 2c55083d8fdb..42c2837b32c1 100644
> --- a/drivers/gpu/drm/i915/display/vlv_clock.c
> +++ b/drivers/gpu/drm/i915/display/vlv_clock.c
> @@ -8,6 +8,13 @@
>  #include "vlv_clock.h"
>  #include "vlv_sideband.h"
>  
> +/*
> + * FIXME: The caching of hpll_freq and czclk_freq relies on the first calls
> + * occurring at a time when they can actually be read. This appears to be the
> + * case, but is somewhat fragile. Make the initialization explicit at a point
> + * where they can be reliably read.
> + */
> +
>  /* returns HPLL frequency in kHz */
>  int vlv_clock_get_hpll_vco(struct drm_device *drm)
>  {
> -- 
> 2.47.3

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2025-09-17 14:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17 13:52 [PATCH] drm/i915: add note on VLV/CHV hpll_freq and czclk_freq caching Jani Nikula
2025-09-17 14:04 ` Ville Syrjälä [this message]
2025-09-18  7:25   ` Jani Nikula
2025-09-17 16:35 ` ✓ i915.CI.BAT: success for " Patchwork
2025-09-18  2:52 ` ✗ i915.CI.Full: 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=aMq_1JGyQNylvdzm@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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.