media: venus: hfi_venus: Restrict writing SCIACMDARG3 to Venus V1/V2
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Tue, 30 May 2023 12:30:51 +0000 (14:30 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 10 Aug 2023 05:58:35 +0000 (07:58 +0200)
This write was last present on msm-3.10, which means before HFI3XX
platforms were introduced. Guard it with an appropriate if condition.

Does not seem to have any adverse effects on at least SM8250.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/qcom/venus/hfi_venus.c

index 82854553f99ea40c8163e9f2ce4a5f79ec9390d6..19fc6575a489105f824f9275c8f05650d25d440a 100644 (file)
@@ -462,7 +462,8 @@ static int venus_boot_core(struct venus_hfi_device *hdev)
        }
 
        writel(mask_val, wrapper_base + WRAPPER_INTR_MASK);
-       writel(1, cpu_cs_base + CPU_CS_SCIACMDARG3);
+       if (IS_V1(hdev->core))
+               writel(1, cpu_cs_base + CPU_CS_SCIACMDARG3);
 
        writel(BIT(VIDC_CTRL_INIT_CTRL_SHIFT), cpu_cs_base + VIDC_CTRL_INIT);
        while (!ctrl_status && count < max_tries) {