File df9e50c.diff of Package nvidia-open-driver-G06-signed-sidecar

diff --git a/drivers/platform/tegra/rtcpu/ivc-bus.c b/drivers/platform/tegra/rtcpu/ivc-bus.c
index 2ed87cb..84fc774 100644
--- a/drivers/platform/tegra/rtcpu/ivc-bus.c
+++ b/drivers/platform/tegra/rtcpu/ivc-bus.c
@@ -15,6 +15,10 @@
 #include <linux/version.h>
 #include "soc/tegra/camrtc-channels.h"
 
+#if defined(NV_TEGRA_IVC_STRUCT_HAS_IOSYS_MAP)
+#include <linux/iosys-map.h>
+#endif
+
 #define NV(p) "nvidia," #p
 
 #define CAMRTC_IVC_CONFIG_SIZE	4096
@@ -79,6 +83,9 @@
 		struct camrtc_hsp *camhsp)
 {
 	struct camrtc_tlv_ivc_setup *tlv;
+#if defined(NV_TEGRA_IVC_STRUCT_HAS_IOSYS_MAP)
+	struct iosys_map rx_map, tx_map;
+#endif
 	struct {
 		u32 rx;
 		u32 tx;
@@ -161,6 +168,21 @@
 	region->ivc_size += queue_size;
 	end.tx = region->ivc_size;
 
+#if defined(NV_TEGRA_IVC_STRUCT_HAS_IOSYS_MAP)
+	iosys_map_set_vaddr(&rx_map, (void *)(region->base + start.rx));
+	iosys_map_set_vaddr(&tx_map, (void *)(region->base + start.tx));
+
+	/* Init IVC */
+	ret = tegra_ivc_init(&chan->ivc,
+			NULL,
+			&rx_map,
+			region->iova + start.rx,
+			&tx_map,
+			region->iova + start.tx,
+			nframes, frame_size,
+			tegra_ivc_channel_ring,
+			(void *)camhsp);
+#else
 	/* Init IVC */
 	ret = tegra_ivc_init(&chan->ivc,
 			NULL,
@@ -171,6 +193,7 @@
 			nframes, frame_size,
 			tegra_ivc_channel_ring,
 			(void *)camhsp);
+#endif
 	if (ret) {
 		dev_err(&chan->dev, "IVC initialization error: %d\n", ret);
 		goto error;
openSUSE Build Service is sponsored by