From patchwork Tue Jun 10 10:49:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 4330001 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 35CC09F1D6 for ; Tue, 10 Jun 2014 17:48:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 58A2F202C8 for ; Tue, 10 Jun 2014 17:48:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 593D120295 for ; Tue, 10 Jun 2014 17:48:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E90726E71C; Tue, 10 Jun 2014 10:48:45 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 753D66E71C for ; Tue, 10 Jun 2014 10:48:44 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 10 Jun 2014 10:48:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="4.98,1010,1392192000"; d="scan'208"; a="526333741" Received: from di-604.jf.intel.com (HELO rdvivi-hillsboro.jf.intel.com) ([10.7.201.28]) by orsmga001.jf.intel.com with ESMTP; 10 Jun 2014 10:48:26 -0700 From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Tue, 10 Jun 2014 03:49:57 -0700 Message-Id: <1402397397-914-1-git-send-email-rodrigo.vivi@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <20140610152457.GY5821@phenom.ffwll.local> References: <20140610152457.GY5821@phenom.ffwll.local> 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); }