From patchwork Tue Nov 24 04:40:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sonika.jindal@intel.com X-Patchwork-Id: 7687601 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 919B3BF90C for ; Tue, 24 Nov 2015 04:40:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB4662085E for ; Tue, 24 Nov 2015 04:40:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id EED792085B for ; Tue, 24 Nov 2015 04:40:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E6C506E7FA; Mon, 23 Nov 2015 20:40:14 -0800 (PST) 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 32C596E7FA for ; Mon, 23 Nov 2015 20:40:14 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 23 Nov 2015 20:40:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,338,1444719600"; d="scan'208";a="827662758" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 23 Nov 2015 20:40:14 -0800 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 23 Nov 2015 20:40:13 -0800 Received: from bgsmsx106.gar.corp.intel.com (10.223.43.196) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 23 Nov 2015 20:40:13 -0800 Received: from bgsmsx104.gar.corp.intel.com ([169.254.5.225]) by BGSMSX106.gar.corp.intel.com ([169.254.1.177]) with mapi id 14.03.0248.002; Tue, 24 Nov 2015 10:10:09 +0530 From: "Jindal, Sonika" To: "Vivi, Rodrigo" , "intel-gfx@lists.freedesktop.org" Thread-Topic: [PATCH] drm/i915: Also disable PSR on Sink when disabling it on Source. Thread-Index: AQHRJj0j7ld2GT2ryEOIVMJVOgJRb56ql79w Date: Tue, 24 Nov 2015 04:40:08 +0000 Message-ID: <000C66961D35964B9714611E548C10AD0C31F54A@BGSMSX104.gar.corp.intel.com> References: <000C66961D35964B9714611E548C10AD0C319A17@BGSMSX104.gar.corp.intel.com> <1448317172-24993-1-git-send-email-rodrigo.vivi@intel.com> In-Reply-To: <1448317172-24993-1-git-send-email-rodrigo.vivi@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.223.10.10] MIME-Version: 1.0 Subject: Re: [Intel-gfx] [PATCH] drm/i915: Also disable PSR on Sink when disabling it on Source. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, 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 Reviewed-by: Sonika Jindal -----Original Message----- From: Vivi, Rodrigo Sent: Tuesday, November 24, 2015 3:50 AM To: intel-gfx@lists.freedesktop.org Cc: Vivi, Rodrigo; Jindal, Sonika Subject: [PATCH] drm/i915: Also disable PSR on Sink when disabling it on Source. It is not a bad idea to disable the PSR feature on Sink when we are disabling on the Source. v2: Move dpcd write inside mutex protected area as suggested by Sonika. Cc: Sonika Jindal Suggested-by: Sonika Jindal Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/intel_psr.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.4.3 diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c index 2b2f84d..3bbb270 100644 --- a/drivers/gpu/drm/i915/intel_psr.c +++ b/drivers/gpu/drm/i915/intel_psr.c @@ -518,11 +518,15 @@ void intel_psr_disable(struct intel_dp *intel_dp) return; } + /* Disable PSR on Source */ if (HAS_DDI(dev)) hsw_psr_disable(intel_dp); else vlv_psr_disable(intel_dp); + /* Disable PSR on Sink */ + drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, 0); + dev_priv->psr.enabled = NULL; mutex_unlock(&dev_priv->psr.lock);