All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 10/12] drm/i915: Drop the funky ilk wm setup
Date: Wed, 10 Oct 2018 16:04:52 +0300	[thread overview]
Message-ID: <20181010130454.28557-11-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20181010130454.28557-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Currently we try to disable the wm code entirely for ilk if the BIOS
doesn't provide proper latency values. Now that we have real fallbacks
in place we should be able to alawys rely on the wm code instead.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c |  6 ++----
 drivers/gpu/drm/i915/intel_pm.c      | 20 ++++----------------
 2 files changed, 6 insertions(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index eb324a784f8f..3493da7f102b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5590,8 +5590,7 @@ static void ironlake_crtc_enable(struct intel_crtc_state *pipe_config,
 	 */
 	intel_color_load_luts(&pipe_config->base);
 
-	if (dev_priv->display.initial_watermarks != NULL)
-		dev_priv->display.initial_watermarks(old_intel_state, pipe_config);
+	dev_priv->display.initial_watermarks(old_intel_state, pipe_config);
 	intel_enable_pipe(pipe_config);
 
 	if (pipe_config->has_pch_encoder)
@@ -5738,8 +5737,7 @@ static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,
 	if (!transcoder_is_dsi(cpu_transcoder))
 		intel_ddi_enable_transcoder_func(pipe_config);
 
-	if (dev_priv->display.initial_watermarks != NULL)
-		dev_priv->display.initial_watermarks(old_intel_state, pipe_config);
+	dev_priv->display.initial_watermarks(old_intel_state, pipe_config);
 
 	if (INTEL_GEN(dev_priv) >= 11)
 		icl_pipe_mbus_enable(intel_crtc);
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 62334e413220..7bd29bba81c1 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -9389,22 +9389,10 @@ void intel_init_pm(struct drm_i915_private *dev_priv)
 		dev_priv->display.compute_global_watermarks = skl_compute_wm;
 	} else if (HAS_PCH_SPLIT(dev_priv)) {
 		ilk_setup_wm_latency(dev_priv);
-
-		if ((IS_GEN5(dev_priv) && dev_priv->wm.pri_latency[1] &&
-		     dev_priv->wm.spr_latency[1] && dev_priv->wm.cur_latency[1]) ||
-		    (!IS_GEN5(dev_priv) && dev_priv->wm.pri_latency[0] &&
-		     dev_priv->wm.spr_latency[0] && dev_priv->wm.cur_latency[0])) {
-			dev_priv->display.compute_pipe_wm = ilk_compute_pipe_wm;
-			dev_priv->display.compute_intermediate_wm =
-				ilk_compute_intermediate_wm;
-			dev_priv->display.initial_watermarks =
-				ilk_initial_watermarks;
-			dev_priv->display.optimize_watermarks =
-				ilk_optimize_watermarks;
-		} else {
-			DRM_DEBUG_KMS("Failed to read display plane latency. "
-				      "Disable CxSR\n");
-		}
+		dev_priv->display.compute_pipe_wm = ilk_compute_pipe_wm;
+		dev_priv->display.compute_intermediate_wm = ilk_compute_intermediate_wm;
+		dev_priv->display.initial_watermarks = ilk_initial_watermarks;
+		dev_priv->display.optimize_watermarks = ilk_optimize_watermarks;
 	} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
 		vlv_setup_wm_latency(dev_priv);
 		dev_priv->display.compute_pipe_wm = vlv_compute_pipe_wm;
-- 
2.18.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-10-10 13:10 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 13:04 [PATCH 00/12] drm/i915: Clean up the wm mem latency stuff Ville Syrjala
2018-10-10 13:04 ` [PATCH 01/12] drm/i915: Store all wm memory latency values in .1 usec units Ville Syrjala
2018-10-10 13:12   ` Chris Wilson
2018-10-10 15:35     ` Ville Syrjälä
2018-10-26 18:14   ` [PATCH v2 " Ville Syrjala
2018-10-10 13:04 ` [PATCH 02/12] drm/i915: Use the spr/cur latencies on vlv/chv/g4x Ville Syrjala
2018-10-10 13:04 ` [PATCH 03/12] drm/i915: Eliminate skl_latency[] Ville Syrjala
2018-10-10 13:04 ` [PATCH 04/12] drm/i915: Add dev_priv->wm.num_levels and use it everywhere Ville Syrjala
2018-10-26 18:27   ` [PATCH v2 " Ville Syrjala
2018-10-10 13:04 ` [PATCH 05/12] drm/i915: Add DEFINE_SNPRINTF_ARRAY() Ville Syrjala
2018-10-11 12:14   ` Jani Nikula
2018-10-11 12:47     ` Ville Syrjälä
2018-10-11 16:07       ` Jani Nikula
2018-10-10 13:04 ` [PATCH 06/12] drm/i915: Make the WM memory latency print more compact Ville Syrjala
2018-10-10 13:04 ` [PATCH 07/12] drm/i915: Eliminate redundant ilk sprite/cursor wm fixup code Ville Syrjala
2018-10-10 13:04 ` [PATCH 08/12] drm/i915: Split skl+ and ilk+ read_wm_latency() Ville Syrjala
2018-10-26 18:45   ` [PATCH v2 " Ville Syrjala
2018-10-10 13:04 ` [PATCH 09/12] drm/i915: Sanitize wm latency values for ilk+ Ville Syrjala
2018-10-26 19:11   ` [PATCH v2 " Ville Syrjala
2018-10-10 13:04 ` Ville Syrjala [this message]
2018-10-10 13:04 ` [PATCH 11/12] drm/i915: Allow LP3 watermarks on ILK Ville Syrjala
2018-10-10 13:04 ` [PATCH 12/12] drm/i915: Remove the remnants of the ilk+ LP0 wm hack Ville Syrjala
2018-10-10 14:34 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Clean up the wm mem latency stuff Patchwork
2018-10-10 14:38 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-10-10 14:50 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-10-26 18:17 ` ✗ Fi.CI.BAT: failure for drm/i915: Clean up the wm mem latency stuff (rev2) Patchwork
2018-10-26 18:37 ` ✗ Fi.CI.BAT: failure for drm/i915: Clean up the wm mem latency stuff (rev3) Patchwork
2018-10-26 19:01 ` ✗ Fi.CI.BAT: failure for drm/i915: Clean up the wm mem latency stuff (rev4) Patchwork
2018-10-26 19:29 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Clean up the wm mem latency stuff (rev5) Patchwork
2018-10-26 19:34 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-10-26 19:47 ` ✓ Fi.CI.BAT: success " Patchwork
2018-10-27  5:17 ` ✓ Fi.CI.IGT: " Patchwork

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=20181010130454.28557-11-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.