#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/host1x.h>
#include <linux/iommu.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
#include <soc/tegra/pmc.h>
#include "drm.h"
#include "falcon.h"
#include "vic.h"
struct vic_config { … };
struct vic { … };
static inline struct vic *to_vic(struct tegra_drm_client *client)
{ … }
static void vic_writel(struct vic *vic, u32 value, unsigned int offset)
{ … }
static int vic_boot(struct vic *vic)
{ … }
static int vic_init(struct host1x_client *client)
{ … }
static int vic_exit(struct host1x_client *client)
{ … }
static const struct host1x_client_ops vic_client_ops = …;
static int vic_load_firmware(struct vic *vic)
{ … }
static int __maybe_unused vic_runtime_resume(struct device *dev)
{ … }
static int __maybe_unused vic_runtime_suspend(struct device *dev)
{ … }
static int vic_open_channel(struct tegra_drm_client *client,
struct tegra_drm_context *context)
{ … }
static void vic_close_channel(struct tegra_drm_context *context)
{ … }
static int vic_can_use_memory_ctx(struct tegra_drm_client *client, bool *supported)
{ … }
static const struct tegra_drm_client_ops vic_ops = …;
#define NVIDIA_TEGRA_124_VIC_FIRMWARE …
static const struct vic_config vic_t124_config = …;
#define NVIDIA_TEGRA_210_VIC_FIRMWARE …
static const struct vic_config vic_t210_config = …;
#define NVIDIA_TEGRA_186_VIC_FIRMWARE …
static const struct vic_config vic_t186_config = …;
#define NVIDIA_TEGRA_194_VIC_FIRMWARE …
static const struct vic_config vic_t194_config = …;
#define NVIDIA_TEGRA_234_VIC_FIRMWARE …
static const struct vic_config vic_t234_config = …;
static const struct of_device_id tegra_vic_of_match[] = …;
MODULE_DEVICE_TABLE(of, tegra_vic_of_match);
static int vic_probe(struct platform_device *pdev)
{ … }
static void vic_remove(struct platform_device *pdev)
{ … }
static const struct dev_pm_ops vic_pm_ops = …;
struct platform_driver tegra_vic_driver = …;
#if IS_ENABLED(CONFIG_ARCH_TEGRA_124_SOC)
MODULE_FIRMWARE(NVIDIA_TEGRA_124_VIC_FIRMWARE);
#endif
#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
MODULE_FIRMWARE(NVIDIA_TEGRA_210_VIC_FIRMWARE);
#endif
#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC)
MODULE_FIRMWARE(NVIDIA_TEGRA_186_VIC_FIRMWARE);
#endif
#if IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC)
MODULE_FIRMWARE(NVIDIA_TEGRA_194_VIC_FIRMWARE);
#endif
#if IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC)
MODULE_FIRMWARE(NVIDIA_TEGRA_234_VIC_FIRMWARE);
#endif