From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [PATCH 03/16] drm/i915: Run psr_setup unconditionally
Date: Wed, 18 Jun 2014 13:59:04 +0200 [thread overview]
Message-ID: <1403092757-31421-4-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1403092757-31421-1-git-send-email-daniel.vetter@ffwll.ch>
Due to runtime pm and system s/r we need to restore hw state every
time we enable a pipe again. Hence trying to avoid that is just
pointless book-keeping which Rodrigo then tried to work around by
manually adding psr_setup calls to our resume code.
Much simpler to just remove code instead.
v2: Properly bail out of psr exit if psr isn't enabled. Spotted by
Rodrigo.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_drv.h | 1 -
drivers/gpu/drm/i915/intel_dp.c | 7 +------
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 0640071e30a9..877c3e0de12e 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -636,7 +636,6 @@ struct i915_drrs {
struct i915_psr {
bool sink_support;
bool source_ok;
- bool setup_done;
bool enabled;
bool active;
struct delayed_work work;
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index b373b895fe48..420939fdb31d 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1663,9 +1663,6 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)
struct drm_i915_private *dev_priv = dev->dev_private;
struct edp_vsc_psr psr_vsc;
- if (dev_priv->psr.setup_done)
- return;
-
/* Prepare VSC packet as per EDP 1.3 spec, Table 3.10 */
memset(&psr_vsc, 0, sizeof(psr_vsc));
psr_vsc.sdp_header.HB0 = 0;
@@ -1677,8 +1674,6 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)
/* Avoid continuous PSR exit by masking memup and hpd */
I915_WRITE(EDP_PSR_DEBUG_CTL(dev), EDP_PSR_DEBUG_MASK_MEMUP |
EDP_PSR_DEBUG_MASK_HPD | EDP_PSR_DEBUG_MASK_LPSP);
-
- dev_priv->psr.setup_done = true;
}
static void intel_edp_psr_enable_sink(struct intel_dp *intel_dp)
@@ -1911,7 +1906,7 @@ void intel_edp_psr_exit(struct drm_device *dev, bool schedule_back)
if (!HAS_PSR(dev))
return;
- if (!dev_priv->psr.setup_done)
+ if (!dev_priv->psr.enabled)
return;
cancel_delayed_work_sync(&dev_priv->psr.work);
--
2.0.0
next prev parent reply other threads:[~2014-06-18 11:59 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 11:59 [PATCH 00/16] PSR rework and accurate frontbuffer tracking Daniel Vetter
2014-06-18 11:59 ` [PATCH 01/16] drm/i915: Drop unecessary complexity from psr_inactivate Daniel Vetter
2014-06-18 11:59 ` [PATCH 02/16] drm/i915: Ditch intel_edp_psr_update Daniel Vetter
2014-06-18 11:59 ` Daniel Vetter [this message]
2014-06-18 11:59 ` [PATCH 04/16] drm/i915: Drop schedule_back from psr_exit Daniel Vetter
2014-06-18 11:59 ` [PATCH 05/16] drm/i915: Add a FIXME about drrs/psr interactions Daniel Vetter
2014-06-18 11:59 ` [PATCH 06/16] drm/i915: Track the psr dp connector in dev_priv->psr.enabled Daniel Vetter
2014-06-18 11:59 ` [PATCH 07/16] drm/i915: Don't try to disable psr harder from the work item Daniel Vetter
2014-06-18 11:59 ` [PATCH 08/16] drm/i915: Lock down psr sw/hw state tracking Daniel Vetter
2014-06-18 11:59 ` [PATCH 09/16] drm/i915: More checks for psr.enabled Daniel Vetter
2014-06-18 12:27 ` Chris Wilson
2014-06-18 12:41 ` Daniel Vetter
2014-06-18 12:46 ` Chris Wilson
2014-06-18 13:03 ` Daniel Vetter
2014-06-18 11:59 ` [PATCH 10/16] drm/i915: Add locking to psr code Daniel Vetter
2014-06-18 11:59 ` [PATCH 11/16] drm/i915: Introduce accurate frontbuffer tracking Daniel Vetter
2014-06-18 12:20 ` Chris Wilson
2014-06-18 13:01 ` [PATCH] " Daniel Vetter
2014-06-18 14:55 ` Chris Wilson
2014-06-18 15:55 ` Daniel Vetter
2014-06-18 15:58 ` Chris Wilson
2014-06-18 16:05 ` Daniel Vetter
2014-06-18 16:14 ` Chris Wilson
2014-06-18 21:28 ` Daniel Vetter
2014-06-19 7:29 ` Chris Wilson
2014-06-18 13:05 ` [PATCH] drm/i915: Properly track domain of the fbcon fb Daniel Vetter
2014-06-18 14:57 ` Chris Wilson
2014-06-18 15:57 ` Daniel Vetter
2014-06-18 16:15 ` Chris Wilson
2014-06-18 11:59 ` [PATCH 12/16] drm/i915: Use new frontbuffer bits to increase pll clock Daniel Vetter
2014-06-18 14:46 ` Chris Wilson
2014-06-18 11:59 ` [PATCH 13/16] drm/i915: Properly track domain of the fbcon fb Daniel Vetter
2014-06-18 12:10 ` Chris Wilson
2014-06-18 12:44 ` Daniel Vetter
2014-06-18 13:09 ` [PATCH] " Daniel Vetter
2014-06-18 11:59 ` [PATCH 14/16] drm/i915: Track frontbuffer invalidation/flushing Daniel Vetter
2014-06-18 14:43 ` Chris Wilson
2014-06-19 12:41 ` [PATCH] " Daniel Vetter
2014-06-19 13:02 ` Chris Wilson
2014-06-19 13:54 ` Daniel Vetter
2014-06-19 14:01 ` Daniel Vetter
2014-06-19 15:12 ` Chris Wilson
2014-06-19 16:15 ` Daniel Vetter
2014-06-18 11:59 ` [PATCH 15/16] drm/i915: Fix up PSR frontbuffer tracking Daniel Vetter
2014-06-18 11:59 ` [PATCH 16/16] drm/i915: Improve PSR debugfs output Daniel Vetter
2014-06-18 12:46 ` [PATCH] drm/i915: Print obj->frontbuffer_bits in " Daniel Vetter
2014-06-18 14:50 ` Chris Wilson
2014-06-18 16:00 ` Daniel Vetter
2014-06-18 14:51 ` [PATCH 16/16] drm/i915: Improve PSR " Chris Wilson
2014-06-18 16:02 ` Daniel Vetter
2014-06-18 13:08 ` [PATCH] drm/i915: Remove redundant HAS_PSR checks Daniel Vetter
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=1403092757-31421-4-git-send-email-daniel.vetter@ffwll.ch \
--to=daniel.vetter@ffwll.ch \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).