All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Dikshita Agarwal <quic_dikshita@quicinc.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Vikash Garodia <quic_vgarodia@quicinc.com>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Bryan O'Donoghue <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>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] media: iris: Add support for SM8750 (VPU v3.5)
Date: Tue, 12 Aug 2025 10:16:37 +0200	[thread overview]
Message-ID: <db11085e-bca3-4d54-b435-c8f8d8672acd@kernel.org> (raw)
In-Reply-To: <83205cad-14f5-65a1-1818-677335a1ab91@quicinc.com>

On 12/08/2025 10:05, Dikshita Agarwal wrote:
>>  
>>  struct platform_clk_data {
>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>> index d3026b2bcb708c7ec31f134f628df7e57b54af4f..c7c384fce2332255ea96da69ef4dc0bc1a24771c 100644
>> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>> @@ -1,6 +1,7 @@
>>  // SPDX-License-Identifier: GPL-2.0-only
>>  /*
>>   * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
>> + * Copyright (c) 2025 Linaro Ltd
> 
> 
> I don't see a need to add a copyright here.

And I see the need, I added there quite a lot of lines.

Look at your commit bb8a95aa038e099f5ec82c466e996b006e05abd7
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb8a95aa038e099f5ec82c466e996b006e05abd7

and this hunk:
drivers/media/platform/qcom/iris/iris_resources.h

which adds 7 (!) declarations and a copyright.

If you claim you copyright 7 lines of such declarations:

+struct iris_core;
+
+int iris_enable_power_domains(struct iris_core *core, struct device
*pd_dev);
+int iris_disable_power_domains(struct iris_core *core, struct device
*pd_dev);
+int iris_unset_icc_bw(struct iris_core *core);
+int iris_set_icc_bw(struct iris_core *core, unsigned long icc_bw);
+int iris_disable_unprepare_clock(struct iris_core *core, enum
platform_clk_type clk_type);
+int iris_prepare_enable_clock(struct iris_core *core, enum
platform_clk_type clk_type);

then me adding here 68 lines of NEW CREATIVE WORK is copyrightable as well.

Anyway, you cannot reject someone's copyrights. The work is
copyrightable regardless if you see a need.

> 
>> +
>> +	iris_disable_unprepare_clock(core, IRIS_HW_FREERUN_CLK);
>> +	iris_disable_unprepare_clock(core, IRIS_AXI_CLK);
>> +}
>> +
>> +static int iris_vpu35_power_off_controller(struct iris_core *core)
>> +{
>> +	u32 clk_rst_tbl_size = core->iris_platform_data->clk_rst_tbl_size;
>> +	u32 val = 0;
>> +	int ret;
>> +
>> +	writel(MSK_SIGNAL_FROM_TENSILICA | MSK_CORE_POWER_ON, core->reg_base + CPU_CS_X2RPMH);
>> +
>> +	writel(REQ_POWER_DOWN_PREP, core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_CONTROL);
>> +
>> +	ret = readl_poll_timeout(core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_STATUS,
>> +				 val, val & BIT(0), 200, 2000);
>> +	if (ret)
>> +		goto disable_power;
>> +
>> +	writel(0x0, core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_CONTROL);
>> +
>> +	writel(REQ_POWER_DOWN_PREP, core->reg_base + AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_CONTROL);
> 
> 
> Read initial status of AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_STATUS
> 
> based on value, run the retry loop.
> This loop runs till the desired LPI state is reached i.e. BIT(0) is set,
> and hardware is idle i.e. BIT(1) or BIT(2) are unset. This suggests a
> situation where the hardware might be stuck or slow to transition.
> 
> This sequence was not needed for SM8650 since it doesn't have
> AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_CONTROL/STATUS registers.
> But required for SM8750, so please add.


Sure

> 
> 
>> +	ret = readl_poll_timeout(core->reg_base + AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_STATUS,
>> +				 val, val & (BIT(0) | BIT(1) | BIT(2)), 15, 1000);
>> +	if (ret)
>> +		goto disable_power> +
>> +	writel(0x0, core->reg_base + AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_CONTROL);
>> +
>> +	writel(0x0, core->reg_base + WRAPPER_DEBUG_BRIDGE_LPI_CONTROL);
>> +
>> +	ret = readl_poll_timeout(core->reg_base + WRAPPER_DEBUG_BRIDGE_LPI_STATUS,
>> +				 val, val == 0, 200, 2000);
>> +	if (ret)
>> +		goto disable_power;
>> +
>> +disable_power:
>> +	iris_disable_unprepare_clock(core, IRIS_CTRL_CLK);
>> +	iris_disable_unprepare_clock(core, IRIS_CTRL_FREERUN_CLK);
>> +	iris_disable_unprepare_clock(core, IRIS_AXI1_CLK);
>> +
>> +	iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_POWER_DOMAIN]);
>> +
>> +	reset_control_bulk_reset(clk_rst_tbl_size, core->resets);
>> +
>> +	return 0;
>> +}
>> +
>> +static int iris_vpu35_power_on_controller(struct iris_core *core)
>> +{
>> +	u32 rst_tbl_size = core->iris_platform_data->clk_rst_tbl_size;
>> +	int ret;
>> +
>> +	ret = iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_POWER_DOMAIN]);
>> +	if (ret)
>> +		return ret;
>> +
>> +	ret = reset_control_bulk_reset(rst_tbl_size, core->resets);
>> +	if (ret)
>> +		goto err_disable_power;
> 
> 
> this reset is not needed to power-on this SOC.


Hm, I will trust you on that, thanks.

Best regards,
Krzysztof

  reply	other threads:[~2025-08-12  8:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-04 13:37 [PATCH v2 0/3] media: iris: Add support for SM8750 (VPU v3.5) Krzysztof Kozlowski
2025-08-04 13:37 ` [PATCH v2 1/3] media: dt-bindings: qcom,sm8550-iris: Add SM8750 video codec Krzysztof Kozlowski
2025-08-12  7:54   ` Dikshita Agarwal
2025-08-12  8:00     ` Krzysztof Kozlowski
2025-08-12  8:04       ` Krzysztof Kozlowski
2025-08-13 21:15         ` Bryan O'Donoghue
2025-08-14  4:26           ` Dikshita Agarwal
2025-08-14  5:58           ` Krzysztof Kozlowski
2025-08-04 13:37 ` [PATCH v2 2/3] media: iris: Split power on per variants Krzysztof Kozlowski
2025-08-12  7:55   ` Dikshita Agarwal
2025-08-04 13:37 ` [PATCH v2 3/3] media: iris: Add support for SM8750 (VPU v3.5) Krzysztof Kozlowski
2025-08-12  8:05   ` Dikshita Agarwal
2025-08-12  8:16     ` Krzysztof Kozlowski [this message]
2025-08-28 13:18       ` Krzysztof Kozlowski
2025-08-12  7:52 ` [PATCH v2 0/3] " Dikshita Agarwal
2025-08-12  7:59   ` Krzysztof Kozlowski
2025-08-12  9:28     ` Dikshita Agarwal
2025-08-12  9:36       ` Krzysztof Kozlowski
2025-08-12  9:40         ` Dikshita Agarwal

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=db11085e-bca3-4d54-b435-c8f8d8672acd@kernel.org \
    --to=krzk@kernel.org \
    --cc=abhinav.kumar@linux.dev \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@linaro.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=p.zabel@pengutronix.de \
    --cc=quic_dikshita@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.