drm/amd/display: Change to correct unit on audio rate
authorChris Park <Chris.Park@amd.com>
Tue, 22 Sep 2020 22:31:38 +0000 (18:31 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Oct 2020 19:13:47 +0000 (15:13 -0400)
[Why]
Formula uses kHz in their formula while our driver operates with Hz.

[How]
Divide audio rate by 1000 on the initial variable that is entered into formula.

Signed-off-by: Chris Park <Chris.Park@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Eryk Brol <eryk.brol@amd.com>
Acked-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

index bf37a22..d50a9c3 100644 (file)
@@ -150,7 +150,6 @@ struct _vcs_dpi_ip_params_st dcn2_0_ip = {
        .dispclk_delay_subtotal = 87, //
        .dcfclk_cstate_latency = 10, // SRExitTime
        .max_inter_dcn_tile_repeaters = 8,
-
        .xfc_supported = true,
        .xfc_fill_bw_overhead_percent = 10.0,
        .xfc_fill_constant_bytes = 0,
@@ -2203,9 +2202,9 @@ int dcn20_populate_dml_pipes_from_context(
                /* todo: default max for now, until there is logic reflecting this in dc*/
                pipes[pipe_cnt].dout.output_bpc = 12;
 #if defined(CONFIG_DRM_AMD_DC_DCN3_0)
-               /*fill up the audio sample rate*/
+               /*fill up the audio sample rate (unit in kHz)*/
                get_audio_check(&res_ctx->pipe_ctx[i].stream->audio_info, &aud_check);
-               pipes[pipe_cnt].dout.max_audio_sample_rate = aud_check.max_audiosample_rate;
+               pipes[pipe_cnt].dout.max_audio_sample_rate = aud_check.max_audiosample_rate / 1000;
 #endif
                /*
                 * For graphic plane, cursor number is 1, nv12 is 0