Commit dd631e8a authored by Thierry Reding's avatar Thierry Reding

drm/tegra: vic: Skip stream ID programming without IOMMU

If VIC is not behind an IOMMU, don't touch any of the registers related
to stream ID programming.
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 0301196b
...@@ -97,6 +97,9 @@ static int vic_runtime_suspend(struct device *dev) ...@@ -97,6 +97,9 @@ static int vic_runtime_suspend(struct device *dev)
static int vic_boot(struct vic *vic) static int vic_boot(struct vic *vic)
{ {
#ifdef CONFIG_IOMMU_API
struct iommu_fwspec *spec = dev_iommu_fwspec_get(vic->dev);
#endif
u32 fce_ucode_size, fce_bin_data_offset; u32 fce_ucode_size, fce_bin_data_offset;
void *hdr; void *hdr;
int err = 0; int err = 0;
...@@ -105,15 +108,14 @@ static int vic_boot(struct vic *vic) ...@@ -105,15 +108,14 @@ static int vic_boot(struct vic *vic)
return 0; return 0;
#ifdef CONFIG_IOMMU_API #ifdef CONFIG_IOMMU_API
if (vic->config->supports_sid) { if (vic->config->supports_sid && spec) {
struct iommu_fwspec *spec = dev_iommu_fwspec_get(vic->dev);
u32 value; u32 value;
value = TRANSCFG_ATT(1, TRANSCFG_SID_FALCON) | value = TRANSCFG_ATT(1, TRANSCFG_SID_FALCON) |
TRANSCFG_ATT(0, TRANSCFG_SID_HW); TRANSCFG_ATT(0, TRANSCFG_SID_HW);
vic_writel(vic, value, VIC_TFBIF_TRANSCFG); vic_writel(vic, value, VIC_TFBIF_TRANSCFG);
if (spec && spec->num_ids > 0) { if (spec->num_ids > 0) {
value = spec->ids[0] & 0xffff; value = spec->ids[0] & 0xffff;
vic_writel(vic, value, VIC_THI_STREAMID0); vic_writel(vic, value, VIC_THI_STREAMID0);
......
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