From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380683; b=U4m1jg6s3c6MvG84WIi68EgbdI217ANwS9KRTX4HexUqZJMsNi6cFdan907wUq2nrTBK OcyIaLxj3gO/z/Bflhg9acnBgQN3/OXlfTCzAB5aFmT6hNezwwtxsFs5FZw3/iJUDBcLI x+B9sdG1IPPot1vUBIRNbvjjwc4crg24JyUSg7Gkt2QIr/DpMPi7s+4Uq9/GXjqRQW72+ d/qPCjGrD4mSegxccW7wV3iOUoX6xDgOh/FcRngEMHHE1q35bd5beTzcERSfggMPXiNQo dPi9ywbxqdzXO5Gt+obCnY4OEoWPp9DaOJM5qxmbJJpVv6z7SSmqvfeCwqJJSy6GEpA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380683; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=71JhrNW2url8hKHp6yUGM34GgDoVr5/8y8Dbw5LdFvQ=; b=lkmGrT4LSizsCdT+uAENoTMAqJl4i6vBCoD1OSW6rTeCo94oiQaPE7GoXJK5p/gOwbFw oA2cxg/wGy1f9ef1f4ay1ekukyVQxDY1vV0dmz81juJzMRAdZRssH3SBDFL2+zfekkKbW kA7FmOkmdGlXVRC4u6m/nM3yfGYBb8zfTK0OncjXKQw/AZxQddc1zsD/dBC9CWqp7QSMT wkvIYRr2C3uftjhT//WOHmfH+FBuz856LaJhXmhew2Y3U0t6+xz+xaum76AKngs4iZuG0 UFb6sIlBLZkiWf0/5Ijjbu4kN3Sb0fbcm6d6IVGsh8B8jUHPNtZKY9MvpI6hyom11EQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=OAnbgu3h; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E0B9606A685; Fri, 4 Dec 2026 10:38:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=OAnbgu3h Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFFFA1F00A08; Fri, 4 Dec 2026 10:38:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380683; bh=71JhrNW2url8hKHp6yUGM34GgDoVr5/8y8Dbw5LdFvQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OAnbgu3hCHxpj1Hc0mWMaLG0Smt9EZX8mHhaNiqywTspd7VK+Yt7na6dVuqYpT4fY FWAIlpukv0T9lnGE7Bw/yt1q1vmp/F4us+9aFeMGcAtLaxxyK3Cei9l8U8nTDyJNDm wRDzcpEetfNv4XTfUuW2GEije30BtvOOKsFVIka4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ray Wu , Egor Perevoshchikov , Wayne Lin , Alex Deucher Subject: [PATCH 7.3 379/742] drm/amd/display: Restore PSR-SU guard in power module Date: Fri, 4 Dec 2026 19:04:03 +0900 Message-ID: <20261204100645.153175526@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Egor Perevoshchikov commit 57decaa0e378bf2481eae5f49293a5202976a19e upstream. Commit a5ce8695d6d1 ("drm/amd/display: Avoid configuring PSR granularity if PSR-SU not supported") restricted DSC slice-height configuration to PSR-SU. The power-module integration removed that guarded caller. Its replacement in mod_power_psr_notify_mode_change() calls psr_su_set_dsc_slice_height() unconditionally and ignores its return value. On PSR1 links with a DSC slice configuration, this applies a PSR-SU-only alignment check even though selective update is not enabled. If the calculated DSC slice height is not a multiple of the nonzero advertised SU Y granularity, the helper triggers an assertion. It also sets dsc_slice_height before failing the check, so the caller passes this SU-specific value into PSR1 setup despite the failure. Restore the PSR version guard and failure handling in the new caller. PSR1 proceeds with the zero-initialized DSC slice height, while PSR-SU retains its alignment validation and stops setup if that validation fails. Fixes: 3c108046e1d6 ("drm/amd/display: Add power module on Linux") Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/3027 Reviewed-by: Ray Wu Signed-off-by: Egor Perevoshchikov Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher (cherry picked from commit 83558fcf83cc911e09962ea17c883add596766c0) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/modules/power/power_psr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/modules/power/power_psr.c b/drivers/gpu/drm/amd/display/modules/power/power_psr.c index 96bb77fff05b..7139395b5c00 100644 --- a/drivers/gpu/drm/amd/display/modules/power/power_psr.c +++ b/drivers/gpu/drm/amd/display/modules/power/power_psr.c @@ -94,9 +94,12 @@ bool mod_power_psr_notify_mode_change(struct mod_power *mod_power, * The value of DSC slice height is determined in DSC Driver but it does not * propagated out here, so we need to calculate it as below 'slice_height'. */ - psr_su_set_dsc_slice_height(dc, link, - (struct dc_stream_state *) stream, - &psr_config); + if (link->psr_settings.psr_version == DC_PSR_VERSION_SU_1) { + if (!psr_su_set_dsc_slice_height(dc, link, + (struct dc_stream_state *)stream, + &psr_config)) + return false; + } dc_link_setup_psr(link, stream, &psr_config, &psr_context); -- 2.56.1