Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Renjiang Han <quic_renjiang@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>,
	"Vikash Garodia (QUIC)" <quic_vgarodia@quicinc.com>,
	"bryan.odonoghue@linaro.org" <bryan.odonoghue@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	"Konrad Dybcio" <konradybcio@kernel.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	<quic_qiweil@quicinc.com>
Subject: Re: [PATCH v3 2/4] media: venus: core: add qcs615 platform data
Date: Tue, 26 Nov 2024 15:40:47 +0800	[thread overview]
Message-ID: <36fdb3d7-fd48-43a9-a392-336038db71a2@quicinc.com> (raw)
In-Reply-To: <ro5nx6brovd7inyy6tkrs7newszcxrzymfbsftejgpglz3gs6v@pscij26xmmco>


On 11/26/2024 12:20 AM, Dmitry Baryshkov wrote:
> On Mon, Nov 25, 2024 at 03:34:19PM +0000, Renjiang Han (QUIC) wrote:
>> On Monday, November 25, 2024 9:36 PM, Dmitry Baryshkov wrote:
>>> On Mon, Nov 25, 2024 at 11:04:50AM +0530, Renjiang Han wrote:
>>>> Initialize the platform data and enable venus driver probe of QCS615
>>>> SoC.
>>>>
>>>> Signed-off-by: Renjiang Han <quic_renjiang@quicinc.com> >
>>>> ---
>>>>   drivers/media/platform/qcom/venus/core.c | 50
>>>> ++++++++++++++++++++++++++++++++
>>>>   1 file changed, 50 insertions(+)
>>>>
>>>> diff --git a/drivers/media/platform/qcom/venus/core.c
>>>> b/drivers/media/platform/qcom/venus/core.c
>>>> index
>>>> 423deb5e94dcb193974da23f9bd2d905bfeab2d9..39d8bcf62fe4f72674746b75994c
>>>> ce6cbaee94eb 100644
>>>> --- a/drivers/media/platform/qcom/venus/core.c
>>>> +++ b/drivers/media/platform/qcom/venus/core.c
>>>> @@ -630,6 +630,55 @@ static const struct venus_resources msm8998_res = {
>>>>   	.fwname = "qcom/venus-4.4/venus.mbn",  };
>>>>   
>>>> +static const struct freq_tbl qcs615_freq_table[] = {
>>>> +	{ 0, 460000000 },
>>>> +	{ 0, 410000000 },
>>>> +	{ 0, 380000000 },
>>>> +	{ 0, 300000000 },
>>>> +	{ 0, 240000000 },
>>>> +	{ 0, 133333333 },
>>>> +};
>>>> +
>>>> +static const struct bw_tbl qcs615_bw_table_enc[] = {
>>>> +	{  972000,  951000, 0, 1434000, 0 },	/* 3840x2160@30 */
>>>> +	{  489600,  723000, 0,  973000, 0 },	/* 1920x1080@60 */
>>>> +	{  244800,  370000, 0,	495000, 0 },	/* 1920x1080@30 */
>>>> +};
>>>> +
>>>> +static const struct bw_tbl qcs615_bw_table_dec[] = {
>>>> +	{ 1036800, 1987000, 0, 2797000, 0 },	/* 4096x2160@30 */
>>>> +	{  489600, 1040000, 0, 1298000, 0 },	/* 1920x1080@60 */
>>>> +	{  244800,  530000, 0,  659000, 0 },	/* 1920x1080@30 */
>>>> +};
>>>> +
>>>> +static const struct venus_resources qcs615_res = {
>>>> +	.freq_tbl = qcs615_freq_table,
>>>> +	.freq_tbl_size = ARRAY_SIZE(qcs615_freq_table),
>>>> +	.bw_tbl_enc = qcs615_bw_table_enc,
>>>> +	.bw_tbl_enc_size = ARRAY_SIZE(qcs615_bw_table_enc),
>>>> +	.bw_tbl_dec = qcs615_bw_table_dec,
>>>> +	.bw_tbl_dec_size = ARRAY_SIZE(qcs615_bw_table_dec),
>>>> +	.clks = {"core", "iface", "bus" },
>>>> +	.clks_num = 3,
>>>> +	.vcodec0_clks = { "vcodec0_core", "vcodec0_bus" },
>>>> +	.vcodec_clks_num = 2,
>>>> +	.vcodec_pmdomains = (const char *[]) { "venus", "vcodec0" },
>>>> +	.vcodec_pmdomains_num = 2,
>>>> +	.opp_pmdomain = (const char *[]) { "cx" },
>>>> +	.vcodec_num = 1,
>>>> +	.hfi_version = HFI_VERSION_4XX,
>>>> +	.vpu_version = VPU_VERSION_AR50,
>>>> +	.vmem_id = VIDC_RESOURCE_NONE,
>>>> +	.vmem_size = 0,
>>>> +	.vmem_addr = 0,
>>>> +	.dma_mask = 0xe0000000 - 1,
>>>> +	.cp_start = 0,
>>>> +	.cp_size = 0x70800000,
>>>> +	.cp_nonpixel_start = 0x1000000,
>>>> +	.cp_nonpixel_size = 0x24800000,
>>>> +	.fwname = "qcom/venus-5.4/venus_s6.mbn",
>>> I really want the firmware discussion of linux-firmware to be solved first,
>>> before we land this patch.
>>> SHort summary: can we use a single image for all 5.4 platforms (by using
>>> v5 signatures, by using v6 signatures, v3 or any other kind of quirk).
>> Thanks for your comment. We have discussed with the firmware team and
>> other teams if we can use the same firmware binary. The result is we'd better
>> use different firmware files. They should respond in the firmware binary
>> thread. I will push them and hope them respond as quickly as possible and
>> give reasons.
>>>> +};
>>>> +
>>>>   static const struct freq_tbl sdm660_freq_table[] = {
>>>>   	{ 979200, 518400000 },
>>>>   	{ 489600, 441600000 },
>>>> @@ -937,6 +986,7 @@ static const struct of_device_id venus_dt_match[] = {
>>>>   	{ .compatible = "qcom,msm8916-venus", .data = &msm8916_res, },
>>>>   	{ .compatible = "qcom,msm8996-venus", .data = &msm8996_res, },
>>>>   	{ .compatible = "qcom,msm8998-venus", .data = &msm8998_res, },
>>>> +	{ .compatible = "qcom,qcs615-venus", .data = &qcs615_res, },
>>> The hardware seems to be the same as sc7180, only the frequencies differ.
>>> Can we change the driver in a way that we don't have to add another
>>> compat entry just for the sake of changing freqs / bandwidths?
>> Thank you for your comment. I agree with you. But based on the Venus code
>> architecturE ANd the distinction between different platforms, I think the
>> current changes are the simplest.
> Well, it is simplest, correct. But not the best one. There is no plan no
> migrate these platforms to the iris driver. So instead, please improve
> the venus driver instead of just pushing the simplest change. I should
> have been more explicit about it earlier.

Based on the current code architecture, I don't know if there is a 
better way. If we

refactor the code, it will take a lot of effort.

Therefore, I submit this change. Do you have a better approach?

Also, the driver architecture of iris is implemented as you said.

>>>>   	{ .compatible = "qcom,sdm660-venus", .data = &sdm660_res, },
>>>>   	{ .compatible = "qcom,sdm845-venus", .data = &sdm845_res, },
>>>>   	{ .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, },
>>>>
>>>> --
>>>> 2.34.1
>>>>
>>> -- 
>>> With best wishes
>>> Dmitry

-- 
Best Regards,
Renjiang


  reply	other threads:[~2024-11-26  7:40 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25  5:34 [PATCH v3 0/4] media: venus: enable venus on qcs615 Renjiang Han
2024-11-25  5:34 ` [PATCH v3 1/4] dt-bindings: qcom,qcs615-venus: add support for video hardware Renjiang Han
2024-11-25  6:37   ` Rob Herring (Arm)
2024-11-25  8:06     ` Renjiang Han (QUIC)
2024-11-25  8:16       ` Krzysztof Kozlowski
2024-11-25  7:50   ` Krzysztof Kozlowski
2024-11-25 15:49     ` Renjiang Han (QUIC)
2024-11-25 15:55       ` Krzysztof Kozlowski
2024-11-26  6:07         ` Renjiang Han
2024-11-26  6:42           ` Krzysztof Kozlowski
2024-11-26  9:39             ` Renjiang Han
2024-11-26  9:42               ` Krzysztof Kozlowski
2024-11-25 16:12   ` Dmitry Baryshkov
2024-11-26  8:57     ` Renjiang Han
2024-11-26  9:34       ` Krzysztof Kozlowski
2024-11-26  9:58         ` Renjiang Han
2024-11-26 10:07           ` Krzysztof Kozlowski
2024-11-26 12:00           ` Dmitry Baryshkov
2024-11-27  8:09     ` Vikash Garodia
2024-11-25  5:34 ` [PATCH v3 2/4] media: venus: core: add qcs615 platform data Renjiang Han
2024-11-25  8:44   ` Renjiang Han (QUIC)
2024-11-25  8:56     ` Krzysztof Kozlowski
2024-11-25  9:06       ` Renjiang Han (QUIC)
2024-11-25 13:35   ` Dmitry Baryshkov
2024-11-25 15:34     ` Renjiang Han (QUIC)
2024-11-25 16:20       ` Dmitry Baryshkov
2024-11-26  7:40         ` Renjiang Han [this message]
2024-11-26 12:03           ` Dmitry Baryshkov
2024-11-27  8:07             ` Vikash Garodia
2024-11-25  5:34 ` [PATCH v3 3/4] arm64: dts: qcom: add venus node for the qcs615 Renjiang Han
2024-11-25  8:50   ` Renjiang Han (QUIC)
2024-11-30 22:00     ` Bryan O'Donoghue
2024-11-30 13:34   ` Konrad Dybcio
2024-11-25  5:34 ` [PATCH v3 4/4] arm64: dts: qcom: qcs615-ride: enable venus node Renjiang Han
2024-11-25  8:53   ` Renjiang Han (QUIC)

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=36fdb3d7-fd48-43a9-a392-336038db71a2@quicinc.com \
    --to=quic_renjiang@quicinc.com \
    --cc=andersson@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.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_qiweil@quicinc.com \
    --cc=quic_vgarodia@quicinc.com \
    --cc=robh@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