All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anson Jacob <Anson.Jacob@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Wesley Chalmers <Wesley.Chalmers@amd.com>,
	Eryk.Brol@amd.com, Sunpeng.Li@amd.com, Harry.Wentland@amd.com,
	qingqing.zhuo@amd.com, Rodrigo.Siqueira@amd.com,
	roman.li@amd.com, Anson.Jacob@amd.com, Aurabindo.Pillai@amd.com,
	Jun Lei <Jun.Lei@amd.com>,
	Bhawanpreet.Lakha@amd.com, bindu.r@amd.com
Subject: [PATCH 13/24] drm/amd/display: Read LTTPR caps first on bootup
Date: Thu, 10 Jun 2021 12:28:27 -0400	[thread overview]
Message-ID: <20210610162838.287723-14-Anson.Jacob@amd.com> (raw)
In-Reply-To: <20210610162838.287723-1-Anson.Jacob@amd.com>

From: Wesley Chalmers <Wesley.Chalmers@amd.com>

[WHY]
SCR for DP 2.0 requires that LTTPR caps be read first on hotplug.
For the sake of consistency, this should also be the case on bootup.

Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Anson Jacob <Anson.Jacob@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 ++++
 drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c        | 3 +++
 drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h           | 1 +
 3 files changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
index 3b175af97388..711ba953a99b 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
@@ -54,6 +54,7 @@
 #include "dce/dmub_hw_lock_mgr.h"
 #include "dc_trace.h"
 #include "dce/dmub_outbox.h"
+#include "inc/dc_link_dp.h"
 
 #define DC_LOGGER_INIT(logger)
 
@@ -1403,6 +1404,9 @@ void dcn10_init_hw(struct dc *dc)
 			if (dc->links[i]->connector_signal != SIGNAL_TYPE_DISPLAY_PORT)
 				continue;
 
+			/* DP 2.0 requires that LTTPR Caps be read first */
+			dp_retrieve_lttpr_cap(dc->links[i]);
+
 			/*
 			 * If any of the displays are lit up turn them off.
 			 * The reason is that some MST hubs cannot be turned off
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
index ef5d0b778a72..6c88c5f236a7 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
@@ -48,6 +48,7 @@
 #include "dc_dmub_srv.h"
 #include "link_hwss.h"
 #include "dpcd_defs.h"
+#include "inc/dc_link_dp.h"
 
 
 
@@ -529,6 +530,8 @@ void dcn30_init_hw(struct dc *dc)
 		for (i = 0; i < dc->link_count; i++) {
 			if (dc->links[i]->connector_signal != SIGNAL_TYPE_DISPLAY_PORT)
 				continue;
+			/* DP 2.0 states that LTTPR regs must be read first */
+			dp_retrieve_lttpr_cap(dc->links[i]);
 
 			/* if any of the displays are lit up turn them off */
 			status = core_link_read_dpcd(dc->links[i], DP_SET_POWER,
diff --git a/drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h b/drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h
index dd38dd63697f..e2b58ec9912d 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h
@@ -190,4 +190,5 @@ enum dc_status dpcd_configure_lttpr_mode(
 		struct link_training_settings *lt_settings);
 
 enum dp_link_encoding dp_get_link_encoding_format(const struct dc_link_settings *link_settings);
+bool dp_retrieve_lttpr_cap(struct dc_link *link);
 #endif /* __DC_LINK_DP_H__ */
-- 
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2021-06-10 16:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 16:28 [PATCH 00/24] DC Patches June 10, 2021 Anson Jacob
2021-06-10 16:28 ` [PATCH 01/24] drm/amd/display: Remove unnecessary blank lines Anson Jacob
2021-06-10 16:28 ` [PATCH 02/24] drm/amd/display: add DMUB registers to crash dump diagnostic data Anson Jacob
2021-06-10 16:28 ` [PATCH 03/24] drm/amd/display: add config option for eDP hotplug detection Anson Jacob
2021-06-10 16:28 ` [PATCH 04/24] drm/amd/display: tune backlight ramping profiles Anson Jacob
2021-06-10 16:28 ` [PATCH 05/24] drm/amd/display: dp mst detection code refactor Anson Jacob
2021-06-10 16:28 ` [PATCH 06/24] drm/amd/display: Change swizzle visual confirm reference pipe Anson Jacob
2021-06-10 16:28 ` [PATCH 07/24] drm/amd/display: Updated variable name Anson Jacob
2021-06-10 16:28 ` [PATCH 08/24] drm/amd/display: [FW Promotion] Release 0.0.70 Anson Jacob
2021-06-10 16:28 ` [PATCH 09/24] drm/amd/display: 3.2.140 Anson Jacob
2021-06-10 16:28 ` [PATCH 10/24] drm/amd/display: move psr dm interface to separate files Anson Jacob
2021-06-10 16:28 ` [PATCH 11/24] drm/amd/display: Read LTTPR caps first on hotplug Anson Jacob
2021-06-10 16:28 ` [PATCH 12/24] drm/amd/display: Move LTTPR cap read into its own function Anson Jacob
2021-06-10 16:28 ` Anson Jacob [this message]
2021-06-10 16:28 ` [PATCH 14/24] drm/amd/display: Set LTTPR Transparent Mode after read link cap Anson Jacob
2021-06-10 16:28 ` [PATCH 15/24] drm/amd/display: Always write repeater mode regardless of LTTPR Anson Jacob
2021-06-10 16:28 ` [PATCH 16/24] drm/amd/display: Improve logic for is_lttpr_present Anson Jacob
2021-06-10 16:28 ` [PATCH 17/24] drm/amd/display: Enforce DPCD Address ranges Anson Jacob
2021-06-10 16:28 ` [PATCH 18/24] drm/amd/display: Rename constant Anson Jacob
2021-06-10 16:28 ` [PATCH 19/24] drm/amd/display: 7 retries + 50 ms timeout on AUX DEFER Anson Jacob
2021-06-10 16:28 ` [PATCH 20/24] drm/amd/display: Do not count I2C DEFERs with AUX DEFERs Anson Jacob
2021-06-10 16:28 ` [PATCH 21/24] drm/amd/display: Partition DPCD address space and break up transactions Anson Jacob
2021-06-10 16:28 ` [PATCH 22/24] drm/amd/display: Add interface to get Calibrated Avg Level from FIFO Anson Jacob
2021-06-10 16:28 ` [PATCH 23/24] drm/amd/display: Cover edge-case when changing DISPCLK WDIVIDER Anson Jacob
2021-06-10 16:28 ` [PATCH 24/24] drm/amd/display: Extend AUX timeout for DP initial reads Anson Jacob
2021-06-14 13:23 ` [PATCH 00/24] DC Patches June 10, 2021 Wheeler, Daniel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210610162838.287723-14-Anson.Jacob@amd.com \
    --to=anson.jacob@amd.com \
    --cc=Aurabindo.Pillai@amd.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Eryk.Brol@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Jun.Lei@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=Wesley.Chalmers@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bindu.r@amd.com \
    --cc=qingqing.zhuo@amd.com \
    --cc=roman.li@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.