mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Renjiang Han <quic_renjiang@quicinc.com>,
	Vikash Garodia <quic_vgarodia@quicinc.com>,
	Dikshita Agarwal <quic_dikshita@quicinc.com>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v8 1/3] media: venus: pm_helpers: use opp-table for the frequency
Date: Sat, 31 May 2025 13:11:04 +0200	[thread overview]
Message-ID: <8c57ed65-002a-4ddc-9056-6b7908c0ff52@oss.qualcomm.com> (raw)
In-Reply-To: <20250530-add-venus-for-qcs615-v8-1-c0092ac616d0@quicinc.com>

On 5/30/25 6:02 AM, Renjiang Han wrote:
> The frequency value in the opp-table in the device tree and the freq_tbl
> in the driver are the same.
> 
> Therefore, update pm_helpers.c to use the opp-table for frequency values
> for the v4 core.
> If getting data from the opp table fails, fall back to using the frequency
> table.
> 
> Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com>
> Signed-off-by: Renjiang Han <quic_renjiang@quicinc.com>
> ---

You can save yourself some error-checking pain in this patch if you
do something like 

ret = devm_pm_opp_of_add_table(dev);
if (ret == -ENODEV) {
	for (i = 0; i < freq_tbl_len; i++)
		dev_pm_opp_add(dev, freq_tbl[i], 0);
}

to programmatically migrate everyone to OPP..

But - tangent - I'd say efforts to preserve compatibility with DTs that
don't even contain frequency data for a given target are rather futile.. 
Such descriptions where we only know the frequency (be it the tables that
we currently have, or the constructed OPP tables that only contain frequency
data and no voltage corners) are incomplete, and if the system manages to
not crash if the driver requests a TURBO/max freq, it's all because we got
lucky, as this consumer is not voting on (MM)CX.

That said, it's probably to keep the breakage to minimum, especially
given this is an old driver for old hardware.. I'll add the missing
OPPs across platforms with an intention to drop the hardcoding somewhere
in the future

Konrad

  parent reply	other threads:[~2025-05-31 11:11 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-30  4:02 [PATCH v8 0/3] media: venus: enable venus on qcs615 Renjiang Han
2025-05-30  4:02 ` [PATCH v8 1/3] media: venus: pm_helpers: use opp-table for the frequency Renjiang Han
2025-05-30 20:26   ` Dmitry Baryshkov
2025-06-03  2:31     ` Renjiang Han
2025-05-31 11:11   ` Konrad Dybcio [this message]
2025-06-06  7:12     ` Renjiang Han
2025-05-30  4:02 ` [PATCH v8 2/3] arm64: dts: qcom: qcs615: add venus node to devicetree Renjiang Han
2025-05-30 10:51   ` Konrad Dybcio
2025-05-30  4:02 ` [PATCH v8 3/3] arm64: dts: qcom: qcs615-ride: enable venus node to initialize video codec Renjiang Han
2025-05-30 20:31   ` Dmitry Baryshkov
2025-05-31  0:07     ` Renjiang Han
2025-06-02  6:14       ` Dmitry Baryshkov
2025-05-30 12:52 ` [PATCH v8 0/3] media: venus: enable venus on qcs615 Rob Herring (Arm)
2025-05-30 20:27 ` Dmitry Baryshkov
2025-05-31  0:05   ` Renjiang Han
2025-06-02  6:16     ` Dmitry Baryshkov
2025-06-05 11:24       ` Renjiang Han
2025-06-05 11:46         ` Dmitry Baryshkov
2025-06-05 12:13       ` Krzysztof Kozlowski
2025-06-05 12:30         ` Dmitry Baryshkov
2025-06-05 12:33           ` Krzysztof Kozlowski
2025-06-05 12:40             ` Bryan O'Donoghue
2025-06-05 16:02               ` Dmitry Baryshkov
2025-06-05 16:39                 ` Bryan O'Donoghue
2025-06-05 16:40                   ` Dmitry Baryshkov
2025-06-05 17:12                 ` Krzysztof Kozlowski
2025-06-05 17:13                   ` Dmitry Baryshkov
2025-06-06  3:52               ` Renjiang Han
2025-06-06  7:51                 ` Renjiang Han
2025-06-06  7:54                   ` Krzysztof Kozlowski
2025-06-07  2:08                     ` Dmitry Baryshkov
2025-06-05 12:34     ` Bryan O'Donoghue
2025-06-06 12:37       ` Renjiang Han
2025-06-06 12:44         ` Krzysztof Kozlowski
2025-06-06 12:51           ` Renjiang Han
2025-06-06 12:56             ` Krzysztof Kozlowski
2025-06-06 13:32               ` Renjiang Han
2025-06-06 14:53                 ` Bryan O'Donoghue
2025-06-06 15:35                   ` Vikash Garodia
2025-06-07  2:13                   ` Dmitry Baryshkov
2025-06-07  2:31                     ` Renjiang Han
2025-06-07  9:16                     ` Bryan O'Donoghue
2025-06-07 10:32                       ` Dmitry Baryshkov
2025-06-07  9:46                 ` Krzysztof Kozlowski
2025-06-11 15:06                   ` 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=8c57ed65-002a-4ddc-9056-6b7908c0ff52@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=quic_dikshita@quicinc.com \
    --cc=quic_renjiang@quicinc.com \
    --cc=quic_vgarodia@quicinc.com \
    --cc=robh@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

all inboxes | Powered by JetHome®