Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp638472pxb; Tue, 5 Apr 2022 16:53:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx44W/GQtZwPC0+9RTSMnwZG8ZdOtF0SlO8hBGjtkipIrW2ZRhBXwIDoal0QXQpue+sOqDM X-Received: by 2002:a17:902:7e0d:b0:156:47a4:a7c4 with SMTP id b13-20020a1709027e0d00b0015647a4a7c4mr6085960plm.141.1649202812208; Tue, 05 Apr 2022 16:53:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649202812; cv=none; d=google.com; s=arc-20160816; b=eWGkLNeHBKa0Rj9Cr8rYQ4K2r5KR57SC/h94JwSSqUZCdQsZhs5ecEPhpgBWkZ+LnA rT1MZA1jfOwG6cMBI1t15vr/HFzDKzpnGarUah9TFglCk7dmYaxhnCi/1OCEjjt7UsDL kRZA0WDX7D6QwYdVGc/hUB17m7p+0x++2jQliVuPO6XqilX4lIjUTjD0iMAlC+Td82cH itxo97sXg3rV8k8hCu8mzqK4WhVwGFkqX2Y0pXhqELLvMXLV2/5Ilhzv9Jly4vgDiK0q OHi8UqMUst7CweMH5tYH6Dnu+QHAXDu45j0F7t1Hx1fS+g+re5WEMRegJ0t2mtwaVAHD 5JZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UeY9pQF+mFAzMDXQJJogYTWGOgTcoq8HcCfDQ2VkPIo=; b=dZDlosrfPmxZK0pWZ136LT7UksbawYsI1gNhmtUdMOF2P+QMrtmcjyPNqfzP2DYL9C ei0w+/x7fQimf1c/8XjYibBK08hzTh1US8B9UmAkQu0nYKroJsl54YrVZxFB9D8TKfON BT5k6LEAEqrQIA4jKBxrUKQVFtf1M2P8Y2IqqOoR7cqMk0IkrAa8DXzjEzBb7Kuitvg5 Kv1lQvFrQ85RuMmt5ALXwf7lXDNq05B6s3oRMnGLT0fRtgGUNGcjEp+1Bicy+91wNeJE 9Zoz320nBIWoczCRSEI+VDM5ckfAdCk0rZXDdVBl4ReVhb9D/DWfqFYVukrBcyb+dvnS 3ipQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KykZsF+X; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c4-20020a170902d48400b00153b2d16629si4827786plg.561.2022.04.05.16.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:53:32 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KykZsF+X; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ECA2B1C6EF3; Tue, 5 Apr 2022 16:39:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352774AbiDEMtm (ORCPT + 99 others); Tue, 5 Apr 2022 08:49:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244191AbiDEJJs (ORCPT ); Tue, 5 Apr 2022 05:09:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BBCB33E; Tue, 5 Apr 2022 01:58:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B4D5061003; Tue, 5 Apr 2022 08:58:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE8FCC385A1; Tue, 5 Apr 2022 08:58:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149136; bh=DGLMwc0aKxz+FQqD2YEpG77UF0UGtPZkVPr4ju27lBU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KykZsF+XePv5y6f7PS6tSylgzGK6pofc2clvbG4oxGLtMMlm0redtFrJWRiDw7Qdo GRoL7SkQ1qzXdCp1Tcn0tbdCDMXrwJS/Z/FckRVUM1dxMsFGopyrwZQDmCgDZy67hC waL/XEkdiq2ttVmzD2dwmYiy56DksPopJL+0URYU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Khaled Almahallawy , Charlton Lin , =?UTF-8?q?Jouni=20H=C3=B6gander?= , =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= , Joonas Lahtinen , Sasha Levin Subject: [PATCH 5.16 0608/1017] drm/i915/display: Do not re-enable PSR after it was marked as not reliable Date: Tue, 5 Apr 2022 09:25:21 +0200 Message-Id: <20220405070412.327169580@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: José Roberto de Souza [ Upstream commit 278da06c03655c2bb9bc36ebdf45b90a079b3bfd ] If a error happens and sink_not_reliable is set, PSR should be disabled for good but that is not happening. It would be disabled by the function handling the PSR error but then on the next fastset it would be enabled again in _intel_psr_post_plane_update(). It would only be disabled for good in the next modeset where has_psr will be set false. v2: - release psr lock before continue Fixes: 9ce5884e5139 ("drm/i915/display: Only keep PSR enabled if there is active planes") Reported-by: Khaled Almahallawy Reported-by: Charlton Lin Cc: Jouni Högander Signed-off-by: José Roberto de Souza Reviewed-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20220311185149.110527-2-jose.souza@intel.com (cherry picked from commit 15f26bdc81f7f03561aaea5a10d87bd6638e1459) Signed-off-by: Joonas Lahtinen Signed-off-by: Sasha Levin --- drivers/gpu/drm/i915/display/intel_psr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 3ba8b717e176..f7ade9c06386 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1793,6 +1793,9 @@ static void _intel_psr_post_plane_update(const struct intel_atomic_state *state, mutex_lock(&psr->lock); + if (psr->sink_not_reliable) + goto exit; + drm_WARN_ON(&dev_priv->drm, psr->enabled && !crtc_state->active_planes); /* Only enable if there is active planes */ @@ -1803,6 +1806,7 @@ static void _intel_psr_post_plane_update(const struct intel_atomic_state *state, if (crtc_state->crc_enabled && psr->enabled) psr_force_hw_tracking_exit(intel_dp); +exit: mutex_unlock(&psr->lock); } } -- 2.34.1