Message ID | 20230906234732.3728630-10-matthew.d.roper@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Separate display workarounds from clock gating | expand |
On Wed, Sep 06, 2023 at 04:47:37PM -0700, Matt Roper wrote: >Rather than applying display workarounds as part of >intel_clock_gating_init() (which in turn is confusingly called from >i915_gem_init during device probe), handle them at the point we're >actually initializing the display hardware. This will also ensure that >these workarounds are properly applied during display initialization on >the Xe driver, which re-uses i915's display code, but does not call >i915's gem init. > >Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Lucas De Marchi >--- > drivers/gpu/drm/i915/display/intel_display_driver.c | 3 +++ > drivers/gpu/drm/i915/intel_clock_gating.c | 3 --- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c >index 8f144d4d3c39..9d9b034b9bdc 100644 >--- a/drivers/gpu/drm/i915/display/intel_display_driver.c >+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c >@@ -31,6 +31,7 @@ > #include "intel_display_irq.h" > #include "intel_display_power.h" > #include "intel_display_types.h" >+#include "intel_display_wa.h" > #include "intel_dkl_phy.h" > #include "intel_dmc.h" > #include "intel_dp.h" >@@ -88,6 +89,8 @@ void intel_display_driver_init_hw(struct drm_i915_private *i915) > intel_update_cdclk(i915); > intel_cdclk_dump_config(i915, &i915->display.cdclk.hw, "Current CDCLK"); > cdclk_state->logical = cdclk_state->actual = i915->display.cdclk.hw; >+ >+ intel_display_wa_apply(i915); > } > > static const struct drm_mode_config_funcs intel_mode_funcs = { >diff --git a/drivers/gpu/drm/i915/intel_clock_gating.c b/drivers/gpu/drm/i915/intel_clock_gating.c >index abfb6bdbd367..9c21ce69bd98 100644 >--- a/drivers/gpu/drm/i915/intel_clock_gating.c >+++ b/drivers/gpu/drm/i915/intel_clock_gating.c >@@ -28,7 +28,6 @@ > #include "display/intel_de.h" > #include "display/intel_display.h" > #include "display/intel_display_trace.h" >-#include "display/intel_display_wa.h" > #include "display/skl_watermark.h" > > #include "gt/intel_engine_regs.h" >@@ -750,8 +749,6 @@ static void i830_init_clock_gating(struct drm_i915_private *i915) > void intel_clock_gating_init(struct drm_i915_private *i915) > { > i915->clock_gating_funcs->init_clock_gating(i915); >- >- intel_display_wa_apply(i915); > } > > static void nop_init_clock_gating(struct drm_i915_private *i915) >-- >2.41.0 >
diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index 8f144d4d3c39..9d9b034b9bdc 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -31,6 +31,7 @@ #include "intel_display_irq.h" #include "intel_display_power.h" #include "intel_display_types.h" +#include "intel_display_wa.h" #include "intel_dkl_phy.h" #include "intel_dmc.h" #include "intel_dp.h" @@ -88,6 +89,8 @@ void intel_display_driver_init_hw(struct drm_i915_private *i915) intel_update_cdclk(i915); intel_cdclk_dump_config(i915, &i915->display.cdclk.hw, "Current CDCLK"); cdclk_state->logical = cdclk_state->actual = i915->display.cdclk.hw; + + intel_display_wa_apply(i915); } static const struct drm_mode_config_funcs intel_mode_funcs = { diff --git a/drivers/gpu/drm/i915/intel_clock_gating.c b/drivers/gpu/drm/i915/intel_clock_gating.c index abfb6bdbd367..9c21ce69bd98 100644 --- a/drivers/gpu/drm/i915/intel_clock_gating.c +++ b/drivers/gpu/drm/i915/intel_clock_gating.c @@ -28,7 +28,6 @@ #include "display/intel_de.h" #include "display/intel_display.h" #include "display/intel_display_trace.h" -#include "display/intel_display_wa.h" #include "display/skl_watermark.h" #include "gt/intel_engine_regs.h" @@ -750,8 +749,6 @@ static void i830_init_clock_gating(struct drm_i915_private *i915) void intel_clock_gating_init(struct drm_i915_private *i915) { i915->clock_gating_funcs->init_clock_gating(i915); - - intel_display_wa_apply(i915); } static void nop_init_clock_gating(struct drm_i915_private *i915)
Rather than applying display workarounds as part of intel_clock_gating_init() (which in turn is confusingly called from i915_gem_init during device probe), handle them at the point we're actually initializing the display hardware. This will also ensure that these workarounds are properly applied during display initialization on the Xe driver, which re-uses i915's display code, but does not call i915's gem init. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> --- drivers/gpu/drm/i915/display/intel_display_driver.c | 3 +++ drivers/gpu/drm/i915/intel_clock_gating.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-)