summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_clock_gating.c
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2023-09-06 16:47:34 -0700
committerMatt Roper <matthew.d.roper@intel.com>2023-09-08 15:45:07 -0700
commit7ed888fa78129941255af09eddbf4cc51a3351d1 (patch)
tree00428de5cedd54ea19ef0eecce10e3c3a658b573 /drivers/gpu/drm/i915/intel_clock_gating.c
parent231b1d6c9ab6ff23f7a1826835946dd2b0f57156 (diff)
drm/i915: Stop forcing clock gating init for future platforms
In the early days of i915, pretty much every platform needed to initialize _something_ in the clock gating init functions. In some cases the items initialized were inside the GT (and really should have been initialized through the GT workaround infrastructure instead). In other cases they were display programming (sometimes not even related to "clock gating" at all!) which probably needs to move inside the display-specific code. The number of initialization tasks that are truly "clock gating" and don't fall within the GT or display domains is relatively limited. Let's stop forcing future platforms to always define a clock gating init hook. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230906234732.3728630-7-matthew.d.roper@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_clock_gating.c')
-rw-r--r--drivers/gpu/drm/i915/intel_clock_gating.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_clock_gating.c b/drivers/gpu/drm/i915/intel_clock_gating.c
index 81a4d32734e9..90b180492c22 100644
--- a/drivers/gpu/drm/i915/intel_clock_gating.c
+++ b/drivers/gpu/drm/i915/intel_clock_gating.c
@@ -843,9 +843,7 @@ CG_FUNCS(nop);
*/
void intel_clock_gating_hooks_init(struct drm_i915_private *i915)
{
- if (IS_METEORLAKE(i915))
- i915->clock_gating_funcs = &nop_clock_gating_funcs;
- else if (IS_PONTEVECCHIO(i915))
+ if (IS_PONTEVECCHIO(i915))
i915->clock_gating_funcs = &pvc_clock_gating_funcs;
else if (IS_DG2(i915))
i915->clock_gating_funcs = &dg2_clock_gating_funcs;
@@ -853,7 +851,7 @@ void intel_clock_gating_hooks_init(struct drm_i915_private *i915)
i915->clock_gating_funcs = &xehpsdv_clock_gating_funcs;
else if (IS_ALDERLAKE_P(i915))
i915->clock_gating_funcs = &adlp_clock_gating_funcs;
- else if (GRAPHICS_VER(i915) == 12)
+ else if (DISPLAY_VER(i915) == 12)
i915->clock_gating_funcs = &gen12lp_clock_gating_funcs;
else if (GRAPHICS_VER(i915) == 11)
i915->clock_gating_funcs = &icl_clock_gating_funcs;
@@ -893,8 +891,6 @@ void intel_clock_gating_hooks_init(struct drm_i915_private *i915)
i915->clock_gating_funcs = &i85x_clock_gating_funcs;
else if (GRAPHICS_VER(i915) == 2)
i915->clock_gating_funcs = &i830_clock_gating_funcs;
- else {
- MISSING_CASE(INTEL_DEVID(i915));
+ else
i915->clock_gating_funcs = &nop_clock_gating_funcs;
- }
}