drivers/media/platform/qcom/iris/Makefile | 5 +- drivers/media/platform/qcom/iris/iris_buffer.c | 220 ++++-- drivers/media/platform/qcom/iris/iris_buffer.h | 7 +- drivers/media/platform/qcom/iris/iris_common.c | 232 ++++++ drivers/media/platform/qcom/iris/iris_common.h | 18 + drivers/media/platform/qcom/iris/iris_core.h | 20 +- drivers/media/platform/qcom/iris/iris_ctrls.c | 675 +++++++++++++++- drivers/media/platform/qcom/iris/iris_ctrls.h | 15 + drivers/media/platform/qcom/iris/iris_hfi_common.h | 2 +- .../platform/qcom/iris/iris_hfi_gen1_command.c | 480 +++++++++--- .../platform/qcom/iris/iris_hfi_gen1_defines.h | 112 ++- .../platform/qcom/iris/iris_hfi_gen1_response.c | 60 +- .../platform/qcom/iris/iris_hfi_gen2_command.c | 359 ++++++--- .../platform/qcom/iris/iris_hfi_gen2_defines.h | 44 +- .../platform/qcom/iris/iris_hfi_gen2_response.c | 46 +- drivers/media/platform/qcom/iris/iris_instance.h | 24 + .../platform/qcom/iris/iris_platform_common.h | 74 +- .../media/platform/qcom/iris/iris_platform_gen2.c | 522 ++++++++++++- .../platform/qcom/iris/iris_platform_qcs8300.h | 352 ++++++++- .../platform/qcom/iris/iris_platform_sm8250.c | 234 +++++- drivers/media/platform/qcom/iris/iris_probe.c | 33 +- drivers/media/platform/qcom/iris/iris_state.c | 9 +- drivers/media/platform/qcom/iris/iris_state.h | 1 + drivers/media/platform/qcom/iris/iris_utils.c | 36 + drivers/media/platform/qcom/iris/iris_utils.h | 2 + drivers/media/platform/qcom/iris/iris_vb2.c | 58 +- drivers/media/platform/qcom/iris/iris_vdec.c | 251 +----- drivers/media/platform/qcom/iris/iris_vdec.h | 13 +- drivers/media/platform/qcom/iris/iris_venc.c | 579 ++++++++++++++ drivers/media/platform/qcom/iris/iris_venc.h | 27 + drivers/media/platform/qcom/iris/iris_vidc.c | 299 +++++++- drivers/media/platform/qcom/iris/iris_vpu_buffer.c | 847 ++++++++++++++++++++- drivers/media/platform/qcom/iris/iris_vpu_buffer.h | 20 + 33 files changed, 4964 insertions(+), 712 deletions(-)
Hi All, This patch series adds support for H.264 and H.265 encoder in iris driver and includes a few fixes and cleanup in the common code that were identified during encoder bring-up process. The changes include: - Enabling support for H.264 and H.265 encoding. - Fixes and improvements in shared componenets used by both encoder and decoder paths. - Ensuring compatibility and stability with the existing decoder flow. Changes in v3: - Fixed the log when destroying the interanl buffers (Jorge) - Updated commit text with issue details in patch 05/25 (Krzysztof) - Added a patch to simplify conditional logic in stop handling for hfi gen1 (Bryan) - Reduced duplicate code while registering video devices (Bryan) - Added a fix for try fmt handling in decoder (Self) - Fixed the value of max core mbps for qcs8300 (Vikash) - Simplied the frame rate handling in driver by using non q16 format and converted to q16 when setting to firmware (Vikash) - Fixed the issue with bitstream resolution setting to firmware (Neil) - Addressed other review comments (Vikash, Bryan) - Link to v2: https://lore.kernel.org/r/20250813-iris-video-encoder-v2-0-c725ff673078@quicinc.com Changes in v2: - Fixed sparse/coccinnelle issues. - Fixed the kernel doc warning. - Removed unsupported PEAK_BITRATE property from SM8250. - Dropped patch 04/25 to fix quality issue with encoder. - Enhanced command handling for encoder to allow start/stop commands. - Expanded rate control condition checks to include additional rate control types for HFI Gen2. - Updated default value to MAX_QP for all caps related to max QP settings. - Add support for INPUT/OUTPUT_BUF_HOST_MAX_COUNT caps for encoder. - Link to v1: https://lore.kernel.org/r/20250704-iris-video-encoder-v1-0-b6ce24e273cf@quicinc.com All patches have been tested with v4l2-compliance, v4l2-ctl and Gstreamer on SM8250 and SM8550 for encoder, at the same time ensured that the existing decoder functionality remains uneffected. Commands used for V4l2-ctl validation: v4l2-ctl --verbose --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 --set-selection-output target=crop,top=0,left=0,width=1280,height=720 --set-fmt-video=pixelformat=H264 --stream-mmap --stream-out-mmap --stream-from=/media/cyclists_1280x720_92frames.yuv --stream-to=/tmp/cyclists_1280x720_92frames.h264 -d /dev/video1 v4l2-ctl --verbose --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 --set-selection-output target=crop,top=0,left=0,width=1280,height=720 --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap --stream-from=/media/cyclists_1280x720_92frames.yuv --stream-to=/tmp/cyclists_1280x720_92frames.hevc -d /dev/video1 Commands used for GST validation: gst-launch-1.0 -v filesrc location=/media/cyclists_1280x720_92frames.yuv ! rawvideoparse format=nv12 width=1280 height=720 framerate=30/1 ! v4l2h264enc capture-io-mode=4 output-io-mode=4 ! filesink sync=true location=/tmp/gst_cyclists_1280x720_92frames.h264 gst-launch-1.0 -v filesrc location=/media/cyclists_1280x720_92frames.yuv ! rawvideoparse format=nv12 width=1280 height=720 framerate=30/1 ! v4l2h265enc capture-io-mode=4 output-io-mode=4 ! filesink sync=true location=/tmp/gst_cyclists_1280x720_92frames.hevc The result of v4l2-compliance on SM8550: v4l2-compliance 1.29.0-5270, 64 bits, 64-bit time_t v4l2-compliance SHA: dc947661089e 2024-11-11 10:25:38 Compliance test for iris_driver device /dev/video1: Driver Info: Driver name : iris_driver Card type : Iris Encoder Bus info : platform:aa00000.video-codec Driver version : 6.16.0 Capabilities : 0x84204000 Video Memory-to-Memory Multiplanar Streaming Extended Pix Format Device Capabilities Device Caps : 0x04204000 Video Memory-to-Memory Multiplanar Streaming Extended Pix Format Detected Stateful Encoder Required ioctls: test VIDIOC_QUERYCAP: OK test invalid ioctls: OK Allow for multiple opens: test second /dev/video1 open: OK test VIDIOC_QUERYCAP: OK test VIDIOC_G/S_PRIORITY: OK test for unlimited opens: OK Debug ioctls: test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK (Not Supported) Input ioctls: test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 0 Audio Inputs: 0 Tuners: 0 Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0 Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported) Control ioctls: test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK test VIDIOC_QUERYCTRL: OK test VIDIOC_G/S_CTRL: OK test VIDIOC_G/S/TRY_EXT_CTRLS: OK test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 37 Private Controls: 0 Format ioctls: test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK test VIDIOC_TRY_FMT: OK test VIDIOC_S_FMT: OK test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK test Composing: OK (Not Supported) test Scaling: OK (Not Supported) Codec ioctls: test VIDIOC_(TRY_)ENCODER_CMD: OK test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) Buffer ioctls: test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK test CREATE_BUFS maximum buffers: OK test VIDIOC_REMOVE_BUFS: OK test VIDIOC_EXPBUF: OK test Requests: OK (Not Supported) test blocking wait: OK Test input 0: Streaming ioctls: test read/write: OK (Not Supported) Video Capture Multiplanar: Captured 61 buffers test MMAP (select, REQBUFS): OK Video Capture Multiplanar: Captured 61 buffers test MMAP (epoll, REQBUFS): OK Video Capture Multiplanar: Captured 61 buffers test MMAP (select, CREATE_BUFS): OK Video Capture Multiplanar: Captured 61 buffers test MMAP (epoll, CREATE_BUFS): OK test USERPTR (select): OK (Not Supported) test DMABUF: Cannot test, specify --expbuf-device Total for iris_driver device /dev/video1: 54, Succeeded: 54, Failed: 0, Warnings: 0 The result of v4l2-compliance on SM8250: v4l2-compliance 1.29.0-5270, 64 bits, 64-bit time_t v4l2-compliance SHA: dc947661089e 2024-11-11 10:25:38 Compliance test for iris_driver device /dev/video1: Driver Info: Driver name : iris_driver Card type : Iris Encoder Bus info : platform:aa00000.video-codec Driver version : 6.16.0 Capabilities : 0x84204000 Video Memory-to-Memory Multiplanar Streaming Extended Pix Format Device Capabilities Device Caps : 0x04204000 Video Memory-to-Memory Multiplanar Streaming Extended Pix Format Detected Stateful Encoder Required ioctls: test VIDIOC_QUERYCAP: OK test invalid ioctls: OK Allow for multiple opens: test second /dev/video1 open: OK test VIDIOC_QUERYCAP: OK test VIDIOC_G/S_PRIORITY: OK test for unlimited opens: OK Debug ioctls: test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK (Not Supported) Input ioctls: test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 0 Audio Inputs: 0 Tuners: 0 Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0 Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported) Control ioctls: test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK test VIDIOC_QUERYCTRL: OK test VIDIOC_G/S_CTRL: OK test VIDIOC_G/S/TRY_EXT_CTRLS: OK test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 19 Private Controls: 0 Format ioctls: test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK test VIDIOC_TRY_FMT: OK test VIDIOC_S_FMT: OK test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK test Composing: OK (Not Supported) test Scaling: OK (Not Supported) Codec ioctls: test VIDIOC_(TRY_)ENCODER_CMD: OK test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) Buffer ioctls: test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK test CREATE_BUFS maximum buffers: OK test VIDIOC_REMOVE_BUFS: OK test VIDIOC_EXPBUF: OK test Requests: OK (Not Supported) test blocking wait: OK Test input 0: Streaming ioctls: test read/write: OK (Not Supported) Video Capture Multiplanar: Captured 61 buffers test MMAP (select, REQBUFS): OK Video Capture Multiplanar: Captured 61 buffers test MMAP (epoll, REQBUFS): OK Video Capture Multiplanar: Captured 61 buffers test MMAP (select, CREATE_BUFS): OK Video Capture Multiplanar: Captured 61 buffers test MMAP (epoll, CREATE_BUFS): OK test USERPTR (select): OK (Not Supported) test DMABUF: Cannot test, specify --expbuf-device Total for iris_driver device /dev/video1: 54, Succeeded: 54, Failed: 0, Warnings: 0 Looking forward to your review and feedback. Thanks, Dikshita Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> --- Dikshita Agarwal (26): media: iris: Fix buffer count reporting in internal buffer check media: iris: Report unreleased PERSIST buffers on session close media: iris: Fix memory leak by freeing untracked persist buffer media: iris: Fix port streaming handling media: iris: Allow substate transition to load resources during output streaming media: iris: Always destroy internal buffers on firmware release response media: iris: Update vbuf flags before v4l2_m2m_buf_done media: iris: Simplify session stop logic by relying on vb2 checks media: iris: Allow stop on firmware only if start was issued. media: iris: Send dummy buffer address for all codecs during drain media: iris: Fix missing LAST flag handling during drain media: iris: Fix format check for CAPTURE plane in try_fmt media: iris: Add support for video encoder device media: iris: Initialize and deinitialize encoder instance structure media: iris: Add support for ENUM_FMT, S/G/TRY_FMT encoder media: iris: Add support for ENUM_FRAMESIZES/FRAMEINTERVALS for encoder media: iris: Add support for VIDIOC_QUERYCAP for encoder video device media: iris: Add encoder support for V4L2 event subscription media: iris: Add support for G/S_SELECTION for encoder video device media: iris: Add support for G/S_PARM for encoder video device media: iris: Add platform-specific capabilities for encoder video device media: iris: Add V4L2 streaming support for encoder video device media: iris: Set platform capabilities to firmware for encoder video device media: iris: Allocate and queue internal buffers for encoder video device media: iris: Add support for buffer management ioctls for encoder device media: iris: Add support for drain sequence in encoder video device drivers/media/platform/qcom/iris/Makefile | 5 +- drivers/media/platform/qcom/iris/iris_buffer.c | 220 ++++-- drivers/media/platform/qcom/iris/iris_buffer.h | 7 +- drivers/media/platform/qcom/iris/iris_common.c | 232 ++++++ drivers/media/platform/qcom/iris/iris_common.h | 18 + drivers/media/platform/qcom/iris/iris_core.h | 20 +- drivers/media/platform/qcom/iris/iris_ctrls.c | 675 +++++++++++++++- drivers/media/platform/qcom/iris/iris_ctrls.h | 15 + drivers/media/platform/qcom/iris/iris_hfi_common.h | 2 +- .../platform/qcom/iris/iris_hfi_gen1_command.c | 480 +++++++++--- .../platform/qcom/iris/iris_hfi_gen1_defines.h | 112 ++- .../platform/qcom/iris/iris_hfi_gen1_response.c | 60 +- .../platform/qcom/iris/iris_hfi_gen2_command.c | 359 ++++++--- .../platform/qcom/iris/iris_hfi_gen2_defines.h | 44 +- .../platform/qcom/iris/iris_hfi_gen2_response.c | 46 +- drivers/media/platform/qcom/iris/iris_instance.h | 24 + .../platform/qcom/iris/iris_platform_common.h | 74 +- .../media/platform/qcom/iris/iris_platform_gen2.c | 522 ++++++++++++- .../platform/qcom/iris/iris_platform_qcs8300.h | 352 ++++++++- .../platform/qcom/iris/iris_platform_sm8250.c | 234 +++++- drivers/media/platform/qcom/iris/iris_probe.c | 33 +- drivers/media/platform/qcom/iris/iris_state.c | 9 +- drivers/media/platform/qcom/iris/iris_state.h | 1 + drivers/media/platform/qcom/iris/iris_utils.c | 36 + drivers/media/platform/qcom/iris/iris_utils.h | 2 + drivers/media/platform/qcom/iris/iris_vb2.c | 58 +- drivers/media/platform/qcom/iris/iris_vdec.c | 251 +----- drivers/media/platform/qcom/iris/iris_vdec.h | 13 +- drivers/media/platform/qcom/iris/iris_venc.c | 579 ++++++++++++++ drivers/media/platform/qcom/iris/iris_venc.h | 27 + drivers/media/platform/qcom/iris/iris_vidc.c | 299 +++++++- drivers/media/platform/qcom/iris/iris_vpu_buffer.c | 847 ++++++++++++++++++++- drivers/media/platform/qcom/iris/iris_vpu_buffer.h | 20 + 33 files changed, 4964 insertions(+), 712 deletions(-) --- base-commit: a75b8d198c55e9eb5feb6f6e155496305caba2dc change-id: 20250704-iris-video-encoder-b193350b487a Best regards, -- Dikshita Agarwal <quic_dikshita@quicinc.com>
On 20/08/2025 11:07, Dikshita Agarwal wrote: > Hi All, > > This patch series adds support for H.264 and H.265 encoder in iris > driver and includes a few fixes and cleanup in the common code that were > identified during encoder bring-up process. > > The changes include: > - Enabling support for H.264 and H.265 encoding. > - Fixes and improvements in shared componenets used by both encoder and > decoder paths. > - Ensuring compatibility and stability with the existing decoder flow. > > Changes in v3: > - Fixed the log when destroying the interanl buffers (Jorge) > - Updated commit text with issue details in patch 05/25 (Krzysztof) > - Added a patch to simplify conditional logic in stop handling for hfi gen1 (Bryan) > - Reduced duplicate code while registering video devices (Bryan) > - Added a fix for try fmt handling in decoder (Self) > - Fixed the value of max core mbps for qcs8300 (Vikash) > - Simplied the frame rate handling in driver by using non q16 format and > converted to q16 when setting to firmware (Vikash) > - Fixed the issue with bitstream resolution setting to firmware (Neil) > - Addressed other review comments (Vikash, Bryan) > - Link to v2: https://lore.kernel.org/r/20250813-iris-video-encoder-v2-0-c725ff673078@quicinc.com > > Changes in v2: > - Fixed sparse/coccinnelle issues. > - Fixed the kernel doc warning. > - Removed unsupported PEAK_BITRATE property from SM8250. > - Dropped patch 04/25 to fix quality issue with encoder. > - Enhanced command handling for encoder to allow start/stop commands. > - Expanded rate control condition checks to include additional rate > control types for HFI Gen2. > - Updated default value to MAX_QP for all caps related to max QP settings. > - Add support for INPUT/OUTPUT_BUF_HOST_MAX_COUNT caps for encoder. > - Link to v1: https://lore.kernel.org/r/20250704-iris-video-encoder-v1-0-b6ce24e273cf@quicinc.com > > All patches have been tested with v4l2-compliance, v4l2-ctl and > Gstreamer on SM8250 and SM8550 for encoder, at the same time ensured > that the existing decoder functionality remains uneffected. > > Commands used for V4l2-ctl validation: > > v4l2-ctl --verbose --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 > --set-selection-output target=crop,top=0,left=0,width=1280,height=720 > --set-fmt-video=pixelformat=H264 --stream-mmap --stream-out-mmap > --stream-from=/media/cyclists_1280x720_92frames.yuv > --stream-to=/tmp/cyclists_1280x720_92frames.h264 -d /dev/video1 > > v4l2-ctl --verbose --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 > --set-selection-output target=crop,top=0,left=0,width=1280,height=720 > --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap > --stream-from=/media/cyclists_1280x720_92frames.yuv > --stream-to=/tmp/cyclists_1280x720_92frames.hevc -d /dev/video1 > > Commands used for GST validation: > > gst-launch-1.0 -v filesrc location=/media/cyclists_1280x720_92frames.yuv ! > rawvideoparse format=nv12 width=1280 height=720 framerate=30/1 ! v4l2h264enc > capture-io-mode=4 output-io-mode=4 ! filesink sync=true > location=/tmp/gst_cyclists_1280x720_92frames.h264 > > gst-launch-1.0 -v filesrc location=/media/cyclists_1280x720_92frames.yuv ! > rawvideoparse format=nv12 width=1280 height=720 framerate=30/1 ! v4l2h265enc > capture-io-mode=4 output-io-mode=4 ! filesink sync=true > location=/tmp/gst_cyclists_1280x720_92frames.hevc > > The result of v4l2-compliance on SM8550: > v4l2-compliance 1.29.0-5270, 64 bits, 64-bit time_t > v4l2-compliance SHA: dc947661089e 2024-11-11 10:25:38 > > Compliance test for iris_driver device /dev/video1: > > Driver Info: > Driver name : iris_driver > Card type : Iris Encoder > Bus info : platform:aa00000.video-codec > Driver version : 6.16.0 > Capabilities : 0x84204000 > Video Memory-to-Memory Multiplanar > Streaming > Extended Pix Format > Device Capabilities > Device Caps : 0x04204000 > Video Memory-to-Memory Multiplanar > Streaming > Extended Pix Format > Detected Stateful Encoder > > Required ioctls: > test VIDIOC_QUERYCAP: OK > test invalid ioctls: OK > > Allow for multiple opens: > test second /dev/video1 open: OK > test VIDIOC_QUERYCAP: OK > test VIDIOC_G/S_PRIORITY: OK > test for unlimited opens: OK > > Debug ioctls: > test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) > test VIDIOC_LOG_STATUS: OK (Not Supported) > > Input ioctls: > test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) > test VIDIOC_G/S_FREQUENCY: OK (Not Supported) > test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) > test VIDIOC_ENUMAUDIO: OK (Not Supported) > test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) > test VIDIOC_G/S_AUDIO: OK (Not Supported) > Inputs: 0 Audio Inputs: 0 Tuners: 0 > > Output ioctls: > test VIDIOC_G/S_MODULATOR: OK (Not Supported) > test VIDIOC_G/S_FREQUENCY: OK (Not Supported) > test VIDIOC_ENUMAUDOUT: OK (Not Supported) > test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) > test VIDIOC_G/S_AUDOUT: OK (Not Supported) > Outputs: 0 Audio Outputs: 0 Modulators: 0 > > Input/Output configuration ioctls: > test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) > test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) > test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) > test VIDIOC_G/S_EDID: OK (Not Supported) > > Control ioctls: > test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK > test VIDIOC_QUERYCTRL: OK > test VIDIOC_G/S_CTRL: OK > test VIDIOC_G/S/TRY_EXT_CTRLS: OK > test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK > test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) > Standard Controls: 37 Private Controls: 0 > > Format ioctls: > test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK > test VIDIOC_G/S_PARM: OK > test VIDIOC_G_FBUF: OK (Not Supported) > test VIDIOC_G_FMT: OK > test VIDIOC_TRY_FMT: OK > test VIDIOC_S_FMT: OK > test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) > test Cropping: OK > test Composing: OK (Not Supported) > test Scaling: OK (Not Supported) > > Codec ioctls: > test VIDIOC_(TRY_)ENCODER_CMD: OK > test VIDIOC_G_ENC_INDEX: OK (Not Supported) > test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) > > Buffer ioctls: > test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK > test CREATE_BUFS maximum buffers: OK > test VIDIOC_REMOVE_BUFS: OK > test VIDIOC_EXPBUF: OK > test Requests: OK (Not Supported) > test blocking wait: OK > > Test input 0: > > Streaming ioctls: > test read/write: OK (Not Supported) > Video Capture Multiplanar: Captured 61 buffers > test MMAP (select, REQBUFS): OK > Video Capture Multiplanar: Captured 61 buffers > test MMAP (epoll, REQBUFS): OK > Video Capture Multiplanar: Captured 61 buffers > test MMAP (select, CREATE_BUFS): OK > Video Capture Multiplanar: Captured 61 buffers > test MMAP (epoll, CREATE_BUFS): OK > test USERPTR (select): OK (Not Supported) > test DMABUF: Cannot test, specify --expbuf-device > > Total for iris_driver device /dev/video1: 54, Succeeded: 54, Failed: 0, Warnings: 0 > > The result of v4l2-compliance on SM8250: > v4l2-compliance 1.29.0-5270, 64 bits, 64-bit time_t > v4l2-compliance SHA: dc947661089e 2024-11-11 10:25:38 > > Compliance test for iris_driver device /dev/video1: > > Driver Info: > Driver name : iris_driver > Card type : Iris Encoder > Bus info : platform:aa00000.video-codec > Driver version : 6.16.0 > Capabilities : 0x84204000 > Video Memory-to-Memory Multiplanar > Streaming > Extended Pix Format > Device Capabilities > Device Caps : 0x04204000 > Video Memory-to-Memory Multiplanar > Streaming > Extended Pix Format > Detected Stateful Encoder > > Required ioctls: > test VIDIOC_QUERYCAP: OK > test invalid ioctls: OK > > Allow for multiple opens: > test second /dev/video1 open: OK > test VIDIOC_QUERYCAP: OK > test VIDIOC_G/S_PRIORITY: OK > test for unlimited opens: OK > > Debug ioctls: > test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) > test VIDIOC_LOG_STATUS: OK (Not Supported) > > Input ioctls: > test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) > test VIDIOC_G/S_FREQUENCY: OK (Not Supported) > test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) > test VIDIOC_ENUMAUDIO: OK (Not Supported) > test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) > test VIDIOC_G/S_AUDIO: OK (Not Supported) > Inputs: 0 Audio Inputs: 0 Tuners: 0 > > Output ioctls: > test VIDIOC_G/S_MODULATOR: OK (Not Supported) > test VIDIOC_G/S_FREQUENCY: OK (Not Supported) > test VIDIOC_ENUMAUDOUT: OK (Not Supported) > test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) > test VIDIOC_G/S_AUDOUT: OK (Not Supported) > Outputs: 0 Audio Outputs: 0 Modulators: 0 > > Input/Output configuration ioctls: > test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) > test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) > test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) > test VIDIOC_G/S_EDID: OK (Not Supported) > > Control ioctls: > test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK > test VIDIOC_QUERYCTRL: OK > test VIDIOC_G/S_CTRL: OK > test VIDIOC_G/S/TRY_EXT_CTRLS: OK > test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK > test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) > Standard Controls: 19 Private Controls: 0 > > Format ioctls: > test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK > test VIDIOC_G/S_PARM: OK > test VIDIOC_G_FBUF: OK (Not Supported) > test VIDIOC_G_FMT: OK > test VIDIOC_TRY_FMT: OK > test VIDIOC_S_FMT: OK > test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) > test Cropping: OK > test Composing: OK (Not Supported) > test Scaling: OK (Not Supported) > > Codec ioctls: > test VIDIOC_(TRY_)ENCODER_CMD: OK > test VIDIOC_G_ENC_INDEX: OK (Not Supported) > test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) > > Buffer ioctls: > test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK > test CREATE_BUFS maximum buffers: OK > test VIDIOC_REMOVE_BUFS: OK > test VIDIOC_EXPBUF: OK > test Requests: OK (Not Supported) > test blocking wait: OK > > Test input 0: > > Streaming ioctls: > test read/write: OK (Not Supported) > Video Capture Multiplanar: Captured 61 buffers > test MMAP (select, REQBUFS): OK > Video Capture Multiplanar: Captured 61 buffers > test MMAP (epoll, REQBUFS): OK > Video Capture Multiplanar: Captured 61 buffers > test MMAP (select, CREATE_BUFS): OK > Video Capture Multiplanar: Captured 61 buffers > test MMAP (epoll, CREATE_BUFS): OK > test USERPTR (select): OK (Not Supported) > test DMABUF: Cannot test, specify --expbuf-device > > Total for iris_driver device /dev/video1: 54, Succeeded: 54, Failed: 0, Warnings: 0 > > Looking forward to your review and feedback. > > Thanks, > Dikshita > > Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> > --- > Dikshita Agarwal (26): > media: iris: Fix buffer count reporting in internal buffer check > media: iris: Report unreleased PERSIST buffers on session close > media: iris: Fix memory leak by freeing untracked persist buffer > media: iris: Fix port streaming handling > media: iris: Allow substate transition to load resources during output streaming > media: iris: Always destroy internal buffers on firmware release response > media: iris: Update vbuf flags before v4l2_m2m_buf_done > media: iris: Simplify session stop logic by relying on vb2 checks > media: iris: Allow stop on firmware only if start was issued. > media: iris: Send dummy buffer address for all codecs during drain > media: iris: Fix missing LAST flag handling during drain > media: iris: Fix format check for CAPTURE plane in try_fmt > media: iris: Add support for video encoder device > media: iris: Initialize and deinitialize encoder instance structure > media: iris: Add support for ENUM_FMT, S/G/TRY_FMT encoder > media: iris: Add support for ENUM_FRAMESIZES/FRAMEINTERVALS for encoder > media: iris: Add support for VIDIOC_QUERYCAP for encoder video device > media: iris: Add encoder support for V4L2 event subscription > media: iris: Add support for G/S_SELECTION for encoder video device > media: iris: Add support for G/S_PARM for encoder video device > media: iris: Add platform-specific capabilities for encoder video device > media: iris: Add V4L2 streaming support for encoder video device > media: iris: Set platform capabilities to firmware for encoder video device > media: iris: Allocate and queue internal buffers for encoder video device > media: iris: Add support for buffer management ioctls for encoder device > media: iris: Add support for drain sequence in encoder video device > > drivers/media/platform/qcom/iris/Makefile | 5 +- > drivers/media/platform/qcom/iris/iris_buffer.c | 220 ++++-- > drivers/media/platform/qcom/iris/iris_buffer.h | 7 +- > drivers/media/platform/qcom/iris/iris_common.c | 232 ++++++ > drivers/media/platform/qcom/iris/iris_common.h | 18 + > drivers/media/platform/qcom/iris/iris_core.h | 20 +- > drivers/media/platform/qcom/iris/iris_ctrls.c | 675 +++++++++++++++- > drivers/media/platform/qcom/iris/iris_ctrls.h | 15 + > drivers/media/platform/qcom/iris/iris_hfi_common.h | 2 +- > .../platform/qcom/iris/iris_hfi_gen1_command.c | 480 +++++++++--- > .../platform/qcom/iris/iris_hfi_gen1_defines.h | 112 ++- > .../platform/qcom/iris/iris_hfi_gen1_response.c | 60 +- > .../platform/qcom/iris/iris_hfi_gen2_command.c | 359 ++++++--- > .../platform/qcom/iris/iris_hfi_gen2_defines.h | 44 +- > .../platform/qcom/iris/iris_hfi_gen2_response.c | 46 +- > drivers/media/platform/qcom/iris/iris_instance.h | 24 + > .../platform/qcom/iris/iris_platform_common.h | 74 +- > .../media/platform/qcom/iris/iris_platform_gen2.c | 522 ++++++++++++- > .../platform/qcom/iris/iris_platform_qcs8300.h | 352 ++++++++- > .../platform/qcom/iris/iris_platform_sm8250.c | 234 +++++- > drivers/media/platform/qcom/iris/iris_probe.c | 33 +- > drivers/media/platform/qcom/iris/iris_state.c | 9 +- > drivers/media/platform/qcom/iris/iris_state.h | 1 + > drivers/media/platform/qcom/iris/iris_utils.c | 36 + > drivers/media/platform/qcom/iris/iris_utils.h | 2 + > drivers/media/platform/qcom/iris/iris_vb2.c | 58 +- > drivers/media/platform/qcom/iris/iris_vdec.c | 251 +----- > drivers/media/platform/qcom/iris/iris_vdec.h | 13 +- > drivers/media/platform/qcom/iris/iris_venc.c | 579 ++++++++++++++ > drivers/media/platform/qcom/iris/iris_venc.h | 27 + > drivers/media/platform/qcom/iris/iris_vidc.c | 299 +++++++- > drivers/media/platform/qcom/iris/iris_vpu_buffer.c | 847 ++++++++++++++++++++- > drivers/media/platform/qcom/iris/iris_vpu_buffer.h | 20 + > 33 files changed, 4964 insertions(+), 712 deletions(-) > --- > base-commit: a75b8d198c55e9eb5feb6f6e155496305caba2dc > change-id: 20250704-iris-video-encoder-b193350b487a > > Best regards, Thanks ! Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK It still requires some sm8650 specific buffer calculations tweaks to support new firmwares and HEVC for encoding, but I'll post that in a second time. The core is functional for H264 on older firmwares. Neil
On 8/22/2025 4:59 PM, Neil Armstrong wrote: > On 20/08/2025 11:07, Dikshita Agarwal wrote: >> Hi All, >> >> This patch series adds support for H.264 and H.265 encoder in iris >> driver and includes a few fixes and cleanup in the common code that were >> identified during encoder bring-up process. >> >> The changes include: >> - Enabling support for H.264 and H.265 encoding. >> - Fixes and improvements in shared componenets used by both encoder and >> decoder paths. >> - Ensuring compatibility and stability with the existing decoder flow. >> >> Changes in v3: >> - Fixed the log when destroying the interanl buffers (Jorge) >> - Updated commit text with issue details in patch 05/25 (Krzysztof) >> - Added a patch to simplify conditional logic in stop handling for hfi gen1 >> (Bryan) >> - Reduced duplicate code while registering video devices (Bryan) >> - Added a fix for try fmt handling in decoder (Self) >> - Fixed the value of max core mbps for qcs8300 (Vikash) >> - Simplied the frame rate handling in driver by using non q16 format and >> converted to q16 when setting to firmware (Vikash) >> - Fixed the issue with bitstream resolution setting to firmware (Neil) >> - Addressed other review comments (Vikash, Bryan) >> - Link to v2: >> https://lore.kernel.org/r/20250813-iris-video-encoder-v2-0-c725ff673078@quicinc.com >> >> Changes in v2: >> - Fixed sparse/coccinnelle issues. >> - Fixed the kernel doc warning. >> - Removed unsupported PEAK_BITRATE property from SM8250. >> - Dropped patch 04/25 to fix quality issue with encoder. >> - Enhanced command handling for encoder to allow start/stop commands. >> - Expanded rate control condition checks to include additional rate >> control types for HFI Gen2. >> - Updated default value to MAX_QP for all caps related to max QP settings. >> - Add support for INPUT/OUTPUT_BUF_HOST_MAX_COUNT caps for encoder. >> - Link to v1: >> https://lore.kernel.org/r/20250704-iris-video-encoder-v1-0-b6ce24e273cf@quicinc.com >> >> All patches have been tested with v4l2-compliance, v4l2-ctl and >> Gstreamer on SM8250 and SM8550 for encoder, at the same time ensured >> that the existing decoder functionality remains uneffected. >> >> Commands used for V4l2-ctl validation: >> >> v4l2-ctl --verbose --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 >> --set-selection-output target=crop,top=0,left=0,width=1280,height=720 >> --set-fmt-video=pixelformat=H264 --stream-mmap --stream-out-mmap >> --stream-from=/media/cyclists_1280x720_92frames.yuv >> --stream-to=/tmp/cyclists_1280x720_92frames.h264 -d /dev/video1 >> >> v4l2-ctl --verbose --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 >> --set-selection-output target=crop,top=0,left=0,width=1280,height=720 >> --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap >> --stream-from=/media/cyclists_1280x720_92frames.yuv >> --stream-to=/tmp/cyclists_1280x720_92frames.hevc -d /dev/video1 >> >> Commands used for GST validation: >> >> gst-launch-1.0 -v filesrc location=/media/cyclists_1280x720_92frames.yuv ! >> rawvideoparse format=nv12 width=1280 height=720 framerate=30/1 ! v4l2h264enc >> capture-io-mode=4 output-io-mode=4 ! filesink sync=true >> location=/tmp/gst_cyclists_1280x720_92frames.h264 >> >> gst-launch-1.0 -v filesrc location=/media/cyclists_1280x720_92frames.yuv ! >> rawvideoparse format=nv12 width=1280 height=720 framerate=30/1 ! v4l2h265enc >> capture-io-mode=4 output-io-mode=4 ! filesink sync=true >> location=/tmp/gst_cyclists_1280x720_92frames.hevc <snip> > > Thanks ! > > Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK > Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK > > It still requires some sm8650 specific buffer calculations tweaks > to support new firmwares and HEVC for encoding, but I'll post that in > a second time. The core is functional for H264 on older firmwares. > > Neil @Bryan, except the minor fix in #24 (v4 would be needed for it), i do not see any open comments in this series and looks good to me to be pulled once v4 is posted with the fix. Regards, Vikash
Hi, On 20/08/2025 11:07, Dikshita Agarwal wrote: > Hi All, > > This patch series adds support for H.264 and H.265 encoder in iris > driver and includes a few fixes and cleanup in the common code that were > identified during encoder bring-up process. > > The changes include: > - Enabling support for H.264 and H.265 encoding. > - Fixes and improvements in shared componenets used by both encoder and > decoder paths. > - Ensuring compatibility and stability with the existing decoder flow. > > Changes in v3: > - Fixed the log when destroying the interanl buffers (Jorge) > - Updated commit text with issue details in patch 05/25 (Krzysztof) > - Added a patch to simplify conditional logic in stop handling for hfi gen1 (Bryan) > - Reduced duplicate code while registering video devices (Bryan) > - Added a fix for try fmt handling in decoder (Self) > - Fixed the value of max core mbps for qcs8300 (Vikash) > - Simplied the frame rate handling in driver by using non q16 format and > converted to q16 when setting to firmware (Vikash) > - Fixed the issue with bitstream resolution setting to firmware (Neil) > - Addressed other review comments (Vikash, Bryan) > - Link to v2: https://lore.kernel.org/r/20250813-iris-video-encoder-v2-0-c725ff673078@quicinc.com > > Changes in v2: > - Fixed sparse/coccinnelle issues. > - Fixed the kernel doc warning. > - Removed unsupported PEAK_BITRATE property from SM8250. > - Dropped patch 04/25 to fix quality issue with encoder. > - Enhanced command handling for encoder to allow start/stop commands. > - Expanded rate control condition checks to include additional rate > control types for HFI Gen2. > - Updated default value to MAX_QP for all caps related to max QP settings. > - Add support for INPUT/OUTPUT_BUF_HOST_MAX_COUNT caps for encoder. > - Link to v1: https://lore.kernel.org/r/20250704-iris-video-encoder-v1-0-b6ce24e273cf@quicinc.com > > All patches have been tested with v4l2-compliance, v4l2-ctl and > Gstreamer on SM8250 and SM8550 for encoder, at the same time ensured > that the existing decoder functionality remains uneffected. > > Commands used for V4l2-ctl validation: > > v4l2-ctl --verbose --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 > --set-selection-output target=crop,top=0,left=0,width=1280,height=720 > --set-fmt-video=pixelformat=H264 --stream-mmap --stream-out-mmap > --stream-from=/media/cyclists_1280x720_92frames.yuv > --stream-to=/tmp/cyclists_1280x720_92frames.h264 -d /dev/video1 > > v4l2-ctl --verbose --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 > --set-selection-output target=crop,top=0,left=0,width=1280,height=720 > --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap > --stream-from=/media/cyclists_1280x720_92frames.yuv > --stream-to=/tmp/cyclists_1280x720_92frames.hevc -d /dev/video1 - I've tested this serie on SM8650, first I failed to get HEVC working with the following command: v4l2-ctl --verbose --set-fmt-video-out=width=1920,height=1080,pixelformat=NV12 --set-selection-output target=crop,top=0,left=0,width=1920,height=1080 --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap --stream-from=Big_Buck_Bunny_1080_10s.yuv --stream-to=Big_Buck_Bunny_1080_10s.hevc -d /dev/video1 I got: qcom-iris aa00000.video-codec: session error received 0x1000005: unknown I checked the diff with v2, and reverting this make HEVC encoding work again: ===========================><================================================= --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c @@ -194,9 +194,8 @@ static int iris_hfi_gen2_set_bitstream_resolution(struct iris_inst *inst, u32 pl inst_hfi_gen2->src_subcr_params.bitstream_resolution = resolution; payload_type = HFI_PAYLOAD_U32; } else { - codec_align = inst->codec == V4L2_PIX_FMT_HEVC ? 32 : 16; - resolution = ALIGN(inst->fmt_dst->fmt.pix_mp.width, codec_align) << 16 | - ALIGN(inst->fmt_dst->fmt.pix_mp.height, codec_align); + resolution = inst->fmt_dst->fmt.pix_mp.width << 16 | + inst->fmt_dst->fmt.pix_mp.height; inst_hfi_gen2->dst_subcr_params.bitstream_resolution = resolution; payload_type = HFI_PAYLOAD_32_PACKED; } ===========================><================================================= Did I pass some wrong parameters ? I don't expect the fw to crash. - On the 1280x720 output bug, I tried the same commands as v2: v4l2-ctl --verbose --set-fmt-video-out=width=1920,height=1080,pixelformat=NV12 --set-selection-output target=crop,top=0,left=0,width=1920,height=1080 --set-fmt-video=pixelformat=H264 --stream-mmap --stream-out-mmap --stream-from=Big_Buck_Bunny_1080_10s.yuv --stream-to=Big_Buck_Bunny_1080_10s.h264 -d /dev/video1 And I still get a 1280x720 h264 video, did I miss something ? - Finally I tested the firmware you sent today (https://gitlab.com/kernel-firmware/linux-firmware/-/merge_requests/654), first thanks a lot for that ! But then I was unable to encode with this firmware (v2 or v3 patchset), I got around all the firmwares I got and here's the results: | QC_IMAGE_VERSION_STRING | BUILD_DATE | Release | decoding | encoding v2 | encoding v3 | |-------------------------------------------------------------|-------------|---------------------------------|----------|-------------|-------------| | video-firmware.3.4-245082a0a3cc5e740f6340c295000ab4bcfc367d | Aug 24 2023 | VIDEO.LA.4.0.r2-02400-lanai.0-1 | OK | OK | KO HEVC | | video-firmware.3.4-457429862ac40592d143de942b04d80fd9987e56 | Jan 29 2024 | VIDEO.LA.4.0.r2-03800-lanai.0-1 | OK | OK | KO HEVC | | video-firmware.3.4-0d8a914b010672616a0d0613e22866c0b639a807 | Aug 14 2024 | VIDEO.LA.4.0.r2-05900-lanai.0-1 | OK | KO | KO | | video-firmware.3.4-75ad4eb9657cf50ee663b05f78c01d6ceccd5632 | Jan 29 2025 | VIDEO.LA.4.0.r2-05900-lanai.0-1 | OK | KO | KO | | video-firmware.3.4-e299f99ffcd086b43a2ccc7c3279ce5df404d693 | Aug 14 2025 | VIDEO.VPU.3.4-0054 | OK | KO | KO | ------------------------------------------------------------------------------------------------------------------------------------------------------ The change occurs around Aug 14 2024, So I checked the downstream driver and I found that fixes the encoding: ===========================><================================================= --- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c +++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c @@ -863,9 +863,18 @@ static inline u32 size_vpss_line_buf(u32 num_vpp_pipes_enc, u32 frame_height_coded, u32 frame_width_coded) { - return ALIGN(((((((8192) >> 2) << 5) * (num_vpp_pipes_enc)) + 64) + - (((((max_t(u32, (frame_width_coded), - (frame_height_coded)) + 3) >> 2) << 5) + 256) * 16)), 256); + u32 vpss_4tap_top = 0, vpss_4tap_left = 0, vpss_div2_top = 0, vpss_div2_left = 0, vpss_top_lb = 0, vpss_left_lb = 0, size_left = 0, size_top = 0; + + vpss_4tap_top = ((((max_t(u32, frame_width_coded, frame_height_coded) * 2) + 3) >> 2) << 4) + 256; + vpss_4tap_left = (((8192 + 3) >> 2) << 5) + 64; + vpss_div2_top = (((max_t(u32,frame_width_coded, frame_height_coded) + 3) >> 2) << 4) + 256; + vpss_div2_left = ((((max_t(u32, frame_width_coded, frame_height_coded)* 2) + 3) >> 2) << 5) + 64; + vpss_top_lb = (frame_width_coded + 1) << 3; + vpss_left_lb = (frame_height_coded << 3) * num_vpp_pipes_enc; + size_left = (vpss_4tap_left + vpss_div2_left) * 2 * num_vpp_pipes_enc; + size_top = (vpss_4tap_top + vpss_div2_top) * 2; + + return ALIGN(size_left + size_top + vpss_top_lb + vpss_left_lb, DMA_ALIGNMENT); } static inline ===========================><================================================= And I checked and encoding still works with the "old" firmwares. With both changes, I can get H264 & HEVC encoding working on any firmware. Neil > > Commands used for GST validation: > > gst-launch-1.0 -v filesrc location=/media/cyclists_1280x720_92frames.yuv ! > rawvideoparse format=nv12 width=1280 height=720 framerate=30/1 ! v4l2h264enc > capture-io-mode=4 output-io-mode=4 ! filesink sync=true > location=/tmp/gst_cyclists_1280x720_92frames.h264 > > gst-launch-1.0 -v filesrc location=/media/cyclists_1280x720_92frames.yuv ! > rawvideoparse format=nv12 width=1280 height=720 framerate=30/1 ! v4l2h265enc > capture-io-mode=4 output-io-mode=4 ! filesink sync=true > location=/tmp/gst_cyclists_1280x720_92frames.hevc > > The result of v4l2-compliance on SM8550: > v4l2-compliance 1.29.0-5270, 64 bits, 64-bit time_t > v4l2-compliance SHA: dc947661089e 2024-11-11 10:25:38 > > Compliance test for iris_driver device /dev/video1: > > Driver Info: > Driver name : iris_driver > Card type : Iris Encoder > Bus info : platform:aa00000.video-codec > Driver version : 6.16.0 > Capabilities : 0x84204000 > Video Memory-to-Memory Multiplanar > Streaming > Extended Pix Format > Device Capabilities > Device Caps : 0x04204000 > Video Memory-to-Memory Multiplanar > Streaming > Extended Pix Format > Detected Stateful Encoder > > Required ioctls: > test VIDIOC_QUERYCAP: OK > test invalid ioctls: OK > > Allow for multiple opens: > test second /dev/video1 open: OK > test VIDIOC_QUERYCAP: OK > test VIDIOC_G/S_PRIORITY: OK > test for unlimited opens: OK > > Debug ioctls: > test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) > test VIDIOC_LOG_STATUS: OK (Not Supported) > > Input ioctls: > test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) > test VIDIOC_G/S_FREQUENCY: OK (Not Supported) > test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) > test VIDIOC_ENUMAUDIO: OK (Not Supported) > test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) > test VIDIOC_G/S_AUDIO: OK (Not Supported) > Inputs: 0 Audio Inputs: 0 Tuners: 0 > > Output ioctls: > test VIDIOC_G/S_MODULATOR: OK (Not Supported) > test VIDIOC_G/S_FREQUENCY: OK (Not Supported) > test VIDIOC_ENUMAUDOUT: OK (Not Supported) > test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) > test VIDIOC_G/S_AUDOUT: OK (Not Supported) > Outputs: 0 Audio Outputs: 0 Modulators: 0 > > Input/Output configuration ioctls: > test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) > test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) > test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) > test VIDIOC_G/S_EDID: OK (Not Supported) > > Control ioctls: > test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK > test VIDIOC_QUERYCTRL: OK > test VIDIOC_G/S_CTRL: OK > test VIDIOC_G/S/TRY_EXT_CTRLS: OK > test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK > test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) > Standard Controls: 37 Private Controls: 0 > > Format ioctls: > test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK > test VIDIOC_G/S_PARM: OK > test VIDIOC_G_FBUF: OK (Not Supported) > test VIDIOC_G_FMT: OK > test VIDIOC_TRY_FMT: OK > test VIDIOC_S_FMT: OK > test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) > test Cropping: OK > test Composing: OK (Not Supported) > test Scaling: OK (Not Supported) > > Codec ioctls: > test VIDIOC_(TRY_)ENCODER_CMD: OK > test VIDIOC_G_ENC_INDEX: OK (Not Supported) > test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) > > Buffer ioctls: > test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK > test CREATE_BUFS maximum buffers: OK > test VIDIOC_REMOVE_BUFS: OK > test VIDIOC_EXPBUF: OK > test Requests: OK (Not Supported) > test blocking wait: OK > > Test input 0: > > Streaming ioctls: > test read/write: OK (Not Supported) > Video Capture Multiplanar: Captured 61 buffers > test MMAP (select, REQBUFS): OK > Video Capture Multiplanar: Captured 61 buffers > test MMAP (epoll, REQBUFS): OK > Video Capture Multiplanar: Captured 61 buffers > test MMAP (select, CREATE_BUFS): OK > Video Capture Multiplanar: Captured 61 buffers > test MMAP (epoll, CREATE_BUFS): OK > test USERPTR (select): OK (Not Supported) > test DMABUF: Cannot test, specify --expbuf-device > > Total for iris_driver device /dev/video1: 54, Succeeded: 54, Failed: 0, Warnings: 0 > > The result of v4l2-compliance on SM8250: > v4l2-compliance 1.29.0-5270, 64 bits, 64-bit time_t > v4l2-compliance SHA: dc947661089e 2024-11-11 10:25:38 > > Compliance test for iris_driver device /dev/video1: > > Driver Info: > Driver name : iris_driver > Card type : Iris Encoder > Bus info : platform:aa00000.video-codec > Driver version : 6.16.0 > Capabilities : 0x84204000 > Video Memory-to-Memory Multiplanar > Streaming > Extended Pix Format > Device Capabilities > Device Caps : 0x04204000 > Video Memory-to-Memory Multiplanar > Streaming > Extended Pix Format > Detected Stateful Encoder > > Required ioctls: > test VIDIOC_QUERYCAP: OK > test invalid ioctls: OK > > Allow for multiple opens: > test second /dev/video1 open: OK > test VIDIOC_QUERYCAP: OK > test VIDIOC_G/S_PRIORITY: OK > test for unlimited opens: OK > > Debug ioctls: > test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) > test VIDIOC_LOG_STATUS: OK (Not Supported) > > Input ioctls: > test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) > test VIDIOC_G/S_FREQUENCY: OK (Not Supported) > test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) > test VIDIOC_ENUMAUDIO: OK (Not Supported) > test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) > test VIDIOC_G/S_AUDIO: OK (Not Supported) > Inputs: 0 Audio Inputs: 0 Tuners: 0 > > Output ioctls: > test VIDIOC_G/S_MODULATOR: OK (Not Supported) > test VIDIOC_G/S_FREQUENCY: OK (Not Supported) > test VIDIOC_ENUMAUDOUT: OK (Not Supported) > test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) > test VIDIOC_G/S_AUDOUT: OK (Not Supported) > Outputs: 0 Audio Outputs: 0 Modulators: 0 > > Input/Output configuration ioctls: > test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) > test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) > test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) > test VIDIOC_G/S_EDID: OK (Not Supported) > > Control ioctls: > test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK > test VIDIOC_QUERYCTRL: OK > test VIDIOC_G/S_CTRL: OK > test VIDIOC_G/S/TRY_EXT_CTRLS: OK > test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK > test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) > Standard Controls: 19 Private Controls: 0 > > Format ioctls: > test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK > test VIDIOC_G/S_PARM: OK > test VIDIOC_G_FBUF: OK (Not Supported) > test VIDIOC_G_FMT: OK > test VIDIOC_TRY_FMT: OK > test VIDIOC_S_FMT: OK > test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) > test Cropping: OK > test Composing: OK (Not Supported) > test Scaling: OK (Not Supported) > > Codec ioctls: > test VIDIOC_(TRY_)ENCODER_CMD: OK > test VIDIOC_G_ENC_INDEX: OK (Not Supported) > test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) > > Buffer ioctls: > test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK > test CREATE_BUFS maximum buffers: OK > test VIDIOC_REMOVE_BUFS: OK > test VIDIOC_EXPBUF: OK > test Requests: OK (Not Supported) > test blocking wait: OK > > Test input 0: > > Streaming ioctls: > test read/write: OK (Not Supported) > Video Capture Multiplanar: Captured 61 buffers > test MMAP (select, REQBUFS): OK > Video Capture Multiplanar: Captured 61 buffers > test MMAP (epoll, REQBUFS): OK > Video Capture Multiplanar: Captured 61 buffers > test MMAP (select, CREATE_BUFS): OK > Video Capture Multiplanar: Captured 61 buffers > test MMAP (epoll, CREATE_BUFS): OK > test USERPTR (select): OK (Not Supported) > test DMABUF: Cannot test, specify --expbuf-device > > Total for iris_driver device /dev/video1: 54, Succeeded: 54, Failed: 0, Warnings: 0 > > Looking forward to your review and feedback. > > Thanks, > Dikshita > > Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> > --- > Dikshita Agarwal (26): > media: iris: Fix buffer count reporting in internal buffer check > media: iris: Report unreleased PERSIST buffers on session close > media: iris: Fix memory leak by freeing untracked persist buffer > media: iris: Fix port streaming handling > media: iris: Allow substate transition to load resources during output streaming > media: iris: Always destroy internal buffers on firmware release response > media: iris: Update vbuf flags before v4l2_m2m_buf_done > media: iris: Simplify session stop logic by relying on vb2 checks > media: iris: Allow stop on firmware only if start was issued. > media: iris: Send dummy buffer address for all codecs during drain > media: iris: Fix missing LAST flag handling during drain > media: iris: Fix format check for CAPTURE plane in try_fmt > media: iris: Add support for video encoder device > media: iris: Initialize and deinitialize encoder instance structure > media: iris: Add support for ENUM_FMT, S/G/TRY_FMT encoder > media: iris: Add support for ENUM_FRAMESIZES/FRAMEINTERVALS for encoder > media: iris: Add support for VIDIOC_QUERYCAP for encoder video device > media: iris: Add encoder support for V4L2 event subscription > media: iris: Add support for G/S_SELECTION for encoder video device > media: iris: Add support for G/S_PARM for encoder video device > media: iris: Add platform-specific capabilities for encoder video device > media: iris: Add V4L2 streaming support for encoder video device > media: iris: Set platform capabilities to firmware for encoder video device > media: iris: Allocate and queue internal buffers for encoder video device > media: iris: Add support for buffer management ioctls for encoder device > media: iris: Add support for drain sequence in encoder video device > > drivers/media/platform/qcom/iris/Makefile | 5 +- > drivers/media/platform/qcom/iris/iris_buffer.c | 220 ++++-- > drivers/media/platform/qcom/iris/iris_buffer.h | 7 +- > drivers/media/platform/qcom/iris/iris_common.c | 232 ++++++ > drivers/media/platform/qcom/iris/iris_common.h | 18 + > drivers/media/platform/qcom/iris/iris_core.h | 20 +- > drivers/media/platform/qcom/iris/iris_ctrls.c | 675 +++++++++++++++- > drivers/media/platform/qcom/iris/iris_ctrls.h | 15 + > drivers/media/platform/qcom/iris/iris_hfi_common.h | 2 +- > .../platform/qcom/iris/iris_hfi_gen1_command.c | 480 +++++++++--- > .../platform/qcom/iris/iris_hfi_gen1_defines.h | 112 ++- > .../platform/qcom/iris/iris_hfi_gen1_response.c | 60 +- > .../platform/qcom/iris/iris_hfi_gen2_command.c | 359 ++++++--- > .../platform/qcom/iris/iris_hfi_gen2_defines.h | 44 +- > .../platform/qcom/iris/iris_hfi_gen2_response.c | 46 +- > drivers/media/platform/qcom/iris/iris_instance.h | 24 + > .../platform/qcom/iris/iris_platform_common.h | 74 +- > .../media/platform/qcom/iris/iris_platform_gen2.c | 522 ++++++++++++- > .../platform/qcom/iris/iris_platform_qcs8300.h | 352 ++++++++- > .../platform/qcom/iris/iris_platform_sm8250.c | 234 +++++- > drivers/media/platform/qcom/iris/iris_probe.c | 33 +- > drivers/media/platform/qcom/iris/iris_state.c | 9 +- > drivers/media/platform/qcom/iris/iris_state.h | 1 + > drivers/media/platform/qcom/iris/iris_utils.c | 36 + > drivers/media/platform/qcom/iris/iris_utils.h | 2 + > drivers/media/platform/qcom/iris/iris_vb2.c | 58 +- > drivers/media/platform/qcom/iris/iris_vdec.c | 251 +----- > drivers/media/platform/qcom/iris/iris_vdec.h | 13 +- > drivers/media/platform/qcom/iris/iris_venc.c | 579 ++++++++++++++ > drivers/media/platform/qcom/iris/iris_venc.h | 27 + > drivers/media/platform/qcom/iris/iris_vidc.c | 299 +++++++- > drivers/media/platform/qcom/iris/iris_vpu_buffer.c | 847 ++++++++++++++++++++- > drivers/media/platform/qcom/iris/iris_vpu_buffer.h | 20 + > 33 files changed, 4964 insertions(+), 712 deletions(-) > --- > base-commit: a75b8d198c55e9eb5feb6f6e155496305caba2dc > change-id: 20250704-iris-video-encoder-b193350b487a > > Best regards,
On 8/20/2025 8:29 PM, Neil Armstrong wrote: > Hi, > > On 20/08/2025 11:07, Dikshita Agarwal wrote: >> Hi All, >> >> This patch series adds support for H.264 and H.265 encoder in iris >> driver and includes a few fixes and cleanup in the common code that were >> identified during encoder bring-up process. >> >> The changes include: >> - Enabling support for H.264 and H.265 encoding. >> - Fixes and improvements in shared componenets used by both encoder and >> decoder paths. >> - Ensuring compatibility and stability with the existing decoder flow. >> >> Changes in v3: >> - Fixed the log when destroying the interanl buffers (Jorge) >> - Updated commit text with issue details in patch 05/25 (Krzysztof) >> - Added a patch to simplify conditional logic in stop handling for hfi >> gen1 (Bryan) >> - Reduced duplicate code while registering video devices (Bryan) >> - Added a fix for try fmt handling in decoder (Self) >> - Fixed the value of max core mbps for qcs8300 (Vikash) >> - Simplied the frame rate handling in driver by using non q16 format and >> converted to q16 when setting to firmware (Vikash) >> - Fixed the issue with bitstream resolution setting to firmware (Neil) >> - Addressed other review comments (Vikash, Bryan) >> - Link to v2: >> https://lore.kernel.org/r/20250813-iris-video-encoder-v2-0-c725ff673078@quicinc.com >> >> Changes in v2: >> - Fixed sparse/coccinnelle issues. >> - Fixed the kernel doc warning. >> - Removed unsupported PEAK_BITRATE property from SM8250. >> - Dropped patch 04/25 to fix quality issue with encoder. >> - Enhanced command handling for encoder to allow start/stop commands. >> - Expanded rate control condition checks to include additional rate >> control types for HFI Gen2. >> - Updated default value to MAX_QP for all caps related to max QP settings. >> - Add support for INPUT/OUTPUT_BUF_HOST_MAX_COUNT caps for encoder. >> - Link to v1: >> https://lore.kernel.org/r/20250704-iris-video-encoder-v1-0-b6ce24e273cf@quicinc.com >> >> All patches have been tested with v4l2-compliance, v4l2-ctl and >> Gstreamer on SM8250 and SM8550 for encoder, at the same time ensured >> that the existing decoder functionality remains uneffected. >> >> Commands used for V4l2-ctl validation: >> >> v4l2-ctl --verbose >> --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 >> --set-selection-output target=crop,top=0,left=0,width=1280,height=720 >> --set-fmt-video=pixelformat=H264 --stream-mmap --stream-out-mmap >> --stream-from=/media/cyclists_1280x720_92frames.yuv >> --stream-to=/tmp/cyclists_1280x720_92frames.h264 -d /dev/video1 >> >> v4l2-ctl --verbose >> --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 >> --set-selection-output target=crop,top=0,left=0,width=1280,height=720 >> --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap >> --stream-from=/media/cyclists_1280x720_92frames.yuv >> --stream-to=/tmp/cyclists_1280x720_92frames.hevc -d /dev/video1 > > - I've tested this serie on SM8650, first I failed to get HEVC working with > the following command: > > v4l2-ctl --verbose > --set-fmt-video-out=width=1920,height=1080,pixelformat=NV12 > --set-selection-output target=crop,top=0,left=0,width=1920,height=1080 > --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap > --stream-from=Big_Buck_Bunny_1080_10s.yuv > --stream-to=Big_Buck_Bunny_1080_10s.hevc -d /dev/video1 > > I got: > qcom-iris aa00000.video-codec: session error received 0x1000005: unknown > > I checked the diff with v2, and reverting this make HEVC encoding work again: This is strange, we don't see any such issue on SM8550. Could you pls share the full logs. > ===========================><================================================= > --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c > +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c > @@ -194,9 +194,8 @@ static int > iris_hfi_gen2_set_bitstream_resolution(struct iris_inst *inst, u32 pl > inst_hfi_gen2->src_subcr_params.bitstream_resolution = > resolution; > payload_type = HFI_PAYLOAD_U32; > } else { > - codec_align = inst->codec == V4L2_PIX_FMT_HEVC ? 32 : 16; > - resolution = ALIGN(inst->fmt_dst->fmt.pix_mp.width, > codec_align) << 16 | > - ALIGN(inst->fmt_dst->fmt.pix_mp.height, codec_align); > + resolution = inst->fmt_dst->fmt.pix_mp.width << 16 | > + inst->fmt_dst->fmt.pix_mp.height; > inst_hfi_gen2->dst_subcr_params.bitstream_resolution = > resolution; > payload_type = HFI_PAYLOAD_32_PACKED; > } > ===========================><================================================= > Did I pass some wrong parameters ? I don't expect the fw to crash. > > - On the 1280x720 output bug, I tried the same commands as v2: > v4l2-ctl --verbose > --set-fmt-video-out=width=1920,height=1080,pixelformat=NV12 > --set-selection-output target=crop,top=0,left=0,width=1920,height=1080 > --set-fmt-video=pixelformat=H264 --stream-mmap --stream-out-mmap > --stream-from=Big_Buck_Bunny_1080_10s.yuv > --stream-to=Big_Buck_Bunny_1080_10s.h264 -d /dev/video1 > > And I still get a 1280x720 h264 video, did I miss something ? The above chnage which you reverted is needed to resolve this bug, basically if you don't set the resolution aligned with 16 (for H264) and 32 (for HEVC) firmware will reject the property and encode to some default resolution which is 720p in this case. > > - Finally I tested the firmware you sent today > (https://gitlab.com/kernel-firmware/linux-firmware/-/merge_requests/654), > first thanks a lot for that ! > > But then I was unable to encode with this firmware (v2 or v3 patchset), I > got around all the firmwares > I got and here's the results: > | QC_IMAGE_VERSION_STRING | BUILD_DATE > | Release | decoding | encoding v2 | encoding v3 | > |-------------------------------------------------------------|-------------|---------------------------------|----------|-------------|-------------| > | video-firmware.3.4-245082a0a3cc5e740f6340c295000ab4bcfc367d | Aug 24 2023 > | VIDEO.LA.4.0.r2-02400-lanai.0-1 | OK | OK | KO HEVC | > | video-firmware.3.4-457429862ac40592d143de942b04d80fd9987e56 | Jan 29 2024 > | VIDEO.LA.4.0.r2-03800-lanai.0-1 | OK | OK | KO HEVC | > | video-firmware.3.4-0d8a914b010672616a0d0613e22866c0b639a807 | Aug 14 2024 > | VIDEO.LA.4.0.r2-05900-lanai.0-1 | OK | KO | KO | > | video-firmware.3.4-75ad4eb9657cf50ee663b05f78c01d6ceccd5632 | Jan 29 2025 > | VIDEO.LA.4.0.r2-05900-lanai.0-1 | OK | KO | KO | > | video-firmware.3.4-e299f99ffcd086b43a2ccc7c3279ce5df404d693 | Aug 14 2025 > | VIDEO.VPU.3.4-0054 | OK | KO | KO | > ------------------------------------------------------------------------------------------------------------------------------------------------------ > > The change occurs around Aug 14 2024, So I checked the downstream driver > and I found that fixes the encoding: > ===========================><================================================= > --- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c > +++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c > @@ -863,9 +863,18 @@ static inline > u32 size_vpss_line_buf(u32 num_vpp_pipes_enc, u32 frame_height_coded, > u32 frame_width_coded) > { > - return ALIGN(((((((8192) >> 2) << 5) * (num_vpp_pipes_enc)) + 64) + > - (((((max_t(u32, (frame_width_coded), > - (frame_height_coded)) + 3) >> 2) << 5) + > 256) * 16)), 256); > + u32 vpss_4tap_top = 0, vpss_4tap_left = 0, vpss_div2_top = 0, > vpss_div2_left = 0, vpss_top_lb = 0, vpss_left_lb = 0, size_left = 0, > size_top = 0; > + > + vpss_4tap_top = ((((max_t(u32, frame_width_coded, > frame_height_coded) * 2) + 3) >> 2) << 4) + 256; > + vpss_4tap_left = (((8192 + 3) >> 2) << 5) + 64; > + vpss_div2_top = (((max_t(u32,frame_width_coded, frame_height_coded) > + 3) >> 2) << 4) + 256; > + vpss_div2_left = ((((max_t(u32, frame_width_coded, > frame_height_coded)* 2) + 3) >> 2) << 5) + 64; > + vpss_top_lb = (frame_width_coded + 1) << 3; > + vpss_left_lb = (frame_height_coded << 3) * num_vpp_pipes_enc; > + size_left = (vpss_4tap_left + vpss_div2_left) * 2 * num_vpp_pipes_enc; > + size_top = (vpss_4tap_top + vpss_div2_top) * 2; > + > + return ALIGN(size_left + size_top + vpss_top_lb + vpss_left_lb, > DMA_ALIGNMENT); > } Seems this calculation is different for iris3 and iris33, hence you see this issue on SM8650. Updating this calculation in common code will increase the buffer size with from ~400KB to ~2.2 MBs (for 640x480) and even more for higher resolution. @vikash, pls comment if we should update in common code or have this implemented specific for iris33 separately using some ops. Thanks, Dikshita > > static inline > ===========================><================================================= > > And I checked and encoding still works with the "old" firmwares. > > With both changes, I can get H264 & HEVC encoding working on any firmware. > > Neil > > >> >> Commands used for GST validation: >> >> gst-launch-1.0 -v filesrc location=/media/cyclists_1280x720_92frames.yuv ! >> rawvideoparse format=nv12 width=1280 height=720 framerate=30/1 ! v4l2h264enc >> capture-io-mode=4 output-io-mode=4 ! filesink sync=true >> location=/tmp/gst_cyclists_1280x720_92frames.h264 >> >> gst-launch-1.0 -v filesrc location=/media/cyclists_1280x720_92frames.yuv ! >> rawvideoparse format=nv12 width=1280 height=720 framerate=30/1 ! v4l2h265enc >> capture-io-mode=4 output-io-mode=4 ! filesink sync=true >> location=/tmp/gst_cyclists_1280x720_92frames.hevc >> >> The result of v4l2-compliance on SM8550: >> v4l2-compliance 1.29.0-5270, 64 bits, 64-bit time_t >> v4l2-compliance SHA: dc947661089e 2024-11-11 10:25:38 >> >> Compliance test for iris_driver device /dev/video1: >> >> Driver Info: >> Driver name : iris_driver >> Card type : Iris Encoder >> Bus info : platform:aa00000.video-codec >> Driver version : 6.16.0 >> Capabilities : 0x84204000 >> Video Memory-to-Memory Multiplanar >> Streaming >> Extended Pix Format >> Device Capabilities >> Device Caps : 0x04204000 >> Video Memory-to-Memory Multiplanar >> Streaming >> Extended Pix Format >> Detected Stateful Encoder >> >> Required ioctls: >> test VIDIOC_QUERYCAP: OK >> test invalid ioctls: OK >> >> Allow for multiple opens: >> test second /dev/video1 open: OK >> test VIDIOC_QUERYCAP: OK >> test VIDIOC_G/S_PRIORITY: OK >> test for unlimited opens: OK >> >> Debug ioctls: >> test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) >> test VIDIOC_LOG_STATUS: OK (Not Supported) >> >> Input ioctls: >> test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) >> test VIDIOC_G/S_FREQUENCY: OK (Not Supported) >> test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) >> test VIDIOC_ENUMAUDIO: OK (Not Supported) >> test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) >> test VIDIOC_G/S_AUDIO: OK (Not Supported) >> Inputs: 0 Audio Inputs: 0 Tuners: 0 >> >> Output ioctls: >> test VIDIOC_G/S_MODULATOR: OK (Not Supported) >> test VIDIOC_G/S_FREQUENCY: OK (Not Supported) >> test VIDIOC_ENUMAUDOUT: OK (Not Supported) >> test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) >> test VIDIOC_G/S_AUDOUT: OK (Not Supported) >> Outputs: 0 Audio Outputs: 0 Modulators: 0 >> >> Input/Output configuration ioctls: >> test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) >> test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) >> test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) >> test VIDIOC_G/S_EDID: OK (Not Supported) >> >> Control ioctls: >> test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK >> test VIDIOC_QUERYCTRL: OK >> test VIDIOC_G/S_CTRL: OK >> test VIDIOC_G/S/TRY_EXT_CTRLS: OK >> test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK >> test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) >> Standard Controls: 37 Private Controls: 0 >> >> Format ioctls: >> test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK >> test VIDIOC_G/S_PARM: OK >> test VIDIOC_G_FBUF: OK (Not Supported) >> test VIDIOC_G_FMT: OK >> test VIDIOC_TRY_FMT: OK >> test VIDIOC_S_FMT: OK >> test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) >> test Cropping: OK >> test Composing: OK (Not Supported) >> test Scaling: OK (Not Supported) >> >> Codec ioctls: >> test VIDIOC_(TRY_)ENCODER_CMD: OK >> test VIDIOC_G_ENC_INDEX: OK (Not Supported) >> test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) >> >> Buffer ioctls: >> test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK >> test CREATE_BUFS maximum buffers: OK >> test VIDIOC_REMOVE_BUFS: OK >> test VIDIOC_EXPBUF: OK >> test Requests: OK (Not Supported) >> test blocking wait: OK >> >> Test input 0: >> >> Streaming ioctls: >> test read/write: OK (Not Supported) >> Video Capture Multiplanar: Captured 61 buffers >> test MMAP (select, REQBUFS): OK >> Video Capture Multiplanar: Captured 61 buffers >> test MMAP (epoll, REQBUFS): OK >> Video Capture Multiplanar: Captured 61 buffers >> test MMAP (select, CREATE_BUFS): OK >> Video Capture Multiplanar: Captured 61 buffers >> test MMAP (epoll, CREATE_BUFS): OK >> test USERPTR (select): OK (Not Supported) >> test DMABUF: Cannot test, specify --expbuf-device >> >> Total for iris_driver device /dev/video1: 54, Succeeded: 54, Failed: 0, >> Warnings: 0 >> >> The result of v4l2-compliance on SM8250: >> v4l2-compliance 1.29.0-5270, 64 bits, 64-bit time_t >> v4l2-compliance SHA: dc947661089e 2024-11-11 10:25:38 >> >> Compliance test for iris_driver device /dev/video1: >> >> Driver Info: >> Driver name : iris_driver >> Card type : Iris Encoder >> Bus info : platform:aa00000.video-codec >> Driver version : 6.16.0 >> Capabilities : 0x84204000 >> Video Memory-to-Memory Multiplanar >> Streaming >> Extended Pix Format >> Device Capabilities >> Device Caps : 0x04204000 >> Video Memory-to-Memory Multiplanar >> Streaming >> Extended Pix Format >> Detected Stateful Encoder >> >> Required ioctls: >> test VIDIOC_QUERYCAP: OK >> test invalid ioctls: OK >> >> Allow for multiple opens: >> test second /dev/video1 open: OK >> test VIDIOC_QUERYCAP: OK >> test VIDIOC_G/S_PRIORITY: OK >> test for unlimited opens: OK >> >> Debug ioctls: >> test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) >> test VIDIOC_LOG_STATUS: OK (Not Supported) >> >> Input ioctls: >> test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) >> test VIDIOC_G/S_FREQUENCY: OK (Not Supported) >> test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) >> test VIDIOC_ENUMAUDIO: OK (Not Supported) >> test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) >> test VIDIOC_G/S_AUDIO: OK (Not Supported) >> Inputs: 0 Audio Inputs: 0 Tuners: 0 >> >> Output ioctls: >> test VIDIOC_G/S_MODULATOR: OK (Not Supported) >> test VIDIOC_G/S_FREQUENCY: OK (Not Supported) >> test VIDIOC_ENUMAUDOUT: OK (Not Supported) >> test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) >> test VIDIOC_G/S_AUDOUT: OK (Not Supported) >> Outputs: 0 Audio Outputs: 0 Modulators: 0 >> >> Input/Output configuration ioctls: >> test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) >> test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) >> test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) >> test VIDIOC_G/S_EDID: OK (Not Supported) >> >> Control ioctls: >> test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK >> test VIDIOC_QUERYCTRL: OK >> test VIDIOC_G/S_CTRL: OK >> test VIDIOC_G/S/TRY_EXT_CTRLS: OK >> test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK >> test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) >> Standard Controls: 19 Private Controls: 0 >> >> Format ioctls: >> test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK >> test VIDIOC_G/S_PARM: OK >> test VIDIOC_G_FBUF: OK (Not Supported) >> test VIDIOC_G_FMT: OK >> test VIDIOC_TRY_FMT: OK >> test VIDIOC_S_FMT: OK >> test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) >> test Cropping: OK >> test Composing: OK (Not Supported) >> test Scaling: OK (Not Supported) >> >> Codec ioctls: >> test VIDIOC_(TRY_)ENCODER_CMD: OK >> test VIDIOC_G_ENC_INDEX: OK (Not Supported) >> test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) >> >> Buffer ioctls: >> test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK >> test CREATE_BUFS maximum buffers: OK >> test VIDIOC_REMOVE_BUFS: OK >> test VIDIOC_EXPBUF: OK >> test Requests: OK (Not Supported) >> test blocking wait: OK >> >> Test input 0: >> >> Streaming ioctls: >> test read/write: OK (Not Supported) >> Video Capture Multiplanar: Captured 61 buffers >> test MMAP (select, REQBUFS): OK >> Video Capture Multiplanar: Captured 61 buffers >> test MMAP (epoll, REQBUFS): OK >> Video Capture Multiplanar: Captured 61 buffers >> test MMAP (select, CREATE_BUFS): OK >> Video Capture Multiplanar: Captured 61 buffers >> test MMAP (epoll, CREATE_BUFS): OK >> test USERPTR (select): OK (Not Supported) >> test DMABUF: Cannot test, specify --expbuf-device >> >> Total for iris_driver device /dev/video1: 54, Succeeded: 54, Failed: 0, >> Warnings: 0 >> >> Looking forward to your review and feedback. >> >> Thanks, >> Dikshita >> >> Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> >> --- >> Dikshita Agarwal (26): >> media: iris: Fix buffer count reporting in internal buffer check >> media: iris: Report unreleased PERSIST buffers on session close >> media: iris: Fix memory leak by freeing untracked persist buffer >> media: iris: Fix port streaming handling >> media: iris: Allow substate transition to load resources during >> output streaming >> media: iris: Always destroy internal buffers on firmware release >> response >> media: iris: Update vbuf flags before v4l2_m2m_buf_done >> media: iris: Simplify session stop logic by relying on vb2 checks >> media: iris: Allow stop on firmware only if start was issued. >> media: iris: Send dummy buffer address for all codecs during drain >> media: iris: Fix missing LAST flag handling during drain >> media: iris: Fix format check for CAPTURE plane in try_fmt >> media: iris: Add support for video encoder device >> media: iris: Initialize and deinitialize encoder instance structure >> media: iris: Add support for ENUM_FMT, S/G/TRY_FMT encoder >> media: iris: Add support for ENUM_FRAMESIZES/FRAMEINTERVALS for >> encoder >> media: iris: Add support for VIDIOC_QUERYCAP for encoder video device >> media: iris: Add encoder support for V4L2 event subscription >> media: iris: Add support for G/S_SELECTION for encoder video device >> media: iris: Add support for G/S_PARM for encoder video device >> media: iris: Add platform-specific capabilities for encoder video >> device >> media: iris: Add V4L2 streaming support for encoder video device >> media: iris: Set platform capabilities to firmware for encoder >> video device >> media: iris: Allocate and queue internal buffers for encoder video >> device >> media: iris: Add support for buffer management ioctls for encoder >> device >> media: iris: Add support for drain sequence in encoder video device >> >> drivers/media/platform/qcom/iris/Makefile | 5 +- >> drivers/media/platform/qcom/iris/iris_buffer.c | 220 ++++-- >> drivers/media/platform/qcom/iris/iris_buffer.h | 7 +- >> drivers/media/platform/qcom/iris/iris_common.c | 232 ++++++ >> drivers/media/platform/qcom/iris/iris_common.h | 18 + >> drivers/media/platform/qcom/iris/iris_core.h | 20 +- >> drivers/media/platform/qcom/iris/iris_ctrls.c | 675 +++++++++++++++- >> drivers/media/platform/qcom/iris/iris_ctrls.h | 15 + >> drivers/media/platform/qcom/iris/iris_hfi_common.h | 2 +- >> .../platform/qcom/iris/iris_hfi_gen1_command.c | 480 +++++++++--- >> .../platform/qcom/iris/iris_hfi_gen1_defines.h | 112 ++- >> .../platform/qcom/iris/iris_hfi_gen1_response.c | 60 +- >> .../platform/qcom/iris/iris_hfi_gen2_command.c | 359 ++++++--- >> .../platform/qcom/iris/iris_hfi_gen2_defines.h | 44 +- >> .../platform/qcom/iris/iris_hfi_gen2_response.c | 46 +- >> drivers/media/platform/qcom/iris/iris_instance.h | 24 + >> .../platform/qcom/iris/iris_platform_common.h | 74 +- >> .../media/platform/qcom/iris/iris_platform_gen2.c | 522 ++++++++++++- >> .../platform/qcom/iris/iris_platform_qcs8300.h | 352 ++++++++- >> .../platform/qcom/iris/iris_platform_sm8250.c | 234 +++++- >> drivers/media/platform/qcom/iris/iris_probe.c | 33 +- >> drivers/media/platform/qcom/iris/iris_state.c | 9 +- >> drivers/media/platform/qcom/iris/iris_state.h | 1 + >> drivers/media/platform/qcom/iris/iris_utils.c | 36 + >> drivers/media/platform/qcom/iris/iris_utils.h | 2 + >> drivers/media/platform/qcom/iris/iris_vb2.c | 58 +- >> drivers/media/platform/qcom/iris/iris_vdec.c | 251 +----- >> drivers/media/platform/qcom/iris/iris_vdec.h | 13 +- >> drivers/media/platform/qcom/iris/iris_venc.c | 579 ++++++++++++++ >> drivers/media/platform/qcom/iris/iris_venc.h | 27 + >> drivers/media/platform/qcom/iris/iris_vidc.c | 299 +++++++- >> drivers/media/platform/qcom/iris/iris_vpu_buffer.c | 847 >> ++++++++++++++++++++- >> drivers/media/platform/qcom/iris/iris_vpu_buffer.h | 20 + >> 33 files changed, 4964 insertions(+), 712 deletions(-) >> --- >> base-commit: a75b8d198c55e9eb5feb6f6e155496305caba2dc >> change-id: 20250704-iris-video-encoder-b193350b487a >> >> Best regards, >
On 21/08/2025 09:21, Dikshita Agarwal wrote: > > > On 8/20/2025 8:29 PM, Neil Armstrong wrote: >> Hi, >> >> On 20/08/2025 11:07, Dikshita Agarwal wrote: >>> Hi All, >>> >>> This patch series adds support for H.264 and H.265 encoder in iris >>> driver and includes a few fixes and cleanup in the common code that were >>> identified during encoder bring-up process. >>> >>> The changes include: >>> - Enabling support for H.264 and H.265 encoding. >>> - Fixes and improvements in shared componenets used by both encoder and >>> decoder paths. >>> - Ensuring compatibility and stability with the existing decoder flow. >>> >>> Changes in v3: >>> - Fixed the log when destroying the interanl buffers (Jorge) >>> - Updated commit text with issue details in patch 05/25 (Krzysztof) >>> - Added a patch to simplify conditional logic in stop handling for hfi >>> gen1 (Bryan) >>> - Reduced duplicate code while registering video devices (Bryan) >>> - Added a fix for try fmt handling in decoder (Self) >>> - Fixed the value of max core mbps for qcs8300 (Vikash) >>> - Simplied the frame rate handling in driver by using non q16 format and >>> converted to q16 when setting to firmware (Vikash) >>> - Fixed the issue with bitstream resolution setting to firmware (Neil) >>> - Addressed other review comments (Vikash, Bryan) >>> - Link to v2: >>> https://lore.kernel.org/r/20250813-iris-video-encoder-v2-0-c725ff673078@quicinc.com >>> >>> Changes in v2: >>> - Fixed sparse/coccinnelle issues. >>> - Fixed the kernel doc warning. >>> - Removed unsupported PEAK_BITRATE property from SM8250. >>> - Dropped patch 04/25 to fix quality issue with encoder. >>> - Enhanced command handling for encoder to allow start/stop commands. >>> - Expanded rate control condition checks to include additional rate >>> control types for HFI Gen2. >>> - Updated default value to MAX_QP for all caps related to max QP settings. >>> - Add support for INPUT/OUTPUT_BUF_HOST_MAX_COUNT caps for encoder. >>> - Link to v1: >>> https://lore.kernel.org/r/20250704-iris-video-encoder-v1-0-b6ce24e273cf@quicinc.com >>> >>> All patches have been tested with v4l2-compliance, v4l2-ctl and >>> Gstreamer on SM8250 and SM8550 for encoder, at the same time ensured >>> that the existing decoder functionality remains uneffected. >>> >>> Commands used for V4l2-ctl validation: >>> >>> v4l2-ctl --verbose >>> --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 >>> --set-selection-output target=crop,top=0,left=0,width=1280,height=720 >>> --set-fmt-video=pixelformat=H264 --stream-mmap --stream-out-mmap >>> --stream-from=/media/cyclists_1280x720_92frames.yuv >>> --stream-to=/tmp/cyclists_1280x720_92frames.h264 -d /dev/video1 >>> >>> v4l2-ctl --verbose >>> --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 >>> --set-selection-output target=crop,top=0,left=0,width=1280,height=720 >>> --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap >>> --stream-from=/media/cyclists_1280x720_92frames.yuv >>> --stream-to=/tmp/cyclists_1280x720_92frames.hevc -d /dev/video1 >> >> - I've tested this serie on SM8650, first I failed to get HEVC working with >> the following command: >> >> v4l2-ctl --verbose >> --set-fmt-video-out=width=1920,height=1080,pixelformat=NV12 >> --set-selection-output target=crop,top=0,left=0,width=1920,height=1080 >> --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap >> --stream-from=Big_Buck_Bunny_1080_10s.yuv >> --stream-to=Big_Buck_Bunny_1080_10s.hevc -d /dev/video1 >> >> I got: >> qcom-iris aa00000.video-codec: session error received 0x1000005: unknown >> >> I checked the diff with v2, and reverting this make HEVC encoding work again: > > This is strange, we don't see any such issue on SM8550. > Could you pls share the full logs. I tried again with a 720p stream with your exact command line from the cover letter and it still fails with HEVC: $ v4l2-ctl --verbose --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 --set-selection-output target=crop,top=0,left=0,width=1280,height=720 --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap --stream-from=Big_Buck_Bunny_720_10s.yuv --stream-to=Big_Buck_Bunny_720_10s.hevc -d /dev/video1 VIDIOC_QUERYCAP: ok VIDIOC_G_FMT: ok VIDIOC_S_FMT: ok Format Video Capture Multiplanar: Width/Height : 320/240 Pixel Format : 'HEVC' (HEVC) Field : None Number of planes : 1 Flags : Colorspace : Default Transfer Function : Default YCbCr/HSV Encoding: Default Quantization : Default Plane 0 : Bytes per Line : 0 Size Image : 245760 VIDIOC_G_FMT: ok VIDIOC_S_FMT: ok Format Video Output Multiplanar: Width/Height : 1280/736 Pixel Format : 'NV12' (Y/UV 4:2:0) Field : None Number of planes : 1 Flags : Colorspace : Default Transfer Function : Default YCbCr/HSV Encoding: Default Quantization : Default Plane 0 : Bytes per Line : 1280 Size Image : 1413120 VIDIOC_G_SELECTION: ok VIDIOC_S_SELECTION: ok VIDIOC_G_FMT returned 0 (Success) VIDIOC_G_FMT returned 0 (Success) VIDIOC_G_FMT returned 0 (Success) VIDIOC_REQBUFS returned 0 (Success) VIDIOC_QUERYBUF returned 0 (Success) VIDIOC_QUERYBUF returned 0 (Success) VIDIOC_QUERYBUF returned 0 (Success) VIDIOC_QUERYBUF returned 0 (Success) VIDIOC_G_FMT returned 0 (Success) VIDIOC_QUERYBUF returned 0 (Success) VIDIOC_G_FMT returned 0 (Success) VIDIOC_QBUF returned 0 (Success) VIDIOC_QUERYBUF returned 0 (Success) VIDIOC_G_FMT returned 0 (Success) VIDIOC_QBUF returned 0 (Success) VIDIOC_QUERYBUF returned 0 (Success) VIDIOC_G_FMT returned 0 (Success) VIDIOC_QBUF returned 0 (Success) VIDIOC_QUERYBUF returned 0 (Success) VIDIOC_G_FMT returned 0 (Success) VIDIOC_QBUF returned 0 (Success) VIDIOC_STREAMON returned 0 (Success) VIDIOC_G_FMT: ok VIDIOC_DQBUF: failed: Input/output error out dqbuf: 0 seq: 0 bytesused: 0 ts: 0.000000 field: Any VIDIOC_DQBUF: failed: Input/output error DMESG: [ 370.390568] videobuf2_common: [out-0000000057b84b86] vb2_core_reqbufs: call_qop(queue_setup) [ 370.390585] qcom-iris aa00000.video-codec: state changed from 1 to 1 [ 370.390591] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_alloc: call_memop(0, alloc) [ 370.390742] videobuf2_common: [out-0000000057b84b86] __setup_offsets: buffer 0, plane 0 offset 0x00000000 [ 370.390746] videobuf2_common: [out-0000000057b84b86] __vb2_queue_alloc: call_vb_qop(0, buf_init) [ 370.390749] videobuf2_common: [out-0000000057b84b86] vb2_plane_cookie: call_memop(0, cookie) [ 370.390752] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_alloc: call_memop(1, alloc) [ 370.390911] videobuf2_common: [out-0000000057b84b86] __setup_offsets: buffer 1, plane 0 offset 0x00008000 [ 370.390913] videobuf2_common: [out-0000000057b84b86] __vb2_queue_alloc: call_vb_qop(1, buf_init) [ 370.390915] videobuf2_common: [out-0000000057b84b86] vb2_plane_cookie: call_memop(1, cookie) [ 370.390918] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_alloc: call_memop(2, alloc) [ 370.391139] videobuf2_common: [out-0000000057b84b86] __setup_offsets: buffer 2, plane 0 offset 0x00010000 [ 370.391141] videobuf2_common: [out-0000000057b84b86] __vb2_queue_alloc: call_vb_qop(2, buf_init) [ 370.391143] videobuf2_common: [out-0000000057b84b86] vb2_plane_cookie: call_memop(2, cookie) [ 370.391145] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_alloc: call_memop(3, alloc) [ 370.391293] videobuf2_common: [out-0000000057b84b86] __setup_offsets: buffer 3, plane 0 offset 0x00018000 [ 370.391296] videobuf2_common: [out-0000000057b84b86] __vb2_queue_alloc: call_vb_qop(3, buf_init) [ 370.391297] videobuf2_common: [out-0000000057b84b86] vb2_plane_cookie: call_memop(3, cookie) [ 370.391299] videobuf2_common: [out-0000000057b84b86] __vb2_queue_alloc: allocated 4 buffers, 1 plane(s) each [ 370.391363] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(0, num_users) [ 370.391418] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(1, num_users) [ 370.391470] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(2, num_users) [ 370.391522] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(3, num_users) [ 370.391584] videobuf2_common: [out-0000000057b84b86] vb2_mmap: call_memop(0, mmap) [ 370.391638] vb2_common_vm_open: 00000000210e3729, refcount: 1, vma: ffff96927000-ffff96a80000 [ 370.391642] vb2_dc_mmap: mapped dma addr 0xdfa00000 at 0xffff96927000, size 1413120 [ 370.391646] videobuf2_common: [out-0000000057b84b86] vb2_mmap: buffer 0, plane 0 successfully mapped [ 370.391656] videobuf2_common: [out-0000000057b84b86] vb2_mmap: call_memop(1, mmap) [ 370.391701] vb2_common_vm_open: 0000000076540d0f, refcount: 1, vma: ffff967ce000-ffff96927000 [ 370.391704] vb2_dc_mmap: mapped dma addr 0xdf800000 at 0xffff967ce000, size 1413120 [ 370.391706] videobuf2_common: [out-0000000057b84b86] vb2_mmap: buffer 1, plane 0 successfully mapped [ 370.391716] videobuf2_common: [out-0000000057b84b86] vb2_mmap: call_memop(2, mmap) [ 370.391759] vb2_common_vm_open: 00000000fe5c7906, refcount: 1, vma: ffff96675000-ffff967ce000 [ 370.391761] vb2_dc_mmap: mapped dma addr 0xdf600000 at 0xffff96675000, size 1413120 [ 370.391763] videobuf2_common: [out-0000000057b84b86] vb2_mmap: buffer 2, plane 0 successfully mapped [ 370.391768] videobuf2_common: [out-0000000057b84b86] vb2_mmap: call_memop(3, mmap) [ 370.391812] vb2_common_vm_open: 000000006a194006, refcount: 1, vma: ffff9651c000-ffff96675000 [ 370.391814] vb2_dc_mmap: mapped dma addr 0xdf400000 at 0xffff9651c000, size 1413120 [ 370.391816] videobuf2_common: [out-0000000057b84b86] vb2_mmap: buffer 3, plane 0 successfully mapped [ 370.392050] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(0, num_users) [ 370.393015] videobuf2_common: [out-0000000057b84b86] __buf_prepare: call_vb_qop(0, buf_out_validate) [ 370.393021] videobuf2_common: [out-0000000057b84b86] __prepare_mmap: call_vb_qop(0, buf_prepare) [ 370.393024] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_prepare: call_memop(0, prepare) [ 370.393027] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(0, num_users) [ 370.393030] videobuf2_common: [out-0000000057b84b86] vb2_core_qbuf: qbuf of buffer 0 succeeded [ 370.393033] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000da2be142 [ 370.393037] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 370.393039] v4l2_m2m_try_run: No job pending [ 370.393098] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(1, num_users) [ 370.393715] videobuf2_common: [out-0000000057b84b86] __buf_prepare: call_vb_qop(1, buf_out_validate) [ 370.393720] videobuf2_common: [out-0000000057b84b86] __prepare_mmap: call_vb_qop(1, buf_prepare) [ 370.393723] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_prepare: call_memop(1, prepare) [ 370.393725] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(1, num_users) [ 370.393728] videobuf2_common: [out-0000000057b84b86] vb2_core_qbuf: qbuf of buffer 1 succeeded [ 370.393730] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000da2be142 [ 370.393733] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 370.393735] v4l2_m2m_try_run: No job pending [ 370.393792] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(2, num_users) [ 370.394421] videobuf2_common: [out-0000000057b84b86] __buf_prepare: call_vb_qop(2, buf_out_validate) [ 370.394425] videobuf2_common: [out-0000000057b84b86] __prepare_mmap: call_vb_qop(2, buf_prepare) [ 370.394427] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_prepare: call_memop(2, prepare) [ 370.394430] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(2, num_users) [ 370.394432] videobuf2_common: [out-0000000057b84b86] vb2_core_qbuf: qbuf of buffer 2 succeeded [ 370.394435] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000da2be142 [ 370.394437] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 370.394439] v4l2_m2m_try_run: No job pending [ 370.394496] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(3, num_users) [ 370.395199] videobuf2_common: [out-0000000057b84b86] __buf_prepare: call_vb_qop(3, buf_out_validate) [ 370.395203] videobuf2_common: [out-0000000057b84b86] __prepare_mmap: call_vb_qop(3, buf_prepare) [ 370.395205] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_prepare: call_memop(3, prepare) [ 370.395208] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(3, num_users) [ 370.395210] videobuf2_common: [out-0000000057b84b86] vb2_core_qbuf: qbuf of buffer 3 succeeded [ 370.395212] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000da2be142 [ 370.395214] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 370.395216] v4l2_m2m_try_run: No job pending [ 370.395273] videobuf2_common: [out-0000000057b84b86] vb2_core_streamon: call_qop(prepare_streaming) (nop) [ 370.395277] videobuf2_common: [out-0000000057b84b86] __enqueue_in_driver: call_vb_qop(0, buf_queue) [ 370.395280] videobuf2_common: [out-0000000057b84b86] __enqueue_in_driver: call_vb_qop(1, buf_queue) [ 370.395282] videobuf2_common: [out-0000000057b84b86] __enqueue_in_driver: call_vb_qop(2, buf_queue) [ 370.395285] videobuf2_common: [out-0000000057b84b86] __enqueue_in_driver: call_vb_qop(3, buf_queue) [ 370.395287] videobuf2_common: [out-0000000057b84b86] vb2_start_streaming: call_qop(start_streaming) [ 370.396462] qcom-iris aa00000.video-codec: state changed from 2 to 2 [ 370.396469] videobuf2_common: [out-0000000057b84b86] vb2_core_streamon: successful [ 370.396473] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000da2be142 [ 370.396475] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 370.396477] v4l2_m2m_try_run: No job pending [ 370.396583] videobuf2_common: [cap-00000000e59a888f] vb2_core_streamoff: successful [ 370.396629] videobuf2_common: [cap-00000000e59a888f] vb2_core_reqbufs: call_qop(queue_setup) [ 370.396633] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_alloc: call_memop(0, alloc) [ 370.396691] videobuf2_common: [cap-00000000e59a888f] __setup_offsets: buffer 0, plane 0 offset 0x00000000 [ 370.396694] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_alloc: call_vb_qop(0, buf_init) [ 370.396696] videobuf2_common: [cap-00000000e59a888f] vb2_plane_cookie: call_memop(0, cookie) [ 370.396699] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_alloc: call_memop(1, alloc) [ 370.396746] videobuf2_common: [cap-00000000e59a888f] __setup_offsets: buffer 1, plane 0 offset 0x00008000 [ 370.396748] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_alloc: call_vb_qop(1, buf_init) [ 370.396750] videobuf2_common: [cap-00000000e59a888f] vb2_plane_cookie: call_memop(1, cookie) [ 370.396752] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_alloc: call_memop(2, alloc) [ 370.396809] videobuf2_common: [cap-00000000e59a888f] __setup_offsets: buffer 2, plane 0 offset 0x00010000 [ 370.396811] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_alloc: call_vb_qop(2, buf_init) [ 370.396813] videobuf2_common: [cap-00000000e59a888f] vb2_plane_cookie: call_memop(2, cookie) [ 370.396814] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_alloc: call_memop(3, alloc) [ 370.396884] videobuf2_common: [cap-00000000e59a888f] __setup_offsets: buffer 3, plane 0 offset 0x00018000 [ 370.396886] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_alloc: call_vb_qop(3, buf_init) [ 370.396888] videobuf2_common: [cap-00000000e59a888f] vb2_plane_cookie: call_memop(3, cookie) [ 370.396889] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_alloc: allocated 4 buffers, 1 plane(s) each [ 370.396896] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_in_use: call_memop(0, num_users) [ 370.396899] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_in_use: call_memop(1, num_users) [ 370.396902] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_in_use: call_memop(2, num_users) [ 370.396904] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_in_use: call_memop(3, num_users) [ 370.396919] videobuf2_common: [cap-00000000e59a888f] vb2_mmap: call_memop(0, mmap) [ 370.396945] vb2_common_vm_open: 0000000095b56358, refcount: 1, vma: ffff9646f000-ffff9651c000 [ 370.396948] vb2_dc_mmap: mapped dma addr 0xdf300000 at 0xffff9646f000, size 708608 [ 370.396951] videobuf2_common: [cap-00000000e59a888f] vb2_mmap: buffer 0, plane 0 successfully mapped [ 370.396960] videobuf2_common: [cap-00000000e59a888f] vb2_mmap: call_memop(1, mmap) [ 370.396984] vb2_common_vm_open: 000000005cf693ed, refcount: 1, vma: ffff963c2000-ffff9646f000 [ 370.396987] vb2_dc_mmap: mapped dma addr 0xdf200000 at 0xffff963c2000, size 708608 [ 370.396989] videobuf2_common: [cap-00000000e59a888f] vb2_mmap: buffer 1, plane 0 successfully mapped [ 370.396994] videobuf2_common: [cap-00000000e59a888f] vb2_mmap: call_memop(2, mmap) [ 370.397018] vb2_common_vm_open: 000000000fb3f862, refcount: 1, vma: ffff96315000-ffff963c2000 [ 370.397020] vb2_dc_mmap: mapped dma addr 0xdf100000 at 0xffff96315000, size 708608 [ 370.397022] videobuf2_common: [cap-00000000e59a888f] vb2_mmap: buffer 2, plane 0 successfully mapped [ 370.397027] videobuf2_common: [cap-00000000e59a888f] vb2_mmap: call_memop(3, mmap) [ 370.397048] vb2_common_vm_open: 00000000112d3450, refcount: 1, vma: ffff96268000-ffff96315000 [ 370.397051] vb2_dc_mmap: mapped dma addr 0xdf000000 at 0xffff96268000, size 708608 [ 370.397053] videobuf2_common: [cap-00000000e59a888f] vb2_mmap: buffer 3, plane 0 successfully mapped [ 370.397060] videobuf2_common: [cap-00000000e59a888f] __prepare_mmap: call_vb_qop(0, buf_prepare) [ 370.397062] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_prepare: call_memop(0, prepare) [ 370.397065] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_in_use: call_memop(0, num_users) [ 370.397067] videobuf2_common: [cap-00000000e59a888f] vb2_core_qbuf: qbuf of buffer 0 succeeded [ 370.397069] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000da2be142 [ 370.397071] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 370.397072] v4l2_m2m_try_run: No job pending [ 370.397075] videobuf2_common: [cap-00000000e59a888f] __prepare_mmap: call_vb_qop(1, buf_prepare) [ 370.397077] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_prepare: call_memop(1, prepare) [ 370.397079] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_in_use: call_memop(1, num_users) [ 370.397080] videobuf2_common: [cap-00000000e59a888f] vb2_core_qbuf: qbuf of buffer 1 succeeded [ 370.397082] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000da2be142 [ 370.397084] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 370.397085] v4l2_m2m_try_run: No job pending [ 370.397087] videobuf2_common: [cap-00000000e59a888f] __prepare_mmap: call_vb_qop(2, buf_prepare) [ 370.397089] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_prepare: call_memop(2, prepare) [ 370.397090] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_in_use: call_memop(2, num_users) [ 370.397092] videobuf2_common: [cap-00000000e59a888f] vb2_core_qbuf: qbuf of buffer 2 succeeded [ 370.397094] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000da2be142 [ 370.397095] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 370.397096] v4l2_m2m_try_run: No job pending [ 370.397099] videobuf2_common: [cap-00000000e59a888f] __prepare_mmap: call_vb_qop(3, buf_prepare) [ 370.397100] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_prepare: call_memop(3, prepare) [ 370.397102] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_in_use: call_memop(3, num_users) [ 370.397103] videobuf2_common: [cap-00000000e59a888f] vb2_core_qbuf: qbuf of buffer 3 succeeded [ 370.397105] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000da2be142 [ 370.397106] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 370.397108] v4l2_m2m_try_run: No job pending [ 370.397110] videobuf2_common: [cap-00000000e59a888f] vb2_core_streamon: call_qop(prepare_streaming) (nop) [ 370.397113] videobuf2_common: [cap-00000000e59a888f] __enqueue_in_driver: call_vb_qop(0, buf_queue) [ 370.397115] videobuf2_common: [cap-00000000e59a888f] __enqueue_in_driver: call_vb_qop(1, buf_queue) [ 370.397117] videobuf2_common: [cap-00000000e59a888f] __enqueue_in_driver: call_vb_qop(2, buf_queue) [ 370.397118] videobuf2_common: [cap-00000000e59a888f] __enqueue_in_driver: call_vb_qop(3, buf_queue) [ 370.397120] videobuf2_common: [cap-00000000e59a888f] vb2_start_streaming: call_qop(start_streaming) [ 370.397978] qcom-iris aa00000.video-codec: state changed from 4 to 4 [ 370.397998] videobuf2_common: [cap-00000000e59a888f] vb2_core_streamon: successful [ 370.398001] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000da2be142 [ 370.398003] v4l2_m2m_try_run: Running job on m2m_ctx: 00000000da2be142 [ 370.398609] qcom-iris aa00000.video-codec: session error received 0x1000005: unknown [ 370.398674] qcom-iris aa00000.video-codec: state changed from 5 to 5 [ 370.398687] videobuf2_common: [cap-00000000e59a888f] __vb2_wait_for_done_vb: Queue in error state, will not wait for buffers [ 370.398695] qcom-iris aa00000.video-codec: session error received 0x1000005: unknown [ 370.398716] qcom-iris aa00000.video-codec: session error received 0x1000005: unknown [ 370.398732] videobuf2_common: [out-0000000057b84b86] __vb2_wait_for_done_vb: Queue in error state, will not wait for buffers [ 370.398735] qcom-iris aa00000.video-codec: session error received 0x1000005: unknown [ 370.398763] videobuf2_common: [out-0000000057b84b86] vb2_buffer_done: done processing on buffer 0, state: done [ 370.398781] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_finish: call_memop(0, finish) [ 370.398805] videobuf2_common: [out-0000000057b84b86] vb2_buffer_done: done processing on buffer 1, state: done [ 370.398821] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_finish: call_memop(1, finish) [ 370.398843] videobuf2_common: [out-0000000057b84b86] vb2_buffer_done: done processing on buffer 2, state: done [ 370.398857] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_finish: call_memop(2, finish) [ 370.398875] videobuf2_common: [out-0000000057b84b86] vb2_buffer_done: done processing on buffer 3, state: done [ 370.398890] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_finish: call_memop(3, finish) [ 370.398909] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_done: done processing on buffer 0, state: done [ 370.398923] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_finish: call_memop(0, finish) [ 370.398929] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000da2be142 [ 370.398933] __v4l2_m2m_try_queue: Aborted context [ 370.398942] v4l2_m2m_cancel_job: m2m_ctx 00000000da2be142 running, will wait to complete [ 370.398940] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_done: done processing on buffer 1, state: done [ 370.398946] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_cancel: call_qop(stop_streaming) [ 370.398954] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_finish: call_memop(1, finish) [ 370.398979] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_done: done processing on buffer 2, state: done [ 370.398983] v4l2_m2m_try_run: No job pending [ 370.398996] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_finish: call_memop(2, finish) [ 370.399015] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_done: done processing on buffer 3, state: done [ 370.399029] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_finish: call_memop(3, finish) [ 370.401090] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_cancel: call_qop(unprepare_streaming) (nop) [ 370.401094] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_cancel: call_vb_qop(0, buf_finish) (nop) [ 370.401098] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_cancel: call_vb_qop(1, buf_finish) (nop) [ 370.401100] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_cancel: call_vb_qop(2, buf_finish) (nop) [ 370.401103] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_cancel: call_vb_qop(3, buf_finish) (nop) [ 370.401105] videobuf2_common: [cap-00000000e59a888f] vb2_core_streamoff: successful [ 370.401110] videobuf2_common: [out-0000000057b84b86] __vb2_queue_cancel: call_qop(stop_streaming) [ 370.401357] videobuf2_common: [out-0000000057b84b86] __vb2_queue_cancel: call_qop(unprepare_streaming) (nop) [ 370.401361] videobuf2_common: [out-0000000057b84b86] __vb2_queue_cancel: call_vb_qop(0, buf_finish) (nop) [ 370.401363] videobuf2_common: [out-0000000057b84b86] __vb2_queue_cancel: call_vb_qop(1, buf_finish) (nop) [ 370.401367] videobuf2_common: [out-0000000057b84b86] __vb2_queue_cancel: call_vb_qop(2, buf_finish) (nop) [ 370.401369] videobuf2_common: [out-0000000057b84b86] __vb2_queue_cancel: call_vb_qop(3, buf_finish) (nop) [ 370.401373] videobuf2_common: [out-0000000057b84b86] vb2_core_streamoff: successful [ 370.401377] videobuf2_common: [cap-00000000e59a888f] vb2_core_streamoff: successful [ 370.401418] vb2_common_vm_close: 0000000095b56358, refcount: 2, vma: ffff9646f000-ffff9651c000 [ 370.401455] vb2_common_vm_close: 000000005cf693ed, refcount: 2, vma: ffff963c2000-ffff9646f000 [ 370.401487] vb2_common_vm_close: 000000000fb3f862, refcount: 2, vma: ffff96315000-ffff963c2000 [ 370.401522] vb2_common_vm_close: 00000000112d3450, refcount: 2, vma: ffff96268000-ffff96315000 [ 370.401529] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_in_use: call_memop(0, num_users) [ 370.401531] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_in_use: call_memop(1, num_users) [ 370.401534] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_in_use: call_memop(2, num_users) [ 370.401536] videobuf2_common: [cap-00000000e59a888f] vb2_buffer_in_use: call_memop(3, num_users) [ 370.401539] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_free: call_vb_qop(0, buf_cleanup) (nop) [ 370.401542] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_free: call_vb_qop(1, buf_cleanup) (nop) [ 370.401545] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_free: call_vb_qop(2, buf_cleanup) (nop) [ 370.401548] videobuf2_common: [cap-00000000e59a888f] __vb2_queue_free: call_vb_qop(3, buf_cleanup) (nop) [ 370.401551] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_free: call_memop(0, put) [ 370.401712] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_free: freed plane 0 of buffer 0 [ 370.401715] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_free: call_memop(1, put) [ 370.401865] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_free: freed plane 0 of buffer 1 [ 370.401867] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_free: call_memop(2, put) [ 370.402016] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_free: freed plane 0 of buffer 2 [ 370.402019] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_free: call_memop(3, put) [ 370.402166] videobuf2_common: [cap-00000000e59a888f] __vb2_buf_mem_free: freed plane 0 of buffer 3 [ 370.402172] videobuf2_common: [out-0000000057b84b86] vb2_core_streamoff: successful [ 370.402230] vb2_common_vm_close: 00000000210e3729, refcount: 2, vma: ffff96927000-ffff96a80000 [ 370.402299] vb2_common_vm_close: 0000000076540d0f, refcount: 2, vma: ffff967ce000-ffff96927000 [ 370.402361] vb2_common_vm_close: 00000000fe5c7906, refcount: 2, vma: ffff96675000-ffff967ce000 [ 370.402428] vb2_common_vm_close: 000000006a194006, refcount: 2, vma: ffff9651c000-ffff96675000 [ 370.402433] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(0, num_users) [ 370.402436] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(1, num_users) [ 370.402438] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(2, num_users) [ 370.402440] videobuf2_common: [out-0000000057b84b86] vb2_buffer_in_use: call_memop(3, num_users) [ 370.402443] videobuf2_common: [out-0000000057b84b86] __vb2_queue_free: call_vb_qop(0, buf_cleanup) (nop) [ 370.402445] videobuf2_common: [out-0000000057b84b86] __vb2_queue_free: call_vb_qop(1, buf_cleanup) (nop) [ 370.402448] videobuf2_common: [out-0000000057b84b86] __vb2_queue_free: call_vb_qop(2, buf_cleanup) (nop) [ 370.402450] videobuf2_common: [out-0000000057b84b86] __vb2_queue_free: call_vb_qop(3, buf_cleanup) (nop) [ 370.402452] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_free: call_memop(0, put) [ 370.402745] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_free: freed plane 0 of buffer 0 [ 370.402748] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_free: call_memop(1, put) [ 370.403037] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_free: freed plane 0 of buffer 1 [ 370.403039] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_free: call_memop(2, put) [ 370.403328] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_free: freed plane 0 of buffer 2 [ 370.403330] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_free: call_memop(3, put) [ 370.403618] videobuf2_common: [out-0000000057b84b86] __vb2_buf_mem_free: freed plane 0 of buffer 3 Do you need other debug output ? I'm fine with firmware expecting specific aligments, but I would expect the driver to error out instead of the firmware. Neil > >> ===========================><================================================= >> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c >> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c >> @@ -194,9 +194,8 @@ static int >> iris_hfi_gen2_set_bitstream_resolution(struct iris_inst *inst, u32 pl >> inst_hfi_gen2->src_subcr_params.bitstream_resolution = >> resolution; >> payload_type = HFI_PAYLOAD_U32; >> } else { >> - codec_align = inst->codec == V4L2_PIX_FMT_HEVC ? 32 : 16; >> - resolution = ALIGN(inst->fmt_dst->fmt.pix_mp.width, >> codec_align) << 16 | >> - ALIGN(inst->fmt_dst->fmt.pix_mp.height, codec_align); >> + resolution = inst->fmt_dst->fmt.pix_mp.width << 16 | >> + inst->fmt_dst->fmt.pix_mp.height; >> inst_hfi_gen2->dst_subcr_params.bitstream_resolution = >> resolution; >> payload_type = HFI_PAYLOAD_32_PACKED; >> } >> ===========================><================================================= >> Did I pass some wrong parameters ? I don't expect the fw to crash. >> >> - On the 1280x720 output bug, I tried the same commands as v2: >> v4l2-ctl --verbose >> --set-fmt-video-out=width=1920,height=1080,pixelformat=NV12 >> --set-selection-output target=crop,top=0,left=0,width=1920,height=1080 >> --set-fmt-video=pixelformat=H264 --stream-mmap --stream-out-mmap >> --stream-from=Big_Buck_Bunny_1080_10s.yuv >> --stream-to=Big_Buck_Bunny_1080_10s.h264 -d /dev/video1 >> >> And I still get a 1280x720 h264 video, did I miss something ? > > The above chnage which you reverted is needed to resolve this bug, > basically if you don't set the resolution aligned with 16 (for H264) and 32 > (for HEVC) firmware will reject the property and encode to some default > resolution which is 720p in this case. > >> >> - Finally I tested the firmware you sent today >> (https://gitlab.com/kernel-firmware/linux-firmware/-/merge_requests/654), >> first thanks a lot for that ! >> >> But then I was unable to encode with this firmware (v2 or v3 patchset), I >> got around all the firmwares >> I got and here's the results: >> | QC_IMAGE_VERSION_STRING | BUILD_DATE >> | Release | decoding | encoding v2 | encoding v3 | >> |-------------------------------------------------------------|-------------|---------------------------------|----------|-------------|-------------| >> | video-firmware.3.4-245082a0a3cc5e740f6340c295000ab4bcfc367d | Aug 24 2023 >> | VIDEO.LA.4.0.r2-02400-lanai.0-1 | OK | OK | KO HEVC | >> | video-firmware.3.4-457429862ac40592d143de942b04d80fd9987e56 | Jan 29 2024 >> | VIDEO.LA.4.0.r2-03800-lanai.0-1 | OK | OK | KO HEVC | >> | video-firmware.3.4-0d8a914b010672616a0d0613e22866c0b639a807 | Aug 14 2024 >> | VIDEO.LA.4.0.r2-05900-lanai.0-1 | OK | KO | KO | >> | video-firmware.3.4-75ad4eb9657cf50ee663b05f78c01d6ceccd5632 | Jan 29 2025 >> | VIDEO.LA.4.0.r2-05900-lanai.0-1 | OK | KO | KO | >> | video-firmware.3.4-e299f99ffcd086b43a2ccc7c3279ce5df404d693 | Aug 14 2025 >> | VIDEO.VPU.3.4-0054 | OK | KO | KO | >> ------------------------------------------------------------------------------------------------------------------------------------------------------ >> >> The change occurs around Aug 14 2024, So I checked the downstream driver >> and I found that fixes the encoding: >> ===========================><================================================= >> --- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c >> +++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c >> @@ -863,9 +863,18 @@ static inline >> u32 size_vpss_line_buf(u32 num_vpp_pipes_enc, u32 frame_height_coded, >> u32 frame_width_coded) >> { >> - return ALIGN(((((((8192) >> 2) << 5) * (num_vpp_pipes_enc)) + 64) + >> - (((((max_t(u32, (frame_width_coded), >> - (frame_height_coded)) + 3) >> 2) << 5) + >> 256) * 16)), 256); >> + u32 vpss_4tap_top = 0, vpss_4tap_left = 0, vpss_div2_top = 0, >> vpss_div2_left = 0, vpss_top_lb = 0, vpss_left_lb = 0, size_left = 0, >> size_top = 0; >> + >> + vpss_4tap_top = ((((max_t(u32, frame_width_coded, >> frame_height_coded) * 2) + 3) >> 2) << 4) + 256; >> + vpss_4tap_left = (((8192 + 3) >> 2) << 5) + 64; >> + vpss_div2_top = (((max_t(u32,frame_width_coded, frame_height_coded) >> + 3) >> 2) << 4) + 256; >> + vpss_div2_left = ((((max_t(u32, frame_width_coded, >> frame_height_coded)* 2) + 3) >> 2) << 5) + 64; >> + vpss_top_lb = (frame_width_coded + 1) << 3; >> + vpss_left_lb = (frame_height_coded << 3) * num_vpp_pipes_enc; >> + size_left = (vpss_4tap_left + vpss_div2_left) * 2 * num_vpp_pipes_enc; >> + size_top = (vpss_4tap_top + vpss_div2_top) * 2; >> + >> + return ALIGN(size_left + size_top + vpss_top_lb + vpss_left_lb, >> DMA_ALIGNMENT); >> } > > Seems this calculation is different for iris3 and iris33, hence you see > this issue on SM8650. > > Updating this calculation in common code will increase the buffer size with > from ~400KB to ~2.2 MBs (for 640x480) and even more for higher resolution. > > @vikash, pls comment if we should update in common code or have this > implemented specific for iris33 separately using some ops. > > Thanks, > Dikshita > >> >> static inline >> ===========================><================================================= >> >> And I checked and encoding still works with the "old" firmwares. >> >> With both changes, I can get H264 & HEVC encoding working on any firmware. >> >> Neil >> >> >>> >>> Commands used for GST validation: >>> >>> gst-launch-1.0 -v filesrc location=/media/cyclists_1280x720_92frames.yuv ! >>> rawvideoparse format=nv12 width=1280 height=720 framerate=30/1 ! v4l2h264enc >>> capture-io-mode=4 output-io-mode=4 ! filesink sync=true >>> location=/tmp/gst_cyclists_1280x720_92frames.h264 >>> >>> gst-launch-1.0 -v filesrc location=/media/cyclists_1280x720_92frames.yuv ! >>> rawvideoparse format=nv12 width=1280 height=720 framerate=30/1 ! v4l2h265enc >>> capture-io-mode=4 output-io-mode=4 ! filesink sync=true >>> location=/tmp/gst_cyclists_1280x720_92frames.hevc >>> >>> The result of v4l2-compliance on SM8550: >>> v4l2-compliance 1.29.0-5270, 64 bits, 64-bit time_t >>> v4l2-compliance SHA: dc947661089e 2024-11-11 10:25:38 >>> >>> Compliance test for iris_driver device /dev/video1: >>> >>> Driver Info: >>> Driver name : iris_driver >>> Card type : Iris Encoder >>> Bus info : platform:aa00000.video-codec >>> Driver version : 6.16.0 >>> Capabilities : 0x84204000 >>> Video Memory-to-Memory Multiplanar >>> Streaming >>> Extended Pix Format >>> Device Capabilities >>> Device Caps : 0x04204000 >>> Video Memory-to-Memory Multiplanar >>> Streaming >>> Extended Pix Format >>> Detected Stateful Encoder >>> >>> Required ioctls: >>> test VIDIOC_QUERYCAP: OK >>> test invalid ioctls: OK >>> >>> Allow for multiple opens: >>> test second /dev/video1 open: OK >>> test VIDIOC_QUERYCAP: OK >>> test VIDIOC_G/S_PRIORITY: OK >>> test for unlimited opens: OK >>> >>> Debug ioctls: >>> test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) >>> test VIDIOC_LOG_STATUS: OK (Not Supported) >>> >>> Input ioctls: >>> test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) >>> test VIDIOC_G/S_FREQUENCY: OK (Not Supported) >>> test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) >>> test VIDIOC_ENUMAUDIO: OK (Not Supported) >>> test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) >>> test VIDIOC_G/S_AUDIO: OK (Not Supported) >>> Inputs: 0 Audio Inputs: 0 Tuners: 0 >>> >>> Output ioctls: >>> test VIDIOC_G/S_MODULATOR: OK (Not Supported) >>> test VIDIOC_G/S_FREQUENCY: OK (Not Supported) >>> test VIDIOC_ENUMAUDOUT: OK (Not Supported) >>> test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) >>> test VIDIOC_G/S_AUDOUT: OK (Not Supported) >>> Outputs: 0 Audio Outputs: 0 Modulators: 0 >>> >>> Input/Output configuration ioctls: >>> test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) >>> test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) >>> test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) >>> test VIDIOC_G/S_EDID: OK (Not Supported) >>> >>> Control ioctls: >>> test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK >>> test VIDIOC_QUERYCTRL: OK >>> test VIDIOC_G/S_CTRL: OK >>> test VIDIOC_G/S/TRY_EXT_CTRLS: OK >>> test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK >>> test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) >>> Standard Controls: 37 Private Controls: 0 >>> >>> Format ioctls: >>> test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK >>> test VIDIOC_G/S_PARM: OK >>> test VIDIOC_G_FBUF: OK (Not Supported) >>> test VIDIOC_G_FMT: OK >>> test VIDIOC_TRY_FMT: OK >>> test VIDIOC_S_FMT: OK >>> test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) >>> test Cropping: OK >>> test Composing: OK (Not Supported) >>> test Scaling: OK (Not Supported) >>> >>> Codec ioctls: >>> test VIDIOC_(TRY_)ENCODER_CMD: OK >>> test VIDIOC_G_ENC_INDEX: OK (Not Supported) >>> test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) >>> >>> Buffer ioctls: >>> test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK >>> test CREATE_BUFS maximum buffers: OK >>> test VIDIOC_REMOVE_BUFS: OK >>> test VIDIOC_EXPBUF: OK >>> test Requests: OK (Not Supported) >>> test blocking wait: OK >>> >>> Test input 0: >>> >>> Streaming ioctls: >>> test read/write: OK (Not Supported) >>> Video Capture Multiplanar: Captured 61 buffers >>> test MMAP (select, REQBUFS): OK >>> Video Capture Multiplanar: Captured 61 buffers >>> test MMAP (epoll, REQBUFS): OK >>> Video Capture Multiplanar: Captured 61 buffers >>> test MMAP (select, CREATE_BUFS): OK >>> Video Capture Multiplanar: Captured 61 buffers >>> test MMAP (epoll, CREATE_BUFS): OK >>> test USERPTR (select): OK (Not Supported) >>> test DMABUF: Cannot test, specify --expbuf-device >>> >>> Total for iris_driver device /dev/video1: 54, Succeeded: 54, Failed: 0, >>> Warnings: 0 >>> >>> The result of v4l2-compliance on SM8250: >>> v4l2-compliance 1.29.0-5270, 64 bits, 64-bit time_t >>> v4l2-compliance SHA: dc947661089e 2024-11-11 10:25:38 >>> >>> Compliance test for iris_driver device /dev/video1: >>> >>> Driver Info: >>> Driver name : iris_driver >>> Card type : Iris Encoder >>> Bus info : platform:aa00000.video-codec >>> Driver version : 6.16.0 >>> Capabilities : 0x84204000 >>> Video Memory-to-Memory Multiplanar >>> Streaming >>> Extended Pix Format >>> Device Capabilities >>> Device Caps : 0x04204000 >>> Video Memory-to-Memory Multiplanar >>> Streaming >>> Extended Pix Format >>> Detected Stateful Encoder >>> >>> Required ioctls: >>> test VIDIOC_QUERYCAP: OK >>> test invalid ioctls: OK >>> >>> Allow for multiple opens: >>> test second /dev/video1 open: OK >>> test VIDIOC_QUERYCAP: OK >>> test VIDIOC_G/S_PRIORITY: OK >>> test for unlimited opens: OK >>> >>> Debug ioctls: >>> test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) >>> test VIDIOC_LOG_STATUS: OK (Not Supported) >>> >>> Input ioctls: >>> test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) >>> test VIDIOC_G/S_FREQUENCY: OK (Not Supported) >>> test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) >>> test VIDIOC_ENUMAUDIO: OK (Not Supported) >>> test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) >>> test VIDIOC_G/S_AUDIO: OK (Not Supported) >>> Inputs: 0 Audio Inputs: 0 Tuners: 0 >>> >>> Output ioctls: >>> test VIDIOC_G/S_MODULATOR: OK (Not Supported) >>> test VIDIOC_G/S_FREQUENCY: OK (Not Supported) >>> test VIDIOC_ENUMAUDOUT: OK (Not Supported) >>> test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) >>> test VIDIOC_G/S_AUDOUT: OK (Not Supported) >>> Outputs: 0 Audio Outputs: 0 Modulators: 0 >>> >>> Input/Output configuration ioctls: >>> test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) >>> test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) >>> test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) >>> test VIDIOC_G/S_EDID: OK (Not Supported) >>> >>> Control ioctls: >>> test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK >>> test VIDIOC_QUERYCTRL: OK >>> test VIDIOC_G/S_CTRL: OK >>> test VIDIOC_G/S/TRY_EXT_CTRLS: OK >>> test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK >>> test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) >>> Standard Controls: 19 Private Controls: 0 >>> >>> Format ioctls: >>> test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK >>> test VIDIOC_G/S_PARM: OK >>> test VIDIOC_G_FBUF: OK (Not Supported) >>> test VIDIOC_G_FMT: OK >>> test VIDIOC_TRY_FMT: OK >>> test VIDIOC_S_FMT: OK >>> test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) >>> test Cropping: OK >>> test Composing: OK (Not Supported) >>> test Scaling: OK (Not Supported) >>> >>> Codec ioctls: >>> test VIDIOC_(TRY_)ENCODER_CMD: OK >>> test VIDIOC_G_ENC_INDEX: OK (Not Supported) >>> test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) >>> >>> Buffer ioctls: >>> test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK >>> test CREATE_BUFS maximum buffers: OK >>> test VIDIOC_REMOVE_BUFS: OK >>> test VIDIOC_EXPBUF: OK >>> test Requests: OK (Not Supported) >>> test blocking wait: OK >>> >>> Test input 0: >>> >>> Streaming ioctls: >>> test read/write: OK (Not Supported) >>> Video Capture Multiplanar: Captured 61 buffers >>> test MMAP (select, REQBUFS): OK >>> Video Capture Multiplanar: Captured 61 buffers >>> test MMAP (epoll, REQBUFS): OK >>> Video Capture Multiplanar: Captured 61 buffers >>> test MMAP (select, CREATE_BUFS): OK >>> Video Capture Multiplanar: Captured 61 buffers >>> test MMAP (epoll, CREATE_BUFS): OK >>> test USERPTR (select): OK (Not Supported) >>> test DMABUF: Cannot test, specify --expbuf-device >>> >>> Total for iris_driver device /dev/video1: 54, Succeeded: 54, Failed: 0, >>> Warnings: 0 >>> >>> Looking forward to your review and feedback. >>> >>> Thanks, >>> Dikshita >>> >>> Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> >>> --- >>> Dikshita Agarwal (26): >>> media: iris: Fix buffer count reporting in internal buffer check >>> media: iris: Report unreleased PERSIST buffers on session close >>> media: iris: Fix memory leak by freeing untracked persist buffer >>> media: iris: Fix port streaming handling >>> media: iris: Allow substate transition to load resources during >>> output streaming >>> media: iris: Always destroy internal buffers on firmware release >>> response >>> media: iris: Update vbuf flags before v4l2_m2m_buf_done >>> media: iris: Simplify session stop logic by relying on vb2 checks >>> media: iris: Allow stop on firmware only if start was issued. >>> media: iris: Send dummy buffer address for all codecs during drain >>> media: iris: Fix missing LAST flag handling during drain >>> media: iris: Fix format check for CAPTURE plane in try_fmt >>> media: iris: Add support for video encoder device >>> media: iris: Initialize and deinitialize encoder instance structure >>> media: iris: Add support for ENUM_FMT, S/G/TRY_FMT encoder >>> media: iris: Add support for ENUM_FRAMESIZES/FRAMEINTERVALS for >>> encoder >>> media: iris: Add support for VIDIOC_QUERYCAP for encoder video device >>> media: iris: Add encoder support for V4L2 event subscription >>> media: iris: Add support for G/S_SELECTION for encoder video device >>> media: iris: Add support for G/S_PARM for encoder video device >>> media: iris: Add platform-specific capabilities for encoder video >>> device >>> media: iris: Add V4L2 streaming support for encoder video device >>> media: iris: Set platform capabilities to firmware for encoder >>> video device >>> media: iris: Allocate and queue internal buffers for encoder video >>> device >>> media: iris: Add support for buffer management ioctls for encoder >>> device >>> media: iris: Add support for drain sequence in encoder video device >>> >>> drivers/media/platform/qcom/iris/Makefile | 5 +- >>> drivers/media/platform/qcom/iris/iris_buffer.c | 220 ++++-- >>> drivers/media/platform/qcom/iris/iris_buffer.h | 7 +- >>> drivers/media/platform/qcom/iris/iris_common.c | 232 ++++++ >>> drivers/media/platform/qcom/iris/iris_common.h | 18 + >>> drivers/media/platform/qcom/iris/iris_core.h | 20 +- >>> drivers/media/platform/qcom/iris/iris_ctrls.c | 675 +++++++++++++++- >>> drivers/media/platform/qcom/iris/iris_ctrls.h | 15 + >>> drivers/media/platform/qcom/iris/iris_hfi_common.h | 2 +- >>> .../platform/qcom/iris/iris_hfi_gen1_command.c | 480 +++++++++--- >>> .../platform/qcom/iris/iris_hfi_gen1_defines.h | 112 ++- >>> .../platform/qcom/iris/iris_hfi_gen1_response.c | 60 +- >>> .../platform/qcom/iris/iris_hfi_gen2_command.c | 359 ++++++--- >>> .../platform/qcom/iris/iris_hfi_gen2_defines.h | 44 +- >>> .../platform/qcom/iris/iris_hfi_gen2_response.c | 46 +- >>> drivers/media/platform/qcom/iris/iris_instance.h | 24 + >>> .../platform/qcom/iris/iris_platform_common.h | 74 +- >>> .../media/platform/qcom/iris/iris_platform_gen2.c | 522 ++++++++++++- >>> .../platform/qcom/iris/iris_platform_qcs8300.h | 352 ++++++++- >>> .../platform/qcom/iris/iris_platform_sm8250.c | 234 +++++- >>> drivers/media/platform/qcom/iris/iris_probe.c | 33 +- >>> drivers/media/platform/qcom/iris/iris_state.c | 9 +- >>> drivers/media/platform/qcom/iris/iris_state.h | 1 + >>> drivers/media/platform/qcom/iris/iris_utils.c | 36 + >>> drivers/media/platform/qcom/iris/iris_utils.h | 2 + >>> drivers/media/platform/qcom/iris/iris_vb2.c | 58 +- >>> drivers/media/platform/qcom/iris/iris_vdec.c | 251 +----- >>> drivers/media/platform/qcom/iris/iris_vdec.h | 13 +- >>> drivers/media/platform/qcom/iris/iris_venc.c | 579 ++++++++++++++ >>> drivers/media/platform/qcom/iris/iris_venc.h | 27 + >>> drivers/media/platform/qcom/iris/iris_vidc.c | 299 +++++++- >>> drivers/media/platform/qcom/iris/iris_vpu_buffer.c | 847 >>> ++++++++++++++++++++- >>> drivers/media/platform/qcom/iris/iris_vpu_buffer.h | 20 + >>> 33 files changed, 4964 insertions(+), 712 deletions(-) >>> --- >>> base-commit: a75b8d198c55e9eb5feb6f6e155496305caba2dc >>> change-id: 20250704-iris-video-encoder-b193350b487a >>> >>> Best regards, >>
On 8/21/2025 6:28 PM, Neil Armstrong wrote: > On 21/08/2025 09:21, Dikshita Agarwal wrote: >> >> >> On 8/20/2025 8:29 PM, Neil Armstrong wrote: >>> Hi, >>> >>> On 20/08/2025 11:07, Dikshita Agarwal wrote: >>>> Hi All, >>>> >>>> This patch series adds support for H.264 and H.265 encoder in iris >>>> driver and includes a few fixes and cleanup in the common code that were >>>> identified during encoder bring-up process. >>>> >>>> The changes include: >>>> - Enabling support for H.264 and H.265 encoding. >>>> - Fixes and improvements in shared componenets used by both encoder and >>>> decoder paths. >>>> - Ensuring compatibility and stability with the existing decoder flow. >>>> >>>> Changes in v3: >>>> - Fixed the log when destroying the interanl buffers (Jorge) >>>> - Updated commit text with issue details in patch 05/25 (Krzysztof) >>>> - Added a patch to simplify conditional logic in stop handling for hfi >>>> gen1 (Bryan) >>>> - Reduced duplicate code while registering video devices (Bryan) >>>> - Added a fix for try fmt handling in decoder (Self) >>>> - Fixed the value of max core mbps for qcs8300 (Vikash) >>>> - Simplied the frame rate handling in driver by using non q16 format and >>>> converted to q16 when setting to firmware (Vikash) >>>> - Fixed the issue with bitstream resolution setting to firmware (Neil) >>>> - Addressed other review comments (Vikash, Bryan) >>>> - Link to v2: >>>> https://lore.kernel.org/r/20250813-iris-video-encoder-v2-0-c725ff673078@quicinc.com >>>> >>>> Changes in v2: >>>> - Fixed sparse/coccinnelle issues. >>>> - Fixed the kernel doc warning. >>>> - Removed unsupported PEAK_BITRATE property from SM8250. >>>> - Dropped patch 04/25 to fix quality issue with encoder. >>>> - Enhanced command handling for encoder to allow start/stop commands. >>>> - Expanded rate control condition checks to include additional rate >>>> control types for HFI Gen2. >>>> - Updated default value to MAX_QP for all caps related to max QP settings. >>>> - Add support for INPUT/OUTPUT_BUF_HOST_MAX_COUNT caps for encoder. >>>> - Link to v1: >>>> https://lore.kernel.org/r/20250704-iris-video-encoder-v1-0-b6ce24e273cf@quicinc.com >>>> >>>> All patches have been tested with v4l2-compliance, v4l2-ctl and >>>> Gstreamer on SM8250 and SM8550 for encoder, at the same time ensured >>>> that the existing decoder functionality remains uneffected. >>>> >>>> Commands used for V4l2-ctl validation: >>>> >>>> v4l2-ctl --verbose >>>> --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 >>>> --set-selection-output target=crop,top=0,left=0,width=1280,height=720 >>>> --set-fmt-video=pixelformat=H264 --stream-mmap --stream-out-mmap >>>> --stream-from=/media/cyclists_1280x720_92frames.yuv >>>> --stream-to=/tmp/cyclists_1280x720_92frames.h264 -d /dev/video1 >>>> >>>> v4l2-ctl --verbose >>>> --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 >>>> --set-selection-output target=crop,top=0,left=0,width=1280,height=720 >>>> --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap >>>> --stream-from=/media/cyclists_1280x720_92frames.yuv >>>> --stream-to=/tmp/cyclists_1280x720_92frames.hevc -d /dev/video1 >>> >>> - I've tested this serie on SM8650, first I failed to get HEVC working with >>> the following command: >>> >>> v4l2-ctl --verbose >>> --set-fmt-video-out=width=1920,height=1080,pixelformat=NV12 >>> --set-selection-output target=crop,top=0,left=0,width=1920,height=1080 >>> --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap >>> --stream-from=Big_Buck_Bunny_1080_10s.yuv >>> --stream-to=Big_Buck_Bunny_1080_10s.hevc -d /dev/video1 >>> >>> I got: >>> qcom-iris aa00000.video-codec: session error received 0x1000005: unknown >>> >>> I checked the diff with v2, and reverting this make HEVC encoding work >>> again: >> >> This is strange, we don't see any such issue on SM8550. >> Could you pls share the full logs. > > I tried again with a 720p stream with your exact command line from the > cover letter > and it still fails with HEVC: > $ v4l2-ctl --verbose > --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 > --set-selection-output target=crop,top=0,left=0,width=1280,height=720 > --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap > --stream-from=Big_Buck_Bunny_720_10s.yuv > --stream-to=Big_Buck_Bunny_720_10s.hevc -d /dev/video1 > VIDIOC_QUERYCAP: ok > VIDIOC_G_FMT: ok > VIDIOC_S_FMT: ok > Format Video Capture Multiplanar: > Width/Height : 320/240 > Pixel Format : 'HEVC' (HEVC) > Field : None > Number of planes : 1 > Flags : > Colorspace : Default > Transfer Function : Default > YCbCr/HSV Encoding: Default > Quantization : Default > Plane 0 : > Bytes per Line : 0 > Size Image : 245760 > VIDIOC_G_FMT: ok > VIDIOC_S_FMT: ok > Format Video Output Multiplanar: > Width/Height : 1280/736 > Pixel Format : 'NV12' (Y/UV 4:2:0) > Field : None > Number of planes : 1 > Flags : > Colorspace : Default > Transfer Function : Default > YCbCr/HSV Encoding: Default > Quantization : Default > Plane 0 : > Bytes per Line : 1280 > Size Image : 1413120 > VIDIOC_G_SELECTION: ok > VIDIOC_S_SELECTION: ok > VIDIOC_G_FMT returned 0 (Success) > VIDIOC_G_FMT returned 0 (Success) > VIDIOC_G_FMT returned 0 (Success) > VIDIOC_REQBUFS returned 0 (Success) > VIDIOC_QUERYBUF returned 0 (Success) > VIDIOC_QUERYBUF returned 0 (Success) > VIDIOC_QUERYBUF returned 0 (Success) > VIDIOC_QUERYBUF returned 0 (Success) > VIDIOC_G_FMT returned 0 (Success) > VIDIOC_QUERYBUF returned 0 (Success) > VIDIOC_G_FMT returned 0 (Success) > VIDIOC_QBUF returned 0 (Success) > VIDIOC_QUERYBUF returned 0 (Success) > VIDIOC_G_FMT returned 0 (Success) > VIDIOC_QBUF returned 0 (Success) > VIDIOC_QUERYBUF returned 0 (Success) > VIDIOC_G_FMT returned 0 (Success) > VIDIOC_QBUF returned 0 (Success) > VIDIOC_QUERYBUF returned 0 (Success) > VIDIOC_G_FMT returned 0 (Success) > VIDIOC_QBUF returned 0 (Success) > VIDIOC_STREAMON returned 0 (Success) > VIDIOC_G_FMT: ok > VIDIOC_DQBUF: failed: Input/output error > out dqbuf: 0 seq: 0 bytesused: 0 ts: 0.000000 field: Any > VIDIOC_DQBUF: failed: Input/output error > Thanks for the logs, but those didn't give any useful info on this issue, We would firmware logs to check this, as we are not able to reproduce this issue on SM8550. Please use below patch to enabled firmware logs and share the debug output. if you see any issue due to higher logging, you can reduce the paylod value for HFI_PROP_DEBUG_LOG_LEVEL to 0x00000018. diff --git a/drivers/media/platform/qcom/iris/iris_hfi_common.c b/drivers/media/platform/qcom/iris/iris_hfi_common.c index 92112eb16c110..b7061faa82ae2 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_common.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_common.c @@ -87,6 +87,10 @@ int iris_hfi_core_init(struct iris_core *core) if (ret) return ret; + ret = hfi_ops->sys_set_debug(core); + if (ret) + return ret; + return hfi_ops->sys_interframe_powercollapse(core); } diff --git a/drivers/media/platform/qcom/iris/iris_hfi_common.h b/drivers/media/platform/qcom/iris/iris_hfi_common.h index b51471fb32c70..edda5a531953d 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_common.h +++ b/drivers/media/platform/qcom/iris/iris_hfi_common.h @@ -108,6 +108,7 @@ struct iris_hfi_prop_type_handle { struct iris_hfi_command_ops { int (*sys_init)(struct iris_core *core); int (*sys_image_version)(struct iris_core *core); + int (*sys_set_debug)(struct iris_core *core); int (*sys_interframe_powercollapse)(struct iris_core *core); int (*sys_pc_prep)(struct iris_core *core); int (*session_set_config_params)(struct iris_inst *inst, u32 plane); diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c index c97e4910e8528..ec3e59c615a40 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c @@ -54,6 +54,23 @@ static int iris_hfi_gen2_sys_image_version(struct iris_core *core) return ret; } +static int iris_hfi_gen2_sys_set_debug(struct iris_core *core) +{ + struct iris_hfi_header *hdr; + int ret; + + hdr = kzalloc(SYS_IFPC_PKT_SIZE, GFP_KERNEL); + if (!hdr) + return -ENOMEM; + + iris_hfi_gen2_packet_set_debug(core, hdr); + ret = iris_hfi_queue_cmd_write_locked(core, hdr, hdr->size); + + kfree(hdr); + + return ret; +} + static int iris_hfi_gen2_sys_interframe_powercollapse(struct iris_core *core) { struct iris_hfi_header *hdr; @@ -1170,6 +1187,7 @@ static int iris_hfi_gen2_session_release_buffer(struct iris_inst *inst, struct i static const struct iris_hfi_command_ops iris_hfi_gen2_command_ops = { .sys_init = iris_hfi_gen2_sys_init, .sys_image_version = iris_hfi_gen2_sys_image_version, + .sys_set_debug = iris_hfi_gen2_sys_set_debug, .sys_interframe_powercollapse = iris_hfi_gen2_sys_interframe_powercollapse, .sys_pc_prep = iris_hfi_gen2_sys_pc_prep, .session_open = iris_hfi_gen2_session_open, diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_defines.h b/drivers/media/platform/qcom/iris/iris_hfi_gen2_defines.h index aa1f795f5626c..4f0f4e95652c1 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_defines.h +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_defines.h @@ -187,6 +187,9 @@ enum hfi_packet_firmware_flags { HFI_FW_FLAGS_SYSTEM_ERROR = 0x00000008, }; +#define HFI_PROP_DEBUG_CONFIG 0x0300000a +#define HFI_PROP_DEBUG_LOG_LEVEL 0x0300000b + struct hfi_debug_header { u32 size; u32 debug_level; diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c index d77fa29f44fc6..14b0abbb8bc02 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c @@ -222,6 +222,33 @@ void iris_hfi_gen2_packet_image_version(struct iris_core *core, struct iris_hfi_ NULL, 0); } +void iris_hfi_gen2_packet_set_debug(struct iris_core *core, struct iris_hfi_header *hdr) +{ + u32 payload = 0; + + iris_hfi_gen2_create_header(hdr, 0, core->header_id++); + + payload = 0; + iris_hfi_gen2_create_packet(hdr, + HFI_PROP_DEBUG_CONFIG, + HFI_HOST_FLAGS_NONE, + HFI_PAYLOAD_U32_ENUM, + HFI_PORT_NONE, + core->packet_id++, + &payload, + sizeof(u32)); + + payload = 0x0000001c; + iris_hfi_gen2_create_packet(hdr, + HFI_PROP_DEBUG_LOG_LEVEL, + HFI_HOST_FLAGS_NONE, + HFI_PAYLOAD_U32_ENUM, + HFI_PORT_NONE, + core->packet_id++, + &payload, + sizeof(u32)); +} + void iris_hfi_gen2_packet_session_command(struct iris_inst *inst, u32 pkt_type, u32 flags, u32 port, u32 session_id, u32 payload_type, void *payload, diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.h b/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.h index 25b9582349ca1..f44c09af694a0 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.h +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.h @@ -121,5 +121,6 @@ void iris_hfi_gen2_packet_session_property(struct iris_inst *inst, void iris_hfi_gen2_packet_sys_interframe_powercollapse(struct iris_core *core, struct iris_hfi_header *hdr); void iris_hfi_gen2_packet_sys_pc_prep(struct iris_core *core, struct iris_hfi_header *hdr); +void iris_hfi_gen2_packet_set_debug(struct iris_core *core, struct iris_hfi_header *hdr); #endif diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c index 2f1f118eae4f6..345e438967ead 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c @@ -949,7 +949,7 @@ static void iris_hfi_gen2_flush_debug_queue(struct iris_core *core, u8 *packet) packet[pkt->size] = '\0'; log = (u8 *)packet + sizeof(*pkt) + 1; - dev_dbg(core->dev, "%s", log); + dev_err(core->dev, "%s", log); } } Thanks, Dikshita
On 22/08/2025 09:02, Dikshita Agarwal wrote: > > > On 8/21/2025 6:28 PM, Neil Armstrong wrote: >> On 21/08/2025 09:21, Dikshita Agarwal wrote: >>> >>> >>> On 8/20/2025 8:29 PM, Neil Armstrong wrote: >>>> Hi, >>>> >>>> On 20/08/2025 11:07, Dikshita Agarwal wrote: >>>>> Hi All, >>>>> >>>>> This patch series adds support for H.264 and H.265 encoder in iris >>>>> driver and includes a few fixes and cleanup in the common code that were >>>>> identified during encoder bring-up process. >>>>> >>>>> The changes include: >>>>> - Enabling support for H.264 and H.265 encoding. >>>>> - Fixes and improvements in shared componenets used by both encoder and >>>>> decoder paths. >>>>> - Ensuring compatibility and stability with the existing decoder flow. >>>>> >>>>> Changes in v3: >>>>> - Fixed the log when destroying the interanl buffers (Jorge) >>>>> - Updated commit text with issue details in patch 05/25 (Krzysztof) >>>>> - Added a patch to simplify conditional logic in stop handling for hfi >>>>> gen1 (Bryan) >>>>> - Reduced duplicate code while registering video devices (Bryan) >>>>> - Added a fix for try fmt handling in decoder (Self) >>>>> - Fixed the value of max core mbps for qcs8300 (Vikash) >>>>> - Simplied the frame rate handling in driver by using non q16 format and >>>>> converted to q16 when setting to firmware (Vikash) >>>>> - Fixed the issue with bitstream resolution setting to firmware (Neil) >>>>> - Addressed other review comments (Vikash, Bryan) >>>>> - Link to v2: >>>>> https://lore.kernel.org/r/20250813-iris-video-encoder-v2-0-c725ff673078@quicinc.com >>>>> >>>>> Changes in v2: >>>>> - Fixed sparse/coccinnelle issues. >>>>> - Fixed the kernel doc warning. >>>>> - Removed unsupported PEAK_BITRATE property from SM8250. >>>>> - Dropped patch 04/25 to fix quality issue with encoder. >>>>> - Enhanced command handling for encoder to allow start/stop commands. >>>>> - Expanded rate control condition checks to include additional rate >>>>> control types for HFI Gen2. >>>>> - Updated default value to MAX_QP for all caps related to max QP settings. >>>>> - Add support for INPUT/OUTPUT_BUF_HOST_MAX_COUNT caps for encoder. >>>>> - Link to v1: >>>>> https://lore.kernel.org/r/20250704-iris-video-encoder-v1-0-b6ce24e273cf@quicinc.com >>>>> >>>>> All patches have been tested with v4l2-compliance, v4l2-ctl and >>>>> Gstreamer on SM8250 and SM8550 for encoder, at the same time ensured >>>>> that the existing decoder functionality remains uneffected. >>>>> >>>>> Commands used for V4l2-ctl validation: >>>>> >>>>> v4l2-ctl --verbose >>>>> --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 >>>>> --set-selection-output target=crop,top=0,left=0,width=1280,height=720 >>>>> --set-fmt-video=pixelformat=H264 --stream-mmap --stream-out-mmap >>>>> --stream-from=/media/cyclists_1280x720_92frames.yuv >>>>> --stream-to=/tmp/cyclists_1280x720_92frames.h264 -d /dev/video1 >>>>> >>>>> v4l2-ctl --verbose >>>>> --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 >>>>> --set-selection-output target=crop,top=0,left=0,width=1280,height=720 >>>>> --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap >>>>> --stream-from=/media/cyclists_1280x720_92frames.yuv >>>>> --stream-to=/tmp/cyclists_1280x720_92frames.hevc -d /dev/video1 >>>> >>>> - I've tested this serie on SM8650, first I failed to get HEVC working with >>>> the following command: >>>> >>>> v4l2-ctl --verbose >>>> --set-fmt-video-out=width=1920,height=1080,pixelformat=NV12 >>>> --set-selection-output target=crop,top=0,left=0,width=1920,height=1080 >>>> --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap >>>> --stream-from=Big_Buck_Bunny_1080_10s.yuv >>>> --stream-to=Big_Buck_Bunny_1080_10s.hevc -d /dev/video1 >>>> >>>> I got: >>>> qcom-iris aa00000.video-codec: session error received 0x1000005: unknown >>>> >>>> I checked the diff with v2, and reverting this make HEVC encoding work >>>> again: >>> >>> This is strange, we don't see any such issue on SM8550. >>> Could you pls share the full logs. >> >> I tried again with a 720p stream with your exact command line from the >> cover letter >> and it still fails with HEVC: >> $ v4l2-ctl --verbose >> --set-fmt-video-out=width=1280,height=720,pixelformat=NV12 >> --set-selection-output target=crop,top=0,left=0,width=1280,height=720 >> --set-fmt-video=pixelformat=HEVC --stream-mmap --stream-out-mmap >> --stream-from=Big_Buck_Bunny_720_10s.yuv >> --stream-to=Big_Buck_Bunny_720_10s.hevc -d /dev/video1 >> VIDIOC_QUERYCAP: ok >> VIDIOC_G_FMT: ok >> VIDIOC_S_FMT: ok >> Format Video Capture Multiplanar: >> Width/Height : 320/240 >> Pixel Format : 'HEVC' (HEVC) >> Field : None >> Number of planes : 1 >> Flags : >> Colorspace : Default >> Transfer Function : Default >> YCbCr/HSV Encoding: Default >> Quantization : Default >> Plane 0 : >> Bytes per Line : 0 >> Size Image : 245760 >> VIDIOC_G_FMT: ok >> VIDIOC_S_FMT: ok >> Format Video Output Multiplanar: >> Width/Height : 1280/736 >> Pixel Format : 'NV12' (Y/UV 4:2:0) >> Field : None >> Number of planes : 1 >> Flags : >> Colorspace : Default >> Transfer Function : Default >> YCbCr/HSV Encoding: Default >> Quantization : Default >> Plane 0 : >> Bytes per Line : 1280 >> Size Image : 1413120 >> VIDIOC_G_SELECTION: ok >> VIDIOC_S_SELECTION: ok >> VIDIOC_G_FMT returned 0 (Success) >> VIDIOC_G_FMT returned 0 (Success) >> VIDIOC_G_FMT returned 0 (Success) >> VIDIOC_REQBUFS returned 0 (Success) >> VIDIOC_QUERYBUF returned 0 (Success) >> VIDIOC_QUERYBUF returned 0 (Success) >> VIDIOC_QUERYBUF returned 0 (Success) >> VIDIOC_QUERYBUF returned 0 (Success) >> VIDIOC_G_FMT returned 0 (Success) >> VIDIOC_QUERYBUF returned 0 (Success) >> VIDIOC_G_FMT returned 0 (Success) >> VIDIOC_QBUF returned 0 (Success) >> VIDIOC_QUERYBUF returned 0 (Success) >> VIDIOC_G_FMT returned 0 (Success) >> VIDIOC_QBUF returned 0 (Success) >> VIDIOC_QUERYBUF returned 0 (Success) >> VIDIOC_G_FMT returned 0 (Success) >> VIDIOC_QBUF returned 0 (Success) >> VIDIOC_QUERYBUF returned 0 (Success) >> VIDIOC_G_FMT returned 0 (Success) >> VIDIOC_QBUF returned 0 (Success) >> VIDIOC_STREAMON returned 0 (Success) >> VIDIOC_G_FMT: ok >> VIDIOC_DQBUF: failed: Input/output error >> out dqbuf: 0 seq: 0 bytesused: 0 ts: 0.000000 field: Any >> VIDIOC_DQBUF: failed: Input/output error >> > > Thanks for the logs, but those didn't give any useful info on this issue, > We would firmware logs to check this, as we are not able to reproduce this > issue on SM8550. > > Please use below patch to enabled firmware logs and share the debug output. > > if you see any issue due to higher logging, you can reduce the paylod value > for HFI_PROP_DEBUG_LOG_LEVEL to 0x00000018. > Here's the fw debug for 720p: [ 156.014030] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723c008:00> Current cmd contains 1 packet(s) [ 156.025851] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723c008:00> Current cmd contains 1 packet(s) [ 156.048597] videobuf2_common: [out-00000000b3188ebe] __setup_offsets: buffer 0, plane 0 offset 0x00000000 [ 156.048740] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723c008:00> Current cmd contains 1 packet(s) [ 156.060239] videobuf2_common: [out-00000000b3188ebe] __setup_offsets: buffer 1, plane 0 offset 0x00008000 [ 156.091521] videobuf2_common: [out-00000000b3188ebe] __setup_offsets: buffer 2, plane 0 offset 0x00010000 [ 156.091557] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723c008:00> Current cmd contains 1 packet(s) [ 156.112758] videobuf2_common: [out-00000000b3188ebe] __setup_offsets: buffer 3, plane 0 offset 0x00018000 [ 156.112760] videobuf2_common: [out-00000000b3188ebe] __vb2_queue_alloc: allocated 4 buffers, 1 plane(s) each [ 156.177110] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723c008:00> HostDriver: Codec 4 Session Created [ 156.199103] videobuf2_common: [out-00000000b3188ebe] vb2_mmap: buffer 0, plane 0 successfully mapped [ 156.216207] videobuf2_common: [out-00000000b3188ebe] vb2_mmap: buffer 1, plane 0 successfully mapped [ 156.225641] videobuf2_common: [out-00000000b3188ebe] vb2_mmap: buffer 2, plane 0 successfully mapped [ 156.235069] videobuf2_common: [out-00000000b3188ebe] vb2_mmap: buffer 3, plane 0 successfully mapped [ 156.245383] videobuf2_common: [out-00000000b3188ebe] vb2_core_qbuf: qbuf of buffer 0 succeeded [ 156.265177] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000539baada [ 156.265180] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 156.265181] v4l2_m2m_try_run: No job pending [ 156.265775] videobuf2_common: [out-00000000b3188ebe] vb2_core_qbuf: qbuf of buffer 1 succeeded [ 156.285938] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000539baada [ 156.285940] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 156.285941] v4l2_m2m_try_run: No job pending [ 156.286521] videobuf2_common: [out-00000000b3188ebe] vb2_core_qbuf: qbuf of buffer 2 succeeded [ 156.306742] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000539baada [ 156.306743] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 156.306745] v4l2_m2m_try_run: No job pending [ 156.307270] videobuf2_common: [out-00000000b3188ebe] vb2_core_qbuf: qbuf of buffer 3 succeeded [ 156.327559] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000539baada [ 156.327561] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 156.327562] v4l2_m2m_try_run: No job pending [ 156.333898] videobuf2_common: [out-00000000b3188ebe] vb2_core_streamon: successful [ 156.336266] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723c008:00> Current cmd contains 1 packet(s) [ 156.347440] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000539baada [ 156.347441] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 156.347442] v4l2_m2m_try_run: No job pending [ 156.358386] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.358391] videobuf2_common: [cap-00000000747aa047] vb2_core_streamoff: successful [ 156.379671] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.379781] videobuf2_common: [cap-00000000747aa047] __setup_offsets: buffer 0, plane 0 offset 0x00000000 [ 156.399741] videobuf2_common: [cap-00000000747aa047] __setup_offsets: buffer 1, plane 0 offset 0x00008000 [ 156.399741] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.411219] videobuf2_common: [cap-00000000747aa047] __setup_offsets: buffer 2, plane 0 offset 0x00010000 [ 156.421223] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.431101] videobuf2_common: [cap-00000000747aa047] __setup_offsets: buffer 3, plane 0 offset 0x00018000 [ 156.441081] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.450912] videobuf2_common: [cap-00000000747aa047] __vb2_queue_alloc: allocated 4 buffers, 1 plane(s) each [ 156.450938] videobuf2_common: [cap-00000000747aa047] vb2_mmap: buffer 0, plane 0 successfully mapped [ 156.460941] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.471063] videobuf2_common: [cap-00000000747aa047] vb2_mmap: buffer 1, plane 0 successfully mapped [ 156.480446] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.490477] videobuf2_common: [cap-00000000747aa047] vb2_mmap: buffer 2, plane 0 successfully mapped [ 156.499865] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.509884] videobuf2_common: [cap-00000000747aa047] vb2_mmap: buffer 3, plane 0 successfully mapped [ 156.519283] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.529295] videobuf2_common: [cap-00000000747aa047] vb2_core_qbuf: qbuf of buffer 0 succeeded [ 156.529296] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000539baada [ 156.538687] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.548707] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 156.548708] v4l2_m2m_try_run: No job pending [ 156.548709] videobuf2_common: [cap-00000000747aa047] vb2_core_qbuf: qbuf of buffer 1 succeeded [ 156.548710] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000539baada [ 156.548710] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 156.548711] v4l2_m2m_try_run: No job pending [ 156.548711] videobuf2_common: [cap-00000000747aa047] vb2_core_qbuf: qbuf of buffer 2 succeeded [ 156.548712] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000539baada [ 156.548712] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 156.557573] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.567585] v4l2_m2m_try_run: No job pending [ 156.567586] videobuf2_common: [cap-00000000747aa047] vb2_core_qbuf: qbuf of buffer 3 succeeded [ 156.567586] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000539baada [ 156.567587] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 156.567587] v4l2_m2m_try_run: No job pending [ 156.568234] videobuf2_common: [cap-00000000747aa047] vb2_core_streamon: successful [ 156.576513] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.585323] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000539baada [ 156.585326] v4l2_m2m_try_run: Running job on m2m_ctx: 00000000539baada [ 156.622122] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.632154] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.642193] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.652223] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.662249] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.672276] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_COLOR_FORMAT) --> 0x00000001 [ 156.683826] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_RAW_RESOLUTION) --> 0x050002e0 [ 156.695557] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 156.707094] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_LINEAR_STRIDE_SCANLINE) --> 0x050002e0 [ 156.719523] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_SIGNAL_COLOR_INFO) --> 0x14000003 [ 156.731507] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 156.742619] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 156.753733] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 156.764671] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 156.775604] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 156.787965] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 156.800325] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 156.811269] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 156.823100] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 156.834763] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 156.846332] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 156.858068] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.868113] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.878162] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.888213] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.898261] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.908309] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.918360] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.928417] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.938466] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.948518] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.958565] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.968615] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.978664] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.988713] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 156.998765] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.008812] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.018865] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.028910] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.038967] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.049026] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.059078] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.069130] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.079184] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.089239] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.099292] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.109342] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.119392] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.129440] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.139492] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.149542] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_BITSTREAM_RESOLUTION) --> 0x050002e0 [ 157.161823] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 157.173386] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_FRAME_RATE) --> 0x001e0000 [ 157.184768] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 157.195895] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 157.207017] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 157.217953] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 157.228889] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 157.241250] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 157.253611] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 157.264554] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 157.276383] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 157.288040] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723e008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 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 [ 157.437461] videobuf2_common: [cap-00000000747aa047] __vb2_wait_for_done_vb: Queue in error state, will not wait for buffers [ 157.444852] qcom-iris aa00000.video-codec: session error received 0x1000005: unknown [ 157.464359] videobuf2_common: [out-00000000b3188ebe] __vb2_wait_for_done_vb: Queue in error state, will not wait for buffers [ 157.464362] qcom-iris aa00000.video-codec: session error received 0x1000005: unknown [ 157.483989] videobuf2_common: [out-00000000b3188ebe] vb2_buffer_done: done processing on buffer 0, state: done [ 157.501256] videobuf2_common: [out-00000000b3188ebe] vb2_buffer_done: done processing on buffer 1, state: done [ 157.511654] videobuf2_common: [out-00000000b3188ebe] vb2_buffer_done: done processing on buffer 2, state: done [ 157.524167] videobuf2_common: [out-00000000b3188ebe] vb2_buffer_done: done processing on buffer 3, state: done [ 157.534706] videobuf2_common: [cap-00000000747aa047] vb2_buffer_done: done processing on buffer 0, state: done [ 157.548756] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 00000000539baada [ 157.548758] __v4l2_m2m_try_queue: Aborted context [ 157.548761] v4l2_m2m_try_run: No job pending [ 157.548762] v4l2_m2m_cancel_job: m2m_ctx 00000000539baada running, will wait to complete [ 157.548791] videobuf2_common: [cap-00000000747aa047] vb2_buffer_done: done processing on buffer 1, state: done [ 157.559268] videobuf2_common: [cap-00000000747aa047] vb2_buffer_done: done processing on buffer 2, state: done [ 157.569579] videobuf2_common: [cap-00000000747aa047] vb2_buffer_done: done processing on buffer 3, state: done [ 157.581887] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.582512] videobuf2_common: [cap-00000000747aa047] vb2_core_streamoff: successful [ 157.600203] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) [ 157.600230] videobuf2_common: [out-00000000b3188ebe] vb2_core_streamoff: successful [ 157.618202] videobuf2_common: [cap-00000000747aa047] vb2_core_streamoff: successful [ 157.626311] videobuf2_common: [cap-00000000747aa047] __vb2_buf_mem_free: freed plane 0 of buffer 0 [ 157.635700] videobuf2_common: [cap-00000000747aa047] __vb2_buf_mem_free: freed plane 0 of buffer 1 [ 157.645066] videobuf2_common: [cap-00000000747aa047] __vb2_buf_mem_free: freed plane 0 of buffer 2 [ 157.654429] videobuf2_common: [cap-00000000747aa047] __vb2_buf_mem_free: freed plane 0 of buffer 3 [ 157.663663] videobuf2_common: [out-00000000b3188ebe] vb2_core_streamoff: successful [ 157.672515] videobuf2_common: [out-00000000b3188ebe] __vb2_buf_mem_free: freed plane 0 of buffer 0 [ 157.682040] videobuf2_common: [out-00000000b3188ebe] __vb2_buf_mem_free: freed plane 0 of buffer 1 [ 157.691531] videobuf2_common: [out-00000000b3188ebe] __vb2_buf_mem_free: freed plane 0 of buffer 2 [ 157.701045] videobuf2_common: [out-00000000b3188ebe] __vb2_buf_mem_free: freed plane 0 of buffer 3 [ 157.711048] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723e008:00> Current cmd contains 1 packet(s) and with 640x480: [ 282.394172] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723c008:00> Current cmd contains 1 packet(s) [ 282.409166] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723c008:00> Current cmd contains 1 packet(s) [ 282.431742] videobuf2_common: [out-0000000066975fcf] __setup_offsets: buffer 0, plane 0 offset 0x00000000 [ 282.431799] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723c008:00> Current cmd contains 1 packet(s) [ 282.447126] videobuf2_common: [out-0000000066975fcf] __setup_offsets: buffer 1, plane 0 offset 0x00008000 [ 282.447189] videobuf2_common: [out-0000000066975fcf] __setup_offsets: buffer 2, plane 0 offset 0x00010000 [ 282.468613] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723c008:00> Current cmd contains 1 packet(s) [ 282.489826] videobuf2_common: [out-0000000066975fcf] __setup_offsets: buffer 3, plane 0 offset 0x00018000 [ 282.489828] videobuf2_common: [out-0000000066975fcf] __vb2_queue_alloc: allocated 4 buffers, 1 plane(s) each [ 282.575556] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723c008:00> HostDriver: Codec 4 Session Created [ 282.587027] videobuf2_common: [out-0000000066975fcf] vb2_mmap: buffer 0, plane 0 successfully mapped [ 282.599638] videobuf2_common: [out-0000000066975fcf] vb2_mmap: buffer 1, plane 0 successfully mapped [ 282.619757] videobuf2_common: [out-0000000066975fcf] vb2_mmap: buffer 2, plane 0 successfully mapped [ 282.629178] videobuf2_common: [out-0000000066975fcf] vb2_mmap: buffer 3, plane 0 successfully mapped [ 282.639035] videobuf2_common: [out-0000000066975fcf] vb2_core_qbuf: qbuf of buffer 0 succeeded [ 282.647911] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 0000000079b61dc9 [ 282.647913] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 282.647914] v4l2_m2m_try_run: No job pending [ 282.648284] videobuf2_common: [out-0000000066975fcf] vb2_core_qbuf: qbuf of buffer 1 succeeded [ 282.666948] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 0000000079b61dc9 [ 282.666949] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 282.666950] v4l2_m2m_try_run: No job pending [ 282.667273] videobuf2_common: [out-0000000066975fcf] vb2_core_qbuf: qbuf of buffer 2 succeeded [ 282.676140] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 0000000079b61dc9 [ 282.676141] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 282.676142] v4l2_m2m_try_run: No job pending [ 282.676505] videobuf2_common: [out-0000000066975fcf] vb2_core_qbuf: qbuf of buffer 3 succeeded [ 282.696438] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 0000000079b61dc9 [ 282.696440] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 282.696441] v4l2_m2m_try_run: No job pending [ 282.700138] videobuf2_common: [out-0000000066975fcf] vb2_core_streamon: successful [ 282.702464] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723c008:00> Current cmd contains 1 packet(s) [ 282.716205] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 0000000079b61dc9 [ 282.716207] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 282.716207] v4l2_m2m_try_run: No job pending [ 282.736985] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 282.736998] videobuf2_common: [cap-00000000cc711ce3] vb2_core_streamoff: successful [ 282.750425] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 282.758641] videobuf2_common: [cap-00000000cc711ce3] __setup_offsets: buffer 0, plane 0 offset 0x00000000 [ 282.770259] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 282.780126] videobuf2_common: [cap-00000000cc711ce3] __setup_offsets: buffer 1, plane 0 offset 0x00008000 [ 282.790099] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 282.799987] videobuf2_common: [cap-00000000cc711ce3] __setup_offsets: buffer 2, plane 0 offset 0x00010000 [ 282.809973] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 282.819860] videobuf2_common: [cap-00000000cc711ce3] __setup_offsets: buffer 3, plane 0 offset 0x00018000 [ 282.829834] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 282.839685] videobuf2_common: [cap-00000000cc711ce3] __vb2_queue_alloc: allocated 4 buffers, 1 plane(s) each [ 282.849710] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 282.859827] videobuf2_common: [cap-00000000cc711ce3] vb2_mmap: buffer 0, plane 0 successfully mapped [ 282.869820] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 282.879231] videobuf2_common: [cap-00000000cc711ce3] vb2_mmap: buffer 1, plane 0 successfully mapped [ 282.889238] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 282.898650] videobuf2_common: [cap-00000000cc711ce3] vb2_mmap: buffer 2, plane 0 successfully mapped [ 282.908664] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 282.918072] videobuf2_common: [cap-00000000cc711ce3] vb2_mmap: buffer 3, plane 0 successfully mapped [ 282.928079] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 282.937474] videobuf2_common: [cap-00000000cc711ce3] vb2_core_qbuf: qbuf of buffer 0 succeeded [ 282.937475] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 0000000079b61dc9 [ 282.937476] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 282.937476] v4l2_m2m_try_run: No job pending [ 282.937478] videobuf2_common: [cap-00000000cc711ce3] vb2_core_qbuf: qbuf of buffer 1 succeeded [ 282.947494] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 282.956358] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 0000000079b61dc9 [ 282.956360] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 282.956361] v4l2_m2m_try_run: No job pending [ 282.956362] videobuf2_common: [cap-00000000cc711ce3] vb2_core_qbuf: qbuf of buffer 2 succeeded [ 282.956363] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 0000000079b61dc9 [ 282.956364] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 282.956364] v4l2_m2m_try_run: No job pending [ 282.956366] videobuf2_common: [cap-00000000cc711ce3] vb2_core_qbuf: qbuf of buffer 3 succeeded [ 282.956366] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 0000000079b61dc9 [ 282.956367] __v4l2_m2m_try_queue: Streaming needs to be on for both queues [ 282.956367] v4l2_m2m_try_run: No job pending [ 282.957187] videobuf2_common: [cap-00000000cc711ce3] vb2_core_streamon: successful [ 282.965294] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 282.975271] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 0000000079b61dc9 [ 282.975273] v4l2_m2m_try_run: Running job on m2m_ctx: 0000000079b61dc9 [ 283.010930] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.020984] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.031021] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.041057] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.051097] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_COLOR_FORMAT) --> 0x00000001 [ 283.062639] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_RAW_RESOLUTION) --> 0x028001e0 [ 283.074374] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 283.085933] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_LINEAR_STRIDE_SCANLINE) --> 0x028001e0 [ 283.098388] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_SIGNAL_COLOR_INFO) --> 0x14000003 [ 283.110399] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 283.121510] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 283.132620] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 283.143556] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 283.154491] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 283.166852] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 283.179213] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 283.190149] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 283.201978] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 283.213641] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 283.225214] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 283.236948] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.247001] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.257049] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.267097] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.277148] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.287196] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.297244] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.307291] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.317341] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.327391] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.337441] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.347494] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.357543] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.367591] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.377696] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_BITSTREAM_RESOLUTION) --> 0x028001e0 [ 283.389980] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 283.401539] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.411589] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.421634] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.431683] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.441732] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.451779] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.461828] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.471881] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.481928] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.491976] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.502027] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.512092] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.522137] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.532186] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.542229] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.552274] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_FRAME_RATE) --> 0x001e0000 [ 283.563652] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 283.574758] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 283.585867] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 283.596803] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 283.607738] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 283.620094] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 283.632457] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 283.643390] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 283.655216] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 283.666854] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 283.678411] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 283.690146] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> Disabling ONE_SLICE mode, tiling:0 numTile:1 CP:0 SliceDelivery:0 MultiSliceMode:0 [ 283.704644] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH, Driver macro size = 23787008 vs FW HFI macro size = 2614784 vs FW golden buffer size = 1923072 [ 283.723415] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a723a008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_NON_COMV, Driver macro size = 274176 vs FW HFI macro size = 274432 vs FW golden buffer size = 274432 [ 283.742809] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:265e:a723a008:00> venc_c2Start(3860): Send HFI_CMD_START error response for port 1 [ 283.755706] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:265e:a723a008:00> VenusVencCodecEmptyThisBuffer(6732): ETB received in wrong state! [ 283.768690] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:265e:a723a008:00> VenusVencCodecEmptyThisBuffer(6732): ETB received in wrong state! [ 283.781675] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:265e:a723a008:00> VenusVencCodecEmptyThisBuffer(6732): ETB received in wrong state! [ 283.794658] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:265e:a723a008:00> VenusVencCodecEmptyThisBuffer(6732): ETB received in wrong state! [ 283.807679] qcom-iris aa00000.video-codec: session error received 0x1000005: unknown [ 283.815686] qcom-iris aa00000.video-codec: session error received 0x1000005: unknown [ 283.816669] videobuf2_common: [cap-00000000cc711ce3] __vb2_wait_for_done_vb: Queue in error state, will not wait for buffers [ 283.823675] qcom-iris aa00000.video-codec: session error received 0x1000005: unknown [ 283.843267] qcom-iris aa00000.video-codec: session error received 0x1000005: unknown [ 283.854795] videobuf2_common: [out-0000000066975fcf] __vb2_wait_for_done_vb: Queue in error state, will not wait for buffers [ 283.866607] videobuf2_common: [out-0000000066975fcf] vb2_buffer_done: done processing on buffer 0, state: done [ 283.880173] videobuf2_common: [out-0000000066975fcf] vb2_buffer_done: done processing on buffer 1, state: done [ 283.891718] videobuf2_common: [out-0000000066975fcf] vb2_buffer_done: done processing on buffer 2, state: done [ 283.903227] videobuf2_common: [out-0000000066975fcf] vb2_buffer_done: done processing on buffer 3, state: done [ 283.917229] __v4l2_m2m_try_queue: Trying to schedule a job for m2m_ctx: 0000000079b61dc9 [ 283.917231] __v4l2_m2m_try_queue: Aborted context [ 283.917236] v4l2_m2m_cancel_job: m2m_ctx 0000000079b61dc9 running, will wait to complete [ 283.917284] videobuf2_common: [cap-00000000cc711ce3] vb2_buffer_done: done processing on buffer 0, state: done [ 283.917286] v4l2_m2m_try_run: No job pending [ 283.927793] videobuf2_common: [cap-00000000cc711ce3] vb2_buffer_done: done processing on buffer 1, state: done [ 283.938108] videobuf2_common: [cap-00000000cc711ce3] vb2_buffer_done: done processing on buffer 2, state: done [ 283.948414] videobuf2_common: [cap-00000000cc711ce3] vb2_buffer_done: done processing on buffer 3, state: done [ 283.961022] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.961974] videobuf2_common: [cap-00000000cc711ce3] vb2_core_streamoff: successful [ 283.979434] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) [ 283.979503] videobuf2_common: [out-0000000066975fcf] vb2_core_streamoff: successful [ 283.997396] videobuf2_common: [cap-00000000cc711ce3] vb2_core_streamoff: successful [ 284.005569] videobuf2_common: [cap-00000000cc711ce3] __vb2_buf_mem_free: freed plane 0 of buffer 0 [ 284.015022] videobuf2_common: [cap-00000000cc711ce3] __vb2_buf_mem_free: freed plane 0 of buffer 1 [ 284.024455] videobuf2_common: [cap-00000000cc711ce3] __vb2_buf_mem_free: freed plane 0 of buffer 2 [ 284.033965] videobuf2_common: [cap-00000000cc711ce3] __vb2_buf_mem_free: freed plane 0 of buffer 3 [ 284.043215] videobuf2_common: [out-0000000066975fcf] vb2_core_streamoff: successful [ 284.051277] videobuf2_common: [out-0000000066975fcf] __vb2_buf_mem_free: freed plane 0 of buffer 0 [ 284.060607] videobuf2_common: [out-0000000066975fcf] __vb2_buf_mem_free: freed plane 0 of buffer 1 [ 284.069920] videobuf2_common: [out-0000000066975fcf] __vb2_buf_mem_free: freed plane 0 of buffer 2 [ 284.079233] videobuf2_common: [out-0000000066975fcf] __vb2_buf_mem_free: freed plane 0 of buffer 3 [ 284.088940] qcom-iris aa00000.video-codec: <VFW_H:HostDr:265e:a723a008:00> Current cmd contains 1 packet(s) When encoding h264 I get: 720p: [ 435.812159] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_COLOR_FORMAT) --> 0x00000001 [ 435.812163] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_RAW_RESOLUTION) --> 0x050002e0 [ 435.812167] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 435.812171] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_LINEAR_STRIDE_SCANLINE) --> 0x050002e0 [ 435.812176] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_SIGNAL_COLOR_INFO) --> 0x14000003 [ 435.812179] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000004 [ 435.812185] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000004 [ 435.812189] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_LEVEL) --> 0x0000000e [ 435.812193] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_LEVEL) --> 0x0000000e [ 435.812196] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 435.812200] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 435.812205] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 435.812209] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 435.812212] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 435.812216] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 435.812220] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 435.812223] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_CABAC_SESSION) --> 0x00000001 [ 435.812227] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_BITSTREAM_RESOLUTION) --> 0x050002d0 [ 435.812231] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 435.812235] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:264e:a723c008:00> encC2SetEncodedFrameCropOffset(2766): Invalid Crop Offset: Right or Bottom is bigger than max offset 15 [ 435.812239] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:264e:a723c008:00> venc_c2SetProperty(4438): Error in SetProperty HFI_PROP_CROP_OFFSETS [ 435.812243] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_FRAME_RATE) --> 0x001e0000 [ 435.812247] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000004 [ 435.812251] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000004 [ 435.812254] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_LEVEL) --> 0x0000000e [ 435.812258] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_LEVEL) --> 0x0000000e [ 435.814198] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 435.814204] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 435.814209] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 435.814212] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 435.814216] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 435.814221] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 435.814224] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 435.814229] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_CABAC_SESSION) --> 0x00000001 [ 435.814232] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> Disabling ONE_SLICE mode, tiling:0 numTile:1 CP:0 SliceDelivery:0 MultiSliceMode:0 [ 435.814237] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH, Driver macro size = 9563648 vs FW HFI macro size = 7797248 vs FW golden buffer size = 5723136 [ 435.814242] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_2, Driver macro size = 5804032 vs FW HFI macro size = 5804032 vs FW golden buffer size = 2899968 [ 435.814246] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> LOAD_RESOURCES [ 435.814250] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_COMV, Driver macro size = 436224 vs FW HFI macro size = 436224 vs FW golden buffer size = 436224 [ 435.814256] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_NON_COMV, Driver macro size = 392448 vs FW HFI macro size = 392448 vs FW golden buffer size = 159488 [ 435.817008] qcom-iris aa00000.video-codec: <VFW_H:WrkDec:264e:a723c008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_LINE, Driver macro size = 509952 vs FW HFI macro size = 509952 vs FW golden buffer size = 93952 [ 435.817020] qcom-iris aa00000.video-codec: <VFW_H:WrkDec:264e:a723c008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_LINE, Driver macro size = 509952 vs FW HFI macro size = 509952 vs FW golden buffer size = 93952 480p: [ 403.967554] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_COLOR_FORMAT) --> 0x00000001 [ 403.967611] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_RAW_RESOLUTION) --> 0x028001e0 [ 403.967614] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 403.967619] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_LINEAR_STRIDE_SCANLINE) --> 0x028001e0 [ 403.967623] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723c008:00> SetProperty(HFI_PROP_SIGNAL_COLOR_INFO) --> 0x14000003 [ 536.001357] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000004 [ 536.001361] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x0000000e [ 536.001364] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x0000000e [ 536.001369] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 536.001372] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 536.001376] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 536.001380] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 536.001383] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 536.001387] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 536.001390] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 536.001393] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_CABAC_SESSION) --> 0x00000001 [ 536.001397] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_BITSTREAM_RESOLUTION) --> 0x028001e0 [ 536.001400] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 536.001404] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_FRAME_RATE) --> 0x001e0000 [ 536.001408] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000004 [ 536.001412] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000004 [ 536.001415] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x0000000e [ 536.001419] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x0000000e [ 536.001423] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 536.001426] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 536.001430] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 536.001433] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 536.001437] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 536.001441] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 536.003117] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 536.003125] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> SetProperty(HFI_PROP_CABAC_SESSION) --> 0x00000001 [ 536.003128] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> Disabling ONE_SLICE mode, tiling:0 numTile:1 CP:0 SliceDelivery:0 MultiSliceMode:0 [ 536.003132] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH, Driver macro size = 23787008 vs FW HFI macro size = 2614784 vs FW golden buffer size = 1923072 [ 536.003136] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_2, Driver macro size = 1921024 vs FW HFI macro size = 1921024 vs FW golden buffer size = 958464 [ 536.003140] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> LOAD_RESOURCES [ 536.003143] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_COMV, Driver macro size = 147456 vs FW HFI macro size = 147456 vs FW golden buffer size = 147456 [ 536.003148] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:a723e008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_NON_COMV, Driver macro size = 313856 vs FW HFI macro size = 313856 vs FW golden buffer size = 86784 [ 536.004955] qcom-iris aa00000.video-codec: <VFW_H:WrkDec:264e:a723e008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_LINE, Driver macro size = 404992 vs FW HFI macro size = 404992 vs FW golden buffer size = 62976 [ 536.005100] qcom-iris aa00000.video-codec: <VFW_H:VppDec:264e:a723e008:00> bOverride_C: 0 bOverride_D: 0 bOverride_E:0 [ 536.005132] qcom-iris aa00000.video-codec: <VFW_H:VppDec:264e:a723e008:00> is_llc_set 0 SCID[0] 0 SCID[1] 0 core_id 0 [ 536.005147] qcom-iris aa00000.video-codec: <VFW_H:WrkDec:264e:a723e008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_LINE, Driver macro size = 404992 vs FW HFI macro size = 404992 vs FW golden buffer size = 62976 1080p: [ 549.781449] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_COLOR_FORMAT) --> 0x00000001 [ 549.781452] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_RAW_RESOLUTION) --> 0x07800440 [ 549.781455] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 549.781459] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_LINEAR_STRIDE_SCANLINE) --> 0x07800440 [ 549.781462] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_SIGNAL_COLOR_INFO) --> 0x14000003 [ 549.781465] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000004 [ 549.781468] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000004 [ 549.781516] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_LEVEL) --> 0x0000000e [ 549.781520] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_LEVEL) --> 0x0000000e [ 549.781523] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 549.781527] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 549.781530] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 549.781533] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 549.781536] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 549.781539] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 549.781542] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 549.781545] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_CABAC_SESSION) --> 0x00000001 [ 549.781548] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_BITSTREAM_RESOLUTION) --> 0x07800438 [ 549.781554] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:264e:96bfa008:00> encC2SetEncodedFrameSize(2713): Invalid Bitstream Resolution: Width or Height has to be aligned to 16 [ 549.781557] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:264e:96bfa008:00> venc_c2SetProperty(4449): Error in SetProperty HFI_PROP_BITSTREAM_RESOLUTION [ 549.781561] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 549.781564] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_FRAME_RATE) --> 0x001e0000 [ 549.781567] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000004 [ 549.781570] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000004 [ 549.781573] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_LEVEL) --> 0x0000000e [ 549.781576] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_LEVEL) --> 0x0000000e [ 549.781579] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 549.781583] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 549.781586] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 549.781589] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 549.781593] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 549.781596] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 549.781599] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 549.781602] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> SetProperty(HFI_PROP_CABAC_SESSION) --> 0x00000001 [ 549.782951] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> Disabling ONE_SLICE mode, tiling:0 numTile:1 CP:0 SliceDelivery:0 MultiSliceMode:0 [ 549.782954] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> VPSS Internal Buffer is not set, Disabling support for DS/Blur + DynamicFlip [ 549.782958] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH, Driver macro size = 21479936 vs FW HFI macro size = 7797248 vs FW golden buffer size = 5723136 [ 549.782962] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_2, Driver macro size = 12636160 vs FW HFI macro size = 5804032 vs FW golden buffer size = 2899968 [ 549.782966] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> LOAD_RESOURCES [ 549.782969] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_COMV, Driver macro size = 983040 vs FW HFI macro size = 436224 vs FW golden buffer size = 436224 [ 549.782973] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:264e:96bfa008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_NON_COMV, Driver macro size = 542720 vs FW HFI macro size = 392448 vs FW golden buffer size = 159488 [ 549.784705] qcom-iris aa00000.video-codec: <VFW_H:WrkDec:264e:96bfa008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_LINE, Driver macro size = 628224 vs FW HFI macro size = 509952 vs FW golden buffer size = 186624 [ 549.784723] qcom-iris aa00000.video-codec: <VFW_H:WrkDec:264e:96bfa008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_LINE, Driver macro size = 628224 vs FW HFI macro size = 509952 vs FW golden buffer size = 186624 => works but I get a 720p stream If I revert the align, I still get errors for 720p ans 480p but 1080p "works" but generates a 720p stream: 720: [ 461.154790] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_COLOR_FORMAT) --> 0x00000001 [ 461.154793] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_RAW_RESOLUTION) --> 0x028001e0 [ 461.154797] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 461.154800] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_LINEAR_STRIDE_SCANLINE) --> 0x028001e0 [ 461.154804] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_SIGNAL_COLOR_INFO) --> 0x14000003 [ 461.154807] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 461.154810] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 461.154814] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 461.154817] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 461.154820] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 461.154823] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 461.154869] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 461.154873] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 461.154876] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 461.154880] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 461.154884] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 461.154887] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_BITSTREAM_RESOLUTION) --> 0x028001e0 [ 461.154891] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 461.154894] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_FRAME_RATE) --> 0x001e0000 [ 461.154897] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 461.154900] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 461.154903] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 461.154906] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 461.154910] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 461.154913] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 461.154916] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 461.154919] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 461.154923] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 461.154926] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 461.154929] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 461.156113] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> Disabling ONE_SLICE mode, tiling:0 numTile:1 CP:0 SliceDelivery:0 MultiSliceMode:0 [ 461.156117] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH, Driver macro size = 23787008 vs FW HFI macro size = 2614784 vs FW golden buffer size = 1923072 [ 461.156120] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_NON_COMV, Driver macro size = 274176 vs FW HFI macro size = 274432 vs FW golden buffer size = 274432 [ 461.156124] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:265e:a3f7e008:00> venc_c2Start(3860): Send HFI_CMD_START error response for port 1 480: [ 461.154790] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_COLOR_FORMAT) --> 0x00000001 [ 461.154793] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_RAW_RESOLUTION) --> 0x028001e0 [ 461.154797] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 461.154800] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_LINEAR_STRIDE_SCANLINE) --> 0x028001e0 [ 461.154804] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_SIGNAL_COLOR_INFO) --> 0x14000003 [ 461.154807] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 461.154810] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 461.154814] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 461.154817] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 461.154820] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 461.154823] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 461.154869] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 461.154873] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 461.154876] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 461.154880] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 461.154884] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 461.154887] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_BITSTREAM_RESOLUTION) --> 0x028001e0 [ 461.154891] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 461.154894] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_FRAME_RATE) --> 0x001e0000 [ 461.154897] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 461.154900] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 461.154903] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 461.154906] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 461.154910] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 461.154913] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 461.154916] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 461.154919] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 461.154923] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 461.154926] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 461.154929] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 461.156113] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> Disabling ONE_SLICE mode, tiling:0 numTile:1 CP:0 SliceDelivery:0 MultiSliceMode:0 [ 461.156117] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH, Driver macro size = 23787008 vs FW HFI macro size = 2614784 vs FW golden buffer size = 1923072 [ 461.156120] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:a3f7e008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_NON_COMV, Driver macro size = 274176 vs FW HFI macro size = 274432 vs FW golden buffer size = 274432 [ 461.156124] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:265e:a3f7e008:00> venc_c2Start(3860): Send HFI_CMD_START error response for port 1 1080p: [ 412.129203] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_COLOR_FORMAT) --> 0x00000001 [ 412.129220] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_RAW_RESOLUTION) --> 0x07800440 [ 412.129237] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 412.129255] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_LINEAR_STRIDE_SCANLINE) --> 0x07800440 [ 412.129272] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_SIGNAL_COLOR_INFO) --> 0x14000003 [ 412.129288] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 412.129304] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 412.129319] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 412.129335] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 412.129351] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 412.129369] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 412.129386] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 412.129403] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 412.129421] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 412.129439] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 412.129457] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 412.129716] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_BITSTREAM_RESOLUTION) --> 0x07800438 [ 412.129735] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:265e:9b15c008:00> encC2SetEncodedFrameSize(2713): Invalid Bitstream Resolution: Width or Height has to be aligned to 32 [ 412.129754] qcom-iris aa00000.video-codec: <VFW_E:CmdDec:265e:9b15c008:00> venc_c2SetProperty(4449): Error in SetProperty HFI_PROP_BITSTREAM_RESOLUTION [ 412.129772] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_CROP_OFFSETS) --> 0x00000000 [ 412.129789] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_FRAME_RATE) --> 0x001e0000 [ 412.129806] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 412.129824] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_PROFILE) --> 0x00000000 [ 412.129840] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 412.129857] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_LEVEL) --> 0x00000007 [ 412.129873] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 412.129890] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_BUFFER_HOST_MAX_COUNT) --> 0x00000040 [ 412.129908] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_STAGE) --> 0x00000002 [ 412.129925] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_SEQ_HEADER_MODE) --> 0x00000002 [ 412.129943] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_TOTAL_BITRATE) --> 0x01312d00 [ 412.129960] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_RATE_CONTROL) --> 0x00000000 [ 412.129976] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> SetProperty(HFI_PROP_MAX_GOP_FRAMES) --> 0x0000003b [ 412.133012] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> Disabling ONE_SLICE mode, tiling:0 numTile:1 CP:0 SliceDelivery:0 MultiSliceMode:0 [ 412.133028] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> VPSS Internal Buffer is not set, Disabling support for DS/Blur + DynamicFlip [ 412.133047] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH, Driver macro size = 21479936 vs FW HFI macro size = 7953920 vs FW golden buffer size = 5833728 [ 412.133065] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_2, Driver macro size = 12636160 vs FW HFI macro size = 5804032 vs FW golden buffer size = 2899968 [ 412.133083] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> LOAD_RESOURCES [ 412.133098] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_COMV, Driver macro size = 458752 vs FW HFI macro size = 206336 vs FW golden buffer size = 206336 [ 412.133116] qcom-iris aa00000.video-codec: <VFW_H:CmdDec:265e:9b15c008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_NON_COMV, Driver macro size = 345344 vs FW HFI macro size = 299264 vs FW golden buffer size = 80640 [ 412.133170] qcom-iris aa00000.video-codec: <VFW_H:WrkDec:265e:9b15c008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_LINE, Driver macro size = 617472 vs FW HFI macro size = 500736 vs FW golden buffer size = 177152 [ 412.134723] qcom-iris aa00000.video-codec: <VFW_H:WrkDec:265e:9b15c008:00> HFI_BUFFER_COMMON_INTERNAL_SCRATCH_1_LINE, Driver macro size = 617472 vs FW HFI macro size = 500736 vs FW golden buffer size = 177152 => works but I get a 720p stream The 1080p encoding probably works because I provide buffers sized for 1080p but it encodes 720p in reality ? Thanks, Neil > > Thanks, > Dikshita
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
On 22/08/2025 12:09, Vikash Garodia wrote: > > 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) Works like a charm ! Do you want me to add it to the iri33 buffer size patch I'm preparing ? Thanks, Neil > > Regards, > Vikash
On 8/22/2025 4:38 PM, Neil Armstrong wrote: > On 22/08/2025 12:09, Vikash Garodia wrote: >> >> 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) > > Works like a charm ! Good to know it worked for you for SM8650. Appreciate your efforts in bringing it up on SM8650. > > Do you want me to add it to the iri33 buffer size patch I'm preparing ? This(non comv) change need to go to common buffer calculation. Dikshita will add in her encoder series. Regards, Vikash > > Thanks, > Neil > >> >> Regards, >> Vikash >
On 8/22/2025 4:38 PM, Neil Armstrong wrote: > On 22/08/2025 12:09, Vikash Garodia wrote: >> >> 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) > > Works like a charm ! Great! > > Do you want me to add it to the iri33 buffer size patch I'm preparing ? This change will go in common code, since it applies to all iris3 generations. Thanks, Dikshita > > Thanks, > Neil > >> >> Regards, >> Vikash >
On 8/21/2025 12:51 PM, Dikshita Agarwal wrote: >> The change occurs around Aug 14 2024, So I checked the downstream driver >> and I found that fixes the encoding: >> ===========================><================================================= >> --- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c >> +++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c >> @@ -863,9 +863,18 @@ static inline >> u32 size_vpss_line_buf(u32 num_vpp_pipes_enc, u32 frame_height_coded, >> u32 frame_width_coded) >> { >> - return ALIGN(((((((8192) >> 2) << 5) * (num_vpp_pipes_enc)) + 64) + >> - (((((max_t(u32, (frame_width_coded), >> - (frame_height_coded)) + 3) >> 2) << 5) + >> 256) * 16)), 256); >> + u32 vpss_4tap_top = 0, vpss_4tap_left = 0, vpss_div2_top = 0, >> vpss_div2_left = 0, vpss_top_lb = 0, vpss_left_lb = 0, size_left = 0, >> size_top = 0; >> + >> + vpss_4tap_top = ((((max_t(u32, frame_width_coded, >> frame_height_coded) * 2) + 3) >> 2) << 4) + 256; >> + vpss_4tap_left = (((8192 + 3) >> 2) << 5) + 64; >> + vpss_div2_top = (((max_t(u32,frame_width_coded, frame_height_coded) >> + 3) >> 2) << 4) + 256; >> + vpss_div2_left = ((((max_t(u32, frame_width_coded, >> frame_height_coded)* 2) + 3) >> 2) << 5) + 64; >> + vpss_top_lb = (frame_width_coded + 1) << 3; >> + vpss_left_lb = (frame_height_coded << 3) * num_vpp_pipes_enc; >> + size_left = (vpss_4tap_left + vpss_div2_left) * 2 * num_vpp_pipes_enc; >> + size_top = (vpss_4tap_top + vpss_div2_top) * 2; >> + >> + return ALIGN(size_left + size_top + vpss_top_lb + vpss_left_lb, >> DMA_ALIGNMENT); >> } > Seems this calculation is different for iris3 and iris33, hence you see > this issue on SM8650. > > Updating this calculation in common code will increase the buffer size with > from ~400KB to ~2.2 MBs (for 640x480) and even more for higher resolution. > > @vikash, pls comment if we should update in common code or have this > implemented specific for iris33 separately using some ops. increasing 1.8 MBs for VGA and assuming it grows further for higher resolution, i would recommend to separate it out for line buffer alone. Neil, We are doing something similar as a preparation for enabling an upcoming SOC, maybe let me share the pseudo code offline with you. When you add encode support for SM8650, you can raise that change to extend the line buffer calculation for iris33. Regards, Vikash
Hi, On 21/08/2025 09:56, Vikash Garodia wrote: > > On 8/21/2025 12:51 PM, Dikshita Agarwal wrote: >>> The change occurs around Aug 14 2024, So I checked the downstream driver >>> and I found that fixes the encoding: >>> ===========================><================================================= >>> --- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c >>> +++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c >>> @@ -863,9 +863,18 @@ static inline >>> u32 size_vpss_line_buf(u32 num_vpp_pipes_enc, u32 frame_height_coded, >>> u32 frame_width_coded) >>> { >>> - return ALIGN(((((((8192) >> 2) << 5) * (num_vpp_pipes_enc)) + 64) + >>> - (((((max_t(u32, (frame_width_coded), >>> - (frame_height_coded)) + 3) >> 2) << 5) + >>> 256) * 16)), 256); >>> + u32 vpss_4tap_top = 0, vpss_4tap_left = 0, vpss_div2_top = 0, >>> vpss_div2_left = 0, vpss_top_lb = 0, vpss_left_lb = 0, size_left = 0, >>> size_top = 0; >>> + >>> + vpss_4tap_top = ((((max_t(u32, frame_width_coded, >>> frame_height_coded) * 2) + 3) >> 2) << 4) + 256; >>> + vpss_4tap_left = (((8192 + 3) >> 2) << 5) + 64; >>> + vpss_div2_top = (((max_t(u32,frame_width_coded, frame_height_coded) >>> + 3) >> 2) << 4) + 256; >>> + vpss_div2_left = ((((max_t(u32, frame_width_coded, >>> frame_height_coded)* 2) + 3) >> 2) << 5) + 64; >>> + vpss_top_lb = (frame_width_coded + 1) << 3; >>> + vpss_left_lb = (frame_height_coded << 3) * num_vpp_pipes_enc; >>> + size_left = (vpss_4tap_left + vpss_div2_left) * 2 * num_vpp_pipes_enc; >>> + size_top = (vpss_4tap_top + vpss_div2_top) * 2; >>> + >>> + return ALIGN(size_left + size_top + vpss_top_lb + vpss_left_lb, >>> DMA_ALIGNMENT); >>> } >> Seems this calculation is different for iris3 and iris33, hence you see >> this issue on SM8650. >> >> Updating this calculation in common code will increase the buffer size with >> from ~400KB to ~2.2 MBs (for 640x480) and even more for higher resolution. >> >> @vikash, pls comment if we should update in common code or have this >> implemented specific for iris33 separately using some ops. > > increasing 1.8 MBs for VGA and assuming it grows further for higher resolution, > i would recommend to separate it out for line buffer alone. > > Neil, > We are doing something similar as a preparation for enabling an upcoming SOC, > maybe let me share the pseudo code offline with you. When you add encode support > for SM8650, you can raise that change to extend the line buffer calculation for > iris33. I don't understand your point, encoding is already enabled with this patchset and works fine with _old_ firmwares, it just completely fail to encode anything with the firmware sent on linux-firmware yesterday. But yes I can provide a fixup patch for vpu33 on top of this serie to be merged in the same time based on your pseudo code. Neil > > Regards, > Vikash
On 8/21/2025 2:14 PM, Neil Armstrong wrote: > Hi, > > On 21/08/2025 09:56, Vikash Garodia wrote: >> >> On 8/21/2025 12:51 PM, Dikshita Agarwal wrote: >>>> The change occurs around Aug 14 2024, So I checked the downstream driver >>>> and I found that fixes the encoding: >>>> ===========================><================================================= >>>> --- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c >>>> +++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c >>>> @@ -863,9 +863,18 @@ static inline >>>> u32 size_vpss_line_buf(u32 num_vpp_pipes_enc, u32 frame_height_coded, >>>> u32 frame_width_coded) >>>> { >>>> - return ALIGN(((((((8192) >> 2) << 5) * (num_vpp_pipes_enc)) + 64) + >>>> - (((((max_t(u32, (frame_width_coded), >>>> - (frame_height_coded)) + 3) >> 2) << 5) + >>>> 256) * 16)), 256); >>>> + u32 vpss_4tap_top = 0, vpss_4tap_left = 0, vpss_div2_top = 0, >>>> vpss_div2_left = 0, vpss_top_lb = 0, vpss_left_lb = 0, size_left = 0, >>>> size_top = 0; >>>> + >>>> + vpss_4tap_top = ((((max_t(u32, frame_width_coded, >>>> frame_height_coded) * 2) + 3) >> 2) << 4) + 256; >>>> + vpss_4tap_left = (((8192 + 3) >> 2) << 5) + 64; >>>> + vpss_div2_top = (((max_t(u32,frame_width_coded, frame_height_coded) >>>> + 3) >> 2) << 4) + 256; >>>> + vpss_div2_left = ((((max_t(u32, frame_width_coded, >>>> frame_height_coded)* 2) + 3) >> 2) << 5) + 64; >>>> + vpss_top_lb = (frame_width_coded + 1) << 3; >>>> + vpss_left_lb = (frame_height_coded << 3) * num_vpp_pipes_enc; >>>> + size_left = (vpss_4tap_left + vpss_div2_left) * 2 * num_vpp_pipes_enc; >>>> + size_top = (vpss_4tap_top + vpss_div2_top) * 2; >>>> + >>>> + return ALIGN(size_left + size_top + vpss_top_lb + vpss_left_lb, >>>> DMA_ALIGNMENT); >>>> } >>> Seems this calculation is different for iris3 and iris33, hence you see >>> this issue on SM8650. >>> >>> Updating this calculation in common code will increase the buffer size with >>> from ~400KB to ~2.2 MBs (for 640x480) and even more for higher resolution. >>> >>> @vikash, pls comment if we should update in common code or have this >>> implemented specific for iris33 separately using some ops. >> >> increasing 1.8 MBs for VGA and assuming it grows further for higher resolution, >> i would recommend to separate it out for line buffer alone. >> >> Neil, >> We are doing something similar as a preparation for enabling an upcoming SOC, >> maybe let me share the pseudo code offline with you. When you add encode support >> for SM8650, you can raise that change to extend the line buffer calculation for >> iris33. > > I don't understand your point, encoding is already enabled with this patchset and > works fine with _old_ firmwares, it just completely fail to encode anything with > the firmware sent on linux-firmware yesterday. IIUC, the patch looks to increase the size of line buffer, and it worked with the firmware could be due to increased size meeting the firmware need. I was trying to say that if there is an increase in size (in MBs), it is not a good idea to increase in common which increases for all enabled SOCs. > > But yes I can provide a fixup patch for vpu33 on top of this serie to be merged > in the same > time based on your pseudo code. Shared with you on a way to abstract the line buffer calculation for iris33 soc. > > Neil > >> >> Regards, >> Vikash >
© 2016 - 2025 Red Hat, Inc.