Re: [PATCH v3 00/26] Enable H.264/H.265 encoder support and fixes in iris driver common code
From: Vikash Garodia
Date: Fri Aug 22 2025 - 06:09:49 EST
On 8/22/2025 1:47 PM, Neil Armstrong wrote:
> [ 157.299604] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00>
> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b
> [ 157.311341] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00>
> Disabling ONE_SLICE mode, tiling:0 numTile:1 CP:0 SliceDelivery:0 MultiSliceMode:0
> [ 157.325847] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00>
> HFI_BUFFER_COMMON_INTERNAL_SCRATCH, Driver macro size = 9563648 vs FW HFI macro
> size = 7953920 vs FW golden buffer size = 5833728
> [ 157.344542] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00>
> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_NON_COMV, Driver macro size = 299008 vs FW
> HFI macro size = 299264 vs FW golden buffer size = 299264
> [ 157.363944] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:265e:a723e008:00>
> venc_c2Start(3860): Send HFI_CMD_START error response for port 1
> [ 157.376855] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:265e:a723e008:00>
> VenusVencCodecEmptyThisBuffer(6732): ETB received in wrong state!
> [ 157.389836] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:265e:a723e008:00>
> VenusVencCodecEmptyThisBuffer(6732): ETB received in wrong state!
> [ 157.402827] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:265e:a723e008:00>
> VenusVencCodecEmptyThisBuffer(6732): ETB received in wrong state!
> [ 157.415816] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:265e:a723e008:00>
> VenusVencCodecEmptyThisBuffer(6732): ETB received in wrong state!
> [ 157.428832] qcom-iris aa00000.video-codec: session error received 0x1000005:
> unknown
> [ 157.436848] qcom-iris aa00000.video-codec: session error received 0x1000005:
> unknown
Thank you for the logs, the issue is due to driver non_comv macro size (299008)
is less than firmware requirement (299264). Please try below fix, if that works
for SM8650
diff --git a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c
b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c
index 558dba37dbfbc..3247ad736a17c 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c
@@ -967,7 +967,8 @@ static u32 iris_vpu_enc_non_comv_size(struct iris_inst *inst)
if (inst->codec == V4L2_PIX_FMT_HEVC) {
lcu_size = 32;
return hfi_buffer_non_comv_enc(width, height, num_vpp_pipes,
- lcu_size, HFI_CODEC_ENCODE_HEVC);
+ lcu_size, HFI_CODEC_ENCODE_HEVC) +
+ SIZE_ONE_SLICE_BUF;
}
return hfi_buffer_non_comv_enc(width, height, num_vpp_pipes,
diff --git a/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
b/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
index 1ff1b07ecbaa8..94668c5b3d15f 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
+++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.h
@@ -41,6 +41,7 @@ struct iris_inst;
#define SIZE_SLIST_BUF_H265 (BIT(10))
#define H265_DISPLAY_BUF_SIZE (3072)
#define H265_NUM_FRM_INFO (48)
+#define SIZE_ONE_SLICE_BUF 256
#define VP9_NUM_FRAME_INFO_BUF 32
#define VP9_NUM_PROBABILITY_TABLE_BUF (VP9_NUM_FRAME_INFO_BUF + 4)
Regards,
Vikash