Commit 46f226c9 authored by Mikko Perttunen's avatar Mikko Perttunen Committed by Thierry Reding

drm/tegra: Add NVDEC driver

Add support for booting and using NVDEC on Tegra210, Tegra186
and Tegra194 to the Host1x and TegraDRM drivers. Booting in
secure mode is not currently supported.
Signed-off-by: default avatarMikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent cae7472e
...@@ -23,7 +23,8 @@ tegra-drm-y := \ ...@@ -23,7 +23,8 @@ tegra-drm-y := \
gr2d.o \ gr2d.o \
gr3d.o \ gr3d.o \
falcon.o \ falcon.o \
vic.o vic.o \
nvdec.o
tegra-drm-y += trace.o tegra-drm-y += trace.o
......
...@@ -1344,15 +1344,18 @@ static const struct of_device_id host1x_drm_subdevs[] = { ...@@ -1344,15 +1344,18 @@ static const struct of_device_id host1x_drm_subdevs[] = {
{ .compatible = "nvidia,tegra210-sor", }, { .compatible = "nvidia,tegra210-sor", },
{ .compatible = "nvidia,tegra210-sor1", }, { .compatible = "nvidia,tegra210-sor1", },
{ .compatible = "nvidia,tegra210-vic", }, { .compatible = "nvidia,tegra210-vic", },
{ .compatible = "nvidia,tegra210-nvdec", },
{ .compatible = "nvidia,tegra186-display", }, { .compatible = "nvidia,tegra186-display", },
{ .compatible = "nvidia,tegra186-dc", }, { .compatible = "nvidia,tegra186-dc", },
{ .compatible = "nvidia,tegra186-sor", }, { .compatible = "nvidia,tegra186-sor", },
{ .compatible = "nvidia,tegra186-sor1", }, { .compatible = "nvidia,tegra186-sor1", },
{ .compatible = "nvidia,tegra186-vic", }, { .compatible = "nvidia,tegra186-vic", },
{ .compatible = "nvidia,tegra186-nvdec", },
{ .compatible = "nvidia,tegra194-display", }, { .compatible = "nvidia,tegra194-display", },
{ .compatible = "nvidia,tegra194-dc", }, { .compatible = "nvidia,tegra194-dc", },
{ .compatible = "nvidia,tegra194-sor", }, { .compatible = "nvidia,tegra194-sor", },
{ .compatible = "nvidia,tegra194-vic", }, { .compatible = "nvidia,tegra194-vic", },
{ .compatible = "nvidia,tegra194-nvdec", },
{ /* sentinel */ } { /* sentinel */ }
}; };
...@@ -1376,6 +1379,7 @@ static struct platform_driver * const drivers[] = { ...@@ -1376,6 +1379,7 @@ static struct platform_driver * const drivers[] = {
&tegra_gr2d_driver, &tegra_gr2d_driver,
&tegra_gr3d_driver, &tegra_gr3d_driver,
&tegra_vic_driver, &tegra_vic_driver,
&tegra_nvdec_driver,
}; };
static int __init host1x_drm_init(void) static int __init host1x_drm_init(void)
......
...@@ -202,5 +202,6 @@ extern struct platform_driver tegra_sor_driver; ...@@ -202,5 +202,6 @@ extern struct platform_driver tegra_sor_driver;
extern struct platform_driver tegra_gr2d_driver; extern struct platform_driver tegra_gr2d_driver;
extern struct platform_driver tegra_gr3d_driver; extern struct platform_driver tegra_gr3d_driver;
extern struct platform_driver tegra_vic_driver; extern struct platform_driver tegra_vic_driver;
extern struct platform_driver tegra_nvdec_driver;
#endif /* HOST1X_DRM_H */ #endif /* HOST1X_DRM_H */
This diff is collapsed.
...@@ -132,6 +132,12 @@ static const struct host1x_sid_entry tegra186_sid_table[] = { ...@@ -132,6 +132,12 @@ static const struct host1x_sid_entry tegra186_sid_table[] = {
.offset = 0x30, .offset = 0x30,
.limit = 0x34 .limit = 0x34
}, },
{
/* NVDEC */
.base = 0x1b00,
.offset = 0x30,
.limit = 0x34
},
}; };
static const struct host1x_info host1x06_info = { static const struct host1x_info host1x06_info = {
...@@ -156,6 +162,18 @@ static const struct host1x_sid_entry tegra194_sid_table[] = { ...@@ -156,6 +162,18 @@ static const struct host1x_sid_entry tegra194_sid_table[] = {
.offset = 0x30, .offset = 0x30,
.limit = 0x34 .limit = 0x34
}, },
{
/* NVDEC */
.base = 0x1b00,
.offset = 0x30,
.limit = 0x34
},
{
/* NVDEC1 */
.base = 0x1bc0,
.offset = 0x30,
.limit = 0x34
},
}; };
static const struct host1x_info host1x07_info = { static const struct host1x_info host1x07_info = {
......
...@@ -17,6 +17,8 @@ enum host1x_class { ...@@ -17,6 +17,8 @@ enum host1x_class {
HOST1X_CLASS_GR2D_SB = 0x52, HOST1X_CLASS_GR2D_SB = 0x52,
HOST1X_CLASS_VIC = 0x5D, HOST1X_CLASS_VIC = 0x5D,
HOST1X_CLASS_GR3D = 0x60, HOST1X_CLASS_GR3D = 0x60,
HOST1X_CLASS_NVDEC = 0xF0,
HOST1X_CLASS_NVDEC1 = 0xF5,
}; };
struct host1x; struct host1x;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment