Skip to content
/ linux Public

Commit 52920a8

Browse files
dikshita-agarwalSasha Levin
authored andcommitted
media: venus: vdec: restrict EOS addr quirk to IRIS2 only
[ Upstream commit 63c072e ] On SM8250 (IRIS2) with firmware older than 1.0.087, the firmware could not handle a dummy device address for EOS buffers, so a NULL device address is sent instead. The existing check used IS_V6() alongside a firmware version gate: if (IS_V6(core) && is_fw_rev_or_older(core, 1, 0, 87)) fdata.device_addr = 0; else fdata.device_addr = 0xdeadb000; However, SC7280 which is also V6, uses a firmware string of the form "1.0.<commit-hash>", which the version parser translates to 1.0.0. This unintentionally satisfies the `is_fw_rev_or_older(..., 1, 0, 87)` condition on SC7280. Combined with IS_V6() matching there as well, the quirk is incorrectly applied to SC7280, causing VP9 decode failures. Constrain the check to IRIS2 (SM8250) only, which is the only platform that needed this quirk, by replacing IS_V6() with IS_IRIS2(). This restores correct behavior on SC7280 (no forced NULL EOS buffer address). Fixes: 47f867c ("media: venus: fix EOS handling in decoder stop command") Cc: stable@vger.kernel.org Reported-by: Mecid <mecid@mecomediagroup.de> Closes: qualcomm-linux/kernel-topics#222 Co-developed-by: Renjiang Han <renjiang.han@oss.qualcomm.com> Signed-off-by: Renjiang Han <renjiang.han@oss.qualcomm.com> Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> Tested-by: Renjiang Han <renjiang.han@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 225f222 commit 52920a8

File tree

1 file changed

+7
-1
lines changed
  • drivers/media/platform/qcom/venus

1 file changed

+7
-1
lines changed

drivers/media/platform/qcom/venus/vdec.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,13 @@ vdec_decoder_cmd(struct file *file, void *fh, struct v4l2_decoder_cmd *cmd)
568568

569569
fdata.buffer_type = HFI_BUFFER_INPUT;
570570
fdata.flags |= HFI_BUFFERFLAG_EOS;
571-
if (IS_V6(inst->core) && is_fw_rev_or_older(inst->core, 1, 0, 87))
571+
572+
/* Send NULL EOS addr for only IRIS2 (SM8250),for firmware <= 1.0.87.
573+
* SC7280 also reports "1.0.<hash>" parsed as 1.0.0; restricting to IRIS2
574+
* avoids misapplying this quirk and breaking VP9 decode on SC7280.
575+
*/
576+
577+
if (IS_IRIS2(inst->core) && is_fw_rev_or_older(inst->core, 1, 0, 87))
572578
fdata.device_addr = 0;
573579
else
574580
fdata.device_addr = 0xdeadb000;

0 commit comments

Comments
 (0)