mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Renjiang Han <quic_renjiang@quicinc.com>
To: Bjorn Andersson <andersson@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Stanimir Varbanov <stanimir.k.varbanov@gmail.com>,
	Vikash Garodia <quic_vgarodia@quicinc.com>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: <linux-arm-msm@vger.kernel.org>, <linux-clk@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-media@vger.kernel.org>,
	Taniya Das <quic_tdas@quicinc.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Subject: Re: [PATCH v4 0/2] Use APIs in gdsc genpd to switch gdsc mode for venus v4 core
Date: Tue, 4 Mar 2025 18:49:53 +0800	[thread overview]
Message-ID: <47b362a2-116c-4260-84dc-0e0dc0ab7cc7@quicinc.com> (raw)
In-Reply-To: <20250218-switch_gdsc_mode-v4-0-546f6c925ae0@quicinc.com>


On 2/18/2025 6:33 PM, Renjiang Han wrote:
> The Venus driver requires vcodec GDSC to be ON in SW mode for clock
> operations and move it back to HW mode to gain power benefits. Earlier,
> as there is no interface to switch the GDSC mode from GenPD framework,
> the GDSC is moved to HW control mode as part of GDSC enable callback and
> venus driver is writing to its POWER_CONTROL register to keep the GDSC ON
> from SW whereever required. But the POWER_CONTROL register addresses are
> not constant and can vary across the variants.
>
> Also as per the HW recommendation, the GDSC mode switching needs to be
> controlled from respective GDSC register and this is a uniform approach
> across all the targets. Hence use dev_pm_genpd_set_hwmode() API which
> controls GDSC mode switching using its respective GDSC register.
>
> Make venus driver to use dev_pm_genpd_set_hwmode() to switch GDSC mode on
> v4.
> - 1. the venus driver adds compatibility with the new way to switch GDSC
> mode.
> - 2. the clock driver uses the HW_CTRL_TRIGGER flag, which means the venus
> driver needs to use the dev_pm_genpd_set_hwmode() API to switch GDSC mode.
>
> Validated this series on QCS615 and SC7180.
>
> Signed-off-by: Renjiang Han <quic_renjiang@quicinc.com>
> ---
> Changes in v4:
> - 1. Update the order of patches.
> - 2. Update vcodec_control_v4 to try dev_pm_genpd_set_hwmode first.
> - 3. Add hwmode_dev to indicate whether to use HW_CTRL_TRIGGER flag.
> - 4. Update commit message and cover letter message.
> - 5. Remove the patch that cleaned up dead code and will submit this patch
> with next patch series.
> - Link to v3: https://lore.kernel.org/r/20250115-switch_gdsc_mode-v3-0-9a24d2fd724c@quicinc.com
>
> Changes in v3:
> - 1. Update commit message.
> - 2. Add a patch to clean up the dead code for the venus driver.
> - 3. Remove vcodec_control_v4() function.
> - 4. Directly call dev_pm_genpd_set_hwmode() without vcodec_control_v4().
> - Link to v2: https://lore.kernel.org/r/20241223-switch_gdsc_mode-v2-0-eb5c96aee662@quicinc.com
>
> Changes in v2:
> - 1. Add the HW_CTRL_TRIGGER flag for the targets SM7150/SM8150 and SM8450
> video GDSCs supporting movement between HW and SW mode of the GDSC.
> (Suggested by Dmitry Baryshkov)
> - 2. There is a dependency of the clock driver introducing the new flag
> and the video driver adapting to this new API. Missing either the clock
> and video driver could potentially break the video driver.
> - Link to v1: https://lore.kernel.org/r/20241122-switch_gdsc_mode-v1-0-365f097ecbb0@quicinc.com
>
> ---
> Renjiang Han (1):
>        venus: pm_helpers: add compatibility for dev_pm_genpd_set_hwmode on V4
>
> Taniya Das (1):
>        clk: qcom: videocc: Use HW_CTRL_TRIGGER flag for video GDSC's
>
>   drivers/clk/qcom/videocc-sc7180.c              |  2 +-
>   drivers/clk/qcom/videocc-sdm845.c              |  4 +--
>   drivers/clk/qcom/videocc-sm7150.c              |  4 +--
>   drivers/clk/qcom/videocc-sm8150.c              |  4 +--
>   drivers/clk/qcom/videocc-sm8450.c              |  4 +--
>   drivers/media/platform/qcom/venus/core.h       |  2 ++
>   drivers/media/platform/qcom/venus/pm_helpers.c | 38 ++++++++++++++------------
>   7 files changed, 32 insertions(+), 26 deletions(-)
> ---
> base-commit: 63b3ff03d91ae8f875fe8747c781a521f78cde17
> change-id: 20250115-switch_gdsc_mode-a9c14fad9a36
Gentle ping on this patch series.
>
> Best regards,

-- 
Best Regards,
Renjiang


      parent reply	other threads:[~2025-03-04 10:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18 10:33 Renjiang Han
2025-02-18 10:33 ` [PATCH v4 1/2] venus: pm_helpers: add compatibility for dev_pm_genpd_set_hwmode on V4 Renjiang Han
2025-03-18  7:21   ` Vikash Garodia
2025-03-18 22:11   ` Bryan O'Donoghue
2025-05-28 19:27   ` Dmitry Baryshkov
2025-05-29  2:03     ` Renjiang Han
2025-02-18 10:33 ` [PATCH v4 2/2] clk: qcom: videocc: Use HW_CTRL_TRIGGER flag for video GDSC's Renjiang Han
2025-03-18 22:11   ` Bryan O'Donoghue
2025-05-26  8:26     ` Renjiang Han
2025-05-28 19:30       ` Dmitry Baryshkov
2025-05-29  1:53         ` Renjiang Han
2025-05-29  5:48           ` Vikash Garodia
2025-03-04 10:49 ` Renjiang Han [this message]

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=47b362a2-116c-4260-84dc-0e0dc0ab7cc7@quicinc.com \
    --to=quic_renjiang@quicinc.com \
    --cc=andersson@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=quic_tdas@quicinc.com \
    --cc=quic_vgarodia@quicinc.com \
    --cc=sboyd@kernel.org \
    --cc=stanimir.k.varbanov@gmail.com \
    /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

all inboxes | Powered by JetHome®