From: Jeffrey Hugo <quic_jhugo@quicinc.com>
To: Marc Gonzalez <mgonzalez@freebox.fr>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
"Michael Turquette" <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>
Cc: MSM <linux-arm-msm@vger.kernel.org>,
linux-clk <linux-clk@vger.kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Bryan O Donoghue <bryan.odonoghue@linaro.org>,
Vikash Garodia <quic_vgarodia@quicinc.com>,
Douglas Anderson <dianders@chromium.org>,
Pierre-Hugues Husson <phhusson@freebox.fr>,
Arnaud Vrac <avrac@freebox.fr>
Subject: Re: [PATCH v2] clk: qcom: mmcc-msm8998: fix venus clock issue
Date: Fri, 12 Apr 2024 08:49:13 -0600 [thread overview]
Message-ID: <2c82d551-91f6-8165-dc75-d6e81b9b8504@quicinc.com> (raw)
In-Reply-To: <c325691e-1cbe-4589-87fc-b67a41e93294@freebox.fr>
On 4/10/2024 5:13 AM, Marc Gonzalez wrote:
> Video decoder (venus) was broken on msm8998.
>
> PH found crude work-around:
> Drop venus_sys_set_power_control() call.
>
> Bryan suggested proper fix:
> Set required register offsets in venus GDSC structs.
> Set HW_CTRL flag.
>
> GDSC = Globally Distributed Switch Controller
>
> Use same code as mmcc-msm8996 with:
> s/venus_gdsc/video_top_gdsc/
> s/venus_core0_gdsc/video_subcore0_gdsc/
> s/venus_core1_gdsc/video_subcore1_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
Reviewed the documentation, this is all correct.
>
> Suggested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Reviewed-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 },
Checked that these (and the ones below) have the proper bits in the
documentation to support this. Sadly, the documentation does not
mention using them, so I can't really tell if this is required or not.
> + .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 = {
Overall, seems ok to me, but I did see Bjorn asking for some commit text
edits which I agree with.
next prev parent reply other threads:[~2024-04-12 14:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-10 11:13 [PATCH v2] clk: qcom: mmcc-msm8998: fix venus clock issue Marc Gonzalez
2024-04-11 3:07 ` Bjorn Andersson
2024-04-12 14:49 ` Jeffrey Hugo [this message]
2024-04-15 19:56 ` Konrad Dybcio
2024-04-25 11:25 ` Marc Gonzalez
2024-04-25 22:31 ` Bryan O'Donoghue
2024-04-27 0:47 ` Konrad Dybcio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2c82d551-91f6-8165-dc75-d6e81b9b8504@quicinc.com \
--to=quic_jhugo@quicinc.com \
--cc=andersson@kernel.org \
--cc=avrac@freebox.fr \
--cc=bryan.odonoghue@linaro.org \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=mgonzalez@freebox.fr \
--cc=mturquette@baylibre.com \
--cc=phhusson@freebox.fr \
--cc=quic_vgarodia@quicinc.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).