From patchwork Tue Jun 10 10:47:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 4329981 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D2AEB9F1D6 for ; Tue, 10 Jun 2014 17:46:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1119B20274 for ; Tue, 10 Jun 2014 17:46:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2C7E1200FE for ; Tue, 10 Jun 2014 17:46:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D16C6E71F; Tue, 10 Jun 2014 10:46:52 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 210C96E71F for ; Tue, 10 Jun 2014 10:46:51 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 10 Jun 2014 10:41:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="4.98,1010,1392192000"; d="scan'208"; a="555220495" Received: from di-604.jf.intel.com (HELO rdvivi-hillsboro.jf.intel.com) ([10.7.201.28]) by orsmga002.jf.intel.com with ESMTP; 10 Jun 2014 10:45:55 -0700 From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Tue, 10 Jun 2014 03:47:26 -0700 Message-Id: <1402397246-847-1-git-send-email-rodrigo.vivi@intel.com> X-Mailer: git-send-email 1.9.3 Cc: Daniel Vetter , Joe Konno , Paulo Zanoni , Rodrigo Vivi Subject: [Intel-gfx] [PATCH] drm/i915: Force full PSR setup during crtc enable. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DATE_IN_PAST_06_12, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Daniel Vetter Cc: Joe Konno Signed-off-by: Rodrigo Vivi --- 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); }