mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 17:55:05 +03:00
video: tegra: host: nvdla: update firmware version
Increase firmware version as interface is changed significantly after firmware integration from HW tree. Also, include dla_fw_version.h directly instead of defining version. Jira DLA-216 Jira DLA-234 Change-Id: I63e40e4bb13d9932b9893b46724267790f6c3822 Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-on: http://git-master/r/1258114 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
a9592c05f0
commit
25eec664e7
33
drivers/video/tegra/host/nvdla/dla_fw_version.h
Normal file
33
drivers/video/tegra/host/nvdla/dla_fw_version.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* NVDLA OS Interface
|
||||
*
|
||||
* Copyright (c) 2016, 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _DLA_FW_VERSION_H_
|
||||
#define _DLA_FW_VERSION_H_
|
||||
|
||||
#define FIRMWARE_VERSION_MAJOR 0x00
|
||||
#define FIRMWARE_VERSION_MINOR 0x03
|
||||
#define FIRMWARE_VERSION_SUBMINOR 0x00
|
||||
|
||||
static inline uint32_t dla_version(void)
|
||||
{
|
||||
return (uint32_t)(((FIRMWARE_VERSION_MAJOR & 0xff) << 16) |
|
||||
((FIRMWARE_VERSION_MINOR & 0xff) << 8) |
|
||||
((FIRMWARE_VERSION_SUBMINOR & 0xff)));
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "nvdla/nvdla.h"
|
||||
#include "nvdla/nvdla_debug.h"
|
||||
#include <linux/nvhost_nvdla_ioctl.h>
|
||||
#include "dla_fw_version.h"
|
||||
#include "dla_os_interface.h"
|
||||
|
||||
/**
|
||||
@@ -304,6 +305,7 @@ int nvhost_nvdla_finalize_poweron(struct platform_device *pdev)
|
||||
{
|
||||
int ret = 0;
|
||||
uint32_t fw_ver_read_bin;
|
||||
uint32_t firmware_version;
|
||||
struct nvhost_device_data *pdata = platform_get_drvdata(pdev);
|
||||
struct nvdla_device *nvdla_dev = pdata->private_data;
|
||||
|
||||
@@ -316,10 +318,12 @@ int nvhost_nvdla_finalize_poweron(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
fw_ver_read_bin = host1x_readl(pdev, NV_DLA_OS_VERSION);
|
||||
if (FIRMWARE_VERSION != fw_ver_read_bin) {
|
||||
firmware_version = dla_version();
|
||||
|
||||
if (firmware_version != fw_ver_read_bin) {
|
||||
nvdla_dbg_err(pdev,
|
||||
"Fw version of kernel [%u.%u.%u] doesn't match with actual version[%u.%u.%u]",
|
||||
(FIRMWARE_VERSION >> 16) & 0xff, (FIRMWARE_VERSION >> 8) & 0xff, FIRMWARE_VERSION & 0xff,
|
||||
(firmware_version >> 16) & 0xff, (firmware_version >> 8) & 0xff, firmware_version & 0xff,
|
||||
(fw_ver_read_bin >> 16 ) & 0xff, (fw_ver_read_bin >> 8) & 0xff, fw_ver_read_bin & 0xff);
|
||||
|
||||
return -EINVAL;
|
||||
|
||||
@@ -41,14 +41,6 @@
|
||||
#define ACTION_OPCODE_WRITE_SEM 0x80
|
||||
#define ACTION_OPCODE_READ_SEM 0x90
|
||||
|
||||
/* TODO: Get versioning details through firmware interface headers */
|
||||
#define FIRMWARE_VERSION_MAJOR 0x00
|
||||
#define FIRMWARE_VERSION_MINOR 0x02
|
||||
#define FIRMWARE_VERSION_SUBMINOR 0x00
|
||||
#define FIRMWARE_VERSION (((FIRMWARE_VERSION_MAJOR & 0xff) << 16) | \
|
||||
((FIRMWARE_VERSION_MINOR & 0xff) << 8) | \
|
||||
((FIRMWARE_VERSION_SUBMINOR & 0xff)))
|
||||
|
||||
/**
|
||||
* Maximum number of queue's per engine
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user