From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1018DEB64DC for ; Fri, 21 Jul 2023 07:26:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230029AbjGUH0D (ORCPT ); Fri, 21 Jul 2023 03:26:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbjGUH0C (ORCPT ); Fri, 21 Jul 2023 03:26:02 -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 715E8FC for ; Fri, 21 Jul 2023 00:26:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F24676112C for ; Fri, 21 Jul 2023 07:26:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0A72C433C8; Fri, 21 Jul 2023 07:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1689924360; bh=Jr0uBuY5uV5AoksnfbS8yeKD2W1kpn6ZkaCe33rTwT0=; h=Subject:To:Cc:From:Date:From; b=PPX3D8EwstILZVQCbV1dvsoptSsSKWn80oGx0997ijWMN2tCctAcY5tub8CCYqMsy K51zGZ6yFlZBrGt0D6sBGogMnuIudREudMwJRC9sq0+o1dVTi6SpObGWYxafBIQew5 0jMhmP1QnlqyIN8HY0c2kTPIerg90HLm+qkJ0x+s= Subject: FAILED: patch "[PATCH] drm/amd/display: fix the system hang while disable PSR" failed to apply to 6.1-stable tree To: chiahsuan.chung@amd.com, Wayne.Lin@amd.com, alexander.deucher@amd.com, daniel.wheeler@amd.com, mario.limonciello@amd.com, stylon.wang@amd.com Cc: From: Date: Fri, 21 Jul 2023 09:25:56 +0200 Message-ID: <2023072156-uncoiled-unchanged-3b6b@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x f308116676566b555ec3bab4c3f9eb20c1c9a5cb # git commit -s git send-email --to '' --in-reply-to '2023072156-uncoiled-unchanged-3b6b@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: f30811667656 ("drm/amd/display: fix the system hang while disable PSR") 81f743a08f3b ("drm/amd/display: Add wrapper to call planes and stream update") f7511289821f ("drm/amd/display: Use dc_update_planes_and_stream") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From f308116676566b555ec3bab4c3f9eb20c1c9a5cb Mon Sep 17 00:00:00 2001 From: Tom Chung Date: Mon, 29 May 2023 18:00:09 +0800 Subject: [PATCH] drm/amd/display: fix the system hang while disable PSR [Why] When the PSR enabled. If you try to adjust the timing parameters, it may cause system hang. Because the timing mismatch with the DMCUB settings. [How] Disable the PSR before adjusting timing parameters. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Acked-by: Stylon Wang Signed-off-by: Tom Chung Reviewed-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 2f3f579efe30..c6a1014e0e89 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -8279,6 +8279,12 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, if (acrtc_state->abm_level != dm_old_crtc_state->abm_level) bundle->stream_update.abm_level = &acrtc_state->abm_level; + mutex_lock(&dm->dc_lock); + if ((acrtc_state->update_type > UPDATE_TYPE_FAST) && + acrtc_state->stream->link->psr_settings.psr_allow_active) + amdgpu_dm_psr_disable(acrtc_state->stream); + mutex_unlock(&dm->dc_lock); + /* * If FreeSync state on the stream has changed then we need to * re-adjust the min/max bounds now that DC doesn't handle this @@ -8292,10 +8298,6 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, spin_unlock_irqrestore(&pcrtc->dev->event_lock, flags); } mutex_lock(&dm->dc_lock); - if ((acrtc_state->update_type > UPDATE_TYPE_FAST) && - acrtc_state->stream->link->psr_settings.psr_allow_active) - amdgpu_dm_psr_disable(acrtc_state->stream); - update_planes_and_stream_adapter(dm->dc, acrtc_state->update_type, planes_count,