Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp787730ybj; Thu, 7 May 2020 07:39:33 -0700 (PDT) X-Google-Smtp-Source: APiQypKJB81UucE1WsaU1ZwX/jCjgjVWNIC0a+WSqDvWmbwK+v7IXcLbyfAI859Ec31Y6ZSs/ucl X-Received: by 2002:aa7:d306:: with SMTP id p6mr11972726edq.35.1588862373494; Thu, 07 May 2020 07:39:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588862373; cv=none; d=google.com; s=arc-20160816; b=kLu7zgnrhOxfXoMUXYO6e9SVTng39UT+e+VLR57taw2rr0bEirqLGQKFTcKKlPFcxn JrHXHoZZkqt1pbaT4DoM4ef3j7fS90zlTASmrxv6pjbZU24UUh8xkLIec74Mvn2PkOeI y5f4c6V+hzm/lAcLI39P8b7qMl2E0hUS7sx6jGgbzyAQ3n0+cvDYc4pIdReRQymsukrP /GdIHSPuTUwX1QEMqvFlMCCWH8Yql3q3FkZTCprSACjqhNnvW71H40+g5j6T5sBTEGtf r3s93OQk6doBSpHWro0weW0/WCDKkBZKtAC7lkY0RZTig/gH1AN2Ek9X64AJZE2RY1IQ MySg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pIVQ0uLKRGF+zNCL8jUKGOOYFri6iqKxRbPAToX9fQQ=; b=lRN8uuz1xgUL9tnx6PxJjG8hMEFs3Fjw98Hj5jd4FHzH5sLgWvwX8s37y/2ngSwerG Qa97YnGeXPZUyYKd3LQAKAI/CAwzcduzixX/c2kSs6r3NdrkkJZUR8K7qbt0Xg+zNoOk G7fP35K3r29JNOTH9hFXReFtHtbA1+a8q9xeazkvPwPAASt5FDBhbMj58ajuDkXQJnY6 iIzaoQIdsrkK7yza5DfCcT2qIXOoRux0NOinucBAWLJAHSfHWGkNZLqFTw3TUepqShcg Hci/pj6wedz4GISEc3YJaqlq7kOVxsy2JVLsAy+GRK9uYqH0lUrZTH8arYK0a01QpDLv 7Liw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EHpFiZkF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j4si3285011edq.8.2020.05.07.07.39.08; Thu, 07 May 2020 07:39:33 -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=EHpFiZkF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727841AbgEGO14 (ORCPT + 99 others); Thu, 7 May 2020 10:27:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:53854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727815AbgEGO1x (ORCPT ); Thu, 7 May 2020 10:27:53 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BE18120A8B; Thu, 7 May 2020 14:27:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588861672; bh=n1mz1mu8yVWyo3xoJFTGzVFj2+WDzOfgdPH4m6e8cBY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EHpFiZkFcID4GLw7zPYtAHdAttiPSEs4St2oh7N3TtWXYgokJ9t3HN1tZXuvfG2+e RHPMlwF2q6x1voyZZcIldPXjmls8c/4ySjtdXaCkGRiV9D8rtHaF9rQaFN1YBTcifq Jq4xwu8r9L4oY635f5kcna54l+5zVBSaFuCByORA= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Xiaodong Yan , Tony Cheng , Rodrigo Siqueira , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.6 21/50] drm/amd/display: blank dp stream before re-train the link Date: Thu, 7 May 2020 10:26:57 -0400 Message-Id: <20200507142726.25751-21-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200507142726.25751-1-sashal@kernel.org> References: <20200507142726.25751-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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