Follow the commit bfe1326573ff ("venus: Fix for H265 decoding failure.")
and increase H265D_MAX_SLICE following firmware requirements on that
platform. Otherwise decoding of the H.265 streams fails withthe
"insufficient scratch_1 buffer size" from the firmware.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/media/platform/qcom/iris/iris_vpu_buffer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/iris/iris_vpu_buffer.h b/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
index 12640eb5ed8c..8c0d6b7b5de8 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
+++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
@@ -67,7 +67,7 @@ struct iris_inst;
#define SIZE_DOLBY_RPU_METADATA (41 * 1024)
#define H264_CABAC_HDR_RATIO_HD_TOT 1
#define H264_CABAC_RES_RATIO_HD_TOT 3
-#define H265D_MAX_SLICE 1200
+#define H265D_MAX_SLICE 3600
#define SIZE_H265D_HW_PIC_T SIZE_H264D_HW_PIC_T
#define H265_CABAC_HDR_RATIO_HD_TOT 2
#define H265_CABAC_RES_RATIO_HD_TOT 2
--
2.47.3
On 1/31/2026 7:28 PM, Dmitry Baryshkov wrote:
> Follow the commit bfe1326573ff ("venus: Fix for H265 decoding failure.")
> and increase H265D_MAX_SLICE following firmware requirements on that
> platform. Otherwise decoding of the H.265 streams fails withthe
> "insufficient scratch_1 buffer size" from the firmware.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/media/platform/qcom/iris/iris_vpu_buffer.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_vpu_buffer.h b/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
> index 12640eb5ed8c..8c0d6b7b5de8 100644
> --- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
> +++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
> @@ -67,7 +67,7 @@ struct iris_inst;
> #define SIZE_DOLBY_RPU_METADATA (41 * 1024)
> #define H264_CABAC_HDR_RATIO_HD_TOT 1
> #define H264_CABAC_RES_RATIO_HD_TOT 3
> -#define H265D_MAX_SLICE 1200
> +#define H265D_MAX_SLICE 3600
> #define SIZE_H265D_HW_PIC_T SIZE_H264D_HW_PIC_T
> #define H265_CABAC_HDR_RATIO_HD_TOT 2
> #define H265_CABAC_RES_RATIO_HD_TOT 2
>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Thanks,
Dikshita
On 1/31/2026 7:28 PM, Dmitry Baryshkov wrote:
> Follow the commit bfe1326573ff ("venus: Fix for H265 decoding failure.")
> and increase H265D_MAX_SLICE following firmware requirements on that
> platform. Otherwise decoding of the H.265 streams fails withthe
> "insufficient scratch_1 buffer size" from the firmware.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/media/platform/qcom/iris/iris_vpu_buffer.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_vpu_buffer.h b/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
> index 12640eb5ed8c..8c0d6b7b5de8 100644
> --- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
> +++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
> @@ -67,7 +67,7 @@ struct iris_inst;
> #define SIZE_DOLBY_RPU_METADATA (41 * 1024)
> #define H264_CABAC_HDR_RATIO_HD_TOT 1
> #define H264_CABAC_RES_RATIO_HD_TOT 3
> -#define H265D_MAX_SLICE 1200
> +#define H265D_MAX_SLICE 3600
> #define SIZE_H265D_HW_PIC_T SIZE_H264D_HW_PIC_T
> #define H265_CABAC_HDR_RATIO_HD_TOT 2
> #define H265_CABAC_RES_RATIO_HD_TOT 2
>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
On 1/31/26 2:58 PM, Dmitry Baryshkov wrote:
> Follow the commit bfe1326573ff ("venus: Fix for H265 decoding failure.")
> and increase H265D_MAX_SLICE following firmware requirements on that
> platform. Otherwise decoding of the H.265 streams fails withthe
> "insufficient scratch_1 buffer size" from the firmware.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
Since it's matching venus:
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
As a side question, is there anything wrong if we allocate a buffer that's
bigger (or say, vastly bigger) than what the fw expects?
Like, if we allocated 10 GiB for $reasons, would the fw just happily
take it?
Konrad
On 2/2/2026 3:53 PM, Konrad Dybcio wrote:
> On 1/31/26 2:58 PM, Dmitry Baryshkov wrote:
>> Follow the commit bfe1326573ff ("venus: Fix for H265 decoding failure.")
>> and increase H265D_MAX_SLICE following firmware requirements on that
>> platform. Otherwise decoding of the H.265 streams fails withthe
>> "insufficient scratch_1 buffer size" from the firmware.
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>> ---
>
> Since it's matching venus:
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>
> As a side question, is there anything wrong if we allocate a buffer that's
> bigger (or say, vastly bigger) than what the fw expects?
>
> Like, if we allocated 10 GiB for $reasons, would the fw just happily
> take it?
Yes they would, as long as its bigger, they are happy. We are already
struggling to get the usecase (concurrent ones) within 4 GiB, and with
vastly bigger internal buffers, we would even worsen the available iova.
Regards,
Vikash
On 2/2/26 11:36 AM, Vikash Garodia wrote:
>
> On 2/2/2026 3:53 PM, Konrad Dybcio wrote:
>> On 1/31/26 2:58 PM, Dmitry Baryshkov wrote:
>>> Follow the commit bfe1326573ff ("venus: Fix for H265 decoding failure.")
>>> and increase H265D_MAX_SLICE following firmware requirements on that
>>> platform. Otherwise decoding of the H.265 streams fails withthe
>>> "insufficient scratch_1 buffer size" from the firmware.
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>> ---
>>
>> Since it's matching venus:
>>
>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>
>> As a side question, is there anything wrong if we allocate a buffer that's
>> bigger (or say, vastly bigger) than what the fw expects?
>>
>> Like, if we allocated 10 GiB for $reasons, would the fw just happily
>> take it?
>
> Yes they would, as long as its bigger, they are happy. We are already struggling to get the usecase (concurrent ones) within 4 GiB, and with vastly bigger internal buffers, we would even worsen the available iova.
I see, thanks
Konrad
© 2016 - 2026 Red Hat, Inc.