From patchwork Fri Sep 16 11:08:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 12978411 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 37F5FECAAD8 for ; Fri, 16 Sep 2022 11:08:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B286810EBE9; Fri, 16 Sep 2022 11:08:56 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 846F910EBE9 for ; Fri, 16 Sep 2022 11:08:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663326532; x=1694862532; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=+SZO1WXYk2acSIcHGSK5UE/AwJ+ryxQBekLPKLRdIBk=; b=dnYlW8X/7QdxABXhk5sYRt89fx+2MLHC8ZdLeZ4OwfKLZpgj56fRIEf1 1OOO5yVMJmTKf2ewA3d49JOOIcf4bmHyoQYr1oG58+4Lh8WK06i+GWTC3 nBfyUggf8Sbp84LqstznZWXhS2qLMV15lTa921HF0yBTtTFAkjz9zVaAE Uel1f16cR1E4YSfyLHCUIlAtSfkmAgBQtBbuP/Kukp78X9uvqmJbsymbg +aYFOAi8M/XPf0EPNAtsPadkCsvG/7TTBF0pe/PWm7phY/Ols+S3bm6KQ iQ+OwgGPbaqKO2TRioNupz56lBl7ftCEfqy/3tNyWgOGJOlzsd7Uaj5s3 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10471"; a="286009512" X-IronPort-AV: E=Sophos;i="5.93,320,1654585200"; d="scan'208";a="286009512" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2022 04:08:51 -0700 X-IronPort-AV: E=Sophos;i="5.93,320,1654585200"; d="scan'208";a="760014006" Received: from agiering-mobl1.ger.corp.intel.com (HELO jhogande-mobl1.ger.corp.intel.com) ([10.251.209.64]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2022 04:08:50 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Date: Fri, 16 Sep 2022 14:08:04 +0300 Message-Id: <20220916110804.233449-1-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH] drm/i915/psr: Do not re-activate PSR if there was a PSR aux error X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Charlton Lin Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" If there is a PSR aux error sink is marked as not reliable and PSR is permantently disabled. Current code is activating PSR again even there was PSR aux error. Fix this by skipping intel_psr_activate when PSR aux error is detected. Cc: Mika Kahola Cc: José Roberto de Souza Reported-by: Charlton Lin Signed-off-by: Jouni Högander Reviewed-by: Gwan-gyeong Mun --- 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 9def8d9fade6..42390203ad19 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -2153,8 +2153,10 @@ static void intel_psr_work(struct work_struct *work) if (!intel_dp->psr.enabled) goto unlock; - if (READ_ONCE(intel_dp->psr.irq_aux_error)) + if (READ_ONCE(intel_dp->psr.irq_aux_error)) { intel_psr_handle_irq(intel_dp); + goto unlock; + } /* * We have to make sure PSR is ready for re-enable