Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Joe Konno <joe.konno@intel.com>,
	Paulo Zanoni <paulo.r.zanoni@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [PATCH] drm/i915: Force full PSR setup during crtc enable.
Date: Tue, 10 Jun 2014 03:47:26 -0700	[thread overview]
Message-ID: <1402397246-847-1-git-send-email-rodrigo.vivi@intel.com> (raw)

Some registers set during setup might not be persistent after suspend/resume,
and also on crtc off/on cycles.

This was causing bugs for some people that was unable to get PSR entry state
after suspend/resume cycle.

v2: Adding some comments and better commit message explaining why this is
needed. (by Paulo)
v3: Moving psr.setup_done reset to crtc_enable because same issues might apply
also on crtc off/on cycle. (by Daniel)

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Joe Konno <joe.konno@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index b5cbb28..077ab0e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3938,6 +3938,10 @@ static void intel_crtc_enable_planes(struct drm_crtc *crtc)
 
 	mutex_lock(&dev->struct_mutex);
 	intel_update_fbc(dev);
+	/* Forcing a full init sequence here to make sure all
+	* registers are properly set. Some might not be persistent after
+	* crtc on/off cycle. */
+	dev_priv->psr.setup_done = false;
 	intel_edp_psr_update(dev);
 	mutex_unlock(&dev->struct_mutex);
 }
-- 
1.9.3

             reply	other threads:[~2014-06-10 17:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-10 10:47 Rodrigo Vivi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-06-10 15:24 [PATCH] drm/i915: Update PSR on resume Daniel Vetter
2014-06-10 10:49 ` [PATCH] drm/i915: Force full PSR setup during crtc enable Rodrigo Vivi
2014-06-11  9:42   ` 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=1402397246-847-1-git-send-email-rodrigo.vivi@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joe.konno@intel.com \
    --cc=paulo.r.zanoni@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