[PATCH v3 0/2] add MBR type rate control for encoder

From: Sachin Kumar Garg

Date: Fri Oct 30 2026 - 02:33:03 EST


This patch adds support for the MBR rate-control mode in the Iris driver.

Changes in v3:
- Split into two patches: add V4L2_CID_USER_QCOM_IRIS_BASE to
v4l2-controls.h (patch 1), and base V4L2_CID_QCOM_MBR_RATE_CONTROL
on it (patch 2).
- Reserve 64 controls for the iris control base instead of 16, to
leave room for future iris encoder controls.
- Link to v2: https://lore.kernel.org/r/20260720-b4-add_sc7280_mbr-v2-1-a2a86f630f57@xxxxxxxxxxxxxxxx

Changes in v2:
- Per upstream review feedback, convert MBR enablement from the
generic V4L2_MPEG_VIDEO_BITRATE_MODE_MBR menu value to a new
Qualcomm IRIS vendor-specific boolean control,
V4L2_CID_QCOM_MBR_RATE_CONTROL.
- Drop the now-unneeded generic V4L2_MPEG_VIDEO_BITRATE_MODE_MBR
enum, its "Maximum Bitrate" menu string, and its documentation
(previously sent as a separate patch 1/2).
- Drop the separate inst_fw_cap_sc7280_enc[] table (a near-complete
duplicate of inst_fw_cap_sm8250_enc[]); sc7280 now reuses the
shared encoder cap table and layers in only the MBR-specific cap
entry via the new mbr_rc_supported flag.
- Link to v1: https://lore.kernel.org/linux-media/20260213-b4-add_sc7280_mbr-v1-0-e8d95b4e4809@xxxxxxxxxxxxxxxx/

Signed-off-by: Sachin Kumar Garg <sachin.garg@xxxxxxxxxxxxxxxx>
---
Sachin Kumar Garg (2):
media: uapi: v4l2-controls: Add control base for Qualcomm iris driver
media: iris: add new rate control type MBR for encoder

drivers/media/platform/qcom/iris/iris_ctrls.c | 101 +++++++++++++++++----
drivers/media/platform/qcom/iris/iris_ctrls.h | 4 +
.../platform/qcom/iris/iris_hfi_gen1_command.c | 1 +
.../platform/qcom/iris/iris_hfi_gen1_defines.h | 1 +
.../platform/qcom/iris/iris_hfi_gen2_defines.h | 1 +
.../platform/qcom/iris/iris_platform_common.h | 2 +
.../media/platform/qcom/iris/iris_platform_vpu2.c | 1 +
include/uapi/linux/v4l2-controls.h | 6 ++
8 files changed, 100 insertions(+), 17 deletions(-)
---
base-commit: d7e7bca7169873b46e857c025c10f3336c1258d8
change-id: 20260212-b4-add_sc7280_mbr-597ac615b931

Best regards,
--
Sachin Kumar Garg <sachin.garg@xxxxxxxxxxxxxxxx>