From: Sachin Kumar Garg <sachin.garg@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Bryan O'Donoghue <bod@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Subject: Re: [PATCH v3 1/2] media: iris: force stage 1 work mode for CBR RC on encoder
Date: Thu, 23 Jul 2026 16:06:18 +0530 [thread overview]
Message-ID: <4c671695-4266-47e6-acb5-04cf4f690d6c@oss.qualcomm.com> (raw)
In-Reply-To: <2pksblzjw3juu4dvi2vzvyeyawbka77f5lpc3e4t5cjghowujp@rdqzk5vwnobe>
On 7/22/2026 3:17 AM, Dmitry Baryshkov wrote:
> On Tue, Jul 21, 2026 at 03:23:32PM +0530, Sachin Kumar Garg wrote:
>> iris_set_stage() currently always picks STAGE_2 for encoder sessions.
>> CBR rate control requires stage 1 operation, so force STAGE_1 when
>> BITRATE_MODE is set to CBR.
>>
>> The BITRATE_MODE fw_cap value is used instead of inst->hfi_rc_type
>> since STAGE precedes BITRATE_MODE in enum platform_inst_fw_cap_type,
>> so iris_set_properties() would still see the previous hfi_rc_type
>> when iris_set_stage() runs during initial config
>>
>> Reviewed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
>> Signed-off-by: Sachin Kumar Garg <sachin.garg@oss.qualcomm.com>
>> ---
>> drivers/media/platform/qcom/iris/iris_ctrls.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/media/platform/qcom/iris/iris_ctrls.c b/drivers/media/platform/qcom/iris/iris_ctrls.c
>> index 10e33b8a73f6..d7cbf6c3614a 100644
>> --- a/drivers/media/platform/qcom/iris/iris_ctrls.c
>> +++ b/drivers/media/platform/qcom/iris/iris_ctrls.c
>> @@ -519,8 +519,13 @@ int iris_set_stage(struct iris_inst *inst, enum platform_inst_fw_cap_type cap_id
>> if (inst->domain == DECODER) {
>> if (iris_res_is_less_than(width, height, 1280, 720))
>> work_mode = STAGE_1;
>> + } else if (inst->domain == ENCODER) {
>> + if (inst->fw_caps[BITRATE_MODE].value == V4L2_MPEG_VIDEO_BITRATE_MODE_CBR)
>> + work_mode = STAGE_1;
>> }
>>
>> + inst->fw_caps[cap_id].value = work_mode;
>
> Separate commit, Fixes tag.
>
Thanks, Dmitry. Agreed — this is fixed in v4: split into a separate
patch ("cache work mode after computing it in iris_set_stage") with a
fixes tag.
>> +
>> return hfi_ops->session_set_property(inst, hfi_id,
>> HFI_HOST_FLAGS_NONE,
>> iris_get_port_info(inst, cap_id),
>>
>> --
>> 2.34.1
>>
>
next prev parent reply other threads:[~2026-07-23 10:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 9:53 [PATCH v3 0/2] media: qcom: iris: add multi slice support Sachin Kumar Garg
2026-07-21 9:53 ` [PATCH v3 1/2] media: iris: force stage 1 work mode for CBR RC on encoder Sachin Kumar Garg
2026-07-21 21:47 ` Dmitry Baryshkov
2026-07-23 10:36 ` Sachin Kumar Garg [this message]
2026-07-21 9:53 ` [PATCH v3 2/2] media: iris: add support for multi_slice in iris encoder Sachin Kumar Garg
2026-07-22 6:01 ` Vikash Garodia
2026-07-23 10:31 ` Sachin Kumar Garg
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=4c671695-4266-47e6-acb5-04cf4f690d6c@oss.qualcomm.com \
--to=sachin.garg@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=bod@kernel.org \
--cc=busanna.reddy@oss.qualcomm.com \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=dmitry.baryshkov@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
all inboxes | Powered by JetHome®