Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 01/13] drm/i915: Re-init clock gating on coming out of PC8+
Date: Fri, 21 Apr 2023 15:02:55 +0300	[thread overview]
Message-ID: <20230421120307.24793-2-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20230421120307.24793-1-ville.syrjala@linux.intel.com>

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

PC8+ clobbers a bunch of displays registers which need to
be restored by hand or else we lost a bunch of workarounds.
The important ones for us are at least CHICKEN_PAR2* and
CHICKEN_PIPESL*.

Curiously at least some CHICKEN_PAR1* registers
are preserved by the hardware/firmware. Unfortunately Bspec
doens't really specify what gets clobbered vs. preserved
so further reverse engieering might be warranted to figure
out the specifics.

Note that PCH_LP_PARTITION_LEVEL_DISABLE is also set by
lpt_init_clock_gating() so the rmw in hsw_disable_pc8()
is now redundant. Remove it.

TODO: I suspect most gt stuff doesn't need this and we should
      finish moving all of them from init_clock_gating() to
      a more appropriate place...

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_power.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index 5150069f3f82..83c44ec3f5ea 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -10,6 +10,7 @@
 #include "i915_reg.h"
 #include "intel_backlight_regs.h"
 #include "intel_cdclk.h"
+#include "intel_clock_gating.h"
 #include "intel_combo_phy.h"
 #include "intel_de.h"
 #include "intel_display_power.h"
@@ -1366,9 +1367,8 @@ static void hsw_disable_pc8(struct drm_i915_private *dev_priv)
 	hsw_restore_lcpll(dev_priv);
 	intel_init_pch_refclk(dev_priv);
 
-	if (HAS_PCH_LPT_LP(dev_priv))
-		intel_de_rmw(dev_priv, SOUTH_DSPCLK_GATE_D,
-			     0, PCH_LP_PARTITION_LEVEL_DISABLE);
+	/* Many display registers don't survive PC8+ */
+	intel_clock_gating_init(dev_priv);
 }
 
 static void intel_pch_reset_handshake(struct drm_i915_private *dev_priv,
-- 
2.39.2


  reply	other threads:[~2023-04-21 12:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21 12:02 [Intel-gfx] [PATCH 00/13] drm/i915/psr: Restore HSW/BDW PSR1 Ville Syrjala
2023-04-21 12:02 ` Ville Syrjala [this message]
2023-04-21 12:02 ` [Intel-gfx] [PATCH 02/13] drm/i915/psr: Fix BDW PSR AUX CH data register offsets Ville Syrjala
2023-04-21 12:02 ` [Intel-gfx] [PATCH 03/13] drm/i915/psr: Wrap PSR1 register with functions Ville Syrjala
2023-04-21 12:02 ` [Intel-gfx] [PATCH 04/13] drm/i915/psr: Reintroduce HSW PSR1 registers Ville Syrjala
2023-04-21 12:02 ` [Intel-gfx] [PATCH 05/13] drm/i915/psr: Bring back HSW/BDW PSR AUX CH registers/setup Ville Syrjala
2023-04-28 10:18   ` Hogander, Jouni
2023-04-28 11:03     ` Ville Syrjälä
2023-04-28 11:31       ` Hogander, Jouni
2023-04-21 12:03 ` [Intel-gfx] [PATCH 06/13] drm/i915/psr: HSW/BDW have no PSR2 Ville Syrjala
2023-04-21 12:03 ` [Intel-gfx] [PATCH 07/13] drm/i915/psr: Restore PSR interrupt handler for HSW Ville Syrjala
2023-04-21 12:03 ` [Intel-gfx] [PATCH 08/13] drm/i915/psr: Implement WaPsrDPAMaskVBlankInSRD:hsw Ville Syrjala
2023-04-28 10:36   ` Hogander, Jouni
2023-04-28 10:55     ` Ville Syrjälä
2023-04-28 11:29       ` Hogander, Jouni
2023-04-21 12:03 ` [Intel-gfx] [PATCH 09/13] drm/i915/psr: Implement WaPsrDPRSUnmaskVBlankInSRD:hsw Ville Syrjala
2023-04-21 12:03 ` [Intel-gfx] [PATCH 10/13] drm/i915/psr: Do no mask display register writes on hsw/bdw Ville Syrjala
2023-04-21 12:03 ` [Intel-gfx] [PATCH 11/13] drm/i915/psr: Don't skip both TP1 and TP2/3 " Ville Syrjala
2023-04-21 12:03 ` [Intel-gfx] [PATCH 12/13] drm/i915/psr: Allow PSR with sprite enabled " Ville Syrjala
2023-04-21 12:03 ` [Intel-gfx] [PATCH 13/13] drm/i915/psr: Re-enable PSR1 on hdw/bdw Ville Syrjala
2023-04-28 11:19   ` Hogander, Jouni
2023-04-28 11:36     ` Ville Syrjälä
2023-04-28 11:54       ` Hogander, Jouni
2023-04-21 14:46 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/psr: Restore HSW/BDW PSR1 Patchwork
2023-04-21 14:46 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-04-21 14:59 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-04-21 23:33 ` [Intel-gfx] ✓ 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=20230421120307.24793-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox