drm/i915/gt: Extract per-platform function for frequency read
authorLucas De Marchi <lucas.demarchi@intel.com>
Tue, 13 Sep 2022 21:09:57 +0000 (14:09 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 15 Sep 2022 00:32:39 +0000 (17:32 -0700)
commit1416b5473d34d89a85c02889b724f32b56ef12ea
tree065077f333833a604666ab385da2591511139716
parent29a051bd468cba31c227af579a7c57f250570cfa
drm/i915/gt: Extract per-platform function for frequency read

Instead of calling read_clock_frequency() to walk the if/else ladder
per platform, move the ladder to intel_gt_init_clock_frequency() and
use one function per branch.

With the new logic, it's now clear the call to
gen9_get_crystal_clock_freq() was just dead code, as gen9 is handled by
another function and there is no version 10. Remove that function and
the caller.

v2: Correctly handle intel_gt_check_clock_frequency() that also calls
the function to read clock frequency (Gustavo)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220908-if-ladder-v2-2-7a7b15545c93@intel.com
drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c