Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: matthew.d.roper@intel.com
Subject: [Intel-gfx] [PATCH 4/4] drm/i915/display: Apply workarounds during display init
Date: Wed,  6 Sep 2023 16:47:37 -0700	[thread overview]
Message-ID: <20230906234732.3728630-10-matthew.d.roper@intel.com> (raw)
In-Reply-To: <20230906234732.3728630-6-matthew.d.roper@intel.com>

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(-)

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


  parent reply	other threads:[~2023-09-06 23:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 23:47 [Intel-gfx] [PATCH 0/4] Separate display workarounds from clock gating Matt Roper
2023-09-06 23:47 ` [Intel-gfx] [PATCH 1/4] drm/i915: Stop forcing clock gating init for future platforms Matt Roper
2023-09-08 21:45   ` Lucas De Marchi
2023-09-08 21:50     ` Matt Roper
2023-09-08 21:57       ` Lucas De Marchi
2023-09-06 23:47 ` [Intel-gfx] [PATCH 2/4] drm/i915/adlp: Stop calling gen12lp_init_clock_gating() Matt Roper
2023-09-08 21:46   ` Lucas De Marchi
2023-09-06 23:47 ` [Intel-gfx] [PATCH 3/4] drm/i915/display: Extract display workarounds from clock gating init Matt Roper
2023-09-07  0:10   ` [Intel-gfx] [PATCH v2 " Matt Roper
2023-09-08 21:51   ` [Intel-gfx] [PATCH " Lucas De Marchi
2023-09-06 23:47 ` Matt Roper [this message]
2023-09-08 21:52   ` [Intel-gfx] [PATCH 4/4] drm/i915/display: Apply workarounds during display init Lucas De Marchi
2023-09-06 23:55 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Separate display workarounds from clock gating Patchwork
2023-09-07  1:25 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Separate display workarounds from clock gating (rev2) Patchwork
2023-09-07  1:25 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-07  1:42 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-09-07 20:04 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Separate display workarounds from clock gating (rev3) Patchwork
2023-09-07 20:04 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-07 20:22 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-09-08  2:03 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Separate display workarounds from clock gating (rev4) Patchwork
2023-09-08  2:03 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-08  2:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-09-08  6:32 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-09-08 23:01   ` Matt Roper
2023-09-11  9:04     ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230906234732.3728630-10-matthew.d.roper@intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox