mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
drm/tegra: add T186 support to VIC
Define vic_t186_config and vic_t186_ops for VIC Define .load_regs = vic_load_streamid_regs() for VIC streamid support Bug 1704301 Change-Id: Ib364c773c6c340c30e2644ef0baca500d89de55c Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1023439 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
969bd376ed
commit
27cb8a37fc
7
drivers/gpu/drm/tegra/Makefile
Normal file
7
drivers/gpu/drm/tegra/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
ccflags-y += -Idrivers/gpu/drm/tegra
|
||||
ccflags-y += -I../kernel-t18x/drivers/gpu/drm/tegra
|
||||
|
||||
tegra-drm-t186-y = \
|
||||
vic_t186.o
|
||||
|
||||
obj-$(CONFIG_TEGRA_HOST1X) += tegra-drm-t186.o
|
||||
48
drivers/gpu/drm/tegra/vic_t186.c
Normal file
48
drivers/gpu/drm/tegra/vic_t186.c
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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 "vic_t186.h"
|
||||
|
||||
#include <linux/iommu.h>
|
||||
|
||||
static int vic_load_streamid_regs(struct tegra_drm_client *client)
|
||||
{
|
||||
struct vic *vic = to_vic(client);
|
||||
int streamid = -EINVAL;
|
||||
|
||||
streamid = iommu_get_hwid(vic->dev->archdata.iommu, vic->dev, 0);
|
||||
|
||||
if (streamid >= 0) {
|
||||
vic_writel(vic, streamid, VIC_THI_STREAMID0);
|
||||
vic_writel(vic, streamid, VIC_THI_STREAMID1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct tegra_drm_client_ops vic_t186_ops = {
|
||||
.open_channel = vic_open_channel,
|
||||
.close_channel = vic_close_channel,
|
||||
.is_addr_reg = vic_is_addr_reg,
|
||||
.submit = tegra_drm_submit,
|
||||
.load_regs = vic_load_streamid_regs,
|
||||
};
|
||||
|
||||
const struct vic_config vic_t186_config = {
|
||||
.ucode_name = "tegra18x/vic04_ucode.bin",
|
||||
.drm_client_ops = &vic_t186_ops,
|
||||
};
|
||||
27
drivers/gpu/drm/tegra/vic_t186.h
Normal file
27
drivers/gpu/drm/tegra/vic_t186.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* 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 TEGRA_VIC_T186_H
|
||||
#define TEGRA_VIC_T186_H
|
||||
|
||||
#include "vic.h"
|
||||
|
||||
#define VIC_THI_STREAMID0 0x30
|
||||
#define VIC_THI_STREAMID1 0x34
|
||||
|
||||
extern const struct vic_config vic_t186_config;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user