All of lore.kernel.org
 help / color / mirror / Atom feed
From: "José Roberto de Souza" <jose.souza@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Subject: [PATCH v4 7/9] drm/i915: Drop redundant checks to update PSR state
Date: Fri,  1 Mar 2019 17:34:54 -0800	[thread overview]
Message-ID: <20190302013456.24138-7-jose.souza@intel.com> (raw)
In-Reply-To: <20190302013456.24138-1-jose.souza@intel.com>

All of this checks are redudant and can be removed as the if bellow
already takes care when there is no changes in the state.

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/intel_psr.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index 73453d89a841..d3e3996551c6 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -878,15 +878,11 @@ void intel_psr_update(struct intel_dp *intel_dp,
 	if (enable == psr->enabled && psr2_enable == psr->psr2_enabled)
 		goto unlock;
 
-	if (psr->enabled) {
-		if (!enable || psr2_enable != psr->psr2_enabled)
-			intel_psr_disable_locked(intel_dp);
-	}
+	if (psr->enabled)
+		intel_psr_disable_locked(intel_dp);
 
-	if (enable) {
-		if (!psr->enabled || psr2_enable != psr->psr2_enabled)
-			intel_psr_enable_locked(dev_priv, crtc_state);
-	}
+	if (enable)
+		intel_psr_enable_locked(dev_priv, crtc_state);
 
 unlock:
 	mutex_unlock(&dev_priv->psr.lock);
-- 
2.21.0

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

  parent reply	other threads:[~2019-03-02  1:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-02  1:34 [PATCH v4 1/9] drm/i915/psr: Remove PSR2 FIXME José Roberto de Souza
2019-03-02  1:34 ` [PATCH v4 2/9] drm/i915/psr: Only lookup for enabled CRTCs when forcing a fastset José Roberto de Souza
2019-03-02  1:34 ` [PATCH v4 3/9] drm/i915: Compute and commit color features in fastsets José Roberto de Souza
2019-03-02  1:34 ` [PATCH v4 4/9] drm/i915/psr: Drop test for EDP in CRTC when forcing commit José Roberto de Souza
2019-03-04 18:28   ` Rodrigo Vivi
2019-03-02  1:34 ` [PATCH v4 5/9] drm/i915/crc: Make IPS workaround generic José Roberto de Souza
2019-03-04 18:34   ` Rodrigo Vivi
2019-03-02  1:34 ` [PATCH v4 6/9] drm/i915: Disable PSR2 while getting pipe CRC José Roberto de Souza
2019-03-04 18:39   ` Rodrigo Vivi
2019-03-02  1:34 ` José Roberto de Souza [this message]
2019-03-04 18:42   ` [PATCH v4 7/9] drm/i915: Drop redundant checks to update PSR state Rodrigo Vivi
2019-03-04 18:54     ` Dhinakaran Pandiyan
2019-03-04 20:45       ` Souza, Jose
2019-03-02  1:34 ` [PATCH v4 8/9] drm/i915/psr: Set idle frames to maximum while getting pipe CRC José Roberto de Souza
2019-03-04 18:31   ` Dhinakaran Pandiyan
2019-03-04 18:40     ` Souza, Jose
2019-03-04 19:00       ` Dhinakaran Pandiyan
2019-03-04 20:56         ` Souza, Jose
2019-03-02  1:34 ` [PATCH v4 9/9] drm/i915: Enable PSR2 by default José Roberto de Souza
2019-03-04 18:43   ` Rodrigo Vivi
2019-03-02  2:34 ` ✗ Fi.CI.SPARSE: warning for series starting with [v4,1/9] drm/i915/psr: Remove PSR2 FIXME Patchwork
2019-03-02  2:51 ` ✓ Fi.CI.BAT: success " Patchwork
2019-03-02 13:38 ` ✓ 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=20190302013456.24138-7-jose.souza@intel.com \
    --to=jose.souza@intel.com \
    --cc=dhinakaran.pandiyan@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.