summaryrefslogtreecommitdiff
path: root/drivers/phy/eswin/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorVishnu Reddy <busanna.reddy@oss.qualcomm.com>2026-05-14 00:28:22 +0530
committerBryan O'Donoghue <bod@kernel.org>2026-05-30 08:41:48 +0100
commitd1c9f40f764ed2a91d2903c25d1962cf43afef89 (patch)
tree527e22d2339cd7f3b3945b0e9e2db0d49d121c0b /drivers/phy/eswin/git@git.tavy.me:linux.git
parent5c66647a5c3e005f9b6a96fe4aa7ec82d2701b4f (diff)
media: iris: optimize COMV buffer allocation for VPU3x and VPU4x
The existing iris_vpu_dec_comv_size() used VIDEO_MAX_FRAME (32) as num_comv count unconditionally when calculating the co-located motion vector (COMV) buffer size. This resulted in an oversized COMV buffer allocation throughout decode session, wasting memory regardless of actual number of buffers required. For VPU3x and VPU4x platforms, introduce iris_vpu3x_4x_dec_comv_size() to replace iris_vpu_dec_comv_size(). These derive num_comv dynamically, it uses inst->fw_min_count once the firmware has reported its buffer requirements, and fallback to output count during initialization before firmware has communicated its requirements. This aligns the COMV buffer size to the actual count needed rather than always allocating with fixed VIDEO_MAX_FRAME value. Additionally, during iris_vdec_inst_init(), fw_min_count was initialized to MIN_BUFFERS instead of 0. This masked the fallback logic and caused the COMV size calculation to use MIN_BUFFERS even before firmware had reported its actual requirements. Fix this by initializing fw_min_count to 0. During testing of 1080p AVC, it reduces the COMV buffer size from 32.89MB to 6.16MB per decode session, significantly reducing memory consumption. Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Diffstat (limited to 'drivers/phy/eswin/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions