On Fri Jul 10 08:24:03 2026 +0530, Vishnu Reddy wrote:
> When validating a capture format, check_format() compares the requested
> pixel format against inst->fw_caps[BIT_DEPTH]. However, the bit depth
> capability is not available at this stage and it contains the default
> value of BIT_DEPTH_8. The actual bit depth is updated later after the
> firmware reports stream capabilities through read_input_subcr_params().
> Because of this, a valid client request of QC10C format request is
> rejected during the initial format negotiation. The driver then falls
> back to the default capture format (NV12) and stores it as capture format.
> Later, when the firmware reports that the stream is 10-bit, the driver
> sees NV12 as the selected capture format and switches to the default
> 10-bit format (P010). As a result, the original QC10C format requested
> by userspace is lost and QC10C decoding cannot work correctly.
> The bit depth information is not reliable during the initial format
> setup, so it should not be used to validate capture formats. Remove
> the bit-depth checks from check_format() and only verify that the
> requested pixel format is supported. This allows the format requested
> by userspace is handled correctly.
>
> Fixes: 20c3ef4c7cae ("media: qcom: iris: vdec: update find_format to handle
> 8bit and 10bit formats")
> Cc: [email protected]
> Signed-off-by: Vishnu Reddy <[email protected]>
> Reviewed-by: Vikash Garodia <[email protected]>
> Signed-off-by: Bryan O'Donoghue <[email protected]>
Patch committed.
Thanks,
Bryan O'Donoghue
drivers/media/platform/qcom/iris/iris_vdec.c | 10 ----------
1 file changed, 10 deletions(-)
---
diff --git a/drivers/media/platform/qcom/iris/iris_vdec.c
b/drivers/media/platform/qcom/iris/iris_vdec.c
index 9e228b70420e..7f89e745a4b1 100644
--- a/drivers/media/platform/qcom/iris/iris_vdec.c
+++ b/drivers/media/platform/qcom/iris/iris_vdec.c
@@ -95,16 +95,6 @@ static bool check_format(struct iris_inst *inst, u32 pixfmt,
u32 type)
if (i == size)
return false;
- if (type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
- if (iris_fmt_is_8bit(pixfmt) &&
- inst->fw_caps[BIT_DEPTH].value == BIT_DEPTH_10)
- return false;
-
- if (iris_fmt_is_10bit(pixfmt) &&
- inst->fw_caps[BIT_DEPTH].value != BIT_DEPTH_10)
- return false;
- }
-
return true;
}
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]