From patchwork Mon Jul 12 06:07:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 473968 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB10CC07E9C for ; Mon, 12 Jul 2021 07:11:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B3EF661178 for ; Mon, 12 Jul 2021 07:11:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241508AbhGLHOk (ORCPT ); Mon, 12 Jul 2021 03:14:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:48598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241750AbhGLHNG (ORCPT ); Mon, 12 Jul 2021 03:13:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B60AB61179; Mon, 12 Jul 2021 07:10:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626073815; bh=kiDMrShGhA9MsP0ZNDM+Q9R8acrvqw2qcS06gIeaqX0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mnpYhMH43uC8LRCJM0ferfUNXtnjlewQLMJhMf0/chc65aJShMKmJrNUIRCL+z0tK smZZ7zhmU+Z4pV2ryd5bJVur7tcTKTtASNSOg0r3n6mPV7c9X3CpA5PLY4VLYBapXw +8MsTxOn+lEzMjdEfItYeSwVAKV2gZDoHtJzOL8E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhan Liu , Nikola Cornij , Alex Deucher , Sasha Levin Subject: [PATCH 5.12 369/700] drm/amd/display: Avoid HPD IRQ in GPU reset state Date: Mon, 12 Jul 2021 08:07:32 +0200 Message-Id: <20210712061015.649255901@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060924.797321836@linuxfoundation.org> References: <20210712060924.797321836@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhan Liu [ Upstream commit 509b9a5b4865dee723296f143695a7774fc96c4a ] [Why] If GPU is in reset state, force enabling link will cause unexpected behaviour. [How] Avoid handling HPD IRQ when GPU is in reset state. Signed-off-by: Zhan Liu Reviewed-by: Nikola Cornij Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 d95569e0e53a..61337d4c0bb2 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -2624,15 +2624,15 @@ static void handle_hpd_rx_irq(void *param) } } - if (!amdgpu_in_reset(adev)) + if (!amdgpu_in_reset(adev)) { mutex_lock(&adev->dm.dc_lock); #ifdef CONFIG_DRM_AMD_DC_HDCP result = dc_link_handle_hpd_rx_irq(dc_link, &hpd_irq_data, NULL); #else result = dc_link_handle_hpd_rx_irq(dc_link, NULL, NULL); #endif - if (!amdgpu_in_reset(adev)) mutex_unlock(&adev->dm.dc_lock); + } out: if (result && !is_mst_root_connector) {