mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 17:55:05 +03:00
Define tsec_t186_config/tsecb_t186_config and tsec_t186_ops for TSEC Define .load_regs = tsec_load_streamid_regs() for TSEC streamid support Bug 1704301 Change-Id: Ibf3219973627802ee4301c5a23e766d9953dbc3b Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1029501 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
55 lines
1.6 KiB
C
55 lines
1.6 KiB
C
/*
|
|
* 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/>.
|
|
*/
|
|
|
|
#include "drm.h"
|
|
#include "tsec_t186.h"
|
|
|
|
#include <linux/iommu.h>
|
|
|
|
static int tsec_load_streamid_regs(struct tegra_drm_client *client)
|
|
{
|
|
struct tsec *tsec = to_tsec(client);
|
|
int streamid = -EINVAL;
|
|
|
|
streamid = iommu_get_hwid(tsec->dev->archdata.iommu, tsec->dev, 0);
|
|
|
|
if (streamid >= 0) {
|
|
tsec_writel(tsec, streamid, TSEC_THI_STREAMID0);
|
|
tsec_writel(tsec, streamid, TSEC_THI_STREAMID1);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
static const struct tegra_drm_client_ops tsec_t186_ops = {
|
|
.open_channel = tsec_open_channel,
|
|
.close_channel = tsec_close_channel,
|
|
.submit = tegra_drm_submit,
|
|
.load_regs = tsec_load_streamid_regs,
|
|
};
|
|
|
|
const struct tsec_config tsec_t186_config = {
|
|
.ucode_name = "tegra18x/nvhost_tsec.fw",
|
|
.drm_client_ops = &tsec_t186_ops,
|
|
.class_id = HOST1X_CLASS_TSEC,
|
|
};
|
|
|
|
const struct tsec_config tsecb_t186_config = {
|
|
.ucode_name = "tegra18x/nvhost_tsec.fw",
|
|
.drm_client_ops = &tsec_t186_ops,
|
|
.class_id = HOST1X_CLASS_TSECB,
|
|
};
|