mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
drm/i915: Add fallback for CDCLK selection when min_cdclk is too high
In cases where the requested minimum CDCLK exceeds all available values for the current reference clock, the CDCLK selection logic previously returned 0. This could result coverity division or modulo by zero issue. Introduce a fallback mechanism that returns platform's max_cdclk_freq instead of 0. v2: Update safe fallback value to max cdclk. (Ville) v3: Update commit messgae (Mika) Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20251017150526.781715-1-ramanaidu.naladala@intel.com
This commit is contained in:
committed by
Suraj Kandpal
parent
938c6c9be3
commit
bbbfa70dfe
@@ -1561,7 +1561,7 @@ static int bxt_calc_cdclk(struct intel_display *display, int min_cdclk)
|
||||
drm_WARN(display->drm, 1,
|
||||
"Cannot satisfy minimum cdclk %d with refclk %u\n",
|
||||
min_cdclk, display->cdclk.hw.ref);
|
||||
return 0;
|
||||
return display->cdclk.max_cdclk_freq;
|
||||
}
|
||||
|
||||
static int bxt_calc_cdclk_pll_vco(struct intel_display *display, int cdclk)
|
||||
|
||||
Reference in New Issue
Block a user