From 49f4109b660e0d33c1c7b9857e9005c28d96a385 Mon Sep 17 00:00:00 2001 From: Amruta Bhamidipati Date: Thu, 3 Aug 2023 21:39:11 +0000 Subject: [PATCH] drivers: pva: Fix ver check to pin HW seq buffer While trying to pin HW Sequence buffer, ensure that chip generation is not GEN1 since HW sequencer is not supported only in GEN1. JIRA PVAAS-12257 Change-Id: I3684f6a05f336aeda9be21ba783836bfaf454134 Signed-off-by: abhamidipati Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2948207 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2999159 Reviewed-by: Krish Agarwal Reviewed-by: Omar Nemri Tested-by: Omar Nemri GVS: Gerrit_Virtual_Submit --- drivers/video/tegra/host/pva/pva_dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/tegra/host/pva/pva_dma.c b/drivers/video/tegra/host/pva/pva_dma.c index 4d59d016..68ad22c9 100644 --- a/drivers/video/tegra/host/pva/pva_dma.c +++ b/drivers/video/tegra/host/pva/pva_dma.c @@ -2128,8 +2128,8 @@ int pva_task_write_dma_info(struct pva_submit_task *task, } if (task->hwseq_config.hwseqBuf.pin_id != 0U) { - if (hwgen != PVA_HW_GEN2) { - /* HW sequencer is supported only in HW_GEN2 */ + if (hwgen == PVA_HW_GEN1) { + /* HW sequencer is not supported in HW_GEN1 */ err = -EINVAL; goto out; }