From: <sunpeng.li-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: sunpeng.li-5C7GfCeVMHo@public.gmane.org
Subject: [PATCH 32/45] drm/amd/display: Add functionality to get XGMI SS info
Date: Tue, 11 Dec 2018 17:57:38 -0500 [thread overview]
Message-ID: <1544569071-7114-33-git-send-email-sunpeng.li@amd.com> (raw)
In-Reply-To: <1544569071-7114-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
From: Leo Li <sunpeng.li@amd.com>
[Why]
When XGMI is enabled, the DP reference clock needs to be adjusted
according to the XGMI spread spectrum percentage and mode. But first,
we need the ability to fetch this info.
[How]
Within the BIOS parser, Read from vBIOS when XGMI SS info is requested.
In addition, diags build uses include_legacy/atomfirmware.h for the
smu_info_v3_3 table headers. Update that as well.
Signed-off-by: Leo Li <sunpeng.li@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Tony Cheng <Tony.Cheng@amd.com>
---
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 15 +++++++++++++++
drivers/gpu/drm/amd/display/include/bios_parser_types.h | 1 +
2 files changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index 751bb61..c513ab6 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -638,6 +638,7 @@ static enum bp_result get_ss_info_v4_1(
{
enum bp_result result = BP_RESULT_OK;
struct atom_display_controller_info_v4_1 *disp_cntl_tbl = NULL;
+ struct atom_smu_info_v3_3 *smu_info = NULL;
if (!ss_info)
return BP_RESULT_BADINPUT;
@@ -650,6 +651,7 @@ static enum bp_result get_ss_info_v4_1(
if (!disp_cntl_tbl)
return BP_RESULT_BADBIOSTABLE;
+
ss_info->type.STEP_AND_DELAY_INFO = false;
ss_info->spread_percentage_divider = 1000;
/* BIOS no longer uses target clock. Always enable for now */
@@ -688,6 +690,19 @@ static enum bp_result get_ss_info_v4_1(
*/
result = BP_RESULT_UNSUPPORTED;
break;
+ case AS_SIGNAL_TYPE_XGMI:
+ smu_info = GET_IMAGE(struct atom_smu_info_v3_3,
+ DATA_TABLES(smu_info));
+ if (!smu_info)
+ return BP_RESULT_BADBIOSTABLE;
+
+ ss_info->spread_spectrum_percentage =
+ smu_info->waflclk_ss_percentage;
+ ss_info->spread_spectrum_range =
+ smu_info->gpuclk_ss_rate_10hz * 10;
+ if (smu_info->waflclk_ss_mode & ATOM_SS_CENTRE_SPREAD_MODE)
+ ss_info->type.CENTER_MODE = true;
+ break;
default:
result = BP_RESULT_UNSUPPORTED;
}
diff --git a/drivers/gpu/drm/amd/display/include/bios_parser_types.h b/drivers/gpu/drm/amd/display/include/bios_parser_types.h
index b14b3c2..01bf01a 100644
--- a/drivers/gpu/drm/amd/display/include/bios_parser_types.h
+++ b/drivers/gpu/drm/amd/display/include/bios_parser_types.h
@@ -41,6 +41,7 @@ enum as_signal_type {
AS_SIGNAL_TYPE_LVDS,
AS_SIGNAL_TYPE_DISPLAY_PORT,
AS_SIGNAL_TYPE_GPU_PLL,
+ AS_SIGNAL_TYPE_XGMI,
AS_SIGNAL_TYPE_UNKNOWN
};
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-12-11 22:57 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 22:57 [PATCH 00/45] DC Patches Dec 11, 2018 sunpeng.li-5C7GfCeVMHo
[not found] ` <1544569071-7114-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2018-12-11 22:57 ` [PATCH 01/45] drm/amd/display: 3.2.09 sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 02/45] drm/amd/display: Add a PP_SMU_VER_MAX enum sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 03/45] drm/amd/display: Expose hubp1_vready_workaround function sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 04/45] drm/amd/display: Fix runtime errors for diagnostic tests sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 05/45] drm/amd/display: fix surface update sequence sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 06/45] drm/amd/display: Add pixel clock values to dtn logs sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 07/45] drm/amd/display: Remove some extra braces sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 08/45] drm/amd/display: implement dc_init_callbacks to assign callback pointers after dc_create sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 09/45] drm/amd/display: add plane size change check condition sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 10/45] drm/amd/display: Fix issue with VLine interrupt not firing sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 11/45] drm/amd/display: update bw formula to v252 sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 12/45] drm/amd/display: Add debug option to force fclk request sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 13/45] drm/amd/display: remove sink reference in dc_stream_state sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 14/45] drm/amd/display: Remove unused headers sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 15/45] drm/amd/display: Detach backlight from stream sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 16/45] drm/amd/display: Raise dispclk value for Polaris sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 17/45] drm/amd/display: Warn instead of error on REG_WAIT timeout sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 18/45] drm/amd/display: update DCN dml calcs sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 19/45] drm/amd/display: fix YCbCr420 blank color sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 20/45] drm/amd/display: Wait edp HPD to high in detect_sink sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 21/45] drm/amd/display: Don't skip link training for empty dongle sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 22/45] drm/amd/display: add stream ID and otg instance in dc_stream_state sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 23/45] drm/amd/display: Add backlight pwm debugfs sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 24/45] drm/amd/display: 3.2.10 sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 25/45] drm/amd/display: Remove stream_status->link sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 26/45] drm/amd/display: Add retry to read ddc_clock pin sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 27/45] drm/amd/display: Fix driver load crash in amdgpu_dm sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 28/45] drm/amd/display: Minor code cleanup sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 29/45] drm/amd/display: Use 100 Hz precision for pipe pixel clocks sunpeng.li-5C7GfCeVMHo
[not found] ` <1544569071-7114-30-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2018-12-12 8:19 ` Christian König
[not found] ` <2cf9b879-6c37-6879-e4bb-12fb309f8e94-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-12-12 18:29 ` Chalmers, Kenneth
2018-12-11 22:57 ` [PATCH 30/45] drm/amd/display: Improve logging of validation failures during atomic_check sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 31/45] drm/amd/display: Add DCE_VERSION_12_1 enum for Vega 20 sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` sunpeng.li-5C7GfCeVMHo [this message]
2018-12-11 22:57 ` [PATCH 33/45] drm/amd/display: Use local variable instead of caching global sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 34/45] drm/amd/display: Compensate for XGMI SS downspread on dprefclk sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 35/45] drm/amd/display: 3.2.11 sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 36/45] drm/amd/display: Start using the new pp_smu interface sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 37/45] drm/amd/display: Fix bug with not updating VSP infoframe sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 38/45] drm/amd/display: add dsclk to pipe bw struct sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 39/45] drm/amd/display: move AYCrCb8888 format to video section sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 40/45] drm/amd/display: Don't log error if we have no connectors sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 41/45] drm/amd/display: verify lane status before exiting verify link cap sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 42/45] drm/amd/display: Optimize passive update planes sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 43/45] drm/amd/display: Expand set_pixel_clock debug log message sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 44/45] drm/amd/display: validate extended dongle caps sunpeng.li-5C7GfCeVMHo
2018-12-11 22:57 ` [PATCH 45/45] drm/amd/display: Remove unused parameter plane_states sunpeng.li-5C7GfCeVMHo
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=1544569071-7114-33-git-send-email-sunpeng.li@amd.com \
--to=sunpeng.li-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/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