Re: [PATCH v7 4/6] media: qcom: iris: Add hierarchical coding support for encoder
From: Wangao Wang
Date: Wed May 13 2026 - 23:05:45 EST
On 2026/5/13 19:07, Dmitry Baryshkov wrote:
-int iris_set_bitrate(struct iris_inst *inst, enum platform_inst_fw_cap_type cap_id)
+int iris_set_bitrate_gen1(struct iris_inst *inst, enum platform_inst_fw_cap_type cap_id)
+{
+ const struct iris_hfi_session_ops *hfi_ops = inst->hfi_session_ops;
+ u32 entropy_mode = inst->fw_caps[ENTROPY_MODE].value;
+ u32 bitrate = inst->fw_caps[cap_id].value;
+ u32 hfi_id = inst->fw_caps[cap_id].hfi_id;
+ struct hfi_bitrate hfi_val;
+ u32 max_bitrate;
+
+ if (!(inst->fw_caps[cap_id].flags & CAP_FLAG_CLIENT_SET) && cap_id != BITRATE)
+ return -EINVAL;
Why do you need this check?
+
+ if (inst->codec == V4L2_PIX_FMT_HEVC) {
Both bitrate and layer bitrate are set and passed to the firmware using this API (iris_set_bitrate_gen1), so I need to distinguish whether the client has set the layer bitrate.
--
Best Regards,
Wangao