Commit 4e60536d authored by Nicholas Kazlauskas's avatar Nicholas Kazlauskas Committed by Alex Deucher

drm/amd/display: Set DFS bypass flags for dce110

[Why]

While there is support for using and quering DFS bypass clocks the
hardware is never notified to enter DFS bypass mode for dce110.

[How]

Add a flag that can be set when programming the display engine PLL
to enable DFS bypass mode. If this flag is set then the hardware is
notified to enter DFS bypass mode and the correct display engine clock
frequency can be acquired.
Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Acked-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2cb3bcdb
...@@ -2201,6 +2201,9 @@ static enum bp_result program_clock_v6( ...@@ -2201,6 +2201,9 @@ static enum bp_result program_clock_v6(
if (bp_params->flags.SET_EXTERNAL_REF_DIV_SRC) if (bp_params->flags.SET_EXTERNAL_REF_DIV_SRC)
params.sPCLKInput.ucMiscInfo |= PIXEL_CLOCK_MISC_REF_DIV_SRC; params.sPCLKInput.ucMiscInfo |= PIXEL_CLOCK_MISC_REF_DIV_SRC;
if (bp_params->flags.SET_DISPCLK_DFS_BYPASS)
params.sPCLKInput.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_DPREFCLK_BYPASS;
if (EXEC_BIOS_CMD_TABLE(SetPixelClock, params)) { if (EXEC_BIOS_CMD_TABLE(SetPixelClock, params)) {
/* True display clock is returned by VBIOS if DFS bypass /* True display clock is returned by VBIOS if DFS bypass
* is enabled. */ * is enabled. */
......
...@@ -255,6 +255,9 @@ static int dce_set_clock( ...@@ -255,6 +255,9 @@ static int dce_set_clock(
pxl_clk_params.target_pixel_clock = requested_clk_khz; pxl_clk_params.target_pixel_clock = requested_clk_khz;
pxl_clk_params.pll_id = CLOCK_SOURCE_ID_DFS; pxl_clk_params.pll_id = CLOCK_SOURCE_ID_DFS;
if (clk_dce->dfs_bypass_enabled)
pxl_clk_params.flags.SET_DISPCLK_DFS_BYPASS = true;
bp->funcs->program_display_engine_pll(bp, &pxl_clk_params); bp->funcs->program_display_engine_pll(bp, &pxl_clk_params);
if (clk_dce->dfs_bypass_enabled) { if (clk_dce->dfs_bypass_enabled) {
......
...@@ -234,6 +234,8 @@ struct bp_pixel_clock_parameters { ...@@ -234,6 +234,8 @@ struct bp_pixel_clock_parameters {
uint32_t USE_E_CLOCK_AS_SOURCE_FOR_D_CLOCK:1; uint32_t USE_E_CLOCK_AS_SOURCE_FOR_D_CLOCK:1;
/* Use external reference clock (refDivSrc for PLL) */ /* Use external reference clock (refDivSrc for PLL) */
uint32_t SET_EXTERNAL_REF_DIV_SRC:1; uint32_t SET_EXTERNAL_REF_DIV_SRC:1;
/* Use DFS bypass for Display clock. */
uint32_t SET_DISPCLK_DFS_BYPASS:1;
/* Force program PHY PLL only */ /* Force program PHY PLL only */
uint32_t PROGRAM_PHY_PLL_ONLY:1; uint32_t PROGRAM_PHY_PLL_ONLY:1;
/* Support for YUV420 */ /* Support for YUV420 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment