mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/3] add MBR type rate control for encoder
@ 2026-11-16 17:05 Sachin Kumar Garg
  2026-11-16 17:05 ` [PATCH v4 1/3] media: uapi: v4l2-controls: Add control base for Qualcomm iris driver Sachin Kumar Garg
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sachin Kumar Garg @ 2026-11-16 17:05 UTC (permalink / raw)
  To: Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
	Bryan O'Donoghue, Mauro Carvalho Chehab
  Cc: linux-media, linux-arm-msm, linux-kernel, Sachin Kumar Garg

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

Patch 1 reserves a control range for the iris driver in
v4l2-controls.h.
Patch 2 adds the control to a new uapi header,
include/uapi/linux/media/qcom/iris-config.h, and documents it in
Documentation/userspace-api/media/drivers/qcom-iris.rst.
Patch 3 implements the control in the driver. MBR is currently supported on
sc7280 only.

Changes in v4:
- Move V4L2_CID_QCOM_MBR_RATE_CONTROL from the driver to a new uapi
  header, include/uapi/linux/media/qcom/iris-config.h, so userspace
  can use it.
- Ignore MBR when frame-level rate control is disabled.
- Don't program the peak bitrate when MBR is enabled.
- Link to v3: https://lore.kernel.org/r/20261030-b4-add_sc7280_mbr-v3-0-8fadcc873953@oss.qualcomm.com

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@oss.qualcomm.com

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@oss.qualcomm.com/

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

 .../userspace-api/media/drivers/index.rst          |   1 +
 .../userspace-api/media/drivers/qcom-iris.rst      |  28 ++++++
 MAINTAINERS                                        |   2 +
 drivers/media/platform/qcom/iris/iris_ctrls.c      | 108 +++++++++++++++++----
 .../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/media/qcom/iris-config.h        |  15 +++
 include/uapi/linux/v4l2-controls.h                 |   6 ++
 11 files changed, 147 insertions(+), 19 deletions(-)
---
base-commit: d7e7bca7169873b46e857c025c10f3336c1258d8
change-id: 20260212-b4-add_sc7280_mbr-597ac615b931

Best regards,
-- 
Sachin Kumar Garg <sachin.garg@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-02 11:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-16 17:05 [PATCH v4 0/3] add MBR type rate control for encoder Sachin Kumar Garg
2026-11-16 17:05 ` [PATCH v4 1/3] media: uapi: v4l2-controls: Add control base for Qualcomm iris driver Sachin Kumar Garg
2026-11-16 17:05 ` [PATCH v4 2/3] media: uapi: Add Qualcomm iris MBR rate control Sachin Kumar Garg
2026-11-16 17:05 ` [PATCH v4 3/3] media: iris: add new rate control type MBR for encoder Sachin Kumar Garg
2026-12-02 11:29   ` Gourav Kumar

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®