Commit 1155150d authored by Leo Chen's avatar Leo Chen Committed by Alex Deucher

drm/amd/display: Revert "drm/amd/display: Read down-spread percentage from lut to adjust dprefclk."

[Why & How]
Revert commit 6917b0b7 ("drm/amd/display: Read down-spread percentage from lut to adjust dprefclk.")
This change was causing 240hz display to not light up after s0i3.
Reviewed-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: default avatarTom Chung <chiahsuan.chung@amd.com>
Signed-off-by: default avatarLeo Chen <sancchen@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 77cf0607
...@@ -87,14 +87,6 @@ static const struct IP_BASE CLK_BASE = { { { { 0x00016C00, 0x02401800, 0, 0, 0, ...@@ -87,14 +87,6 @@ static const struct IP_BASE CLK_BASE = { { { { 0x00016C00, 0x02401800, 0, 0, 0,
#define CLK1_CLK_PLL_REQ__PllSpineDiv_MASK 0x0000F000L #define CLK1_CLK_PLL_REQ__PllSpineDiv_MASK 0x0000F000L
#define CLK1_CLK_PLL_REQ__FbMult_frac_MASK 0xFFFF0000L #define CLK1_CLK_PLL_REQ__FbMult_frac_MASK 0xFFFF0000L
#define regCLK1_CLK2_BYPASS_CNTL 0x029c
#define regCLK1_CLK2_BYPASS_CNTL_BASE_IDX 0
#define CLK1_CLK2_BYPASS_CNTL__CLK2_BYPASS_SEL__SHIFT 0x0
#define CLK1_CLK2_BYPASS_CNTL__LK2_BYPASS_DIV__SHIFT 0x10
#define CLK1_CLK2_BYPASS_CNTL__CLK2_BYPASS_SEL_MASK 0x00000007L
#define CLK1_CLK2_BYPASS_CNTL__LK2_BYPASS_DIV_MASK 0x000F0000L
#define REG(reg_name) \ #define REG(reg_name) \
(CLK_BASE.instance[0].segment[reg ## reg_name ## _BASE_IDX] + reg ## reg_name) (CLK_BASE.instance[0].segment[reg ## reg_name ## _BASE_IDX] + reg ## reg_name)
...@@ -444,11 +436,6 @@ static DpmClocks314_t dummy_clocks; ...@@ -444,11 +436,6 @@ static DpmClocks314_t dummy_clocks;
static struct dcn314_watermarks dummy_wms = { 0 }; static struct dcn314_watermarks dummy_wms = { 0 };
static struct dcn314_ss_info_table ss_info_table = {
.ss_divider = 1000,
.ss_percentage = {0, 0, 375, 375, 375}
};
static void dcn314_build_watermark_ranges(struct clk_bw_params *bw_params, struct dcn314_watermarks *table) static void dcn314_build_watermark_ranges(struct clk_bw_params *bw_params, struct dcn314_watermarks *table)
{ {
int i, num_valid_sets; int i, num_valid_sets;
...@@ -728,20 +715,6 @@ static struct clk_mgr_funcs dcn314_funcs = { ...@@ -728,20 +715,6 @@ static struct clk_mgr_funcs dcn314_funcs = {
}; };
extern struct clk_mgr_funcs dcn3_fpga_funcs; extern struct clk_mgr_funcs dcn3_fpga_funcs;
static void dcn314_read_ss_info_from_lut(struct clk_mgr_internal *clk_mgr)
{
uint32_t clock_source;
REG_GET(CLK1_CLK2_BYPASS_CNTL, CLK2_BYPASS_SEL, &clock_source);
clk_mgr->dprefclk_ss_percentage = ss_info_table.ss_percentage[clock_source];
if (clk_mgr->dprefclk_ss_percentage != 0) {
clk_mgr->ss_on_dprefclk = true;
clk_mgr->dprefclk_ss_divider = ss_info_table.ss_divider;
}
}
void dcn314_clk_mgr_construct( void dcn314_clk_mgr_construct(
struct dc_context *ctx, struct dc_context *ctx,
struct clk_mgr_dcn314 *clk_mgr, struct clk_mgr_dcn314 *clk_mgr,
...@@ -808,11 +781,8 @@ void dcn314_clk_mgr_construct( ...@@ -808,11 +781,8 @@ void dcn314_clk_mgr_construct(
clk_mgr->base.base.dprefclk_khz = 600000; clk_mgr->base.base.dprefclk_khz = 600000;
clk_mgr->base.base.clks.ref_dtbclk_khz = 600000; clk_mgr->base.base.clks.ref_dtbclk_khz = 600000;
dce_clock_read_ss_info(&clk_mgr->base);
dcn314_read_ss_info_from_lut(&clk_mgr->base);
/*if bios enabled SS, driver needs to adjust dtb clock, only enable with correct bios*/ /*if bios enabled SS, driver needs to adjust dtb clock, only enable with correct bios*/
clk_mgr->base.base.dprefclk_khz =
dce_adjust_dp_ref_freq_for_ss(&clk_mgr->base, clk_mgr->base.base.dprefclk_khz);
clk_mgr->base.base.bw_params = &dcn314_bw_params; clk_mgr->base.base.bw_params = &dcn314_bw_params;
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
#define __DCN314_CLK_MGR_H__ #define __DCN314_CLK_MGR_H__
#include "clk_mgr_internal.h" #include "clk_mgr_internal.h"
#define NUM_CLOCK_SOURCES 5
struct dcn314_watermarks; struct dcn314_watermarks;
struct dcn314_smu_watermark_set { struct dcn314_smu_watermark_set {
...@@ -42,11 +40,6 @@ struct clk_mgr_dcn314 { ...@@ -42,11 +40,6 @@ struct clk_mgr_dcn314 {
struct dcn314_smu_watermark_set smu_wm_set; struct dcn314_smu_watermark_set smu_wm_set;
}; };
struct dcn314_ss_info_table {
uint32_t ss_divider;
uint32_t ss_percentage[NUM_CLOCK_SOURCES];
};
bool dcn314_are_clock_states_equal(struct dc_clocks *a, bool dcn314_are_clock_states_equal(struct dc_clocks *a,
struct dc_clocks *b); struct dc_clocks *b);
......
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