FAILED: patch "[PATCH] drm/i915: Move init_clock_gating() back to where it was" failed to apply to 4.14-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
6ac43272768ca901daac4076a66c2c4e3c7b9321Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <[email protected]>
Date: Wed, 8 Nov 2017 15:35:55 +0200
Subject: [PATCH] drm/i915: Move init_clock_gating() back to where it was
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Apparently setting up a bunch of GT registers before we've properly initialized the rest of the GT hardware leads to these setting being lost. So looks like I broke HSW with commit b7048ea12fbb ("drm/i915:
Do .init_clock_gating() earlier to avoid it clobbering watermarks") by doing init_clock_gating() too early. This should actually affect other platforms as well, but apparently not to such a great degree.
What I was ultimately after in that commit was to move the ilk_init_lp_watermarks() call earlier. So let's undo the damage and move init_clock_gating() back to where it was, and call ilk_init_lp_watermarks() just before the watermark state readout.
This highlights how fragile and messed up our init order really is. I wonder why we even initialize the display before gem. The opposite order would make much more sense to me...
v2: Keep WaRsPkgCStateDisplayPMReq:hsw early as it really must
be done before all planes might get disabled.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103549
References: https://lists.freedesktop.org/archives/intel-gfx/2017-November/145432.html
drivers/gpu/drm/i915/intel_display.c +12 -2
@@ -3676,6 +3676,7 @@ void intel_finish_reset(struct drm_i915_private *dev_priv)intel_pps_unlock_regs_wa (dev_priv);intel_modeset_init_hw (dev); +intel_init_clock_gating (dev_priv);spin_lock_irq (&dev_priv->irq_lock);if (dev_priv->display.hpd_irq_setup)
@@ -14350,8 +14351,6 @@ void intel_modeset_init_hw(struct drm_device *dev)intel_update_cdclk (dev_priv); dev_priv->cdclk.logical = dev_priv->cdclk.actual = dev_priv->cdclk.hw; - -intel_init_clock_gating (dev_priv); }/*
@@ -15063,6 +15062,15 @@ intel_modeset_setup_hw_state(struct drm_device *dev,struct intel_encoder *encoder;int i; +if (IS_HASWELL (dev_priv)) { +/* +* WaRsPkgCStateDisplayPMReq:hsw +* System hang if this isn't done before disabling all planes! +*/ +I915_WRITE (CHICKEN_PAR1_1 , +I915_READ (CHICKEN_PAR1_1 ) |FORCE_ARB_IDLE_PLANES ); + } +intel_modeset_readout_hw_state (dev);/* HW state is read out, now we need to sanitize this mess. */
@@ -15160,6 +15168,8 @@ void intel_modeset_gem_init(struct drm_device *dev)intel_init_gt_powersave (dev_priv); +intel_init_clock_gating (dev_priv); +intel_setup_overlay (dev_priv); }
drivers/gpu/drm/i915/intel_pm.c +18 -26
98 lines not on this page · raw message