Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH] clk: qcom: mmcc-msm8998: fix vdec low-power mode
@ 2024-04-09 15:56 Marc Gonzalez
  2024-04-09 23:36 ` Bryan O'Donoghue
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Gonzalez @ 2024-04-09 15:56 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Michael Turquette, Stephen Boyd
  Cc: MSM, linux-clk, Dmitry Baryshkov, Bryan O Donoghue,
	Vikash Garodia, Jeffrey Hugo, Douglas Anderson,
	Pierre-Hugues Husson, Arnaud Vrac

Use same code as mmcc-msm8996 with:
s/venus_gdsc/video_top_gdsc/
s/venus_core0_gdsc/video_subcore0_gdsc/

https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/caf_migration/kernel.lnx.4.4.r38-rel/include/dt-bindings/clock/msm-clocks-hwio-8996.h
https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/caf_migration/kernel.lnx.4.4.r38-rel/include/dt-bindings/clock/msm-clocks-hwio-8998.h

0x1024 = MMSS_VIDEO GDSCR (undocumented)
0x1028 = MMSS_VIDEO_CORE_CBCR
0x1030 = MMSS_VIDEO_AHB_CBCR
0x1034 = MMSS_VIDEO_AXI_CBCR
0x1038 = MMSS_VIDEO_MAXI_CBCR
0x1040 = MMSS_VIDEO_SUBCORE0 GDSCR (undocumented)
0x1044 = MMSS_VIDEO_SUBCORE1 GDSCR (undocumented)
0x1048 = MMSS_VIDEO_SUBCORE0_CBCR
0x104c = MMSS_VIDEO_SUBCORE1_CBCR

Suggested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
---
 drivers/clk/qcom/mmcc-msm8998.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/clk/qcom/mmcc-msm8998.c b/drivers/clk/qcom/mmcc-msm8998.c
index 1180e48c687ac..275fb3b71ede4 100644
--- a/drivers/clk/qcom/mmcc-msm8998.c
+++ b/drivers/clk/qcom/mmcc-msm8998.c
@@ -2535,6 +2535,8 @@ static struct clk_branch vmem_ahb_clk = {
 
 static struct gdsc video_top_gdsc = {
 	.gdscr = 0x1024,
+	.cxcs = (unsigned int []){ 0x1028, 0x1034, 0x1038 },
+	.cxc_count = 3,
 	.pd = {
 		.name = "video_top",
 	},
@@ -2543,20 +2545,26 @@ static struct gdsc video_top_gdsc = {
 
 static struct gdsc video_subcore0_gdsc = {
 	.gdscr = 0x1040,
+	.cxcs = (unsigned int []){ 0x1048 },
+	.cxc_count = 1,
 	.pd = {
 		.name = "video_subcore0",
 	},
 	.parent = &video_top_gdsc.pd,
 	.pwrsts = PWRSTS_OFF_ON,
+	.flags = HW_CTRL,
 };
 
 static struct gdsc video_subcore1_gdsc = {
 	.gdscr = 0x1044,
+	.cxcs = (unsigned int []){ 0x104c },
+	.cxc_count = 1,
 	.pd = {
 		.name = "video_subcore1",
 	},
 	.parent = &video_top_gdsc.pd,
 	.pwrsts = PWRSTS_OFF_ON,
+	.flags = HW_CTRL,
 };
 
 static struct gdsc mdss_gdsc = {
-- 
2.34.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: qcom: mmcc-msm8998: fix vdec low-power mode
  2024-04-09 15:56 [PATCH] clk: qcom: mmcc-msm8998: fix vdec low-power mode Marc Gonzalez
@ 2024-04-09 23:36 ` Bryan O'Donoghue
  2024-04-10 11:18   ` Marc Gonzalez
  0 siblings, 1 reply; 3+ messages in thread
From: Bryan O'Donoghue @ 2024-04-09 23:36 UTC (permalink / raw)
  To: Marc Gonzalez, Bjorn Andersson, Konrad Dybcio, Michael Turquette,
	Stephen Boyd
  Cc: MSM, linux-clk, Dmitry Baryshkov, Vikash Garodia, Jeffrey Hugo,
	Douglas Anderson, Pierre-Hugues Husson, Arnaud Vrac

On 09/04/2024 16:56, Marc Gonzalez wrote:
> Use same code as mmcc-msm8996 with:
> s/venus_gdsc/video_top_gdsc/
> s/venus_core0_gdsc/video_subcore0_gdsc/
> 
> https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/caf_migration/kernel.lnx.4.4.r38-rel/include/dt-bindings/clock/msm-clocks-hwio-8996.h
> https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/caf_migration/kernel.lnx.4.4.r38-rel/include/dt-bindings/clock/msm-clocks-hwio-8998.h
> 
> 0x1024 = MMSS_VIDEO GDSCR (undocumented)
> 0x1028 = MMSS_VIDEO_CORE_CBCR
> 0x1030 = MMSS_VIDEO_AHB_CBCR
> 0x1034 = MMSS_VIDEO_AXI_CBCR
> 0x1038 = MMSS_VIDEO_MAXI_CBCR
> 0x1040 = MMSS_VIDEO_SUBCORE0 GDSCR (undocumented)
> 0x1044 = MMSS_VIDEO_SUBCORE1 GDSCR (undocumented)
> 0x1048 = MMSS_VIDEO_SUBCORE0_CBCR
> 0x104c = MMSS_VIDEO_SUBCORE1_CBCR
> 
> Suggested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>

I think you should explain what this commit is for and why its needed.

Switching on additional GDSC registers that the top/subcore0 and 
subcore1 depend on, instead of just saying "copy the code from 8996".

With that fixed.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: qcom: mmcc-msm8998: fix vdec low-power mode
  2024-04-09 23:36 ` Bryan O'Donoghue
@ 2024-04-10 11:18   ` Marc Gonzalez
  0 siblings, 0 replies; 3+ messages in thread
From: Marc Gonzalez @ 2024-04-10 11:18 UTC (permalink / raw)
  To: Bryan O'Donoghue, Bjorn Andersson, Konrad Dybcio,
	Michael Turquette, Stephen Boyd
  Cc: MSM, linux-clk, Dmitry Baryshkov, Vikash Garodia, Jeffrey Hugo,
	Douglas Anderson, Pierre-Hugues Husson, Arnaud Vrac

On 10/04/2024 01:36, Bryan O'Donoghue wrote:

> On 09/04/2024 16:56, Marc Gonzalez wrote:
>
>> Use same code as mmcc-msm8996 with:
>> s/venus_gdsc/video_top_gdsc/
>> s/venus_core0_gdsc/video_subcore0_gdsc/
> 
> I think you should explain what this commit is for and why its needed.
> 
> Switching on additional GDSC registers that the top/subcore0 and 
> subcore1 depend on, instead of just saying "copy the code from 8996".
> 
> With that fixed.
> 
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>


Superseded by [PATCH v2] clk: qcom: mmcc-msm8998: fix venus clock issue
Message-ID: <c325691e-1cbe-4589-87fc-b67a41e93294@freebox.fr>
(Changelog: updated commit log)

Regards


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-10 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-09 15:56 [PATCH] clk: qcom: mmcc-msm8998: fix vdec low-power mode Marc Gonzalez
2024-04-09 23:36 ` Bryan O'Donoghue
2024-04-10 11:18   ` Marc Gonzalez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox