Re: [PATCH] media: iris: fix ltr count rc_type validity check in gen2
From: Gourav Kumar
Date: Thu Dec 03 2026 - 02:25:09 EST
On 10/29/2026 8:42 AM, Wangao Wang wrote:
> The condition was inverted: CBR_VFR, CBR_CFR and RC_OFF are the valid
> rc_types for LTR, so reject anything that does NOT match these types.
>
> Fixes: 6870381285b8 ("media: qcom: iris: Add Long-Term Reference support for encoder")
> Signed-off-by: Wangao Wang <wangao.wang@xxxxxxxxxxxxxxxx>
> ---
> drivers/media/platform/qcom/iris/iris_ctrls.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_ctrls.c b/drivers/media/platform/qcom/iris/iris_ctrls.c
> index 4f2633bbb49f81f080ffbe91569d38e954ad15a1..2fd5cec16faebeabe69b836679db8cdbf89b4fac 100644
> --- a/drivers/media/platform/qcom/iris/iris_ctrls.c
> +++ b/drivers/media/platform/qcom/iris/iris_ctrls.c
> @@ -1279,9 +1279,9 @@ int iris_set_ltr_count_gen2(struct iris_inst *inst, enum platform_inst_fw_cap_ty
> if (!ltr_count)
> return -EINVAL;
>
> - if (inst->hfi_rc_type == HFI_RC_CBR_VFR ||
> - inst->hfi_rc_type == HFI_RC_CBR_CFR ||
> - inst->hfi_rc_type == HFI_RC_OFF) {
> + if (inst->hfi_rc_type != HFI_RC_CBR_VFR &&
> + inst->hfi_rc_type != HFI_RC_CBR_CFR &&
> + inst->hfi_rc_type != HFI_RC_OFF) {
> inst->fw_caps[LTR_COUNT].value = 0;
> return -EINVAL;
> }
>
> ---
> base-commit: 6d0933ae9d46674a6ea63a87e9e9ab4e662670c9
> change-id: 20261029-gen2_ltr_fix-0a9b18cbe94c
>
> Best regards,
Reviewed-by: Gourav Kumar <gourav.kumar@xxxxxxxxxxxxxxxx>