From: Rodrigo Vivi <rodrigo.vivi@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [PATCH 2/4] drm/i915: PSR: Organize PSR enable function
Date: Tue, 16 Sep 2014 19:19:06 -0400 [thread overview]
Message-ID: <1410909548-4945-2-git-send-email-rodrigo.vivi@intel.com> (raw)
In-Reply-To: <1410909548-4945-1-git-send-email-rodrigo.vivi@intel.com>
We don't need to setup everything else if it doesn't match all conditions.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 271788e..168b3c3 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1912,10 +1912,12 @@ void intel_edp_psr_enable(struct intel_dp *intel_dp)
mutex_lock(&dev_priv->psr.lock);
if (dev_priv->psr.enabled) {
DRM_DEBUG_KMS("PSR already in use\n");
- mutex_unlock(&dev_priv->psr.lock);
- return;
+ goto unlock;
}
+ if (!intel_edp_psr_match_conditions(intel_dp))
+ goto unlock;
+
dev_priv->psr.busy_frontbuffer_bits = 0;
intel_edp_psr_setup_vsc(intel_dp);
@@ -1924,8 +1926,8 @@ void intel_edp_psr_enable(struct intel_dp *intel_dp)
I915_WRITE(EDP_PSR_DEBUG_CTL(dev), EDP_PSR_DEBUG_MASK_MEMUP |
EDP_PSR_DEBUG_MASK_HPD | EDP_PSR_DEBUG_MASK_LPSP);
- if (intel_edp_psr_match_conditions(intel_dp))
- dev_priv->psr.enabled = intel_dp;
+ dev_priv->psr.enabled = intel_dp;
+unlock:
mutex_unlock(&dev_priv->psr.lock);
}
--
1.9.3
next prev parent reply other threads:[~2014-09-16 23:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 23:19 [PATCH 1/4] drm/i915: PSR: organize setup function Rodrigo Vivi
2014-09-16 23:19 ` Rodrigo Vivi [this message]
2014-09-23 21:05 ` [PATCH 2/4] drm/i915: PSR: Organize PSR enable function Paulo Zanoni
2014-09-24 8:37 ` Daniel Vetter
2014-09-16 23:19 ` [PATCH 3/4] drm/i915: Avoid re-configure panel on every PSR re-enable Rodrigo Vivi
2014-09-24 13:55 ` Paulo Zanoni
2014-09-16 23:19 ` [PATCH 4/4] drm/i915: Make sure PSR is ready for been re-enabled Rodrigo Vivi
2014-09-17 15:50 ` Daniel Vetter
2014-09-17 16:21 ` Rodrigo Vivi
2014-09-17 16:22 ` Rodrigo Vivi
2014-09-17 17:23 ` [PATCH] " Rodrigo Vivi
2014-09-24 15:40 ` Paulo Zanoni
2014-09-24 19:04 ` Daniel Vetter
2014-09-24 22:16 ` Rodrigo Vivi
2014-09-25 17:36 ` Paulo Zanoni
2014-09-25 17:50 ` Rodrigo Vivi
2014-09-29 12:24 ` Daniel Vetter
2014-09-23 20:59 ` [PATCH 1/4] drm/i915: PSR: organize setup function Paulo Zanoni
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=1410909548-4945-2-git-send-email-rodrigo.vivi@intel.com \
--to=rodrigo.vivi@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
/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.