From patchwork Thu Dec 5 05:52:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaurav K Singh X-Patchwork-Id: 11274207 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A30CF139A for ; Thu, 5 Dec 2019 05:49:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8005822464 for ; Thu, 5 Dec 2019 05:49:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8005822464 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3FC876F560; Thu, 5 Dec 2019 05:49:47 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 18E396F560 for ; Thu, 5 Dec 2019 05:49:45 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2019 21:49:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,279,1571727600"; d="scan'208";a="219114852" Received: from gksingh.iind.intel.com ([10.66.179.29]) by fmsmga001.fm.intel.com with ESMTP; 04 Dec 2019 21:49:42 -0800 From: Gaurav K Singh To: intel-gfx@lists.freedesktop.org Date: Thu, 5 Dec 2019 11:22:50 +0530 Message-Id: <1575525170-20284-1-git-send-email-gaurav.k.singh@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1574611468-3319-1-git-send-email-gaurav.k.singh@intel.com> References: <1574611468-3319-1-git-send-email-gaurav.k.singh@intel.com> Subject: [Intel-gfx] [PATCH] [v2] drm/i915: Do not mark as sink as not reliable to PSR runtime errors X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 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" In case of CRC mismatch, panel generates IRQ_HD and PSR2 gets disabled by i915 driver. Due to this, PSR2 will only be enabled back only if system is rebooted or cold boot. So, in cases of suspend resume stress test and S0ix stress test, when we encounter this CRC issue on a particular iteration, once PSR2 is disabled,it remains disabled throughout all the cycling iterations until the system is rebooted. Keeping this in mind, many times users do not reboot their system and they just keep lid off/on or suspend/resume. In these scenarios in case of CRC issue, panel will become non-PSR2 which will eventually drain out battery. In order to fix this behavior, did not set the "sink_not_reliable" flag to be true, so that intel_psr_compute_config() can pass in case of a normal modeset which will lead to enabling PSR2 again in next iteration of suspend/resume or S0ix cycle(without reboot). Tested this patch and works fine on Gen9 Intel chromebook, PSR2 was enabled back in next iteration, no other sideeffects observed. v2: * Change the commit header indicating fix for PSR runtime erros(Jose, Souza) * Allow sink_not_reliable to be set for other errors except CRC error (Jose, Souza) Signed-off-by: Gaurav K Singh --- drivers/gpu/drm/i915/display/intel_psr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 16e9ff47d519..1037b716c1c0 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1484,7 +1484,9 @@ void intel_psr_short_pulse(struct intel_dp *intel_dp) if (status == DP_PSR_SINK_INTERNAL_ERROR || (error_status & errors)) { intel_psr_disable_locked(intel_dp); - psr->sink_not_reliable = true; + if ((error_status & DP_PSR_RFB_STORAGE_ERROR) || + (error_status & DP_PSR_VSC_SDP_UNCORRECTABLE_ERROR)) + psr->sink_not_reliable = true; } if (status == DP_PSR_SINK_INTERNAL_ERROR && !error_status)