Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Bryan O'Donoghue <bod@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 3/6] media: iris: stop encoding PIPE value into fw_caps
Date: Wed, 29 Oct 2025 12:50:40 +0530	[thread overview]
Message-ID: <f6df068c-214a-bdbe-ecce-112e0afe9a9e@oss.qualcomm.com> (raw)
In-Reply-To: <87b3871d-88b3-2851-07ee-db8f2ca1d58f@oss.qualcomm.com>



On 10/29/2025 12:42 PM, Dikshita Agarwal wrote:
> 
> 
> On 10/28/2025 5:16 PM, Dmitry Baryshkov wrote:
>> The value of the PIPE property depends on the number of pipes available
>> on the platform and is frequently the only difference between several
>> fw_caps. In order to reduce duplciation, use num_vpp_pipe from the
>> iris_platform_data rather than hardcoding the value into the fw_cap.
>>
>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>> Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
>> Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>> ---
>>  drivers/media/platform/qcom/iris/iris_ctrls.c            | 16 +++++++++++++---
>>  drivers/media/platform/qcom/iris/iris_platform_gen2.c    |  4 +---
>>  drivers/media/platform/qcom/iris/iris_platform_qcs8300.h |  4 +---
>>  drivers/media/platform/qcom/iris/iris_platform_sm8250.c  |  4 +---
>>  4 files changed, 16 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/media/platform/qcom/iris/iris_ctrls.c b/drivers/media/platform/qcom/iris/iris_ctrls.c
>> index 9da050aa1f7ce8152dfa46a706e2c27adfb5d6ce..c0b3a09ad3e3dfb0a47e3603a8089cf61390fda8 100644
>> --- a/drivers/media/platform/qcom/iris/iris_ctrls.c
>> +++ b/drivers/media/platform/qcom/iris/iris_ctrls.c
>> @@ -313,13 +313,23 @@ void iris_session_init_caps(struct iris_core *core)
>>  			continue;
>>  
>>  		core->inst_fw_caps_dec[cap_id].cap_id = caps[i].cap_id;
>> -		core->inst_fw_caps_dec[cap_id].min = caps[i].min;
>> -		core->inst_fw_caps_dec[cap_id].max = caps[i].max;
>>  		core->inst_fw_caps_dec[cap_id].step_or_mask = caps[i].step_or_mask;
>> -		core->inst_fw_caps_dec[cap_id].value = caps[i].value;
>>  		core->inst_fw_caps_dec[cap_id].flags = caps[i].flags;
>>  		core->inst_fw_caps_dec[cap_id].hfi_id = caps[i].hfi_id;
>>  		core->inst_fw_caps_dec[cap_id].set = caps[i].set;
>> +
>> +		if (cap_id == PIPE) {
>> +			core->inst_fw_caps_dec[cap_id].value =
>> +				core->iris_platform_data->num_vpp_pipe;
>> +			core->inst_fw_caps_dec[cap_id].min =
>> +				core->iris_platform_data->num_vpp_pipe;
>> +			core->inst_fw_caps_dec[cap_id].max =
>> +				core->iris_platform_data->num_vpp_pipe;
>> +		} else {
>> +			core->inst_fw_caps_dec[cap_id].min = caps[i].min;
>> +			core->inst_fw_caps_dec[cap_id].max = caps[i].max;
>> +			core->inst_fw_caps_dec[cap_id].value = caps[i].value;
>> +		}
> 
> The same change would be needed for encoder as well.
> Pls fix this.
> 

Pls ignore, PIPE is not added as a CAP for encoder.

> Thanks,
> Dikshita
>>  	}
>>  
>>  	caps = core->iris_platform_data->inst_fw_caps_enc;
>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>> index b444e816355624bca8248cce9da7adcd7caf6c5b..fb3fa1665c523fbe01df590f14d8012da3a8dd09 100644
>> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>> @@ -160,10 +160,8 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8550_dec[] = {
>>  	},
>>  	{
>>  		.cap_id = PIPE,
>> -		.min = PIPE_1,
>> -		.max = PIPE_4,
>> +		/* .max, .min and .value are set via platform data */
>>  		.step_or_mask = 1,
>> -		.value = PIPE_4,
>>  		.hfi_id = HFI_PROP_PIPE,
>>  		.set = iris_set_pipe,
>>  	},
>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_qcs8300.h b/drivers/media/platform/qcom/iris/iris_platform_qcs8300.h
>> index 87517361a1cf4b6fe53b8a1483188670df52c7e7..7ae50ab22f8c577675a10b767e1d5f3cfe16d439 100644
>> --- a/drivers/media/platform/qcom/iris/iris_platform_qcs8300.h
>> +++ b/drivers/media/platform/qcom/iris/iris_platform_qcs8300.h
>> @@ -146,10 +146,8 @@ static const struct platform_inst_fw_cap inst_fw_cap_qcs8300_dec[] = {
>>  	},
>>  	{
>>  		.cap_id = PIPE,
>> -		.min = PIPE_1,
>> -		.max = PIPE_2,
>> +		/* .max, .min and .value are set via platform data */
>>  		.step_or_mask = 1,
>> -		.value = PIPE_2,
>>  		.hfi_id = HFI_PROP_PIPE,
>>  		.set = iris_set_pipe,
>>  	},
>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8250.c b/drivers/media/platform/qcom/iris/iris_platform_sm8250.c
>> index 66a5bdd24d8a0e98b0554a019438bf4caa1dc43c..805179fba0c41bd7c9e3e5de365912de2b56c182 100644
>> --- a/drivers/media/platform/qcom/iris/iris_platform_sm8250.c
>> +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8250.c
>> @@ -20,10 +20,8 @@
>>  static const struct platform_inst_fw_cap inst_fw_cap_sm8250_dec[] = {
>>  	{
>>  		.cap_id = PIPE,
>> -		.min = PIPE_1,
>> -		.max = PIPE_4,
>> +		/* .max, .min and .value are set via platform data */
>>  		.step_or_mask = 1,
>> -		.value = PIPE_4,
>>  		.hfi_id = HFI_PROPERTY_PARAM_WORK_ROUTE,
>>  		.set = iris_set_pipe,
>>  	},
>>

  reply	other threads:[~2025-10-29  7:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28 11:46 [PATCH v6 0/6] media: iris: port support for Qualcomm SC7280 Dmitry Baryshkov
2025-10-28 11:46 ` [PATCH v6 1/6] media: iris: turn platform caps into constants Dmitry Baryshkov
2025-10-28 11:46 ` [PATCH v6 2/6] media: iris: turn platform data " Dmitry Baryshkov
2025-10-28 11:46 ` [PATCH v6 3/6] media: iris: stop encoding PIPE value into fw_caps Dmitry Baryshkov
2025-10-29  7:12   ` Dikshita Agarwal
2025-10-29  7:20     ` Dikshita Agarwal [this message]
2025-10-28 11:46 ` [PATCH v6 4/6] media: iris: remove duplication between generic gen2 data and qcs8300 Dmitry Baryshkov
2025-10-28 11:46 ` [PATCH v6 5/6] media: iris: rename sm8250 platform file to gen1 Dmitry Baryshkov
2025-10-28 11:46 ` [PATCH v6 6/6] media: iris: enable support for SC7280 platform Dmitry Baryshkov
2025-10-28 12:05   ` Dikshita Agarwal
2025-10-28 12:34   ` Vikash Garodia

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=f6df068c-214a-bdbe-ecce-112e0afe9a9e@oss.qualcomm.com \
    --to=dikshita.agarwal@oss.qualcomm.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=bod@kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=vikash.garodia@oss.qualcomm.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