diff --git a/drivers/video/tegra/host/nvdla/Makefile b/drivers/video/tegra/host/nvdla/Makefile
index 30ad855b..f54534e0 100644
--- a/drivers/video/tegra/host/nvdla/Makefile
+++ b/drivers/video/tegra/host/nvdla/Makefile
@@ -21,5 +21,6 @@ endif
ifdef CONFIG_TEGRA_T23X_GRHOST
ccflags-y += -I$(srctree.nvidia-t23x)/drivers/video/tegra/host
+ccflags-y += -I$(srctree.nvidia-t23x)/drivers/video/tegra/host/nvdla
endif
diff --git a/drivers/video/tegra/host/nvdla/dla_fw_version.h b/drivers/video/tegra/host/nvdla/dla_fw_version.h
deleted file mode 100644
index aec0acd7..00000000
--- a/drivers/video/tegra/host/nvdla/dla_fw_version.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * NVDLA OS Interface
- *
- * Copyright (c) 2016-2019, NVIDIA Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef DLA_FW_VERSION_H
-#define DLA_FW_VERSION_H
-
-#define FIRMWARE_VERSION_MAJOR 0x1UL
-#define FIRMWARE_VERSION_MINOR 0x1UL
-#define FIRMWARE_VERSION_SUBMINOR 0x3UL
-
-static inline uint32_t dla_version(void)
-{
- return (((FIRMWARE_VERSION_MAJOR & 0xffU) << 16) |
- ((FIRMWARE_VERSION_MINOR & 0xffU) << 8) |
- ((FIRMWARE_VERSION_SUBMINOR & 0xffU)));
-}
-
-#endif
diff --git a/drivers/video/tegra/host/nvdla/dla_t19x_fw_version.h b/drivers/video/tegra/host/nvdla/dla_t19x_fw_version.h
new file mode 100644
index 00000000..6c97668b
--- /dev/null
+++ b/drivers/video/tegra/host/nvdla/dla_t19x_fw_version.h
@@ -0,0 +1,31 @@
+/*
+ * NVDLA OS Interface
+ *
+ * Copyright (c) 2016-2020, NVIDIA Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ */
+
+#ifndef DLA_T19X_FW_VERSION_H
+#define DLA_T19X_FW_VERSION_H
+
+#define FIRMWARE_T19X_VERSION_MAJOR 0x1UL
+#define FIRMWARE_T19X_VERSION_MINOR 0x2UL
+#define FIRMWARE_T19X_VERSION_SUBMINOR 0x0UL
+
+static inline uint32_t dla_t19x_fw_version(void)
+{
+ return (((FIRMWARE_T19X_VERSION_MAJOR & 0xffU) << 16) |
+ ((FIRMWARE_T19X_VERSION_MINOR & 0xffU) << 8) |
+ ((FIRMWARE_T19X_VERSION_SUBMINOR & 0xffU)));
+}
+
+#endif /* End of DLA_T19X_FW_VERSION_H */
diff --git a/drivers/video/tegra/host/nvdla/nvdla.c b/drivers/video/tegra/host/nvdla/nvdla.c
index 7ec77834..e53152b9 100644
--- a/drivers/video/tegra/host/nvdla/nvdla.c
+++ b/drivers/video/tegra/host/nvdla/nvdla.c
@@ -48,7 +48,6 @@
#include "nvdla/nvdla_buffer.h"
#include "nvdla/nvdla_debug.h"
#include
-#include "dla_fw_version.h"
#include "dla_os_interface.h"
#include "class_ids_t194.h"
@@ -623,7 +622,8 @@ int nvhost_nvdla_finalize_poweron(struct platform_device *pdev)
}
fw_ver_read_bin = host1x_readl(pdev, NV_DLA_OS_VERSION);
- firmware_version = dla_version();
+
+ firmware_version = pdata->version;
if ((firmware_version & 0xffff00) != (fw_ver_read_bin & 0xffff00)) {
nvdla_dbg_err(pdev,
diff --git a/drivers/video/tegra/host/nvdla/nvdla.h b/drivers/video/tegra/host/nvdla/nvdla.h
index 2aa3a6cc..630e5777 100644
--- a/drivers/video/tegra/host/nvdla/nvdla.h
+++ b/drivers/video/tegra/host/nvdla/nvdla.h
@@ -26,10 +26,17 @@
#include
#include
-
#include "nvdla_buffer.h"
#include "dla_os_interface.h"
-#include "dla_fw_version.h"
+#include "dla_t19x_fw_version.h"
+
+/*
+ * macro to encode firmware version
+ */
+#define FIRMWARE_ENCODE_VERSION(chip) \
+ (((FIRMWARE_##chip##_VERSION_MAJOR & 0xffU) << 16) | \
+ ((FIRMWARE_##chip##_VERSION_MINOR & 0xffU) << 8) | \
+ ((FIRMWARE_##chip##_VERSION_SUBMINOR & 0xffU)))
#define ALIGNED_DMA(x) ((x >> 8) & 0xffffffff)