Skip to content

Commit c9f7567

Browse files
mszyprowSylwester Nawrocki
authored andcommitted
clk: samsung: exynos542x: Move G3D subsystem clocks to its sub-CMU
G3D clocks require special handling of their parent bus clock during power domain on/off sequences. Those clocks were not initially added to the sub-CMU handler, because that time there was no open-source driver for the G3D (MALI Panfrost) hardware module and it was not possible to test it. This patch fixes this issue. Parent clock for G3D hardware block is now properly preserved during G3D power domain on/off sequence. This restores proper MALI Panfrost performance broken by commit 8686764 ("ARM: dts: exynos: Add G3D power domain to Exynos542x"). Reported-by: Marian Mihailescu <[email protected]> Fixes: b06a532 ("clk: samsung: Add Exynos5 sub-CMU clock driver") Signed-off-by: Marek Szyprowski <[email protected]> Tested-by: Marian Mihailescu <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Sylwester Nawrocki <[email protected]>
1 parent faac360 commit c9f7567

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

drivers/clk/samsung/clk-exynos5420.c

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,8 +1172,6 @@ static const struct samsung_gate_clock exynos5x_gate_clks[] __initconst = {
11721172
GATE(CLK_SCLK_ISP_SENSOR2, "sclk_isp_sensor2", "dout_isp_sensor2",
11731173
GATE_TOP_SCLK_ISP, 12, CLK_SET_RATE_PARENT, 0),
11741174

1175-
GATE(CLK_G3D, "g3d", "mout_user_aclk_g3d", GATE_IP_G3D, 9, 0, 0),
1176-
11771175
/* CDREX */
11781176
GATE(CLK_CLKM_PHY0, "clkm_phy0", "dout_sclk_cdrex",
11791177
GATE_BUS_CDREX0, 0, 0, 0),
@@ -1248,6 +1246,15 @@ static struct exynos5_subcmu_reg_dump exynos5x_gsc_suspend_regs[] = {
12481246
{ DIV2_RATIO0, 0, 0x30 }, /* DIV dout_gscl_blk_300 */
12491247
};
12501248

1249+
static const struct samsung_gate_clock exynos5x_g3d_gate_clks[] __initconst = {
1250+
GATE(CLK_G3D, "g3d", "mout_user_aclk_g3d", GATE_IP_G3D, 9, 0, 0),
1251+
};
1252+
1253+
static struct exynos5_subcmu_reg_dump exynos5x_g3d_suspend_regs[] = {
1254+
{ GATE_IP_G3D, 0x3ff, 0x3ff }, /* G3D gates */
1255+
{ SRC_TOP5, 0, BIT(16) }, /* MUX mout_user_aclk_g3d */
1256+
};
1257+
12511258
static const struct samsung_div_clock exynos5x_mfc_div_clks[] __initconst = {
12521259
DIV(0, "dout_mfc_blk", "mout_user_aclk333", DIV4_RATIO, 0, 2),
12531260
};
@@ -1320,6 +1327,14 @@ static const struct exynos5_subcmu_info exynos5x_gsc_subcmu = {
13201327
.pd_name = "GSC",
13211328
};
13221329

1330+
static const struct exynos5_subcmu_info exynos5x_g3d_subcmu = {
1331+
.gate_clks = exynos5x_g3d_gate_clks,
1332+
.nr_gate_clks = ARRAY_SIZE(exynos5x_g3d_gate_clks),
1333+
.suspend_regs = exynos5x_g3d_suspend_regs,
1334+
.nr_suspend_regs = ARRAY_SIZE(exynos5x_g3d_suspend_regs),
1335+
.pd_name = "G3D",
1336+
};
1337+
13231338
static const struct exynos5_subcmu_info exynos5x_mfc_subcmu = {
13241339
.div_clks = exynos5x_mfc_div_clks,
13251340
.nr_div_clks = ARRAY_SIZE(exynos5x_mfc_div_clks),
@@ -1351,13 +1366,15 @@ static const struct exynos5_subcmu_info exynos5800_mau_subcmu = {
13511366
static const struct exynos5_subcmu_info *exynos5x_subcmus[] = {
13521367
&exynos5x_disp_subcmu,
13531368
&exynos5x_gsc_subcmu,
1369+
&exynos5x_g3d_subcmu,
13541370
&exynos5x_mfc_subcmu,
13551371
&exynos5x_mscl_subcmu,
13561372
};
13571373

13581374
static const struct exynos5_subcmu_info *exynos5800_subcmus[] = {
13591375
&exynos5x_disp_subcmu,
13601376
&exynos5x_gsc_subcmu,
1377+
&exynos5x_g3d_subcmu,
13611378
&exynos5x_mfc_subcmu,
13621379
&exynos5x_mscl_subcmu,
13631380
&exynos5800_mau_subcmu,

0 commit comments

Comments
 (0)