drm/amd/display: Adding log for spread_spectrum_info
authorLeo Chen <SanChuan.Chen@amd.com>
Fri, 26 Aug 2022 15:29:23 +0000 (11:29 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 13 Sep 2022 18:33:00 +0000 (14:33 -0400)
[Why & How]
Enable logging for spread_spectrum_percentage in spread_spectrum_info
to facilitate debugging for audio compliance issues

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Co-authored-by: Leo Chen <SanChuan.Chen@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Pavle Kotarac <Pavle.Kotarac@amd.com>
Signed-off-by: Leo Chen <SanChuan.Chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c

index ead4da1..85ed0af 100644 (file)
@@ -849,6 +849,8 @@ static enum bp_result get_ss_info_v4_1(
                                disp_cntl_tbl->dvi_ss_rate_10hz * 10;
                if (disp_cntl_tbl->dvi_ss_mode & ATOM_SS_CENTRE_SPREAD_MODE)
                        ss_info->type.CENTER_MODE = true;
+
+               DC_LOG_BIOS("AS_SIGNAL_TYPE_DVI: %d\n", ss_info->spread_spectrum_percentage);
                break;
        case AS_SIGNAL_TYPE_HDMI:
                ss_info->spread_spectrum_percentage =
@@ -857,6 +859,8 @@ static enum bp_result get_ss_info_v4_1(
                                disp_cntl_tbl->hdmi_ss_rate_10hz * 10;
                if (disp_cntl_tbl->hdmi_ss_mode & ATOM_SS_CENTRE_SPREAD_MODE)
                        ss_info->type.CENTER_MODE = true;
+
+               DC_LOG_BIOS("AS_SIGNAL_TYPE_HDMI: %d\n", ss_info->spread_spectrum_percentage);
                break;
        /* TODO LVDS not support anymore? */
        case AS_SIGNAL_TYPE_DISPLAY_PORT:
@@ -866,6 +870,8 @@ static enum bp_result get_ss_info_v4_1(
                                disp_cntl_tbl->dp_ss_rate_10hz * 10;
                if (disp_cntl_tbl->dp_ss_mode & ATOM_SS_CENTRE_SPREAD_MODE)
                        ss_info->type.CENTER_MODE = true;
+
+               DC_LOG_BIOS("AS_SIGNAL_TYPE_DISPLAY_PORT: %d\n", ss_info->spread_spectrum_percentage);
                break;
        case AS_SIGNAL_TYPE_GPU_PLL:
                /* atom_firmware: DAL only get data from dce_info table.
@@ -886,6 +892,8 @@ static enum bp_result get_ss_info_v4_1(
                                smu_info->gpuclk_ss_rate_10hz * 10;
                if (smu_info->waflclk_ss_mode & ATOM_SS_CENTRE_SPREAD_MODE)
                        ss_info->type.CENTER_MODE = true;
+
+               DC_LOG_BIOS("AS_SIGNAL_TYPE_XGMI: %d\n", ss_info->spread_spectrum_percentage);
                break;
        default:
                result = BP_RESULT_UNSUPPORTED;
@@ -935,6 +943,8 @@ static enum bp_result get_ss_info_v4_2(
                                disp_cntl_tbl->dvi_ss_rate_10hz * 10;
                if (disp_cntl_tbl->dvi_ss_mode & ATOM_SS_CENTRE_SPREAD_MODE)
                        ss_info->type.CENTER_MODE = true;
+
+               DC_LOG_BIOS("AS_SIGNAL_TYPE_DVI: %d\n", ss_info->spread_spectrum_percentage);
                break;
        case AS_SIGNAL_TYPE_HDMI:
                ss_info->spread_spectrum_percentage =
@@ -943,6 +953,8 @@ static enum bp_result get_ss_info_v4_2(
                                disp_cntl_tbl->hdmi_ss_rate_10hz * 10;
                if (disp_cntl_tbl->hdmi_ss_mode & ATOM_SS_CENTRE_SPREAD_MODE)
                        ss_info->type.CENTER_MODE = true;
+
+               DC_LOG_BIOS("AS_SIGNAL_TYPE_HDMI: %d\n", ss_info->spread_spectrum_percentage);
                break;
        /* TODO LVDS not support anymore? */
        case AS_SIGNAL_TYPE_DISPLAY_PORT:
@@ -952,6 +964,8 @@ static enum bp_result get_ss_info_v4_2(
                                smu_info->gpuclk_ss_rate_10hz * 10;
                if (smu_info->gpuclk_ss_mode & ATOM_SS_CENTRE_SPREAD_MODE)
                        ss_info->type.CENTER_MODE = true;
+
+               DC_LOG_BIOS("AS_SIGNAL_TYPE_DISPLAY_PORT: %d\n", ss_info->spread_spectrum_percentage);
                break;
        case AS_SIGNAL_TYPE_GPU_PLL:
                /* atom_firmware: DAL only get data from dce_info table.
@@ -1000,6 +1014,8 @@ static enum bp_result get_ss_info_v4_5(
                                disp_cntl_tbl->dvi_ss_rate_10hz * 10;
                if (disp_cntl_tbl->dvi_ss_mode & ATOM_SS_CENTRE_SPREAD_MODE)
                        ss_info->type.CENTER_MODE = true;
+
+               DC_LOG_BIOS("AS_SIGNAL_TYPE_DVI: %d\n", ss_info->spread_spectrum_percentage);
                break;
        case AS_SIGNAL_TYPE_HDMI:
                ss_info->spread_spectrum_percentage =
@@ -1008,6 +1024,8 @@ static enum bp_result get_ss_info_v4_5(
                                disp_cntl_tbl->hdmi_ss_rate_10hz * 10;
                if (disp_cntl_tbl->hdmi_ss_mode & ATOM_SS_CENTRE_SPREAD_MODE)
                        ss_info->type.CENTER_MODE = true;
+
+               DC_LOG_BIOS("AS_SIGNAL_TYPE_HDMI: %d\n", ss_info->spread_spectrum_percentage);
                break;
        case AS_SIGNAL_TYPE_DISPLAY_PORT:
                ss_info->spread_spectrum_percentage =
@@ -1016,6 +1034,8 @@ static enum bp_result get_ss_info_v4_5(
                                disp_cntl_tbl->dp_ss_rate_10hz * 10;
                if (disp_cntl_tbl->dp_ss_mode & ATOM_SS_CENTRE_SPREAD_MODE)
                        ss_info->type.CENTER_MODE = true;
+
+               DC_LOG_BIOS("AS_SIGNAL_TYPE_DISPLAY_PORT: %d\n", ss_info->spread_spectrum_percentage);
                break;
        case AS_SIGNAL_TYPE_GPU_PLL:
                /* atom_smu_info_v4_0 does not have fields for SS for SMU Display PLL anymore.