diff options
| author | Anusha Srivatsa <anusha.srivatsa@intel.com> | 2022-11-17 15:00:00 -0800 |
|---|---|---|
| committer | Anusha Srivatsa <anusha.srivatsa@intel.com> | 2022-11-21 14:37:30 -0800 |
| commit | 9a0a4ec530a7514ccd6061ecdeaf719a03cb34cd (patch) | |
| tree | 5e031dd6d5ba841ac2986df85283f321a6455dde /lib/timerqueue.c | |
| parent | f322ed0d76ef0c0f2be99780c2a40ac405411cf5 (diff) | |
drm/i915/display: Add missing checks for cdclk crawling
cdclk_sanitize() function was written assuming vco was a signed integer.
vco gets assigned to -1 (essentially ~0) for the case where PLL
might be enabled and vco is not a frequency that will ever
get used. In such a scenario the right thing to do is disable the
PLL and re-enable it again with a valid frequency.
However the vco is declared as a unsigned variable.
With the above assumption, driver takes crawl path when not needed.
Add explicit check to not crawl in the case of an invalid PLL.
v2: Move the check from .h to .c (MattR)
- Move check to bxt_set_cdclk() instead of
intel_modeset_calc_cdclk() which is directly in
the path of the sanitize() function (Ville)
v3: remove unwanted parenthesis(Ville)
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221117230002.792096-1-anusha.srivatsa@intel.com
Diffstat (limited to 'lib/timerqueue.c')
0 files changed, 0 insertions, 0 deletions
