From: Sachin Kumar Garg <sachin.garg@oss.qualcomm.com>
To: 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>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Sachin Kumar Garg <sachin.garg@oss.qualcomm.com>
Subject: [PATCH v2 1/2] media: iris: force stage 1 work mode for CBR RC on encoder
Date: Fri, 17 Jul 2026 12:21:44 +0530 [thread overview]
Message-ID: <20260717-iris_multi_slice-v2-1-9550b1feb39b@oss.qualcomm.com> (raw)
In-Reply-To: <20260717-iris_multi_slice-v2-0-9550b1feb39b@oss.qualcomm.com>
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
Signed-off-by: Sachin Kumar Garg <sachin.garg@oss.qualcomm.com>
---
drivers/media/platform/qcom/iris/iris_ctrls.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/platform/qcom/iris/iris_ctrls.c b/drivers/media/platform/qcom/iris/iris_ctrls.c
index 10e33b8a73f6..6c4eed62d7e3 100644
--- a/drivers/media/platform/qcom/iris/iris_ctrls.c
+++ b/drivers/media/platform/qcom/iris/iris_ctrls.c
@@ -519,6 +519,9 @@ 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;
}
return hfi_ops->session_set_property(inst, hfi_id,
--
2.34.1
next prev parent reply other threads:[~2026-07-17 6:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 6:51 [PATCH v2 0/2] media: qcom: iris: add multi slice support Sachin Kumar Garg
2026-07-17 6:51 ` Sachin Kumar Garg [this message]
2026-07-17 6:51 ` [PATCH v2 2/2] media: iris: add support for multi_slice in iris encoder 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=20260717-iris_multi_slice-v2-1-9550b1feb39b@oss.qualcomm.com \
--to=sachin.garg@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=bod@kernel.org \
--cc=dikshita.agarwal@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