hi all,
here’s a known issue with JP-6.0 GA/ l4t-r36.3.0, which images captured through VI-mode results in abnormal lines.
please refer to below snapshot for demonstration of such line artifacts.
besides, we’ve several similar topics has reported,
for instance,
Topic 299235: Jetpack 6.0: Clusters of null values on the captured camera image
Topic 295598: Video4Linux shows artifacts when nvgstcapture does not
Topic 292692: Vi error when update 36.3.0
this issue only repo’ed via VI mode, it should not seen by going through LibArgus.
also, this is due to memory issue. since upstream has changed the property name to "dma-noncoherent"
. if a device is coherent, the CPU/Device syncs are skipped by the kernel.
hence…
here’re two fixes to address the issue.
(1) device tree for tegra234-camera, to update DT property for VI HW.
---
diff --git a/nv-soc/tegra234-soc-camera.dtsi b/nv-soc/tegra234-soc-camera.dtsi
index 85dfb96..81d441c 100644
--- a/nv-soc/tegra234-soc-camera.dtsi
+++ b/nv-soc/tegra234-soc-camera.dtsi
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
-// SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+// SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
/*
* tegra234-soc-camera.dtsi: Camera RTCPU DTSI file.
@@ -28,7 +28,7 @@
iommus = <&smmu_iso TEGRA234_SID_ISO_VI>;
interconnects = <&mc TEGRA234_MEMORY_CLIENT_VIW &emc>;
interconnect-names = "write";
- non-coherent;
+ dma-noncoherent;
status = "okay";
};
@@ -37,7 +37,7 @@
resets = <&bpmp TEGRA234_RESET_VI>;
reset-names = "vi0_thi";
iommus = <&smmu_iso TEGRA234_SID_ISO_VI>;
- non-coherent;
+ dma-noncoherent;
interconnects = <&mc TEGRA234_MEMORY_CLIENT_VI2FALR &emc>,
<&mc TEGRA234_MEMORY_CLIENT_VI2FALW &emc>;
interconnect-names = "dma-mem", "write";
@@ -54,7 +54,7 @@
iommus = <&smmu_iso TEGRA234_SID_ISO_VI2>;
interconnects = <&mc TEGRA234_MEMORY_CLIENT_VI2W &emc>;
interconnect-names = "write";
- non-coherent;
+ dma-noncoherent;
status = "okay";
};
@@ -63,7 +63,7 @@
resets = <&bpmp TEGRA234_RESET_VI2>;
reset-names = "vi1_thi";
iommus = <&smmu_iso TEGRA234_SID_ISO_VI2>;
- non-coherent;
+ dma-noncoherent;
interconnects = <&mc TEGRA234_MEMORY_CLIENT_VIFALR &emc>,
<&mc TEGRA234_MEMORY_CLIENT_VIFALW &emc>;
interconnect-names = "dma-mem", "write";
(2) kernel logic to handle dma-noncoherent in of_dma_is_coherent()
---
diff --git a/drivers/of/address.c b/drivers/of/address.c
index 4b0c036..b9b3685 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -1095,26 +1095,29 @@
*
* It returns true if "dma-coherent" property was found
* for this device in the DT, or if DMA is coherent by
- * default for OF devices on the current platform.
+ * default for OF devices on the current platform and no
+ * "dma-noncoherent" property was found for this device.
*/
bool of_dma_is_coherent(struct device_node *np)
{
struct device_node *node;
-
- if (IS_ENABLED(CONFIG_OF_DMA_DEFAULT_COHERENT))
- return true;
+ bool is_coherent = IS_ENABLED(CONFIG_OF_DMA_DEFAULT_COHERENT);
node = of_node_get(np);
while (node) {
if (of_property_read_bool(node, "dma-coherent")) {
- of_node_put(node);
- return true;
+ is_coherent = true;
+ break;
+ }
+ if (of_property_read_bool(node, "dma-noncoherent")) {
+ is_coherent = false;
+ break;
}
node = of_get_next_dma_parent(node);
}
of_node_put(node);
- return false;
+ return is_coherent;
}
EXPORT_SYMBOL_GPL(of_dma_is_coherent);
furthermore, we’ve done the code-review progress.
please also expect next Jetpack-6 public release version will also include the fixes.