From: Anson Jacob <Anson.Jacob@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: stylon.wang@amd.com, Anthony Koo <Anthony.Koo@amd.com>,
solomon.chiu@amd.com, Sunpeng.Li@amd.com, Harry.Wentland@amd.com,
qingqing.zhuo@amd.com, Robin Chen <po-tchen@amd.com>,
Rodrigo.Siqueira@amd.com, roman.li@amd.com, Anson.Jacob@amd.com,
Aurabindo.Pillai@amd.com, wayne.lin@amd.com,
mikita.lipski@amd.com, Bhawanpreet.Lakha@amd.com,
agustin.gutierrez@amd.com, pavle.kotarac@amd.com
Subject: [PATCH 19/22] drm/amd/display: To support sending TPS3 pattern when restoring link
Date: Thu, 4 Nov 2021 16:52:12 -0400 [thread overview]
Message-ID: <20211104205215.1125899-20-Anson.Jacob@amd.com> (raw)
In-Reply-To: <20211104205215.1125899-1-Anson.Jacob@amd.com>
From: Robin Chen <po-tchen@amd.com>
[Why]
Some panels require to use TPS3 pattern to wake up link in PSR mode.
[How]
To add TPS3 selection information in PSR settings command and pass to
DMUB FW.
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Anson Jacob <Anson.Jacob@amd.com>
Signed-off-by: Robin Chen <po-tchen@amd.com>
---
drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 9 +++++++++
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 5 ++---
drivers/gpu/drm/amd/display/include/ddc_service_types.h | 3 +++
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
index e9c0ec2ec4ce..60b2ccffaf90 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
@@ -330,6 +330,15 @@ static bool dmub_psr_copy_settings(struct dmub_psr *dmub,
copy_settings_data->cmd_version = DMUB_CMD_PSR_CONTROL_VERSION_1;
copy_settings_data->panel_inst = panel_inst;
+ if (link->fec_state == dc_link_fec_enabled &&
+ (!memcmp(link->dpcd_caps.sink_dev_id_str, DP_SINK_DEVICE_STR_ID_1,
+ sizeof(link->dpcd_caps.sink_dev_id_str)) ||
+ !memcmp(link->dpcd_caps.sink_dev_id_str, DP_SINK_DEVICE_STR_ID_2,
+ sizeof(link->dpcd_caps.sink_dev_id_str))))
+ copy_settings_data->debug.bitfields.force_wakeup_by_tps3 = 1;
+ else
+ copy_settings_data->debug.bitfields.force_wakeup_by_tps3 = 0;
+
dc_dmub_srv_cmd_queue(dc->dmub_srv, &cmd);
dc_dmub_srv_cmd_execute(dc->dmub_srv);
dc_dmub_srv_wait_idle(dc->dmub_srv);
diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
index 1c4cac4a4894..93631b0db881 100644
--- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
+++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
@@ -209,10 +209,9 @@ union dmub_psr_debug_flags {
uint32_t use_hw_lock_mgr : 1;
/**
- * Unused.
- * TODO: Remove.
+ * Use TPS3 signal when restore main link.
*/
- uint32_t log_line_nums : 1;
+ uint32_t force_wakeup_by_tps3 : 1;
} bitfields;
/**
diff --git a/drivers/gpu/drm/amd/display/include/ddc_service_types.h b/drivers/gpu/drm/amd/display/include/ddc_service_types.h
index 4de59b66bb1a..85b25e684464 100644
--- a/drivers/gpu/drm/amd/display/include/ddc_service_types.h
+++ b/drivers/gpu/drm/amd/display/include/ddc_service_types.h
@@ -117,4 +117,7 @@ struct av_sync_data {
uint8_t aud_del_ins3;/* DPCD 0002Dh */
};
+static const uint8_t DP_SINK_DEVICE_STR_ID_1[] = {7, 1, 8, 7, 3, 0};
+static const uint8_t DP_SINK_DEVICE_STR_ID_2[] = {7, 1, 8, 7, 5, 0};
+
#endif /* __DAL_DDC_SERVICE_TYPES_H__ */
--
2.25.1
next prev parent reply other threads:[~2021-11-04 20:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-04 20:51 [PATCH 00/22] DC Patches Nov 4, 2021 Anson Jacob
2021-11-04 20:51 ` [PATCH 01/22] drm/amd/display: Add helper for blanking all dp displays Anson Jacob
2021-11-04 20:51 ` [PATCH 02/22] drm/amd/display: Pass panel inst to a PSR command Anson Jacob
2021-11-04 20:51 ` [PATCH 03/22] drm/amd/display: remove dmcub_support cap dependency Anson Jacob
2021-11-04 20:51 ` [PATCH 04/22] drm/amd/display: Add comment where CONFIG_DRM_AMD_DC_DCN macro ends Anson Jacob
2021-11-04 20:51 ` [PATCH 05/22] drm/amd/display: Fix RGB MPO underflow with multiple displays Anson Jacob
2021-11-04 20:51 ` [PATCH 06/22] drm/amd/display: Use link_enc_cfg API for queries Anson Jacob
2021-11-04 20:52 ` [PATCH 07/22] drm/amd/display: Fix detection of aligned DMUB firmware meta info Anson Jacob
2021-11-04 20:52 ` [PATCH 08/22] drm/amd/display: bring dcn31 clk mgr in line with other version style Anson Jacob
2021-11-04 20:52 ` [PATCH 09/22] drm/amd/display: clean up some formats and log Anson Jacob
2021-11-04 20:52 ` [PATCH 10/22] drm/amd/display: use link_rate_set above DPCD 1.3 (#1527) Anson Jacob
2021-11-04 20:52 ` [PATCH 11/22] drm/amd/display: fix stale info in link encoder assignment Anson Jacob
2021-11-04 20:52 ` [PATCH 12/22] drm/amd/display: retain/release stream pointer in link enc table Anson Jacob
2021-11-04 20:52 ` [PATCH 13/22] drm/amd/display: Don't lock connection_mutex for DMUB HPD Anson Jacob
2021-11-04 20:52 ` [PATCH 14/22] drm/amd/display: Add callbacks for DMUB HPD IRQ notifications Anson Jacob
2021-11-04 20:52 ` [PATCH 15/22] drm/amd/display: Fix Coverity Issues Anson Jacob
2021-11-04 20:52 ` [PATCH 16/22] drm/amd/display: Add hpd pending flag to indicate detection of new hpd Anson Jacob
2021-11-04 20:52 ` [PATCH 17/22] drm/amd/display: Adjust code indentation Anson Jacob
2021-11-04 20:52 ` [PATCH 18/22] drm/amd/display: 3.2.161 Anson Jacob
2021-11-04 20:52 ` Anson Jacob [this message]
2021-11-04 20:52 ` [PATCH 20/22] drm/amd/display: Query all entries in assignment table during updates Anson Jacob
2021-11-04 20:52 ` [PATCH 21/22] drm/amd/display: Initialise encoder assignment when initialising dc_state Anson Jacob
2021-11-04 20:52 ` [PATCH 22/22] drm/amd/display: Wait for ACK for INBOX0 HW Lock Anson Jacob
2021-11-05 20:14 ` [PATCH 00/22] DC Patches Nov 4, 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=20211104205215.1125899-20-Anson.Jacob@amd.com \
--to=anson.jacob@amd.com \
--cc=Anthony.Koo@amd.com \
--cc=Aurabindo.Pillai@amd.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=Harry.Wentland@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Sunpeng.Li@amd.com \
--cc=agustin.gutierrez@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=mikita.lipski@amd.com \
--cc=pavle.kotarac@amd.com \
--cc=po-tchen@amd.com \
--cc=qingqing.zhuo@amd.com \
--cc=roman.li@amd.com \
--cc=solomon.chiu@amd.com \
--cc=stylon.wang@amd.com \
--cc=wayne.lin@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox