Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2927446ybk; Mon, 18 May 2020 11:18:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeJQM8JNyTzqMS88lMeCUcj5SL67qbl0m4vR8aCRh+qmS12jhP0Xj33OpIpVwL8R4HLke6 X-Received: by 2002:aa7:d596:: with SMTP id r22mr9360965edq.379.1589825893949; Mon, 18 May 2020 11:18:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589825893; cv=none; d=google.com; s=arc-20160816; b=ZgFflHxRFjJ1piDc5Wq/bACcik3PGz9owY/4ILtrij6pQUpVSc3TEez5lDqxZSq2NK 1MQ7NYohbfSkjuWPlJn4hFUaoS7egdDL0MP6H8jBmegIf/PeAvL4qo0TVz/iAllPWDIh EvEhc3b6kkaU46w5HE2DDlL3Qo9M+rUXeuKDL9dxpYLlaVhmhqWUGK9PPTTC9H+UjU0S WV1TJtOjC9JVpHJIU3ML7ArbCMYUKJtEe8lXQw2GcTdX86pKznAJZB6nqL+6O6RCgDTj Stq9/+fzEfTKXuL/y2EHRMw7Ac/FCgjLlDt65akh6HPBTlqZXgBfbt8Ej6ousMRScEhT Dgww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pIVQ0uLKRGF+zNCL8jUKGOOYFri6iqKxRbPAToX9fQQ=; b=V3oIzhiYb+EIf5USWfWrj+1dUwm4n6n/U5beRLfbWA506AfrUx+os9ti0GNm/y2RC4 KOCrhRRco2+fX1o0k2qCbRDUWI9LnF4HeVridBcfEbpPZ3VzROVUIrEJlz3QkQKisHys IjS8PgyBlTubS+jwGEcWeo/ZnaJmbp0K8CloUPU7SFBnjUwiKEwxGVMOv64DyL7BJYNR TXT6txqXHiNSGkJoCE8xeBq+lHZHC3xrrj9FYOynz5CWkEbga92Mkuy27R72XWHrPEgH Q79knLyXtnGOvwQUOzyE8Se8vIc9rqO5s7KDouok6GHqzmmuTu/VLINPd8Dxee5qH0Od TIWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Vcxpvjxg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gr5si6549206ejb.509.2020.05.18.11.17.50; Mon, 18 May 2020 11:18:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Vcxpvjxg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732448AbgERSB7 (ORCPT + 99 others); Mon, 18 May 2020 14:01:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:44580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729294AbgERSB5 (ORCPT ); Mon, 18 May 2020 14:01:57 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 15853207D3; Mon, 18 May 2020 18:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589824916; bh=n1mz1mu8yVWyo3xoJFTGzVFj2+WDzOfgdPH4m6e8cBY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VcxpvjxgWmCNQuZN51UowBrmPeO83K3ELKViWD13KuOCbcMFwVD0Cai4UsNAw6Ygw gRj/bkMCy2qliXDEUb8vPhejlatWsHVfMC/qanPnZ9lT40kFOIc6HWdLoLBcyeC5pR mtY6rdeUxFim34/6ucEZjKjZtlmURbiHMzvxpIZQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xiaodong Yan , Tony Cheng , Rodrigo Siqueira , Alex Deucher , Sasha Levin Subject: [PATCH 5.6 056/194] drm/amd/display: blank dp stream before re-train the link Date: Mon, 18 May 2020 19:35:46 +0200 Message-Id: <20200518173536.399457226@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200518173531.455604187@linuxfoundation.org> References: <20200518173531.455604187@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiaodong Yan [ Upstream commit 718a5569b6fa6e1f49f1ae76a3c18acb4ddb74f1 ] [Why] When link loss happened, monitor can not light up if only re-train the link. [How] Blank all the DP streams on this link before re-train the link, and then unblank the stream Signed-off-by: Xiaodong Yan Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index fd9e69634c50a..1b6c75a4dd60a 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c @@ -2885,6 +2885,12 @@ bool dc_link_handle_hpd_rx_irq(struct dc_link *link, union hpd_irq_data *out_hpd sizeof(hpd_irq_dpcd_data), "Status: "); + for (i = 0; i < MAX_PIPES; i++) { + pipe_ctx = &link->dc->current_state->res_ctx.pipe_ctx[i]; + if (pipe_ctx && pipe_ctx->stream && pipe_ctx->stream->link == link) + link->dc->hwss.blank_stream(pipe_ctx); + } + for (i = 0; i < MAX_PIPES; i++) { pipe_ctx = &link->dc->current_state->res_ctx.pipe_ctx[i]; if (pipe_ctx && pipe_ctx->stream && pipe_ctx->stream->link == link) @@ -2904,6 +2910,12 @@ bool dc_link_handle_hpd_rx_irq(struct dc_link *link, union hpd_irq_data *out_hpd if (pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST) dc_link_reallocate_mst_payload(link); + for (i = 0; i < MAX_PIPES; i++) { + pipe_ctx = &link->dc->current_state->res_ctx.pipe_ctx[i]; + if (pipe_ctx && pipe_ctx->stream && pipe_ctx->stream->link == link) + link->dc->hwss.unblank_stream(pipe_ctx, &previous_link_settings); + } + status = false; if (out_link_loss) *out_link_loss = true; -- 2.20.1