Skip to content

Commit a59c16c

Browse files
kholkbebarino
authored andcommitted
clk: qcom: gpucc-msm8998: Add resets, cxc, fix flags on gpu_gx_gdsc
The GPU GX GDSC has GPU_GX_BCR reset and gfx3d_clk CXC, as stated on downstream kernels (and as verified upstream, because otherwise random lockups happen). Also, add PWRSTS_RET and NO_RET_PERIPH: also as found downstream, and also as verified here, to avoid GPU related lockups it is necessary to force retain mem, but *not* peripheral when enabling this GDSC (and, of course, the inverse on disablement). With this change, the GPU finally works flawlessly on my four different MSM8998 devices from two different manufacturers. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org> Link: https://lore.kernel.org/r/20210114221059.483390-11-angelogioacchino.delregno@somainline.org Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 785c02e commit a59c16c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

drivers/clk/qcom/gpucc-msm8998.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,16 @@ static struct gdsc gpu_cx_gdsc = {
253253
static struct gdsc gpu_gx_gdsc = {
254254
.gdscr = 0x1094,
255255
.clamp_io_ctrl = 0x130,
256+
.resets = (unsigned int []){ GPU_GX_BCR },
257+
.reset_count = 1,
258+
.cxcs = (unsigned int []){ 0x1098 },
259+
.cxc_count = 1,
256260
.pd = {
257261
.name = "gpu_gx",
258262
},
259263
.parent = &gpu_cx_gdsc.pd,
260-
.pwrsts = PWRSTS_OFF_ON,
261-
.flags = CLAMP_IO | AON_RESET,
264+
.pwrsts = PWRSTS_OFF_ON | PWRSTS_RET,
265+
.flags = CLAMP_IO | SW_RESET | AON_RESET | NO_RET_PERIPH,
262266
};
263267

264268
static struct clk_regmap *gpucc_msm8998_clocks[] = {

0 commit comments

Comments
 (0)