unsigned int *num_audio,
struct audio_support *aud_support)
{
+ aud_support->dp_audio = true;
+ aud_support->hdmi_audio_native = false;
+ aud_support->hdmi_audio_on_dongle = false;
+
if (straps->hdmi_disable == 0) {
- aud_support->hdmi_audio_native = true;
- aud_support->hdmi_audio_on_dongle = true;
- aud_support->dp_audio = true;
- } else {
if (straps->dc_pinstraps_audio & 0x2) {
aud_support->hdmi_audio_on_dongle = true;
- aud_support->dp_audio = true;
- } else {
- aud_support->dp_audio = true;
+ aud_support->hdmi_audio_native = true;
}
}
return true;
}
-static void dce_set_clock(
+static int dce_set_clock(
struct display_clock *clk,
int requested_clk_khz)
{
struct dce_disp_clk *clk_dce = TO_DCE_CLOCKS(clk);
struct bp_pixel_clock_parameters pxl_clk_params = { 0 };
struct dc_bios *bp = clk->ctx->dc_bios;
+ int actual_clock = requested_clk_khz;
/* Make sure requested clock isn't lower than minimum threshold*/
if (requested_clk_khz > 0)
/* Cache the fixed display clock*/
clk_dce->dfs_bypass_disp_clk =
pxl_clk_params.dfs_bypass_display_clock;
+ actual_clock = pxl_clk_params.dfs_bypass_display_clock;
}
/* from power down, we need mark the clock state as ClocksStateNominal
* from HWReset, so when resume we will call pplib voltage regulator.*/
if (requested_clk_khz == 0)
clk->cur_min_clks_state = DM_PP_CLOCKS_STATE_NOMINAL;
+ return actual_clock;
}
-static void dce_psr_set_clock(
+static int dce_psr_set_clock(
struct display_clock *clk,
int requested_clk_khz)
{
struct dc_context *ctx = clk_dce->base.ctx;
struct core_dc *core_dc = DC_TO_CORE(ctx->dc);
struct dmcu *dmcu = core_dc->res_pool->dmcu;
+ int actual_clk_khz = requested_clk_khz;
- dce_set_clock(clk, requested_clk_khz);
+ actual_clk_khz = dce_set_clock(clk, requested_clk_khz);
- dmcu->funcs->set_psr_wait_loop(dmcu, requested_clk_khz / 1000 / 7);
+ dmcu->funcs->set_psr_wait_loop(dmcu, actual_clk_khz / 1000 / 7);
+ return actual_clk_khz;
}
-static void dce112_set_clock(
+static int dce112_set_clock(
struct display_clock *clk,
int requested_clk_khz)
{
struct core_dc *core_dc = DC_TO_CORE(clk->ctx->dc);
struct abm *abm = core_dc->res_pool->abm;
struct dmcu *dmcu = core_dc->res_pool->dmcu;
-
+ int actual_clock = requested_clk_khz;
/* Prepare to program display clock*/
memset(&dce_clk_params, 0, sizeof(dce_clk_params));
dce_clk_params.clock_type = DCECLOCK_TYPE_DISPLAY_CLOCK;
bp->funcs->set_dce_clock(bp, &dce_clk_params);
+ actual_clock = dce_clk_params.target_clock_frequency;
/* from power down, we need mark the clock state as ClocksStateNominal
* from HWReset, so when resume we will call pplib voltage regulator.*/
if (abm->funcs->is_dmcu_initialized(abm))
dmcu->funcs->set_psr_wait_loop(dmcu,
- requested_clk_khz / 1000 / 7);
-
+ actual_clock / 1000 / 7);
+ return actual_clock;
}
static void dce_clock_read_integrated_info(struct dce_disp_clk *clk_dce)