]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915: add note on VLV/CHV hpll_freq and czclk_freq caching
authorJani Nikula <jani.nikula@intel.com>
Wed, 17 Sep 2025 13:52:00 +0000 (16:52 +0300)
committerJani Nikula <jani.nikula@intel.com>
Thu, 18 Sep 2025 06:28:41 +0000 (09:28 +0300)
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>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://lore.kernel.org/r/20250917135200.1932903-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/vlv_clock.c

index 2c55083d8fdbb65da0cb950ab8af5de32e8242ff..42c2837b32c1faac01d2ddcc94aa658f1d8cb1f7 100644 (file)
@@ -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)
 {