All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH] drm/i915/display: Do not allow DC3CO if PSR SF is enabled
Date: Mon, 22 Feb 2021 13:24:15 +0200	[thread overview]
Message-ID: <20210222112415.1523930-1-gwan-gyeong.mun@intel.com> (raw)

Even though GEN12+ HW supports PSR + DC3CO, DMC's HW DC3CO exitmachanism
has an issue with using of SelectiveFecth and PSR2 ManualTracking.
And as new GEN12+ platform like RKL, ADL-S/P don't have PSR2 HW tracking,
Selective Fetch wiil be enabled by default.
Therefore if the system enables PSR SelectiveFetch / PSR ManualTracking,
it does not allow DC3CO dc state, in that case.

When this DC3CO exit issue is addressed while PSR SF is enabled,
this restriction should be removed.

Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Anshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
---
 .../drm/i915/display/intel_display_power.c    | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index f00c1750febd..b385b3f082f2 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -804,10 +804,12 @@ static u32 gen9_dc_mask(struct drm_i915_private *dev_priv)
 
 	mask = DC_STATE_EN_UPTO_DC5;
 
-	if (INTEL_GEN(dev_priv) >= 12)
-		mask |= DC_STATE_EN_DC3CO | DC_STATE_EN_UPTO_DC6
-					  | DC_STATE_EN_DC9;
-	else if (IS_GEN(dev_priv, 11))
+	if (INTEL_GEN(dev_priv) >= 12) {
+		/* DMC's DC3CO exit machanism has an issue with SelectiveFecth */
+		if (!dev_priv->params.enable_psr2_sel_fetch)
+			mask |=  DC_STATE_EN_DC3CO;
+		mask |= DC_STATE_EN_UPTO_DC6 | DC_STATE_EN_DC9;
+	} else if (IS_GEN(dev_priv, 11))
 		mask |= DC_STATE_EN_UPTO_DC6 | DC_STATE_EN_DC9;
 	else if (IS_GEN9_LP(dev_priv))
 		mask |= DC_STATE_EN_DC9;
@@ -4588,10 +4590,15 @@ static u32 get_allowed_dc_mask(const struct drm_i915_private *dev_priv,
 
 	switch (requested_dc) {
 	case 4:
-		mask |= DC_STATE_EN_DC3CO | DC_STATE_EN_UPTO_DC6;
+		/* DMC's DC3CO exit machanism has an issue with SelectiveFecth */
+		if (!dev_priv->params.enable_psr2_sel_fetch)
+			mask |=  DC_STATE_EN_DC3CO;
+		mask |= DC_STATE_EN_UPTO_DC6;
 		break;
 	case 3:
-		mask |= DC_STATE_EN_DC3CO | DC_STATE_EN_UPTO_DC5;
+		if (!dev_priv->params.enable_psr2_sel_fetch)
+			mask |=  DC_STATE_EN_DC3CO;
+		mask |= DC_STATE_EN_UPTO_DC5;
 		break;
 	case 2:
 		mask |= DC_STATE_EN_UPTO_DC6;
-- 
2.30.0

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

             reply	other threads:[~2021-02-22 11:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 11:24 Gwan-gyeong Mun [this message]
2021-02-22 12:25 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: Do not allow DC3CO if PSR SF is enabled Patchwork
2021-02-22 12:55 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-02-22 14:05 ` [Intel-gfx] [PATCH] " Souza, Jose
2021-02-22 15:16 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " 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=20210222112415.1523930-1-gwan-gyeong.mun@intel.com \
    --to=gwan-gyeong.mun@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.