From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3BD1289340; Wed, 23 Apr 2025 15:03:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745420611; cv=none; b=FhhM5Y9U6niH9jpP/I7SWbLx4QBaH4jHPt1wGciQn+mttvkmZTEY5cN2rmF5WZt6+h40GVnZfzEbYq8j8JzhNHxIel6ZtaWkFpzvNZVPyZ7WagVtvOcJx0qyhPTJWya405IvXFcr82sbZaD8xnvqwypgv2kihHfahig86hLLfNc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745420611; c=relaxed/simple; bh=cSYNyQfPDvCrfCzC+E8wNlmsIO4+4Foas7nhd4iAw8U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VlWlPBk2duWxaTqiyysZaFs6wDSRNRTLQyAs06SnRzYo2iEBoKUuv17U0oUJwd66C3MoZK6b2B24eyA4S6bvtNb6B1dxi8YBJS1EmC6ywhHJIiuuDWyH26Hq/U1xw+RUrn2Z1jXYVcMTRVS6IKINka2G1KqtPiNoUAeIIen0yxg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=L8rvTfQr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="L8rvTfQr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31C70C4CEE2; Wed, 23 Apr 2025 15:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745420611; bh=cSYNyQfPDvCrfCzC+E8wNlmsIO4+4Foas7nhd4iAw8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L8rvTfQrdjKtaM3BqUgUCqGMN1hj+SGtz7+eiRngHFPldmc7S0KRgLBuzk1cBm3lN D/JzWXLLihaQ52Fy+3y0dndgzYwy4h8a/Y/L442aIIcQTctilEMqr5BzkrPqiEMNC7 ZSBinqAJqYqxL5YcrVCYEaVoLz9xE3BLd4E27k5o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wenjing Liu , Brendan Tam , Aurabindo Pillai , Daniel Wheeler , Alex Deucher , Sasha Levin Subject: [PATCH 6.6 093/393] drm/amd/display: add workaround flag to link to force FFE preset Date: Wed, 23 Apr 2025 16:39:49 +0200 Message-ID: <20250423142647.132766266@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250423142643.246005366@linuxfoundation.org> References: <20250423142643.246005366@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Brendan Tam [ Upstream commit 51d1b338541dea83fec8e6f95d3e46fa469a73a8 ] [Why] There have been instances of some monitors being unable to link train on their reported link speed using their selected FFE preset. If a different FFE preset is found that has a higher rate of success during link training this workaround can be used to force its FFE preset. [How] A new link workaround flag is made called force_dp_ffe_preset. The flag is checked in override_training_settings and will set lt_settings->ffe_preset which is null if the flag is not set. The flag is then set in override_lane_settings. Reviewed-by: Wenjing Liu Signed-off-by: Brendan Tam Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ .../gpu/drm/amd/display/dc/link/protocols/link_dp_training.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index cc5e01df15135..88e64b280c90f 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -1563,7 +1563,9 @@ struct dc_link { bool dongle_mode_timing_override; bool blank_stream_on_ocs_change; bool read_dpcd204h_on_irq_hpd; + bool force_dp_ffe_preset; } wa_flags; + union dc_dp_ffe_preset forced_dp_ffe_preset; struct link_mst_stream_allocation_table mst_stream_alloc_table; struct dc_link_status link_status; diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c index 9d1adfc09fb2a..51e88efee11e4 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c @@ -697,6 +697,8 @@ void override_training_settings( lt_settings->pre_emphasis = overrides->pre_emphasis; if (overrides->post_cursor2 != NULL) lt_settings->post_cursor2 = overrides->post_cursor2; + if (link->wa_flags.force_dp_ffe_preset && !dp_is_lttpr_present(link)) + lt_settings->ffe_preset = &link->forced_dp_ffe_preset; if (overrides->ffe_preset != NULL) lt_settings->ffe_preset = overrides->ffe_preset; /* Override HW lane settings with BIOS forced values if present */ -- 2.39.5