1
0
Fork 0

MGS-5709 [#imx-1439] fix gpu suspend/resume stuck

L4.19 SCFW introduced LP mode, clk_set requires power-on,
fixed GPU govern to conform with the latest SCFW change.
remove redundant clk_set_rate in probe to fix LP clock.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Minjie Zhuang 2020-05-28 19:53:55 +08:00
parent 8905f28a8b
commit 7124761ebb
1 changed files with 2 additions and 32 deletions

View File

@ -602,14 +602,8 @@ int init_gpu_opp_table(struct device *dev)
int nr;
int ret = 0;
int i, p;
int core = gcvCORE_MAJOR;
struct imx_priv *priv = &imxPriv;
struct clk *clk_core;
struct clk *clk_shader;
unsigned long core_freq, shader_freq;
priv->imx_gpu_govern.num_modes = 0;
prop = of_find_property(dev->of_node, "operating-points", NULL);
@ -689,32 +683,8 @@ int init_gpu_opp_table(struct device *dev)
ret = driver_create_file(dev->driver, &driver_attr_gpu_govern);
if (ret) {
dev_err(dev, "create gpu_govern attr failed (%d)\n", ret);
return ret;
}
/*
* This could be redundant, but it is useful for testing DTS with
* different OPPs that have assigned-clock rates different than the
* ones specified in OPP tuple array. Otherwise we will display
* different clock values when the driver is loaded. Further
* modifications of the governor will display correctly but not when
* the driver has been loaded.
*/
core_freq = priv->imx_gpu_govern.core_clk_freq[priv->imx_gpu_govern.current_mode];
shader_freq = priv->imx_gpu_govern.shader_clk_freq[priv->imx_gpu_govern.current_mode];
if (core_freq && shader_freq) {
for (; core <= gcvCORE_3D_MAX; core++) {
clk_core = priv->imx_gpu_clks[core].clk_core;
clk_shader = priv->imx_gpu_clks[core].clk_shader;
if (clk_core != NULL && clk_shader != NULL) {
clk_set_rate(clk_core, core_freq);
clk_set_rate(clk_shader, shader_freq);
}
}
}
return ret;
}
}
return ret;